sandbox-smart-contracts
sandbox-smart-contracts copied to clipboard
Deploy/assets l2 goerli
Description
Executed complete plan to migrate assets to L2 on testnet
L1
Asset
- Deploy Asset ERC721
yarn deploy goerli --tags AssetERC721
- Deploy AssetERC721 Tunnel L1
yarn deploy goerli --tags AssetERC721Tunnel
- Remove bouncers to disable minting
yarn execute goerli setup/asset_remove_bouncers.ts
- Take a snapshot of the ERC721 on L1
TSB_Marketplace/web-marketplace-server$ node src/scripts/Snapshot.js -c Asset -i 5 --no-mapResult -b 7368650
TSB_Marketplace/web-marketplace-server$ node
> date = "xxxxxxxxxxxxx"; require("fs").writeFileSync(`./src/scripts/output/snapshots/${date}-nfts.json`, JSON.stringify(require(`./src/scripts/output/snapshots/${date}-assets.json`).filter(o => o.token.supply === "1").map(o => ({ id: o.token.id, owner: o.owner.id }))));
Export should be located in TSB_Marketplace/web-marketplace-server/src/scripts/output/snapshots/xxxxxxxxxxxxx-nfts.json
- Mint and airdrop ERC721 to owners from snapshot
yarn execute goerli setup/asset721_regenerate.ts
- Take a snapshot of all existing Assets and which catalysts and gems they are linked to.
Skipped
- Upgrade Asset to ERC1155
yarn deploy goerli --tags AssetERC1155
- Deploy AssetERC1155 Tunnel L1
yarn execute goerli --tags AssetERC1155Tunnel
L2
Asset
- Deploy Asset ERC721
yarn deploy mumbai --tags PolygonAssetERC721
- Deploy AssetERC721 Tunnel L2
yarn deploy mumbai --tags PolygonAssetERC721Tunnel
- Set ERC721 tunnels
yarn deploy goerli --tags AssetERC721Tunnel
yarn deploy mumbai --tags PolygonAssetERC721Tunnel
- Deploy PolygonAssetERC1155
yarn deploy mumbai --tags PolygonAssetERC1155
- Deploy AssetERC1155 Tunnel L2
yarn deploy mumbai --tags PolygonAssetERC1155Tunnel
- Set ERC1155 tunnels
yarn deploy goerli --tags AssetERC1155Tunnel
yarn deploy mumbai --tags PolygonAssetERC1155Tunnel
Catalysts & Gems
- Deploy PolygonDefaultAttributes
yarn deploy mumbai --tags PolygonDefaultAttributes
- Deploy PolygonGemsCatalystsRegistry
yarn deploy mumbai --tags PolygonGemsCatalystsRegistry
- Deploy Catalyst ERC20 contracts
yarn deploy mumbai --tags PolygonCatalysts
- Deploy Gem ERC20 contracts
yarn deploy mumbai --tags PolygonGems
- [TESTNET] Deploy Attributes Faucet
yarn deploy mumbai --tags AttributesFaucets
- Take snapshot of owners of old catalysts and gems (L1)
Can be done later
- Airdrop Owners of old catalysts and gems on L2
Can be done later
- Deploy:
- PolygonAssetAttributesRegistry (dependent on PolygonGemsCatalystsRegistry)
- PolygonAssetMinter
- PolygonAssetUpgrader (REVIEW)
- PolygonAssetERC1155SignedAuction (REVIEW)
yarn deploy mumbai --tags PolygonAssetAttributesRegistry_deploy
yarn deploy mumbai --tags PolygonAssetMinter_deploy
yarn deploy mumbai --tags PolygonAssetUpgrader
- Setup Registries & Minter set as bouncer
yarn deploy mumbai --tags PolygonAssetAttributesRegistry_setup
yarn deploy mumbai --tags PolygonAssetMinter_setup
- Then we can add the Catalyst and Gem IDs into the PolygonGemsCatalystsRegistry
?????????????
- Migrate CatalystRegistry events from L1 to AssetAttributesRegistry on L2 (Note: Currently the assets have to be minted on L2 to perform the migration)
Skipped