Skip to content

Commit

Permalink
Merge branch 'main' into chore/improve-doc-ethers-v6
Browse files Browse the repository at this point in the history
  • Loading branch information
npty authored Dec 7, 2023
2 parents 29b6f95 + c8dbc27 commit fde16a9
Show file tree
Hide file tree
Showing 9 changed files with 3,611 additions and 341 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useWorkspaces": true,
"version": "2.1.5",
"version": "2.1.7",
"packages": [
"packages/*"
]
Expand Down
3,874 changes: 3,581 additions & 293 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/axelar-local-dev-aptos/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axelar-network/axelar-local-dev-aptos",
"version": "2.1.5",
"version": "2.1.7",
"main": "dist/index.js",
"files": [
"dist/",
Expand All @@ -19,7 +19,7 @@
},
"dependencies": {
"@axelar-network/axelar-cgp-aptos": "^1.0.5",
"@axelar-network/axelar-local-dev": "2.1.5",
"@axelar-network/axelar-local-dev": "2.1.7",
"aptos": "1.3.16"
},
"author": "",
Expand Down
4 changes: 2 additions & 2 deletions packages/axelar-local-dev-near/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axelar-network/axelar-local-dev-near",
"version": "2.1.5",
"version": "2.1.7",
"description": "",
"main": "dist/index.js",
"files": [
Expand All @@ -21,7 +21,7 @@
},
"dependencies": {
"@axelar-network/axelar-cgp-near": "^1.0.0",
"@axelar-network/axelar-local-dev": "2.1.5"
"@axelar-network/axelar-local-dev": "2.1.7"
},
"author": "",
"license": "ISC"
Expand Down
4 changes: 2 additions & 2 deletions packages/axelar-local-dev-sui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axelar-network/axelar-local-dev-sui",
"version": "2.1.5",
"version": "2.1.7",
"main": "dist/index.js",
"files": [
"dist/",
Expand All @@ -18,7 +18,7 @@
},
"dependencies": {
"@axelar-network/axelar-cgp-sui": "https://github.com/axelarnetwork/axelar-cgp-sui.git",
"@axelar-network/axelar-local-dev": "2.1.5",
"@axelar-network/axelar-local-dev": "2.1.7",
"@mysten/sui.js": "^0.41.0"
},
"author": "[email protected]",
Expand Down
6 changes: 3 additions & 3 deletions packages/axelar-local-dev/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axelar-network/axelar-local-dev",
"version": "2.1.5",
"version": "2.1.7",
"description": "",
"main": "dist/index.js",
"files": [
Expand Down Expand Up @@ -36,7 +36,7 @@
"@axelar-network/axelar-cgp-solidity": "^6.1.0",
"@axelar-network/axelar-chains-config": "^0.1.0",
"@axelar-network/axelar-gmp-sdk-solidity": "^5.3.0",
"@axelar-network/interchain-token-service": "^1.0.0-beta.2",
"@axelar-network/interchain-token-service": "^1.0.0-beta.4",
"ethers": "^5.6.5",
"fs-extra": "^10.1.0",
"ganache": "^7.1.0",
Expand All @@ -58,7 +58,7 @@
"chai": "^4.3.6",
"eslint": "^8.17.0",
"eslint-config-richardpringle": "^2.0.0",
"hardhat": "^2.9.9",
"hardhat": "~2.19.1",
"hardhat-gas-reporter": "^1.0.8",
"jest": "^29.2.2",
"npm-run-all": "^4.1.5",
Expand Down
31 changes: 11 additions & 20 deletions packages/axelar-local-dev/src/Network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@ import {
TokenManagerDeployer,
InterchainTokenDeployer,
InterchainToken,
TokenManagerMintBurn,
TokenManagerMintBurnFrom,
TokenManagerLockUnlock,
TokenManagerLockUnlockFee,
TokenManager,
TokenHandler,
InterchainTokenService as InterchainTokenServiceContract,
InterchainTokenFactory as InterchainTokenFactoryContract,
InterchainTokenServiceProxy,
IntercahinTokenFactoryProxy,
Proxy,
} from './contracts';
import { AxelarGateway__factory as AxelarGatewayFactory } from './types/factories/@axelar-network/axelar-cgp-solidity/contracts/AxelarGateway__factory';
import { AxelarGateway } from './types/@axelar-network/axelar-cgp-solidity/contracts/AxelarGateway';
Expand Down Expand Up @@ -232,18 +229,12 @@ export class Network {
const deploymentSalt = keccak256(defaultAbiCoder.encode(['string'], ['interchain-token-service-salt']));
const factorySalt = keccak256(defaultAbiCoder.encode(['string'], ['interchain-token-factory-salt']));
const wallet = this.ownerWallet;
const interchainTokenServiceAddress = await this.create3Deployer.deployedAddress('0x', wallet.address, deploymentSalt);
const tokenManagerDeployer = await deployContract(wallet, TokenManagerDeployer);
const intercahinToken = await deployContract(wallet, InterchainToken);
const intercahinToken = await deployContract(wallet, InterchainToken, [interchainTokenServiceAddress]);
const interchainTokenDeployer = await deployContract(wallet, InterchainTokenDeployer, [intercahinToken.address]);

const interchainTokenServiceAddress = await this.create3Deployer.deployedAddress('0x', wallet.address, deploymentSalt);
const tokenManagerImplementations = [
await deployContract(wallet, TokenManagerMintBurn, [interchainTokenServiceAddress]),
await deployContract(wallet, TokenManagerMintBurnFrom, [interchainTokenServiceAddress]),
await deployContract(wallet, TokenManagerLockUnlock, [interchainTokenServiceAddress]),
await deployContract(wallet, TokenManagerLockUnlockFee, [interchainTokenServiceAddress]),
].map((contract) => contract.address);

const tokenManager = await deployContract(wallet, TokenManager, [interchainTokenServiceAddress]);
const tokenHandler = await deployContract(wallet, TokenHandler, []);
const interchainTokenFactoryAddress = await this.create3Deployer.deployedAddress('0x', wallet.address, factorySalt);

let implementation = await deployContract(wallet, InterchainTokenServiceContract, [
Expand All @@ -253,9 +244,10 @@ export class Network {
this.gasService.address,
interchainTokenFactoryAddress,
this.name,
tokenManagerImplementations,
tokenManager.address,
tokenHandler.address,
]);
let factory = new ContractFactory(InterchainTokenServiceProxy.abi, InterchainTokenServiceProxy.bytecode);
const factory = new ContractFactory(Proxy.abi, Proxy.bytecode);
let bytecode = factory.getDeployTransaction(
implementation.address,
wallet.address,
Expand All @@ -266,8 +258,7 @@ export class Network {

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

factory = new ContractFactory(IntercahinTokenFactoryProxy.abi, IntercahinTokenFactoryProxy.bytecode);
bytecode = factory.getDeployTransaction(implementation.address, wallet.address).data;
bytecode = factory.getDeployTransaction(implementation.address, wallet.address, '0x').data;

await this.create3Deployer.connect(wallet).deploy(bytecode, factorySalt);
this.interchainTokenFactory = InterchainTokenFactoryFactory.connect(interchainTokenFactoryAddress, wallet);
Expand Down
9 changes: 3 additions & 6 deletions packages/axelar-local-dev/src/contracts/ITS.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ pragma solidity 0.8.9;
import { TokenManagerDeployer } from '@axelar-network/interchain-token-service/contracts/utils/TokenManagerDeployer.sol';
import { InterchainToken } from '@axelar-network/interchain-token-service/contracts/interchain-token/InterchainToken.sol';
import { InterchainTokenDeployer } from '@axelar-network/interchain-token-service/contracts/utils/InterchainTokenDeployer.sol';
import { TokenManagerLockUnlock } from '@axelar-network/interchain-token-service/contracts/token-manager/TokenManagerLockUnlock.sol';
import { TokenManagerLockUnlockFee } from '@axelar-network/interchain-token-service/contracts/token-manager/TokenManagerLockUnlockFee.sol';
import { TokenManagerMintBurn } from '@axelar-network/interchain-token-service/contracts/token-manager/TokenManagerMintBurn.sol';
import { TokenManagerMintBurnFrom } from '@axelar-network/interchain-token-service/contracts/token-manager/TokenManagerMintBurnFrom.sol';
import { TokenManager } from '@axelar-network/interchain-token-service/contracts/token-manager/TokenManager.sol';
import { TokenHandler } from '@axelar-network/interchain-token-service/contracts/TokenHandler.sol';
import { InterchainTokenService } from '@axelar-network/interchain-token-service/contracts/InterchainTokenService.sol';
import { InterchainTokenServiceProxy } from '@axelar-network/interchain-token-service/contracts/proxies/InterchainTokenServiceProxy.sol';
import { Proxy } from '@axelar-network/interchain-token-service/contracts/proxies/Proxy.sol';
import { InterchainTokenFactory } from '@axelar-network/interchain-token-service/contracts/InterchainTokenFactory.sol';
import { InterchainTokenFactoryProxy } from '@axelar-network/interchain-token-service/contracts/proxies/InterchainTokenFactoryProxy.sol';
18 changes: 6 additions & 12 deletions packages/axelar-local-dev/src/contracts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,11 @@ import IAxelarExecutable from '../artifacts/@axelar-network/axelar-gmp-sdk-solid
import TokenManagerDeployer from '../artifacts/@axelar-network/interchain-token-service/contracts/utils/TokenManagerDeployer.sol/TokenManagerDeployer.json';
import InterchainToken from '../artifacts/@axelar-network/interchain-token-service/contracts/interchain-token/InterchainToken.sol/InterchainToken.json';
import InterchainTokenDeployer from '../artifacts/@axelar-network/interchain-token-service/contracts/utils/InterchainTokenDeployer.sol/InterchainTokenDeployer.json';
import TokenManagerLockUnlock from '../artifacts/@axelar-network/interchain-token-service/contracts/token-manager/TokenManagerLockUnlock.sol/TokenManagerLockUnlock.json';
import TokenManagerLockUnlockFee from '../artifacts/@axelar-network/interchain-token-service/contracts/token-manager/TokenManagerLockUnlockFee.sol/TokenManagerLockUnlockFee.json';
import TokenManagerMintBurn from '../artifacts/@axelar-network/interchain-token-service/contracts/token-manager/TokenManagerMintBurn.sol/TokenManagerMintBurn.json';
import TokenManagerMintBurnFrom from '../artifacts/@axelar-network/interchain-token-service/contracts/token-manager/TokenManagerMintBurnFrom.sol/TokenManagerMintBurnFrom.json';
import TokenManager from '../artifacts/@axelar-network/interchain-token-service/contracts/token-manager/TokenManager.sol/TokenManager.json';
import TokenHandler from '../artifacts/@axelar-network/interchain-token-service/contracts/TokenHandler.sol/TokenHandler.json';
import InterchainTokenService from '../artifacts/@axelar-network/interchain-token-service/contracts/InterchainTokenService.sol/InterchainTokenService.json';
import InterchainTokenFactory from '../artifacts/@axelar-network/interchain-token-service/contracts/InterchainTokenFactory.sol/InterchainTokenFactory.json';
import InterchainTokenServiceProxy from '../artifacts/@axelar-network/interchain-token-service/contracts/proxies/InterchainTokenServiceProxy.sol/InterchainTokenServiceProxy.json';
import IntercahinTokenFactoryProxy from '../artifacts/@axelar-network/interchain-token-service/contracts/proxies/InterchainTokenFactoryProxy.sol/InterchainTokenFactoryProxy.json';
import Proxy from '../artifacts/@axelar-network/axelar-gmp-sdk-solidity/contracts/upgradable/Proxy.sol/Proxy.json';
import IInterchainTokenService from '../artifacts/@axelar-network/interchain-token-service/contracts/interfaces/IInterchainTokenService.sol/IInterchainTokenService.json';
import IInterchainTokenFactory from '../artifacts/@axelar-network/interchain-token-service/contracts/interfaces/IInterchainTokenFactory.sol/IInterchainTokenFactory.json';

Expand All @@ -41,14 +38,11 @@ export {
TokenManagerDeployer,
InterchainToken,
InterchainTokenDeployer,
TokenManagerLockUnlock,
TokenManagerLockUnlockFee,
TokenManagerMintBurn,
TokenManagerMintBurnFrom,
TokenManager,
TokenHandler,
InterchainTokenService,
InterchainTokenServiceProxy,
Proxy,
InterchainTokenFactory,
IntercahinTokenFactoryProxy,
IInterchainTokenService,
IInterchainTokenFactory,
};

0 comments on commit fde16a9

Please sign in to comment.