Skip to content

Commit

Permalink
init draft erc20 mint (with kyc integration)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xPilou committed Nov 28, 2023
1 parent 9fc3a2d commit a005952
Show file tree
Hide file tree
Showing 3 changed files with 1,503 additions and 2 deletions.
189 changes: 187 additions & 2 deletions forge-cache/solidity-files-cache.json
Original file line number Diff line number Diff line change
Expand Up @@ -7224,8 +7224,8 @@
}
},
"src/token/ERC721/ERC721ABLECoin.sol": {
"lastModificationDate": 1698746174403,
"contentHash": "61ebbf85d298124e1dedf379947f13a3",
"lastModificationDate": 1701165890991,
"contentHash": "9fdce83321419a88d82ff6ed4c6e376c",
"sourceName": "src/token/ERC721/ERC721ABLECoin.sol",
"solcConfig": {
"settings": {
Expand Down Expand Up @@ -7274,6 +7274,7 @@
"src/libraries/ABEvents.sol",
"src/token/ERC721/ERC721AB.sol",
"src/utils/IABDataRegistry.sol",
"src/utils/IABKYCModule.sol",
"src/utils/IABVerifier.sol"
],
"versionRequirement": "^0.8.18",
Expand Down Expand Up @@ -8058,6 +8059,47 @@
}
}
},
"test/_testdata/ERC721ABLECoin.td.sol": {
"lastModificationDate": 1701165512839,
"contentHash": "7070e68d1d9c0a9b6cf612cbbf17af05",
"sourceName": "test/_testdata/ERC721ABLECoin.td.sol",
"solcConfig": {
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
]
}
},
"evmVersion": "paris",
"libraries": {}
}
},
"imports": [],
"versionRequirement": "^0.8.18",
"artifacts": {
"ERC721ABCoinTestData": {
"0.8.19+commit.7dd6d404.Darwin.appleclang": "ERC721ABLECoin.td.sol/ERC721ABCoinTestData.json"
}
}
},
"test/_testdata/ERC721ABOE.td.sol": {
"lastModificationDate": 1699519078082,
"contentHash": "0788ecee578ed53f129ab21f714a4788",
Expand Down Expand Up @@ -8653,6 +8695,149 @@
}
}
},
"test/token/ERC721/ERC721ABLECoin.t.sol": {
"lastModificationDate": 1701166882698,
"contentHash": "52f27c899ef7397584ea9ec5535f7c67",
"sourceName": "test/token/ERC721/ERC721ABLECoin.t.sol",
"solcConfig": {
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
]
}
},
"evmVersion": "paris",
"libraries": {}
}
},
"imports": [
"lib/ERC721A-Upgradeable/contracts/ERC721AStorage.sol",
"lib/ERC721A-Upgradeable/contracts/ERC721AUpgradeable.sol",
"lib/ERC721A-Upgradeable/contracts/ERC721A__Initializable.sol",
"lib/ERC721A-Upgradeable/contracts/ERC721A__InitializableStorage.sol",
"lib/ERC721A-Upgradeable/contracts/IERC721AUpgradeable.sol",
"lib/forge-std/lib/ds-test/src/test.sol",
"lib/forge-std/src/Base.sol",
"lib/forge-std/src/StdAssertions.sol",
"lib/forge-std/src/StdChains.sol",
"lib/forge-std/src/StdCheats.sol",
"lib/forge-std/src/StdError.sol",
"lib/forge-std/src/StdInvariant.sol",
"lib/forge-std/src/StdJson.sol",
"lib/forge-std/src/StdMath.sol",
"lib/forge-std/src/StdStorage.sol",
"lib/forge-std/src/StdStyle.sol",
"lib/forge-std/src/StdUtils.sol",
"lib/forge-std/src/Test.sol",
"lib/forge-std/src/Vm.sol",
"lib/forge-std/src/console.sol",
"lib/forge-std/src/console2.sol",
"lib/forge-std/src/interfaces/IMulticall3.sol",
"lib/openzeppelin-contracts/contracts/access/Ownable.sol",
"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol",
"lib/openzeppelin-contracts/contracts/proxy/Clones.sol",
"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol",
"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol",
"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol",
"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol",
"lib/openzeppelin-contracts/contracts/proxy/transparent/ProxyAdmin.sol",
"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol",
"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol",
"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol",
"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol",
"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol",
"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/draft-IERC20Permit.sol",
"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol",
"lib/openzeppelin-contracts/contracts/token/ERC777/IERC777.sol",
"lib/openzeppelin-contracts/contracts/token/ERC777/IERC777Recipient.sol",
"lib/openzeppelin-contracts/contracts/token/ERC777/IERC777Sender.sol",
"lib/openzeppelin-contracts/contracts/utils/Address.sol",
"lib/openzeppelin-contracts/contracts/utils/Context.sol",
"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol",
"lib/openzeppelin-contracts/contracts/utils/Strings.sol",
"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol",
"lib/openzeppelin-contracts/contracts/utils/introspection/IERC1820Registry.sol",
"lib/openzeppelin-contracts/contracts/utils/math/Math.sol",
"lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol",
"lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol",
"lib/openzeppelin-contracts-upgradeable/contracts/access/AccessControlUpgradeable.sol",
"lib/openzeppelin-contracts-upgradeable/contracts/access/IAccessControlUpgradeable.sol",
"lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol",
"lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol",
"lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/ERC1155Upgradeable.sol",
"lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/IERC1155ReceiverUpgradeable.sol",
"lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/IERC1155Upgradeable.sol",
"lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol",
"lib/openzeppelin-contracts-upgradeable/contracts/utils/AddressUpgradeable.sol",
"lib/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol",
"lib/openzeppelin-contracts-upgradeable/contracts/utils/StringsUpgradeable.sol",
"lib/openzeppelin-contracts-upgradeable/contracts/utils/introspection/ERC165Upgradeable.sol",
"lib/openzeppelin-contracts-upgradeable/contracts/utils/introspection/IERC165Upgradeable.sol",
"lib/openzeppelin-contracts-upgradeable/contracts/utils/math/MathUpgradeable.sol",
"lib/protocol-monorepo/packages/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol",
"lib/protocol-monorepo/packages/ethereum-contracts/contracts/interfaces/agreements/IConstantFlowAgreementV1.sol",
"lib/protocol-monorepo/packages/ethereum-contracts/contracts/interfaces/agreements/IInstantDistributionAgreementV1.sol",
"lib/protocol-monorepo/packages/ethereum-contracts/contracts/interfaces/superfluid/Definitions.sol",
"lib/protocol-monorepo/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperAgreement.sol",
"lib/protocol-monorepo/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperApp.sol",
"lib/protocol-monorepo/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol",
"lib/protocol-monorepo/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperTokenFactory.sol",
"lib/protocol-monorepo/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol",
"lib/protocol-monorepo/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluidGovernance.sol",
"lib/protocol-monorepo/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluidToken.sol",
"lib/protocol-monorepo/packages/ethereum-contracts/contracts/interfaces/tokens/ERC20WithTokenInfo.sol",
"lib/protocol-monorepo/packages/ethereum-contracts/contracts/interfaces/tokens/TokenInfo.sol",
"lib/protocol-monorepo/packages/ethereum-contracts/contracts/libs/ERC777Helper.sol",
"lib/protocol-monorepo/packages/ethereum-contracts/contracts/libs/EventsEmitter.sol",
"lib/protocol-monorepo/packages/ethereum-contracts/contracts/libs/FixedSizeData.sol",
"lib/protocol-monorepo/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol",
"lib/protocol-monorepo/packages/ethereum-contracts/contracts/superfluid/SuperfluidToken.sol",
"lib/protocol-monorepo/packages/ethereum-contracts/contracts/upgradability/UUPSProxiable.sol",
"lib/protocol-monorepo/packages/ethereum-contracts/contracts/upgradability/UUPSUtils.sol",
"src/factory/AnotherCloneFactory.sol",
"src/libraries/ABDataTypes.sol",
"src/libraries/ABErrors.sol",
"src/libraries/ABEvents.sol",
"src/royalty/ABRoyalty.sol",
"src/royalty/IABRoyalty.sol",
"src/token/ERC1155/ERC1155AB.sol",
"src/token/ERC721/ERC721AB.sol",
"src/token/ERC721/ERC721ABLECoin.sol",
"src/utils/ABDataRegistry.sol",
"src/utils/ABKYCModule.sol",
"src/utils/ABVerifier.sol",
"src/utils/IABDataRegistry.sol",
"src/utils/IABKYCModule.sol",
"src/utils/IABVerifier.sol",
"test/_mocks/ABSuperToken.sol",
"test/_mocks/MockToken.sol",
"test/_testdata/ERC721ABLECoin.td.sol"
],
"versionRequirement": "^0.8.18",
"artifacts": {
"ERC721ABLECoinTest": {
"0.8.19+commit.7dd6d404.Darwin.appleclang": "ERC721ABLECoin.t.sol/ERC721ABLECoinTest.json"
}
}
},
"test/token/ERC721/ERC721ABOE.t.sol": {
"lastModificationDate": 1700732833038,
"contentHash": "62a5f9653b561bb7ff332b990c95143d",
Expand Down
53 changes: 53 additions & 0 deletions test/_testdata/ERC721ABLECoin.td.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

contract ERC721ABCoinTestData {
/* Superfluid Host */
address public constant SF_HOST = 0x4C073B3baB6d8826b8C5b229f3cfdC1eC6E47E74;

/* Roles Hash */
bytes32 public constant DEFAULT_ADMIN_ROLE_HASH = 0x0000000000000000000000000000000000000000000000000000000000000000;
bytes32 public constant PUBLISHER_ROLE_HASH = keccak256("PUBLISHER_ROLE");
bytes32 public constant AB_ADMIN_ROLE_HASH = keccak256("AB_ADMIN_ROLE");
bytes32 public constant FACTORY_ROLE_HASH = keccak256("FACTORY_ROLE");

/* Test Data */
string public constant MOCK_TOKEN_NAME = "Mock Token";
string public constant MOCK_TOKEN_SYMBOL = "MOCK";
uint256 public constant PUBLISHER_FEE = 9_000;
uint256 public constant DROP_SPECIFIC_FEE = 5_000;
uint256 public constant PRICE = 0.1 ether;
uint256 public constant PRICE_CURRENCY = 100e18;

uint256 public constant SUPPLY = 5;
uint256 public constant SHARE_PER_TOKEN = 90_000;
uint256 public constant MINT_GENESIS = 1;
uint256 public constant UNITS_PRECISION = 1_000;
string public constant NAME = "name";
string public constant SYMBOL = "SYMBOL";
string public constant URI = "http://uri.ipfs/";
bytes32 public constant SALT = "SALT";
bytes32 public constant SALT_2 = "SALT_2";

bool public constant PUBLIC_PHASE = true;
bool public constant PRIVATE_PHASE = false;

uint256 public constant PHASE_ID_0 = 0;
uint256 public constant PHASE_ID_1 = 1;
uint256 public constant PHASE_ID_2 = 2;

uint256 public constant P0_PRICE = 0.1 ether;
uint256 public constant P0_START = 1680000000;
uint256 public constant P0_END = 1680000100;
uint256 public constant P0_MAX_MINT = 3;

uint256 public constant P1_PRICE = 0.125 ether;
uint256 public constant P1_START = 1680100001;
uint256 public constant P1_END = 1680100100;
uint256 public constant P1_MAX_MINT = 3;

uint256 public constant P2_PRICE = 0.15 ether;
uint256 public constant P2_START = 1680200001;
uint256 public constant P2_END = 1680200100;
uint256 public constant P2_MAX_MINT = 3;
}
Loading

0 comments on commit a005952

Please sign in to comment.