Skip to content

Commit

Permalink
Deploy rest of wrapped tokens but 21DOGE
Browse files Browse the repository at this point in the history
  • Loading branch information
diego-G committed Aug 27, 2024
1 parent 98bb35c commit 48f9ae7
Show file tree
Hide file tree
Showing 3 changed files with 263 additions and 164 deletions.
45 changes: 45 additions & 0 deletions .openzeppelin/unknown-84532.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
92 changes: 84 additions & 8 deletions scripts/3_deploy_wrapped_assets_in_order.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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 () {
Expand Down
Loading

0 comments on commit 48f9ae7

Please sign in to comment.