From 27b93749696ebd3a4fc4b554256427fe5820e122 Mon Sep 17 00:00:00 2001 From: leovct Date: Tue, 14 Nov 2023 11:24:43 +0100 Subject: [PATCH 1/3] chore: update flag comments in scripts --- scripts/deploy-erc20.js | 10 +++++----- scripts/deposit.js | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/deploy-erc20.js b/scripts/deploy-erc20.js index 1b6e40375..720f842f5 100644 --- a/scripts/deploy-erc20.js +++ b/scripts/deploy-erc20.js @@ -210,15 +210,15 @@ module.exports = async function (callback) { const accounts = await web3.eth.getAccounts() console.log("Current configured address to make transactions:", accounts[0]) - // -- network + // -- --network // await checkChildERC20(process.argv[6]) // await checkChildERC721(process.argv[6]) - // -- network
+ // -- --network
// await deployTestERC20OnMainchain(accounts[0]) // await deployTestERC721OnMainchain(accounts[0]) - // -- network + // -- --network // await deployChildERC20AndMap({ // token: process.argv[6], // name: process.argv[7], @@ -227,7 +227,7 @@ module.exports = async function (callback) { // doMapping: process.argv[10] === 'true' // }) - // -- network + // -- --network // await deployChildERC721AndMap({ // token: process.argv[6], // name: process.argv[7], @@ -235,7 +235,7 @@ module.exports = async function (callback) { // doMapping: process.argv[9] === 'true' // }) - // -- network + // -- --network // await mapTokenOnMainchain( // process.argv[6], // root token // process.argv[7], // child token diff --git a/scripts/deposit.js b/scripts/deposit.js index cfeebb79b..101a73a36 100644 --- a/scripts/deposit.js +++ b/scripts/deposit.js @@ -65,29 +65,29 @@ module.exports = async function (callback) { const accounts = await web3.eth.getAccounts() console.log("Current configured address to make transactions:", accounts[0]) - // -- network
+ // -- --network
// await depositERC20({ - // addr: accounts[0], + // addr: accounts[0], // rootToken: process.argv[6], // amount: process.argv[7], // }) - // -- network
+ // -- --network
// await depositERC721({ - // addr: accounts[0], + // addr: accounts[0], // rootToken: process.argv[6], // root token // tokenID: process.argv[7], // nft id // }) - // -- network + // -- --network // await checkDepositedERC20Balance({ - // addr: accounts[0], + // addr: accounts[0], // token: process.argv[6], // child token // }) - // -- network + // -- --network // await checkDepositedERC721Balance({ - // addr: accounts[0], + // addr: accounts[0], // token: process.argv[6], // child token // tokenID: process.argv[7], // nft id // }) From 206c0d5966796b65b2c53c9fd3356246603fdf74 Mon Sep 17 00:00:00 2001 From: leovct Date: Thu, 16 Nov 2023 17:22:14 +0100 Subject: [PATCH 2/3] fix: initialize ERC20 tokens `childChain` address --- migrations/5_deploy_child_contracts.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/migrations/5_deploy_child_contracts.js b/migrations/5_deploy_child_contracts.js index a634357be..46b646a7b 100644 --- a/migrations/5_deploy_child_contracts.js +++ b/migrations/5_deploy_child_contracts.js @@ -29,6 +29,7 @@ module.exports = async function(deployer, network, accounts) { 18, false // _isERC721 ) + await MaticWeth.changeChildChain(ChildChain.address) let TestToken = await childChain.addToken( accounts[0], @@ -38,6 +39,7 @@ module.exports = async function(deployer, network, accounts) { 18, false // _isERC721 ) + await TestToken.changeChildChain(ChildChain.address) let RootERC721 = await childChain.addToken( accounts[0], @@ -47,6 +49,7 @@ module.exports = async function(deployer, network, accounts) { 0, true // _isERC721 ) + await RootERC721.changeChildChain(ChildChain.address) const maticToken = await MRC20.at('0x0000000000000000000000000000000000001010') const maticOwner = await maticToken.owner() From 23a8658292d99fb8b1499904709c482a51367d07 Mon Sep 17 00:00:00 2001 From: leovct Date: Fri, 17 Nov 2023 11:24:57 +0100 Subject: [PATCH 3/3] Revert "fix: initialize ERC20 tokens `childChain` address" This reverts commit 206c0d5966796b65b2c53c9fd3356246603fdf74. --- migrations/5_deploy_child_contracts.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/migrations/5_deploy_child_contracts.js b/migrations/5_deploy_child_contracts.js index 46b646a7b..a634357be 100644 --- a/migrations/5_deploy_child_contracts.js +++ b/migrations/5_deploy_child_contracts.js @@ -29,7 +29,6 @@ module.exports = async function(deployer, network, accounts) { 18, false // _isERC721 ) - await MaticWeth.changeChildChain(ChildChain.address) let TestToken = await childChain.addToken( accounts[0], @@ -39,7 +38,6 @@ module.exports = async function(deployer, network, accounts) { 18, false // _isERC721 ) - await TestToken.changeChildChain(ChildChain.address) let RootERC721 = await childChain.addToken( accounts[0], @@ -49,7 +47,6 @@ module.exports = async function(deployer, network, accounts) { 0, true // _isERC721 ) - await RootERC721.changeChildChain(ChildChain.address) const maticToken = await MRC20.at('0x0000000000000000000000000000000000001010') const maticOwner = await maticToken.owner()