From 03a9529487c624b483695823d04c2f75f40fab61 Mon Sep 17 00:00:00 2001 From: Diego Garcia Date: Mon, 19 Aug 2024 16:53:39 +0200 Subject: [PATCH] Get 21BTC metadata from .json --- scripts/3_deploy_wrapped_assets_in_order.js | 6 +++--- scripts/utils.js | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/3_deploy_wrapped_assets_in_order.js b/scripts/3_deploy_wrapped_assets_in_order.js index d23c1654..98c746bf 100644 --- a/scripts/3_deploy_wrapped_assets_in_order.js +++ b/scripts/3_deploy_wrapped_assets_in_order.js @@ -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') @@ -28,7 +28,7 @@ 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) @@ -36,7 +36,7 @@ async function deployWrappedAssets () { // Deploy 21BTC as nonce 9 const proxyContract = await upgrades.deployProxy( CMTATBase, - getInitializerArguments(deployer.address), + tokensMetadata.tokens[0]['0x3f67093dfFD4F0aF4f2918703C92B60ACB7AD78b'].metadata, { initializer: 'initialize' } ) diff --git a/scripts/utils.js b/scripts/utils.js index 60004545..db3b536e 100644 --- a/scripts/utils.js +++ b/scripts/utils.js @@ -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 ] }