diff --git a/.openzeppelin/unknown-84532.json b/.openzeppelin/unknown-84532.json index 12d34515..75184d0e 100644 --- a/.openzeppelin/unknown-84532.json +++ b/.openzeppelin/unknown-84532.json @@ -9,6 +9,51 @@ "address": "0x3f67093dfFD4F0aF4f2918703C92B60ACB7AD78b", "txHash": "0xb9b17aba85b109ec382c8afa12280e38950b7dc61780a50fd9b1f29d01cd408c", "kind": "transparent" + }, + { + "address": "0x0d3bd40758dF4F79aaD316707FcB809CD4815Ffe", + "txHash": "0x1cc20026bf9bd682f6d1e3d9db0e60740f300f6ce836fe77ab1bd9eb9b74259f", + "kind": "transparent" + }, + { + "address": "0x1bE9d03BfC211D83CFf3ABDb94A75F9Db46e1334", + "txHash": "0x52dcbdbbb00ef6d4c8194140d892e8f856929b693f5033a495a3fc53724d227d", + "kind": "transparent" + }, + { + "address": "0x9c05d54645306d4C4EAd6f75846000E1554c0360", + "txHash": "0x681374e2c63229e64adf6e0f86b1104ecb422f7a756f5c008ac86dc9f8079aba", + "kind": "transparent" + }, + { + "address": "0xb80a1d87654BEf7aD8eB6BBDa3d2309E31D4e598", + "txHash": "0xceed62311b0f31f3c98d5f028c26f8c46257c735fcfe9d915bbef4d7d367ced1", + "kind": "transparent" + }, + { + "address": "0x9F2825333aa7bC2C98c061924871B6C016e385F3", + "txHash": "0x634da41d1557fec3efe3595e0897ac6a7bdbd32927736f389d20c40c31134e08", + "kind": "transparent" + }, + { + "address": "0xF4ACCD20bFED4dFFe06d4C85A7f9924b1d5dA819", + "txHash": "0xa20f814d2a36bff29663b57c1fea3fcaa549d7fa345c246c1eb53eec687f4c11", + "kind": "transparent" + }, + { + "address": "0xFf4927e04c6a01868284F5C3fB9cba7F7ca4aeC0", + "txHash": "0x4a6ba73edcb48b1829b44250af672bf072d10c6bb48a883aadd8f36bac8432f4", + "kind": "transparent" + }, + { + "address": "0x399508A43d7E2b4451cd344633108b4d84b33B03", + "txHash": "0x1cfa297abd560ddbddf4f71513779868adccdb97eeef14a4dcc107976d93b5c2", + "kind": "transparent" + }, + { + "address": "0x73225F88fEEA4E41Fc67E986a95AC61dd7118866", + "txHash": "0xaa6fcf253008d4b6f27ef89d0246801b1c81eeb884db3c218f0a3a7c08554896", + "kind": "transparent" } ], "impls": { diff --git a/scripts/3_deploy_wrapped_assets_in_order.js b/scripts/3_deploy_wrapped_assets_in_order.js index 98c746bf..71f00ed7 100644 --- a/scripts/3_deploy_wrapped_assets_in_order.js +++ b/scripts/3_deploy_wrapped_assets_in_order.js @@ -3,7 +3,21 @@ const { ethers, upgrades } = require('hardhat') const { printBoxedTitle } = require('./utils') -const tokensMetadata = require('./wrapped-tokens.json'); +const tokensMetadata = require('./wrapped-tokens.json') + +async function deployWrappedAsset (CMTATBase, metadata) { + const proxyContract = await upgrades.deployProxy( + CMTATBase, + metadata, + { initializer: 'initialize' } + ) + + if (!proxyContract || !(await proxyContract.getAddress())) { + throw new Error('Deployment failed. Proxy contract address is undefined.') + } + + console.log('Deployed contract address: ', await proxyContract.getAddress()) +} async function deployWrappedAssets () { printBoxedTitle('Deploying WRAPPED ASSETS to new network') @@ -34,18 +48,80 @@ async function deployWrappedAssets () { console.log('Implementation', deployedImplementation) // Deploy 21BTC as nonce 9 - const proxyContract = await upgrades.deployProxy( + await deployWrappedAsset( CMTATBase, - tokensMetadata.tokens[0]['0x3f67093dfFD4F0aF4f2918703C92B60ACB7AD78b'].metadata, - { initializer: 'initialize' } + tokensMetadata.tokens['0x3f67093dfFD4F0aF4f2918703C92B60ACB7AD78b'].metadata ) - if (!proxyContract || !(await proxyContract.getAddress())) { - throw new Error('Deployment failed. Proxy contract address is undefined.') + // Deploy 21XRP as nonce 10 + await deployWrappedAsset( + CMTATBase, + tokensMetadata.tokens['0x0d3bd40758dF4F79aaD316707FcB809CD4815Ffe'].metadata + ) + + // Deploy 21BNB as nonce 11 + await deployWrappedAsset( + CMTATBase, + tokensMetadata.tokens['0x1bE9d03BfC211D83CFf3ABDb94A75F9Db46e1334'].metadata + ) + + // Deploy 21ADA as nonce 12 + await deployWrappedAsset( + CMTATBase, + tokensMetadata.tokens['0x9c05d54645306d4C4EAd6f75846000E1554c0360'].metadata + ) + + // Deploy 21SOL as nonce 13 + await deployWrappedAsset( + CMTATBase, + tokensMetadata.tokens['0xb80a1d87654BEf7aD8eB6BBDa3d2309E31D4e598'].metadata + ) + + // Deploy 21LTC as nonce 14 + await deployWrappedAsset( + CMTATBase, + tokensMetadata.tokens['0x9F2825333aa7bC2C98c061924871B6C016e385F3'].metadata + ) + + // Deploy 21DOT as nonce 15 + await deployWrappedAsset( + CMTATBase, + tokensMetadata.tokens['0xF4ACCD20bFED4dFFe06d4C85A7f9924b1d5dA819'].metadata + ) + + // Deploy 21BCH as nonce 16 + await deployWrappedAsset( + CMTATBase, + tokensMetadata.tokens['0xFf4927e04c6a01868284F5C3fB9cba7F7ca4aeC0'].metadata + ) + + // Send 3 dummy transfers to get to nonce 19 + for (let i = 0; i < 3; i++) { + await deployer.sendTransaction({ + to: deployer.address, + value: 1 // Wei + }) + } + + // Deploy 21AVAX as nonce 20 + await deployWrappedAsset( + CMTATBase, + tokensMetadata.tokens['0x399508A43d7E2b4451cd344633108b4d84b33B03'].metadata + ) + + // Send 5 dummy transfers to get to nonce 25 + for (let i = 0; i < 5; i++) { + await deployer.sendTransaction({ + to: deployer.address, + value: 1 // Wei + }) } - console.log('Deployed contract object:\n', proxyContract) - console.log('@ : ', await proxyContract.getAddress()) + // Deploy 21TON as nonce 26 + await deployWrappedAsset( + CMTATBase, + tokensMetadata.tokens['0x73225F88fEEA4E41Fc67E986a95AC61dd7118866'].metadata + ) } async function main () { diff --git a/scripts/wrapped-tokens.json b/scripts/wrapped-tokens.json index ebb100c5..2cd641ae 100644 --- a/scripts/wrapped-tokens.json +++ b/scripts/wrapped-tokens.json @@ -1,171 +1,149 @@ { - "tokens": [ - { - "0x3f67093dfFD4F0aF4f2918703C92B60ACB7AD78b": { - "metadata": [ - "0x73E3552Cdbe9F4F38A1dDf1262b87Aa208d2225C", - "21.co Wrapped Bitcoin", - "21BTC", - 8, - "", - "", - "", - 0 - ], - "nonce": 9 - } + "tokens": { + "0x3f67093dfFD4F0aF4f2918703C92B60ACB7AD78b": { + "metadata": [ + "0xC0D0d4AB1cDe509e62f4DAb3421157b898B500b7", + "21.co Wrapped Bitcoin", + "21BTC", + 8, + "", + "", + "", + 0 + ], + "nonce": 9 }, - { - "0x0d3bd40758dF4F79aaD316707FcB809CD4815Ffe": { - "metadata": [ - "0x73E3552Cdbe9F4F38A1dDf1262b87Aa208d2225C", - "21.co Wrapped XRP", - "21XRP", - 6, - "", - "", - "", - 0 - ], - "nonce": 10 - } + "0x0d3bd40758dF4F79aaD316707FcB809CD4815Ffe": { + "metadata": [ + "0xC0D0d4AB1cDe509e62f4DAb3421157b898B500b7", + "21.co Wrapped XRP", + "21XRP", + 6, + "", + "", + "", + 0 + ], + "nonce": 10 }, - { - "0x1bE9d03BfC211D83CFf3ABDb94A75F9Db46e1334": { - "metadata": [ - "0x73E3552Cdbe9F4F38A1dDf1262b87Aa208d2225C", - "21.co Wrapped BNB", - "21BNB", - 8, - "", - "", - "", - 0 - ], - "nonce": 11 - } + "0x1bE9d03BfC211D83CFf3ABDb94A75F9Db46e1334": { + "metadata": [ + "0xC0D0d4AB1cDe509e62f4DAb3421157b898B500b7", + "21.co Wrapped BNB", + "21BNB", + 8, + "", + "", + "", + 0 + ], + "nonce": 11 }, - { - "0x9c05d54645306d4C4EAd6f75846000E1554c0360": { - "metadata": [ - "0x73E3552Cdbe9F4F38A1dDf1262b87Aa208d2225C", - "21.co Wrapped Cardano", - "21ADA", - 6, - "", - "", - "", - 0 - ], - "nonce": 12 - } + "0x9c05d54645306d4C4EAd6f75846000E1554c0360": { + "metadata": [ + "0xC0D0d4AB1cDe509e62f4DAb3421157b898B500b7", + "21.co Wrapped Cardano", + "21ADA", + 6, + "", + "", + "", + 0 + ], + "nonce": 12 }, - { - "0xb80a1d87654BEf7aD8eB6BBDa3d2309E31D4e598": { - "metadata": [ - "0x73E3552Cdbe9F4F38A1dDf1262b87Aa208d2225C", - "21.co Wrapped Solana", - "21SOL", - 9, - "", - "", - "", - 0 - ], - "nonce": 13 - } + "0xb80a1d87654BEf7aD8eB6BBDa3d2309E31D4e598": { + "metadata": [ + "0xC0D0d4AB1cDe509e62f4DAb3421157b898B500b7", + "21.co Wrapped Solana", + "21SOL", + 9, + "", + "", + "", + 0 + ], + "nonce": 13 }, - { - "0x9F2825333aa7bC2C98c061924871B6C016e385F3": { - "metadata": [ - "0x73E3552Cdbe9F4F38A1dDf1262b87Aa208d2225C", - "21.co Wrapped Litecoin", - "21LTC", - 8, - "", - "", - "", - 0 - ], - "nonce": 14 - } + "0x9F2825333aa7bC2C98c061924871B6C016e385F3": { + "metadata": [ + "0xC0D0d4AB1cDe509e62f4DAb3421157b898B500b7", + "21.co Wrapped Litecoin", + "21LTC", + 8, + "", + "", + "", + 0 + ], + "nonce": 14 }, - { - "0xF4ACCD20bFED4dFFe06d4C85A7f9924b1d5dA819": { - "metadata": [ - "0x73E3552Cdbe9F4F38A1dDf1262b87Aa208d2225C", - "21.co Wrapped Polkadot", - "21DOT", - 10, - "", - "", - "", - 0 - ], - "nonce": 15 - } + "0xF4ACCD20bFED4dFFe06d4C85A7f9924b1d5dA819": { + "metadata": [ + "0xC0D0d4AB1cDe509e62f4DAb3421157b898B500b7", + "21.co Wrapped Polkadot", + "21DOT", + 10, + "", + "", + "", + 0 + ], + "nonce": 15 }, - { - "0xFf4927e04c6a01868284F5C3fB9cba7F7ca4aeC0": { - "metadata": [ - "0x73E3552Cdbe9F4F38A1dDf1262b87Aa208d2225C", - "21.co Wrapped BitcoinCash", - "21BCH", - 8, - "", - "", - "", - 0 - ], - "nonce": 16 - } + "0xFf4927e04c6a01868284F5C3fB9cba7F7ca4aeC0": { + "metadata": [ + "0xC0D0d4AB1cDe509e62f4DAb3421157b898B500b7", + "21.co Wrapped BitcoinCash", + "21BCH", + 8, + "", + "", + "", + 0 + ], + "nonce": 16 }, - { - "0x399508A43d7E2b4451cd344633108b4d84b33B03": { - "metadata": [ - "0x73E3552Cdbe9F4F38A1dDf1262b87Aa208d2225C", - "21.co Wrapped AVAX", - "21AVAX", - 18, - "", - "", - "", - 0 - ], - "nonce": 20 - } + "0x399508A43d7E2b4451cd344633108b4d84b33B03": { + "metadata": [ + "0xC0D0d4AB1cDe509e62f4DAb3421157b898B500b7", + "21.co Wrapped AVAX", + "21AVAX", + 18, + "", + "", + "", + 0 + ], + "nonce": 20 }, - { - "0x73225F88fEEA4E41Fc67E986a95AC61dd7118866": { - "metadata": [ - "0x73E3552Cdbe9F4F38A1dDf1262b87Aa208d2225C", - "21.co Wrapped Toncoin", - "21TON", - 9, - "", - "", - "", - 0 - ], - "nonce": 26 - } + "0x73225F88fEEA4E41Fc67E986a95AC61dd7118866": { + "metadata": [ + "0xC0D0d4AB1cDe509e62f4DAb3421157b898B500b7", + "21.co Wrapped Toncoin", + "21TON", + 9, + "", + "", + "", + 0 + ], + "nonce": 26 }, - { - "0xD2aEE1CE2b4459dE326971DE036E82f1318270AF": { - "metadata": [ - "0xDb611733293A7ce9Ac51b7ac382C55F96E537968", - "21.co Wrapped Dogecoin", - "21DOGE", - 8, - "", - "", - "", - 0 - ], - "nonce": 0 - } + "0xD2aEE1CE2b4459dE326971DE036E82f1318270AF": { + "metadata": [ + "0xC0D0d4AB1cDe509e62f4DAb3421157b898B500b7", + "21.co Wrapped Dogecoin", + "21DOGE", + 8, + "", + "", + "", + 0 + ], + "nonce": 0 } - ], + }, "proxyAdmin": { "deployer": "0x73E3552Cdbe9F4F38A1dDf1262b87Aa208d2225C", "nonce": 1