From b91c987a2826a73cc867d67366c2060fa7a81334 Mon Sep 17 00:00:00 2001 From: Pilou <76021631+0xPilou@users.noreply.github.com> Date: Thu, 28 Sep 2023 10:32:25 +0200 Subject: [PATCH] updated test scripts --- test/factory/AnotherCloneFactory.t.sol | 14 +++++++------- test/royalty/ABRoyalty.t.sol | 6 +++--- test/token/ERC1155/ERC1155AB.t.sol | 6 +++--- .../ERC721/{ERC721AB.t.sol => ERC721ABLE.t.sol} | 16 ++++++++-------- 4 files changed, 21 insertions(+), 21 deletions(-) rename test/token/ERC721/{ERC721AB.t.sol => ERC721ABLE.t.sol} (99%) diff --git a/test/factory/AnotherCloneFactory.t.sol b/test/factory/AnotherCloneFactory.t.sol index 765188a..f1c3594 100644 --- a/test/factory/AnotherCloneFactory.t.sol +++ b/test/factory/AnotherCloneFactory.t.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.18; import "forge-std/Test.sol"; -import {ERC721AB} from "src/token/ERC721/ERC721AB.sol"; +import {ERC721ABLE} from "src/token/ERC721/ERC721ABLE.sol"; import {ERC1155AB} from "src/token/ERC1155/ERC1155AB.sol"; import {ABDataRegistry} from "src/utils/ABDataRegistry.sol"; import {AnotherCloneFactory} from "src/factory/AnotherCloneFactory.sol"; @@ -24,7 +24,7 @@ contract AnotherCloneFactoryTest is Test, AnotherCloneFactoryTestData { AnotherCloneFactory public anotherCloneFactory; ABRoyalty public royaltyImplementation; ERC1155AB public erc1155Implementation; - ERC721AB public erc721Implementation; + ERC721ABLE public erc721Implementation; ProxyAdmin public proxyAdmin; TransparentUpgradeableProxy public anotherCloneFactoryProxy; @@ -52,7 +52,7 @@ contract AnotherCloneFactoryTest is Test, AnotherCloneFactoryTestData { erc1155Implementation = new ERC1155AB(); vm.label(address(erc1155Implementation), "erc1155Implementation"); - erc721Implementation = new ERC721AB(); + erc721Implementation = new ERC721ABLE(); vm.label(address(erc721Implementation), "erc721Implementation"); royaltyImplementation = new ABRoyalty(); @@ -219,7 +219,7 @@ contract AnotherCloneFactoryTest is Test, AnotherCloneFactoryTestData { anotherCloneFactory.createCollection721(NAME, SALT); (address nft, address publisher) = anotherCloneFactory.collections(0); - assertEq(ERC721AB(nft).owner(), _publisher); + assertEq(ERC721ABLE(nft).owner(), _publisher); assertEq(publisher, _publisher); vm.stopPrank(); @@ -246,7 +246,7 @@ contract AnotherCloneFactoryTest is Test, AnotherCloneFactoryTestData { anotherCloneFactory.createCollection721FromImplementation(address(erc721Implementation), _publisher, NAME, SALT); (address nft, address publisher) = anotherCloneFactory.collections(0); - assertEq(ERC721AB(nft).owner(), _publisher); + assertEq(ERC721ABLE(nft).owner(), _publisher); assertEq(publisher, _publisher); vm.stopPrank(); @@ -306,7 +306,7 @@ contract AnotherCloneFactoryTest is Test, AnotherCloneFactoryTestData { } function test_setERC721Implementation_admin() public { - ERC721AB newErc721Implementation = new ERC721AB(); + ERC721ABLE newErc721Implementation = new ERC721ABLE(); assertEq(anotherCloneFactory.erc721Impl(), address(erc721Implementation)); @@ -318,7 +318,7 @@ contract AnotherCloneFactoryTest is Test, AnotherCloneFactoryTestData { function test_setERC721Implementation_nonAdmin(address _nonAdmin) public { vm.assume(_nonAdmin != address(this)); - ERC721AB newErc721Implementation = new ERC721AB(); + ERC721ABLE newErc721Implementation = new ERC721ABLE(); vm.prank(_nonAdmin); diff --git a/test/royalty/ABRoyalty.t.sol b/test/royalty/ABRoyalty.t.sol index c734e9f..82b7efe 100644 --- a/test/royalty/ABRoyalty.t.sol +++ b/test/royalty/ABRoyalty.t.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.18; import "forge-std/Test.sol"; -import {ERC721AB} from "src/token/ERC721/ERC721AB.sol"; +import {ERC721ABLE} from "src/token/ERC721/ERC721ABLE.sol"; import {ERC1155AB} from "src/token/ERC1155/ERC1155AB.sol"; import {ABDataRegistry} from "src/utils/ABDataRegistry.sol"; import {AnotherCloneFactory} from "src/factory/AnotherCloneFactory.sol"; @@ -35,7 +35,7 @@ contract ABRoyaltyTest is Test, ABRoyaltyTestData { ABVerifier public abVerifier; ABDataRegistry public abDataRegistry; AnotherCloneFactory public anotherCloneFactory; - ERC721AB public erc721Impl; + ERC721ABLE public erc721Impl; ERC1155AB public erc1155Impl; ProxyAdmin public proxyAdmin; TransparentUpgradeableProxy public anotherCloneFactoryProxy; @@ -80,7 +80,7 @@ contract ABRoyaltyTest is Test, ABRoyaltyTestData { erc1155Impl = new ERC1155AB(); vm.label(address(erc1155Impl), "erc1155Impl"); - erc721Impl = new ERC721AB(); + erc721Impl = new ERC721ABLE(); vm.label(address(erc721Impl), "erc721Impl"); abRoyaltyImpl = new ABRoyalty(); diff --git a/test/token/ERC1155/ERC1155AB.t.sol b/test/token/ERC1155/ERC1155AB.t.sol index e7b43d9..2251110 100644 --- a/test/token/ERC1155/ERC1155AB.t.sol +++ b/test/token/ERC1155/ERC1155AB.t.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.18; import "forge-std/Test.sol"; -import {ERC721AB} from "src/token/ERC721/ERC721AB.sol"; +import {ERC721ABLE} from "src/token/ERC721/ERC721ABLE.sol"; import {ERC1155AB} from "src/token/ERC1155/ERC1155AB.sol"; import {ABDataRegistry} from "src/utils/ABDataRegistry.sol"; import {AnotherCloneFactory} from "src/factory/AnotherCloneFactory.sol"; @@ -45,7 +45,7 @@ contract ERC1155ABTest is Test, ERC1155ABTestData, ERC1155Holder { ABDataRegistry public abDataRegistry; AnotherCloneFactory public anotherCloneFactory; ABRoyalty public royaltyImpl; - ERC721AB public erc721Impl; + ERC721ABLE public erc721Impl; ERC1155AB public erc1155Impl; ProxyAdmin public proxyAdmin; TransparentUpgradeableProxy public anotherCloneFactoryProxy; @@ -109,7 +109,7 @@ contract ERC1155ABTest is Test, ERC1155ABTestData, ERC1155Holder { erc1155Impl = new ERC1155AB(); vm.label(address(erc1155Impl), "erc1155Impl"); - erc721Impl = new ERC721AB(); + erc721Impl = new ERC721ABLE(); vm.label(address(erc721Impl), "erc721Impl"); royaltyImpl = new ABRoyalty(); diff --git a/test/token/ERC721/ERC721AB.t.sol b/test/token/ERC721/ERC721ABLE.t.sol similarity index 99% rename from test/token/ERC721/ERC721AB.t.sol rename to test/token/ERC721/ERC721ABLE.t.sol index d25b9a6..e6df19d 100644 --- a/test/token/ERC721/ERC721AB.t.sol +++ b/test/token/ERC721/ERC721ABLE.t.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.18; import "forge-std/Test.sol"; -import {ERC721AB} from "src/token/ERC721/ERC721AB.sol"; +import {ERC721ABLE} from "src/token/ERC721/ERC721ABLE.sol"; import {ERC1155AB} from "src/token/ERC1155/ERC1155AB.sol"; import {ABDataRegistry} from "src/utils/ABDataRegistry.sol"; import {AnotherCloneFactory} from "src/factory/AnotherCloneFactory.sol"; @@ -14,7 +14,7 @@ import {ABErrors} from "src/libraries/ABErrors.sol"; import {ABSuperToken} from "test/_mocks/ABSuperToken.sol"; import {MockToken} from "test/_mocks/MockToken.sol"; -import {ERC721ABTestData} from "test/_testdata/ERC721AB.td.sol"; +import {ERC721ABTestData} from "test/_testdata/ERC721ABLE.td.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; @@ -45,14 +45,14 @@ contract ERC721ABTest is Test, ERC721ABTestData { ABDataRegistry public abDataRegistry; AnotherCloneFactory public anotherCloneFactory; ABRoyalty public royaltyImpl; - ERC721AB public erc721Impl; + ERC721ABLE public erc721Impl; ERC1155AB public erc1155Impl; ProxyAdmin public proxyAdmin; TransparentUpgradeableProxy public anotherCloneFactoryProxy; TransparentUpgradeableProxy public abDataRegistryProxy; TransparentUpgradeableProxy public abVerifierProxy; - ERC721AB public nft; + ERC721ABLE public nft; uint256 public constant DROP_ID_OFFSET = 10_000; @@ -109,7 +109,7 @@ contract ERC721ABTest is Test, ERC721ABTestData { erc1155Impl = new ERC1155AB(); vm.label(address(erc1155Impl), "erc1155Impl"); - erc721Impl = new ERC721AB(); + erc721Impl = new ERC721ABLE(); vm.label(address(erc721Impl), "erc721Impl"); royaltyImpl = new ABRoyalty(); @@ -153,17 +153,17 @@ contract ERC721ABTest is Test, ERC721ABTestData { (address nftAddr,) = anotherCloneFactory.collections(0); - nft = ERC721AB(nftAddr); + nft = ERC721ABLE(nftAddr); } function test_initialize() public { TransparentUpgradeableProxy erc721proxy = new TransparentUpgradeableProxy( - address(new ERC721AB()), + address(new ERC721ABLE()), address(proxyAdmin), "" ); - nft = ERC721AB(address(erc721proxy)); + nft = ERC721ABLE(address(erc721proxy)); nft.initialize(publisher, address(abDataRegistry), address(abVerifier), NAME); assertEq(address(nft.abDataRegistry()), address(abDataRegistry));