Skip to content

Commit

Permalink
chore: update express contract deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
npty committed Jun 21, 2023
1 parent ade31c3 commit 87f2887
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions packages/axelar-local-dev/src/Network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class Network {
const implementationCode = await this.provider.getCode(gateway.address);
const implementationCodeHash = keccak256(implementationCode);
for (let i = 0; i < oldThreshold; i++) {
await (await this.ownerWallet.sendTransaction({to: adminWallets[i]._address, value: BigInt(1e18)})).wait();
await (await this.ownerWallet.sendTransaction({ to: adminWallets[i]._address, value: BigInt(1e18) })).wait();
await (await this.gateway.connect(adminWallets[i]).upgrade(gateway.address, implementationCodeHash, params)).wait();
}
await (await auth.transferOwnership(this.gateway.address)).wait();
Expand Down Expand Up @@ -208,7 +208,6 @@ export class Network {
const expressProxyDeployer = await deployContract(this.ownerWallet, GMPExpressProxyDeployer, [this.gateway.address]);
const expressService = await deployContract(this.ownerWallet, GMPExpressService, [
this.gateway.address,
this.gasService.address,
expressProxyDeployer.address,
this.ownerWallet.address,
]);
Expand Down
8 changes: 5 additions & 3 deletions packages/axelar-local-dev/src/__tests__/relay.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,16 @@ describe('relay', () => {
]);

// get bytecode with constructor data
const expressWithToken = await deployContract(chain2.ownerWallet, ExpressWithToken, [
chain2.gateway.address,
chain2.gasService.address,
]);
const salt = ethers.utils.id(Date.now().toString());
const factory = new ContractFactory(ExpressWithToken.abi, ExpressWithToken.bytecode);
const bytecode = factory.getDeployTransaction(chain2.gateway.address, chain2.gasService.address).data;

// deploy the express proxy + implementation contracts
await chain2.expressService
.connect(chain2.ownerWallet)
.deployExpressExecutable(salt, bytecode, chain2.ownerWallet.address, '0x')
.deployExpressProxy(salt, expressWithToken.address, chain2.ownerWallet.address, '0x')
.then((tx: ContractTransaction) => tx.wait());

// get the proxy address
Expand Down

0 comments on commit 87f2887

Please sign in to comment.