diff --git a/contracts/NFT/ERC721UpgradableAirdroppable.sol b/contracts/NFT/ERC721AirdroppableUpgradable.sol similarity index 91% rename from contracts/NFT/ERC721UpgradableAirdroppable.sol rename to contracts/NFT/ERC721AirdroppableUpgradable.sol index 24727b3..a8b8af6 100644 --- a/contracts/NFT/ERC721UpgradableAirdroppable.sol +++ b/contracts/NFT/ERC721AirdroppableUpgradable.sol @@ -2,7 +2,7 @@ // Compatible with OpenZeppelin Contracts ^5.0.0 pragma solidity ^0.8.20; -import {ERC721UpgradableBase} from "./ERC721UpgradableBase.sol"; +import {ERC721BaseUpgradable} from "./ERC721BaseUpgradable.sol"; struct AirdropRecipient { address receiver; @@ -19,7 +19,7 @@ interface IAirdroppable { function airdrop(AirdropRecipient[] calldata receivers) external; } -abstract contract ERC721UpgradableAirdroppable is ERC721UpgradableBase, IAirdroppable { +abstract contract ERC721AirdroppableUpgradable is ERC721BaseUpgradable, IAirdroppable { error AirdropMintingLocked(uint256 numMinted); event AirDropLocked(uint256 numMinted); diff --git a/contracts/NFT/ERC721UpgradableBase.sol b/contracts/NFT/ERC721BaseUpgradable.sol similarity index 98% rename from contracts/NFT/ERC721UpgradableBase.sol rename to contracts/NFT/ERC721BaseUpgradable.sol index 158b5d3..81be5a0 100644 --- a/contracts/NFT/ERC721UpgradableBase.sol +++ b/contracts/NFT/ERC721BaseUpgradable.sol @@ -10,7 +10,7 @@ import {ERC721URIStorageUpgradeable} from "@openzeppelin/contracts-upgradeable/t import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; -abstract contract ERC721UpgradableBase is +abstract contract ERC721BaseUpgradable is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, diff --git a/contracts/NFT/ERC721UpgradableNonTransferrable.sol b/contracts/NFT/ERC721NonTransferrableUpgradable.sol similarity index 86% rename from contracts/NFT/ERC721UpgradableNonTransferrable.sol rename to contracts/NFT/ERC721NonTransferrableUpgradable.sol index 7f75d2f..849456d 100644 --- a/contracts/NFT/ERC721UpgradableNonTransferrable.sol +++ b/contracts/NFT/ERC721NonTransferrableUpgradable.sol @@ -4,9 +4,9 @@ pragma solidity ^0.8.20; import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; -import {ERC721UpgradableBase} from "./ERC721UpgradableBase.sol"; +import {ERC721BaseUpgradable} from "./ERC721BaseUpgradable.sol"; -abstract contract ERC721UpgradableNonTransferrable is ERC721UpgradableBase { +abstract contract ERC721NonTransferrableUpgradable is ERC721BaseUpgradable { error TransfersDisabled(); /** diff --git a/contracts/NFT/ExternalContributorsEcosystemPartner.sol b/contracts/NFT/OGContributorsRootstockCollective.sol similarity index 61% rename from contracts/NFT/ExternalContributorsEcosystemPartner.sol rename to contracts/NFT/OGContributorsRootstockCollective.sol index 0d4b407..5b07a81 100644 --- a/contracts/NFT/ExternalContributorsEcosystemPartner.sol +++ b/contracts/NFT/OGContributorsRootstockCollective.sol @@ -4,20 +4,17 @@ pragma solidity ^0.8.20; import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; -import {ERC721UpgradableAirdroppable} from "./ERC721UpgradableAirdroppable.sol"; -import {ERC721UpgradableNonTransferrable} from "./ERC721UpgradableNonTransferrable.sol"; +import {ERC721AirdroppableUpgradable} from "./ERC721AirdroppableUpgradable.sol"; +import {ERC721NonTransferrableUpgradable} from "./ERC721NonTransferrableUpgradable.sol"; -contract ExternalContributorsEcosystemPartner is - ERC721UpgradableAirdroppable, - ERC721UpgradableNonTransferrable -{ +contract OGContributorsRootstockCollective is ERC721AirdroppableUpgradable, ERC721NonTransferrableUpgradable { /// @custom:oz-upgrades-unsafe-allow constructor constructor() { _disableInitializers(); } function initialize(address initialOwner) public initializer { - __ERC721UpgradableBase_init("OGExternalContributorsEcosystemPartner", "OGECEP", initialOwner); + __ERC721UpgradableBase_init("OGContributorsRootstockCollective", "OGC", initialOwner); } function _authorizeUpgrade(address newImplementation) internal virtual override onlyOwner {} @@ -30,14 +27,14 @@ contract ExternalContributorsEcosystemPartner is function approve( address to, uint256 tokenId - ) public virtual override(IERC721, ERC721Upgradeable, ERC721UpgradableNonTransferrable) { + ) public virtual override(IERC721, ERC721Upgradeable, ERC721NonTransferrableUpgradable) { super.approve(to, tokenId); } function setApprovalForAll( address operator, bool approved - ) public virtual override(IERC721, ERC721Upgradeable, ERC721UpgradableNonTransferrable) { + ) public virtual override(IERC721, ERC721Upgradeable, ERC721NonTransferrableUpgradable) { super.setApprovalForAll(operator, approved); } @@ -45,7 +42,7 @@ contract ExternalContributorsEcosystemPartner is address from, address to, uint256 tokenId - ) public virtual override(IERC721, ERC721Upgradeable, ERC721UpgradableNonTransferrable) { + ) public virtual override(IERC721, ERC721Upgradeable, ERC721NonTransferrableUpgradable) { super.transferFrom(from, to, tokenId); } } diff --git a/contracts/NFT/OGFounders.sol b/contracts/NFT/OGFoundersRootstockCollective.sol similarity index 96% rename from contracts/NFT/OGFounders.sol rename to contracts/NFT/OGFoundersRootstockCollective.sol index f816d4c..1a050d5 100644 --- a/contracts/NFT/OGFounders.sol +++ b/contracts/NFT/OGFoundersRootstockCollective.sol @@ -5,9 +5,9 @@ pragma solidity ^0.8.20; import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol"; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; -import {ERC721UpgradableNonTransferrable} from "./ERC721UpgradableNonTransferrable.sol"; +import {ERC721NonTransferrableUpgradable} from "./ERC721NonTransferrableUpgradable.sol"; -contract OGFounders is ERC721UpgradableNonTransferrable { +contract OGFoundersRootstockCollective is ERC721NonTransferrableUpgradable { using Strings for uint8; error WasNotEnoughStRIFToMint(uint stRIF); diff --git a/contracts/NFT/OgFoundersEcosystemPartner.sol b/contracts/NFT/OGPartnersRootstockCollective.sol similarity index 61% rename from contracts/NFT/OgFoundersEcosystemPartner.sol rename to contracts/NFT/OGPartnersRootstockCollective.sol index 78df847..793dd21 100644 --- a/contracts/NFT/OgFoundersEcosystemPartner.sol +++ b/contracts/NFT/OGPartnersRootstockCollective.sol @@ -4,17 +4,17 @@ pragma solidity ^0.8.20; import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; -import {ERC721UpgradableAirdroppable} from "./ERC721UpgradableAirdroppable.sol"; -import {ERC721UpgradableNonTransferrable} from "./ERC721UpgradableNonTransferrable.sol"; +import {ERC721AirdroppableUpgradable} from "./ERC721AirdroppableUpgradable.sol"; +import {ERC721NonTransferrableUpgradable} from "./ERC721NonTransferrableUpgradable.sol"; -contract OgFoundersEcosystemPartner is ERC721UpgradableAirdroppable, ERC721UpgradableNonTransferrable { +contract OGPartnersRootstockCollective is ERC721AirdroppableUpgradable, ERC721NonTransferrableUpgradable { /// @custom:oz-upgrades-unsafe-allow constructor constructor() { _disableInitializers(); } function initialize(address initialOwner) public initializer { - __ERC721UpgradableBase_init("OgFoundersEcosystemPartner", "OGFEP", initialOwner); + __ERC721UpgradableBase_init("OGPartnersRootstockCollective", "OGP", initialOwner); } function _authorizeUpgrade(address newImplementation) internal virtual override onlyOwner {} @@ -28,14 +28,14 @@ contract OgFoundersEcosystemPartner is ERC721UpgradableAirdroppable, ERC721Upgra function approve( address to, uint256 tokenId - ) public virtual override(IERC721, ERC721Upgradeable, ERC721UpgradableNonTransferrable) { + ) public virtual override(IERC721, ERC721Upgradeable, ERC721NonTransferrableUpgradable) { super.approve(to, tokenId); } function setApprovalForAll( address operator, bool approved - ) public virtual override(IERC721, ERC721Upgradeable, ERC721UpgradableNonTransferrable) { + ) public virtual override(IERC721, ERC721Upgradeable, ERC721NonTransferrableUpgradable) { super.setApprovalForAll(operator, approved); } @@ -43,7 +43,7 @@ contract OgFoundersEcosystemPartner is ERC721UpgradableAirdroppable, ERC721Upgra address from, address to, uint256 tokenId - ) public virtual override(IERC721, ERC721Upgradeable, ERC721UpgradableNonTransferrable) { + ) public virtual override(IERC721, ERC721Upgradeable, ERC721NonTransferrableUpgradable) { super.transferFrom(from, to, tokenId); } } diff --git a/ignition/modules/ExternalContributorsEcosystemPartner.ts b/ignition/modules/OGContributorsModule.ts similarity index 54% rename from ignition/modules/ExternalContributorsEcosystemPartner.ts rename to ignition/modules/OGContributorsModule.ts index 4e468a9..faffc89 100644 --- a/ignition/modules/ExternalContributorsEcosystemPartner.ts +++ b/ignition/modules/OGContributorsModule.ts @@ -1,8 +1,8 @@ import { buildModule } from '@nomicfoundation/hardhat-ignition/modules' -export const extContributersEpProxyModule = buildModule('ExtContributorsEP', m => { +export const ogContributorsModule = buildModule('OGContributors', m => { // deploy implementation - const implementation = m.contract('ExternalContributorsEcosystemPartner', [], { id: 'Implementation' }) + const implementation = m.contract('OGContributorsRootstockCollective', [], { id: 'Implementation' }) const deployer = m.getAccount(0) // deploy proxy @@ -12,11 +12,11 @@ export const extContributersEpProxyModule = buildModule('ExtContributorsEP', m = id: 'Proxy', }), ]) - const ExtContributorsEP = m.contractAt('ExternalContributorsEcosystemPartner', proxy, { + const ExtContributorsEP = m.contractAt('OGContributorsRootstockCollective', proxy, { id: 'Contract', }) return { ExtContributorsEP } }) -export default extContributersEpProxyModule +export default ogContributorsModule diff --git a/ignition/modules/OGFounders.ts b/ignition/modules/OGFoundersModule.ts similarity index 67% rename from ignition/modules/OGFounders.ts rename to ignition/modules/OGFoundersModule.ts index 6813ac2..e49f35c 100644 --- a/ignition/modules/OGFounders.ts +++ b/ignition/modules/OGFoundersModule.ts @@ -1,8 +1,8 @@ import { buildModule } from '@nomicfoundation/hardhat-ignition/modules' -export const OGFoundersProxyModule = buildModule('OGFounders', m => { +export const OGFoundersModule = buildModule('OGFounders', m => { // deploy implementation - const implementation = m.contract('OGFounders', [], { id: 'Implementation' }) + const implementation = m.contract('OGFoundersRootstockCollective', [], { id: 'Implementation' }) // initializer parameters const deployer = m.getAccount(0) @@ -16,11 +16,11 @@ export const OGFoundersProxyModule = buildModule('OGFounders', m => { id: 'Proxy', }), ]) - const OGFounders = m.contractAt('OGFounders', proxy, { + const OGFounders = m.contractAt('OGFoundersRootstockCollective', proxy, { id: 'Contract', }) return { OGFounders } }) -export default OGFoundersProxyModule +export default OGFoundersModule diff --git a/ignition/modules/OgFoundersEP.ts b/ignition/modules/OGPartnersModule.ts similarity index 58% rename from ignition/modules/OgFoundersEP.ts rename to ignition/modules/OGPartnersModule.ts index 45b83db..b575c2c 100644 --- a/ignition/modules/OgFoundersEP.ts +++ b/ignition/modules/OGPartnersModule.ts @@ -1,8 +1,8 @@ import { buildModule } from '@nomicfoundation/hardhat-ignition/modules' -export const ogFoundersEpProxyModule = buildModule('OgFoundersEP', m => { +export const ogPartnersModule = buildModule('OGPartners', m => { // deploy implementation - const implementation = m.contract('OgFoundersEcosystemPartner', [], { id: 'Implementation' }) + const implementation = m.contract('OGPartnersRootstockCollective', [], { id: 'Implementation' }) // initializer parameters const deployer = m.getAccount(0) @@ -14,11 +14,11 @@ export const ogFoundersEpProxyModule = buildModule('OgFoundersEP', m => { id: 'Proxy', }), ]) - const ogFoundersEp = m.contractAt('OgFoundersEcosystemPartner', proxy, { + const ogFoundersEp = m.contractAt('OGPartnersRootstockCollective', proxy, { id: 'Contract', }) return { ogFoundersEp } }) -export default ogFoundersEpProxyModule +export default ogPartnersModule diff --git a/test/Governor.test.ts b/test/Governor.test.ts index bb50778..f661547 100644 --- a/test/Governor.test.ts +++ b/test/Governor.test.ts @@ -7,13 +7,13 @@ import { StRIFToken, DaoTimelockUpgradableRootstockCollective, ProposalTarget, - OGFounders, + OGFoundersRootstockCollective, } from '../typechain-types' import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers' import { ContractTransactionResponse, parseEther, solidityPackedKeccak256 } from 'ethers' import { Proposal, ProposalState, OperationState } from '../types' import { deployContracts } from './deployContracts' -import ogFoundersProxyModule from '../ignition/modules/OGFounders' +import ogFoundersModule from '../ignition/modules/OGFoundersModule' describe('Governor Contact', () => { const initialVotingDelay = 1n @@ -233,11 +233,11 @@ describe('Governor Contact', () => { }) describe('OG Founders NFT', () => { - let ogFoundersNFT: OGFounders + let ogFoundersNFT: OGFoundersRootstockCollective let tokensLeft = 150 before(async () => { - const contract = await ignition.deploy(ogFoundersProxyModule, { + const contract = await ignition.deploy(ogFoundersModule, { parameters: { OGFounders: { stRIFAddress: await stRIF.getAddress(), @@ -245,7 +245,7 @@ describe('Governor Contact', () => { }, }, }) - ogFoundersNFT = contract.OGFounders as unknown as OGFounders + ogFoundersNFT = contract.OGFounders as unknown as OGFoundersRootstockCollective }) it('the OG Founders NFT should be deployed', async () => { diff --git a/test/ExtContributorsEP.test.ts b/test/OGContributors.test.ts similarity index 84% rename from test/ExtContributorsEP.test.ts rename to test/OGContributors.test.ts index c76bcfa..c2ed649 100644 --- a/test/ExtContributorsEP.test.ts +++ b/test/OGContributors.test.ts @@ -1,20 +1,20 @@ import { expect } from 'chai' import hre, { ethers, ignition } from 'hardhat' -import { ExternalContributorsEcosystemPartner } from '../typechain-types' +import { OGContributorsRootstockCollective } from '../typechain-types' import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers' -import { extContributersEpProxyModule } from '../ignition/modules/ExternalContributorsEcosystemPartner' +import { ogContributorsModule } from '../ignition/modules/OGContributorsModule' import airdropReceivers from '../params/ExtContributorsEP/airdrop-testnet.json' -describe('ExternalContributorsEcosystemPartner NFT', () => { +describe('OGContributorsRootstockCollective NFT', () => { let deployer: SignerWithAddress let alice: SignerWithAddress const orgGangsters: SignerWithAddress[] = [] - let extContEP: ExternalContributorsEcosystemPartner + let extContEP: OGContributorsRootstockCollective before(async () => { ;[deployer, alice] = await ethers.getSigners() - const contract = await ignition.deploy(extContributersEpProxyModule) - extContEP = contract.ExtContributorsEP as unknown as ExternalContributorsEcosystemPartner + const contract = await ignition.deploy(ogContributorsModule) + extContEP = contract.ExtContributorsEP as unknown as OGContributorsRootstockCollective // impersonating airdrop receivers for (let i = 0; i < airdropReceivers.length; i++) { const accountAddr = airdropReceivers[i].receiver @@ -29,8 +29,8 @@ describe('ExternalContributorsEcosystemPartner NFT', () => { describe('Upon deployment', () => { it('should set up proper NFT name and symbol', async () => { - expect(await extContEP.connect(deployer).name()).to.equal("OGExternalContributorsEcosystemPartner") - expect(await extContEP.symbol()).to.equal("OGECEP") + expect(await extContEP.connect(deployer).name()).to.equal('OGContributorsRootstockCollective') + expect(await extContEP.symbol()).to.equal('OGC') }) it('should have zero total supply', async () => { @@ -98,9 +98,10 @@ describe('ExternalContributorsEcosystemPartner NFT', () => { it('approvals should be forbidden', async () => { await Promise.all( orgGangsters.map(async (sender, i) => { - await expect( - extContEP.connect(sender).approve(alice.address, i + 1), - ).to.be.revertedWithCustomError(extContEP, 'TransfersDisabled') + await expect(extContEP.connect(sender).approve(alice.address, i + 1)).to.be.revertedWithCustomError( + extContEP, + 'TransfersDisabled', + ) }), ) }) diff --git a/test/OgFoundersEP.test.ts b/test/OGPartners.test.ts similarity index 89% rename from test/OgFoundersEP.test.ts rename to test/OGPartners.test.ts index 0bcf118..6a1b843 100644 --- a/test/OgFoundersEP.test.ts +++ b/test/OGPartners.test.ts @@ -1,20 +1,20 @@ import { expect } from 'chai' import hre, { ethers, ignition } from 'hardhat' -import { OgFoundersEcosystemPartner } from '../typechain-types' +import { OGPartnersRootstockCollective } from '../typechain-types' import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers' -import { ogFoundersEpProxyModule } from '../ignition/modules/OgFoundersEP' +import { ogPartnersModule } from '../ignition/modules/OGPartnersModule' import airdropReceivers from '../params/OgFoundersEP/airdrop-testnet.json' -describe('OgFoundersEcosystemPartner NFT', () => { +describe('OGPartnersRootstockCollective NFT', () => { let deployer: SignerWithAddress let alice: SignerWithAddress const oldGangsters: SignerWithAddress[] = [] - let ogFoundersEp: OgFoundersEcosystemPartner + let ogFoundersEp: OGPartnersRootstockCollective before(async () => { ;[deployer, alice] = await ethers.getSigners() - const contract = await ignition.deploy(ogFoundersEpProxyModule) - ogFoundersEp = contract.ogFoundersEp as unknown as OgFoundersEcosystemPartner + const contract = await ignition.deploy(ogPartnersModule) + ogFoundersEp = contract.ogFoundersEp as unknown as OGPartnersRootstockCollective // impersonating airdrop receivers for (let i = 0; i < airdropReceivers.length; i++) { const accountAddr = airdropReceivers[i].receiver @@ -29,8 +29,8 @@ describe('OgFoundersEcosystemPartner NFT', () => { describe('Upon deployment', () => { it('should set up proper NFT name and symbol', async () => { - expect(await ogFoundersEp.connect(deployer).name()).to.equal('OgFoundersEcosystemPartner') - expect(await ogFoundersEp.symbol()).to.equal('OGFEP') + expect(await ogFoundersEp.connect(deployer).name()).to.equal('OGPartnersRootstockCollective') + expect(await ogFoundersEp.symbol()).to.equal('OGP') }) it('should have zero total supply', async () => {