Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
chore: rename variables
Browse files Browse the repository at this point in the history
  • Loading branch information
leovct committed Nov 23, 2023
1 parent c857496 commit a83f1be
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions migrations/5_deploy_child_contracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,41 +21,41 @@ module.exports = async function(deployer, network, accounts) {
const childChain = await ChildChain.deployed()
const contractAddresses = utils.getContractAddresses()

const maticWethTx = await childChain.addToken(
const addTokenMaticWethTx = await childChain.addToken(
accounts[0],
contractAddresses.root.tokens.MaticWeth,
'ETH on Matic',
'ETH',
18,
false // _isERC721
)
const maticWethAddress = maticWethTx.logs.find(log => log.event === 'NewToken').args.token
const maticWethContract = await ChildERC20.at(maticWethAddress)
await maticWethContract.changeChildChain(childChain.address, {from: accounts[0]})
const maticWethAddress = addTokenMaticWethTx.logs.find(log => log.event === 'NewToken').args.token
const maticWeth = await ChildERC20.at(maticWethAddress)
await maticWeth.changeChildChain(childChain.address, {from: accounts[0]})

const testERC20Tx = await childChain.addToken(
const addTokenTestERC20Tx = await childChain.addToken(
accounts[0],
contractAddresses.root.tokens.TestToken,
'Test Token',
'TST',
18,
false // _isERC721
)
const testERC20Address = testERC20Tx.logs.find(log => log.event === 'NewToken').args.token
const testERC20Contract = await ChildERC20.at(testERC20Address)
await testERC20Contract.changeChildChain(childChain.address, {from: accounts[0]})
const testERC20Address = addTokenTestERC20Tx.logs.find(log => log.event === 'NewToken').args.token
const testERC20 = await ChildERC20.at(testERC20Address)
await testERC20.changeChildChain(childChain.address, {from: accounts[0]})

const testERC721Tx = await childChain.addToken(
const addTokenTestERC721Tx = await childChain.addToken(
accounts[0],
contractAddresses.root.tokens.RootERC721,
'Test ERC721',
'TST721',
0,
true // _isERC721
)
const testERC721Address = testERC721Tx.logs.find(log => log.event === 'NewToken').args.token
const testERC721Contract = await ChildERC721.at(maticWethAddress)
await testERC721Contract.changeChildChain(childChain.address, {from: accounts[0]})
const testERC721Address = addTokenTestERC721Tx.logs.find(log => log.event === 'NewToken').args.token
const testERC721 = await ChildERC721.at(testERC721Address)
await testERC721.changeChildChain(childChain.address, {from: accounts[0]})

const maticToken = await MRC20.at('0x0000000000000000000000000000000000001010')
const maticOwner = await maticToken.owner()
Expand Down

0 comments on commit a83f1be

Please sign in to comment.