diff --git a/.openzeppelin/unknown-80001.json b/.openzeppelin/unknown-80001.json index fc969f0..8d524fc 100644 --- a/.openzeppelin/unknown-80001.json +++ b/.openzeppelin/unknown-80001.json @@ -105,6 +105,41 @@ "address": "0x765CE2CbE50c727639CDb5FdFF96dD1D8100283b", "txHash": "0xa805bf09cb2a9c8bae0d5b3da03d68b7b1cbb7554357316dd2832ccb49fec8e6", "kind": "uups" + }, + { + "address": "0x89121a08cCb7C52d7bd6C6e93bF1c9Cdf341dC13", + "txHash": "0x08f37e5bf719caaf309ecd8e393cc3de9bf0caa0087dae39d019c9b34bbd64c2", + "kind": "uups" + }, + { + "address": "0xF04c34Cc5773fd726e544a32c25e7Ad6FF7eb875", + "txHash": "0xbe655e30ff07033eac4d6a6095879d60fabbf9512f24890ce0c01012146c4b24", + "kind": "uups" + }, + { + "address": "0x365615E76cf159F30cd2B3cAbe0EB56f12c31330", + "txHash": "0x22ce924a30b75a56663b5e61d4cfa35316db3aba596a4ba748e2c038915982ec", + "kind": "uups" + }, + { + "address": "0x3ddb5ef7a725FDf74A680a312Bf0e4fa3a7D2874", + "txHash": "0x9590deee03a7a95a4b7caecb500866be75a2108fc711a962118dd49817606678", + "kind": "uups" + }, + { + "address": "0x3Bdf79705E11ad90ab8Beba643429be314e894e8", + "txHash": "0xc1e802679e813abb5e5a4c916c8b371a73daeb1e6c7cad19a48ae6a6385c5159", + "kind": "uups" + }, + { + "address": "0xA6820ebdef38dD696E5E721e6E169933b0C24A66", + "txHash": "0xadcbb94721626cbfe3ed3ebd04057d658e6dfa0f28f38891dbfa6623a2de7075", + "kind": "uups" + }, + { + "address": "0x21Fa62cC319be6Ea8662cfFE0c50a5d7cc60F7E1", + "txHash": "0x7a83c05fd0fd326064943c3f40b7962c36e904a7bc52e5a71bec2ac7f19fd49c", + "kind": "uups" } ], "impls": { @@ -1718,7 +1753,7 @@ { "contract": "JointAccounts", "label": "jointAccounts", - "type": "t_mapping(t_address,t_array(t_struct(JointAccountShare)7483_storage)dyn_storage)", + "type": "t_mapping(t_address,t_array(t_struct(JointAccountShare)11986_storage)dyn_storage)", "src": "../project:/contracts/freeportParts/JointAccounts.sol:33" }, { @@ -1786,13 +1821,13 @@ "t_mapping(t_uint256,t_address)": { "label": "mapping(uint256 => address)" }, - "t_mapping(t_address,t_array(t_struct(JointAccountShare)7483_storage)dyn_storage)": { + "t_mapping(t_address,t_array(t_struct(JointAccountShare)11986_storage)dyn_storage)": { "label": "mapping(address => struct JointAccounts.JointAccountShare[])" }, - "t_array(t_struct(JointAccountShare)7483_storage)dyn_storage": { + "t_array(t_struct(JointAccountShare)11986_storage)dyn_storage": { "label": "struct JointAccounts.JointAccountShare[]" }, - "t_struct(JointAccountShare)7483_storage": { + "t_struct(JointAccountShare)11986_storage": { "label": "struct JointAccounts.JointAccountShare", "members": [ { @@ -5361,7 +5396,7 @@ { "contract": "Auction", "label": "freeport", - "type": "t_contract(Freeport)5210", + "type": "t_contract(Freeport)5350", "src": "../project:/contracts/Auction.sol:44" }, { @@ -5378,7 +5413,7 @@ } ], "types": { - "t_contract(Freeport)5210": { + "t_contract(Freeport)5350": { "label": "contract Freeport" }, "t_mapping(t_address,t_mapping(t_uint256,t_struct(Bid)3686_storage))": { @@ -5828,6 +5863,334 @@ } } } + }, + "5b82975fd308efdda6c516aa95c522f97f96622889a5419e983fc120d79d17cb": { + "address": "0x494eF2645Fa2ACDDC47323EaE7D397e7B5Bb06Cf", + "txHash": "0xf0336c4441fd6d27ae0ae1172631f8babea4b3d21b93937fc36acabc1616a65a", + "layout": { + "storage": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_bool", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:23" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:28" + }, + { + "contract": "ERC1967UpgradeUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:229" + }, + { + "contract": "UUPSUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:36" + }, + { + "contract": "ContextUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" + }, + { + "contract": "ERC165Upgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:35" + }, + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)81_storage)", + "src": "../@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:73" + }, + { + "contract": "AccessControlUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "../@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:252" + }, + { + "contract": "ERC1155ReceiverUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/token/ERC1155/utils/ERC1155ReceiverUpgradeable.sol:27" + }, + { + "contract": "ERC1155HolderUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/token/ERC1155/utils/ERC1155HolderUpgradeable.sol:27" + }, + { + "contract": "SimpleAuction", + "label": "freeport", + "type": "t_contract(Freeport)5350", + "src": "../project:/contracts/SimpleAuction.sol:42" + }, + { + "contract": "SimpleAuction", + "label": "sellerNftBids", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(Bid)6091_storage))", + "src": "../project:/contracts/SimpleAuction.sol:82" + }, + { + "contract": "SimpleAuction", + "label": "_bidCollateral", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))", + "src": "../project:/contracts/SimpleAuction.sol:87" + } + ], + "types": { + "t_contract(Freeport)5350": { + "label": "contract Freeport" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_struct(Bid)6091_storage))": { + "label": "mapping(address => mapping(uint256 => struct SimpleAuction.Bid))" + }, + "t_address": { + "label": "address" + }, + "t_mapping(t_uint256,t_struct(Bid)6091_storage)": { + "label": "mapping(uint256 => struct SimpleAuction.Bid)" + }, + "t_uint256": { + "label": "uint256" + }, + "t_struct(Bid)6091_storage": { + "label": "struct SimpleAuction.Bid", + "members": [ + { + "label": "buyer", + "type": "t_address" + }, + { + "label": "price", + "type": "t_uint256" + }, + { + "label": "closeTimeSec", + "type": "t_uint256" + }, + { + "label": "secured", + "type": "t_bool" + } + ] + }, + "t_bool": { + "label": "bool" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { + "label": "mapping(address => mapping(uint256 => uint256))" + }, + "t_mapping(t_uint256,t_uint256)": { + "label": "mapping(uint256 => uint256)" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]" + }, + "t_mapping(t_bytes32,t_struct(RoleData)81_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)" + }, + "t_bytes32": { + "label": "bytes32" + }, + "t_struct(RoleData)81_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)" + }, + { + "label": "adminRole", + "type": "t_bytes32" + } + ] + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]" + } + } + } + }, + "3d4c6590ad6ee5d14d405126a83c7a3b747ed506aec2d2e9a0aacd5040afc1fa": { + "address": "0xef91D072826EfDc1b7971a2c1aAB3FDE51fC6e40", + "txHash": "0x351f965750aeda55c9f36a8dcbc67d503a20fceffe52339d674d98859a9b0150", + "layout": { + "storage": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_bool", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:23" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:28" + }, + { + "contract": "ERC1967UpgradeUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:229" + }, + { + "contract": "UUPSUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:36" + }, + { + "contract": "ContextUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" + }, + { + "contract": "ERC165Upgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:35" + }, + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)81_storage)", + "src": "../@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:73" + }, + { + "contract": "AccessControlUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "../@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:252" + }, + { + "contract": "CollectionFactory", + "label": "nameToCollection", + "type": "t_mapping(t_string_memory_ptr,t_address)", + "src": "../project:/contracts/CollectionFactory.sol:30" + }, + { + "contract": "CollectionFactory", + "label": "freeport", + "type": "t_contract(Freeport)5350", + "src": "../project:/contracts/CollectionFactory.sol:33" + }, + { + "contract": "CollectionFactory", + "label": "nftAttachment", + "type": "t_contract(NFTAttachment)5960", + "src": "../project:/contracts/CollectionFactory.sol:35" + }, + { + "contract": "CollectionFactory", + "label": "addressProxies", + "type": "t_mapping(t_uint256,t_address)", + "src": "../project:/contracts/CollectionFactory.sol:38" + }, + { + "contract": "CollectionFactory", + "label": "collectionCounter", + "type": "t_uint256", + "src": "../project:/contracts/CollectionFactory.sol:39" + }, + { + "contract": "CollectionFactory", + "label": "mintAllowance", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))", + "src": "../project:/contracts/CollectionFactory.sol:48" + }, + { + "contract": "CollectionFactory", + "label": "marketplace", + "type": "t_contract(Marketplace)5580", + "src": "../project:/contracts/CollectionFactory.sol:55" + }, + { + "contract": "CollectionFactory", + "label": "auction", + "type": "t_contract(Auction)4244", + "src": "../project:/contracts/CollectionFactory.sol:57" + } + ], + "types": { + "t_mapping(t_string_memory_ptr,t_address)": { + "label": "mapping(string => address)" + }, + "t_string_storage": { + "label": "string" + }, + "t_address": { + "label": "address" + }, + "t_contract(Freeport)5350": { + "label": "contract Freeport" + }, + "t_contract(NFTAttachment)5960": { + "label": "contract NFTAttachment" + }, + "t_mapping(t_uint256,t_address)": { + "label": "mapping(uint256 => address)" + }, + "t_uint256": { + "label": "uint256" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "label": "mapping(address => mapping(address => bool))" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)" + }, + "t_bool": { + "label": "bool" + }, + "t_contract(Marketplace)5580": { + "label": "contract Marketplace" + }, + "t_contract(Auction)4244": { + "label": "contract Auction" + }, + "t_mapping(t_bytes32,t_struct(RoleData)81_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)" + }, + "t_bytes32": { + "label": "bytes32" + }, + "t_struct(RoleData)81_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)" + }, + { + "label": "adminRole", + "type": "t_bytes32" + } + ] + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]" + } + } + } } } } diff --git a/README.md b/README.md index 41cdc63..d5eb799 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,8 @@ Review all code changes since the last deployed release. Understand how upgradea Bump the version, maintain [CHANGELOG.md](CHANGELOG.md), and create a release in github. +Then, select which deployment to operate on. One way is to use the [configure_deployment](scripts/configure_deployment.js) script (see configuration inside). + Choose a [migration script](migrations/) depending on which contract to upgrade (e.g.: N=8). For the DEV environment, you need to edit the addresses in `build/*.json`. Then run: npm run test diff --git a/logs/stage2_deploy_log b/logs/stage2_deploy_log index 0ba60eb..38bf666 100644 --- a/logs/stage2_deploy_log +++ b/logs/stage2_deploy_log @@ -207,3 +207,119 @@ Sent 1M of currency to 0x6d2b28389d3153689c57909829dFCf6241d36388 Sent 1M of currency to 0x1Bf6FCa28253A1257e4B5B3440F7fbE0c59D1546 Sent 1M of currency to 0x51c5590504251A5993Ba6A46246f87Fa0eaE5897 + +#### On the 2022-09-07 (commit 6c1fc06e) + +3_deploy_marketplace.js +======================= +Operating Marketplace with Freeport contract 0x918E6Ce38Fd2ea97007A6b6F2a4Eaf2A73c9c3De + + Deploying 'ERC1967Proxy' + ------------------------ + > transaction hash: 0xc1e802679e813abb5e5a4c916c8b371a73daeb1e6c7cad19a48ae6a6385c5159 + > Blocks: 2 Seconds: 8 + > contract address: 0x3Bdf79705E11ad90ab8Beba643429be314e894e8 + > block number: 27978624 + > block timestamp: 1662556647 + > account: 0x63846e2D234e4F854F43423014430b4e131f697b + > balance: 0.972437682003310484 + > gas used: 322985 (0x4eda9) + > gas price: 40 gwei + > value sent: 0 ETH + > total cost: 0.0129194 ETH + +Deployed Marketplace proxy 0x3Bdf79705E11ad90ab8Beba643429be314e894e8 +Give the permission to make transfers to Auction. + + +8_upgrade_freeport.js +===================== +Operating on Freeport contract 0x918E6Ce38Fd2ea97007A6b6F2a4Eaf2A73c9c3De +Upgraded 0x918E6Ce38Fd2ea97007A6b6F2a4Eaf2A73c9c3De + + +9_upgrade_simple_auction.js +=========================== +Operating on SimpleAuction contract 0x0D1F3d565b5bA3aBB9334C0e96b5547138b3fAc0 +Operating SimpleAuction with Freeport contract 0x918E6Ce38Fd2ea97007A6b6F2a4Eaf2A73c9c3De +Upgraded 0x0D1F3d565b5bA3aBB9334C0e96b5547138b3fAc0 +Done initialize_v2_0_0 + + +11_upgrade_fiat_gateway.js +========================== +Operating on FiatGateway contract 0x99005372cF2699D0722A380C779Da6D1F2e5BADC +Operating on Freeport contract 0x918E6Ce38Fd2ea97007A6b6F2a4Eaf2A73c9c3De +Operating on Marketplace contract 0x3Bdf79705E11ad90ab8Beba643429be314e894e8 +Upgraded 0x99005372cF2699D0722A380C779Da6D1F2e5BADC +Done initialize_update + + +21_deploy_auction.js +==================== +Operating on Freeport contract 0x918E6Ce38Fd2ea97007A6b6F2a4Eaf2A73c9c3De + + Deploying 'ERC1967Proxy' + ------------------------ + > transaction hash: 0xadcbb94721626cbfe3ed3ebd04057d658e6dfa0f28f38891dbfa6623a2de7075 + > Blocks: 1 Seconds: 8 + > contract address: 0xA6820ebdef38dD696E5E721e6E169933b0C24A66 + > block number: 27978694 + > block timestamp: 1662556998 + > account: 0x63846e2D234e4F854F43423014430b4e131f697b + > balance: 0.943539242003310484 + > gas used: 324477 (0x4f37d) + > gas price: 40 gwei + > value sent: 0 ETH + > total cost: 0.01297908 ETH + +Deployed Auction proxy 0xA6820ebdef38dD696E5E721e6E169933b0C24A66 +Give the permission to make transfers to SimpleAuction. + + +22_deploy_collection_factory.js +=============================== +Operating CollectionFactory with Freeport contract 0x918E6Ce38Fd2ea97007A6b6F2a4Eaf2A73c9c3De +Operating CollectionFactory with NFTAttachment contract 0xb2100D89474b584C910431900601a4095c325b8E +Operating CollectionFactory with Marketplace contract 0x3Bdf79705E11ad90ab8Beba643429be314e894e8 +Operating CollectionFactory with Auction contract 0xA6820ebdef38dD696E5E721e6E169933b0C24A66 + + Deploying 'ERC1967Proxy' + ------------------------ + > transaction hash: 0x7a83c05fd0fd326064943c3f40b7962c36e904a7bc52e5a71bec2ac7f19fd49c + > Blocks: 1 Seconds: 8 + > contract address: 0x21Fa62cC319be6Ea8662cfFE0c50a5d7cc60F7E1 + > block number: 27978700 + > block timestamp: 1662557028 + > account: 0x63846e2D234e4F854F43423014430b4e131f697b + > balance: 0.925508162003310484 + > gas used: 391384 (0x5f8d8) + > gas price: 40 gwei + > value sent: 0 ETH + > total cost: 0.01565536 ETH + +Deployed CollectionFactory proxy 0x21Fa62cC319be6Ea8662cfFE0c50a5d7cc60F7E1 + + +23_upgrade_auction.js +===================== +Operating on Auction contract 0xA6820ebdef38dD696E5E721e6E169933b0C24A66 +Operating Auction with Freeport contract 0x918E6Ce38Fd2ea97007A6b6F2a4Eaf2A73c9c3De +Upgraded 0xA6820ebdef38dD696E5E721e6E169933b0C24A66 +Done initialize_v2_0_0 + + +24_upgrade_collection_factory.js +================================ +Operating on CollectionFactory contract 0x21Fa62cC319be6Ea8662cfFE0c50a5d7cc60F7E1 +Operating CollectionFactory with Freeport contract 0x918E6Ce38Fd2ea97007A6b6F2a4Eaf2A73c9c3De +Operating CollectionFactory with NFTAttachment contract 0xb2100D89474b584C910431900601a4095c325b8E +Operating CollectionFactory with Marketplace contract 0x3Bdf79705E11ad90ab8Beba643429be314e894e8 +Operating CollectionFactory with Auction contract 0xA6820ebdef38dD696E5E721e6E169933b0C24A66 +Upgraded 0x21Fa62cC319be6Ea8662cfFE0c50a5d7cc60F7E1 + + +25_upgrade_marketplace.js +========================= +Operating on Marketplace contract 0x3Bdf79705E11ad90ab8Beba643429be314e894e8 +Upgraded 0x3Bdf79705E11ad90ab8Beba643429be314e894e8 diff --git a/logs/stage_deploy_log b/logs/stage_deploy_log index 9450cf1..dd90a04 100644 --- a/logs/stage_deploy_log +++ b/logs/stage_deploy_log @@ -175,3 +175,161 @@ Sent 1M of currency to 0x6108E8aFFe0c51D4e2515A773aeF16b19ED6feB9 Sent 1M of currency to 0x6d2b28389d3153689c57909829dFCf6241d36388 Sent 1M of currency to 0x1Bf6FCa28253A1257e4B5B3440F7fbE0c59D1546 Sent 1M of currency to 0x51c5590504251A5993Ba6A46246f87Fa0eaE5897 + + +#### On the 2022-09-07 (commit 6c1fc06e) + +3_deploy_marketplace.js +======================= +Operating Marketplace with Freeport contract 0xacd8105cBA046307d2228794ba2F81aA15e82E0D + + Deploying 'ERC1967Proxy' + ------------------------ + > transaction hash: 0x08f37e5bf719caaf309ecd8e393cc3de9bf0caa0087dae39d019c9b34bbd64c2 + > Blocks: 0 Seconds: 0 + > contract address: 0x89121a08cCb7C52d7bd6C6e93bF1c9Cdf341dC13 + > block number: 27978116 + > block timestamp: 1662554099 + > account: 0x63846e2D234e4F854F43423014430b4e131f697b + > balance: 1.366983118003310484 + > gas used: 322997 (0x4edb5) + > gas price: 40 gwei + > value sent: 0 ETH + > total cost: 0.01291988 ETH + + Pausing for 1 confirmations... + + ------------------------------- + > confirmation number: 6 (block: 27978122) +Deployed Marketplace proxy 0x89121a08cCb7C52d7bd6C6e93bF1c9Cdf341dC13 +Give the permission to make transfers to Auction. + > Saving artifacts + ------------------------------------- + > Total cost: 0.01291988 ETH + + +8_upgrade_freeport.js +===================== +Operating on Freeport contract 0xacd8105cBA046307d2228794ba2F81aA15e82E0D +Upgraded 0xacd8105cBA046307d2228794ba2F81aA15e82E0D + + ------------------------------------- + > Total cost: 0 ETH + + +9_upgrade_simple_auction.js +=========================== +Operating on SimpleAuction contract 0x71091eA5466E3Ca50971bd51c11069e5629a49dB +Operating SimpleAuction with Freeport contract 0xacd8105cBA046307d2228794ba2F81aA15e82E0D + + Replacing 'SimpleAuction' + ------------------------- + > transaction hash: 0xf0336c4441fd6d27ae0ae1172631f8babea4b3d21b93937fc36acabc1616a65a + > Blocks: 0 Seconds: 0 + > contract address: 0x494eF2645Fa2ACDDC47323EaE7D397e7B5Bb06Cf + > block number: 27978172 + > block timestamp: 1662554379 + > account: 0x63846e2D234e4F854F43423014430b4e131f697b + > balance: 1.272427878003310484 + > gas used: 2252359 (0x225e47) + > gas price: 40 gwei + > value sent: 0 ETH + > total cost: 0.09009436 ETH + + Pausing for 1 confirmations... + + ------------------------------- + > confirmation number: 6 (block: 27978178) +Upgraded 0x71091eA5466E3Ca50971bd51c11069e5629a49dB +Done initialize_v2_0_0 + + > Saving artifacts + ------------------------------------- + > Total cost: 0.09009436 ETH + + +11_upgrade_fiat_gateway.js +========================== +Operating on FiatGateway contract 0xe25b31Aa454E28110E28C694ded69cD241A27Db1 +Operating on Freeport contract 0xacd8105cBA046307d2228794ba2F81aA15e82E0D +Operating on Marketplace contract 0x89121a08cCb7C52d7bd6C6e93bF1c9Cdf341dC13 +Upgraded 0xe25b31Aa454E28110E28C694ded69cD241A27Db1 +Done initialize_update + + +21_deploy_auction.js +==================== +Operating on Freeport contract 0xacd8105cBA046307d2228794ba2F81aA15e82E0D + + Deploying 'ERC1967Proxy' + ------------------------ + > transaction hash: 0xbe655e30ff07033eac4d6a6095879d60fabbf9512f24890ce0c01012146c4b24 + > Blocks: 46 Seconds: 12 + > contract address: 0xF04c34Cc5773fd726e544a32c25e7Ad6FF7eb875 + > block number: 27978340 + > block timestamp: 1662555222 + > account: 0x63846e2D234e4F854F43423014430b4e131f697b + > balance: 1.260882682003310484 + > gas used: 324489 (0x4f389) + > gas price: 40 gwei + > value sent: 0 ETH + > total cost: 0.01297956 ETH + +Deployed Auction proxy 0xF04c34Cc5773fd726e544a32c25e7Ad6FF7eb875 +Give the permission to make transfers to SimpleAuction. + + +22_deploy_collection_factory.js +=============================== +Operating CollectionFactory with Freeport contract 0xacd8105cBA046307d2228794ba2F81aA15e82E0D +Operating CollectionFactory with NFTAttachment contract 0x84766787c6b9131927A76634F7DDCfcf3ff2e9d1 +Operating CollectionFactory with Marketplace contract 0x89121a08cCb7C52d7bd6C6e93bF1c9Cdf341dC13 +Operating CollectionFactory with Auction contract 0xF04c34Cc5773fd726e544a32c25e7Ad6FF7eb875 + + Deploying 'ERC1967Proxy' + ------------------------ + > transaction hash: 0x9590deee03a7a95a4b7caecb500866be75a2108fc711a962118dd49817606678 + > Blocks: 3 Seconds: 12 + > contract address: 0x3ddb5ef7a725FDf74A680a312Bf0e4fa3a7D2874 + > block number: 27978440 + > block timestamp: 1662555724 + > account: 0x63846e2D234e4F854F43423014430b4e131f697b + > balance: 0.996159842003310484 + > gas used: 391396 (0x5f8e4) + > gas price: 40 gwei + > value sent: 0 ETH + > total cost: 0.01565584 ETH + +Deployed CollectionFactory proxy 0x3ddb5ef7a725FDf74A680a312Bf0e4fa3a7D2874 + > Saving artifacts + ------------------------------------- + > Total cost: 0.01565584 ETH + + +23_upgrade_auction.js +===================== +Operating on Auction contract 0xF04c34Cc5773fd726e544a32c25e7Ad6FF7eb875 +Operating Auction with Freeport contract 0xacd8105cBA046307d2228794ba2F81aA15e82E0D +Upgraded 0xF04c34Cc5773fd726e544a32c25e7Ad6FF7eb875 +Done initialize_v2_0_0 + + ------------------------------------- + > Total cost: 0 ETH + + +24_upgrade_collection_factory.js +================================ +Operating on CollectionFactory contract 0x3ddb5ef7a725FDf74A680a312Bf0e4fa3a7D2874 +Operating CollectionFactory with Freeport contract 0xacd8105cBA046307d2228794ba2F81aA15e82E0D +Operating CollectionFactory with NFTAttachment contract 0x84766787c6b9131927A76634F7DDCfcf3ff2e9d1 +Operating CollectionFactory with Marketplace contract 0x89121a08cCb7C52d7bd6C6e93bF1c9Cdf341dC13 +Operating CollectionFactory with Auction contract 0xF04c34Cc5773fd726e544a32c25e7Ad6FF7eb875 + +Upgraded 0x3ddb5ef7a725FDf74A680a312Bf0e4fa3a7D2874 + + +25_upgrade_marketplace.js +========================= +Operating on Marketplace contract 0x89121a08cCb7C52d7bd6C6e93bF1c9Cdf341dC13 + +Upgraded 0x89121a08cCb7C52d7bd6C6e93bF1c9Cdf341dC13 diff --git a/scripts/configure_deployment.js b/scripts/configure_deployment.js new file mode 100644 index 0000000..e476480 --- /dev/null +++ b/scripts/configure_deployment.js @@ -0,0 +1,48 @@ +/* This scripts copies the configuration from the SDK into the build/*.json files, + * which are then used by other scripts .deployed() functions. + */ + +const fs = require("fs/promises"); +const assert = require("assert/strict"); +const log = console.log; + +// Take the config from https://github.com/Cerebellum-Network/Freeport-Smart-Contracts-SDK +const CONFIG_PATH = "../Freeport-Smart-Contracts-SDK/src/config.json"; +const DEPLOYMENT = "stage"; +const NETWORK_ID = "80001"; +const BUILD_PATH = "build/contracts/"; + + +module.exports = async function (done) { + try { + // Load the deployment configuration. + log("Network ID:", NETWORK_ID); + log("Deployment name:", DEPLOYMENT); + log("Config file:", CONFIG_PATH); + let allConfig = JSON.parse(await fs.readFile(CONFIG_PATH)); + let config = allConfig[DEPLOYMENT][NETWORK_ID]; + assert(config, "Config not found"); + log("Config:", config); + + for (let contractName in config) { + let address = config[contractName]; + + if (contractName === "ERC20") contractName = "TestERC20"; + + log(); + log("Operating on", contractName, address); + + let path = BUILD_PATH + contractName + ".json"; + let artif = JSON.parse(await fs.readFile(path)); + + artif["networks"][NETWORK_ID].address = address; + + await fs.writeFile(path, JSON.stringify(artif, null, 2)); + log("Configured", path); + } + + done(); + } catch (e) { + done(e); + } +};