Skip to content

Commit

Permalink
chore: avoid reassigning vars in network.ts (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
robriks authored Aug 7, 2024
1 parent c5e02a6 commit ed0d136
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/axelar-local-dev/src/Network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export class Network {
const tokenHandler = await deployContract(wallet, TokenHandler, []);
const interchainTokenFactoryAddress = await this.create3Deployer.deployedAddress('0x', wallet.address, factorySalt);

let implementation = await deployContract(wallet, InterchainTokenServiceContract, [
const tokenServiceImplementation = await deployContract(wallet, InterchainTokenServiceContract, [
tokenManagerDeployer.address,
interchainTokenDeployer.address,
this.gateway.address,
Expand All @@ -250,16 +250,16 @@ export class Network {
]);
const factory = new ContractFactory(InterchainProxy.abi, InterchainProxy.bytecode);
let bytecode = factory.getDeployTransaction(
implementation.address,
tokenServiceImplementation.address,
wallet.address,
defaultAbiCoder.encode(['address', 'string', 'string[]', 'string[]'], [wallet.address, this.name, [], []])
).data;
await this.create3Deployer.connect(wallet).deploy(bytecode, deploymentSalt);
this.interchainTokenService = InterchainTokenServiceFactory.connect(interchainTokenServiceAddress, wallet);

implementation = await deployContract(wallet, InterchainTokenFactoryContract, [interchainTokenServiceAddress]);
const tokenFactoryImplementation = await deployContract(wallet, InterchainTokenFactoryContract, [interchainTokenServiceAddress]);

bytecode = factory.getDeployTransaction(implementation.address, wallet.address, '0x').data;
bytecode = factory.getDeployTransaction(tokenFactoryImplementation.address, wallet.address, '0x').data;

await this.create3Deployer.connect(wallet).deploy(bytecode, factorySalt);
this.interchainTokenFactory = InterchainTokenFactoryFactory.connect(interchainTokenFactoryAddress, wallet);
Expand Down

0 comments on commit ed0d136

Please sign in to comment.