Skip to content

Commit

Permalink
Get 21BTC metadata from .json
Browse files Browse the repository at this point in the history
  • Loading branch information
diego-G committed Aug 19, 2024
1 parent ce27956 commit 03a9529
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions scripts/3_deploy_wrapped_assets_in_order.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
require('dotenv').config()
const { ethers, upgrades } = require('hardhat')
const {
getInitializerArguments,
printBoxedTitle
} = require('./utils')
const tokensMetadata = require('./wrapped-tokens.json');

async function deployWrappedAssets () {
printBoxedTitle('Deploying WRAPPED ASSETS to new network')
Expand All @@ -28,15 +28,15 @@ async function deployWrappedAssets () {
})
}

// // Deploy Implementation as nonce 8
// Deploy Implementation as nonce 8
const CMTATBase = await ethers.getContractFactory('CMTAT_BASE')
const deployedImplementation = await upgrades.deployImplementation(CMTATBase)
console.log('Implementation', deployedImplementation)

// Deploy 21BTC as nonce 9
const proxyContract = await upgrades.deployProxy(
CMTATBase,
getInitializerArguments(deployer.address),
tokensMetadata.tokens[0]['0x3f67093dfFD4F0aF4f2918703C92B60ACB7AD78b'].metadata,
{ initializer: 'initialize' }
)

Expand Down
14 changes: 7 additions & 7 deletions scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ async function getAdminAddress () {
function getInitializerArguments (admin) {
return [
admin, // Admin address
'21.co Wrapped Bitcoin',
'21BTC',
8,
'',
'',
'',
0
'Test CMTA Token', // nameIrrevocable
'TCMTAT', // symbolIrrevocable
18, // decimalsIrrevocable
'TCMTAT_ISIN', // tokenId
'https://cmta.ch', // terms
'TCMTAT_info', // information
0 // flag
]
}

Expand Down

0 comments on commit 03a9529

Please sign in to comment.