Skip to content

Commit

Permalink
feat: add to gh action test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean Amiel committed Nov 6, 2023
1 parent 21702f7 commit 84d501f
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 9 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@ jobs:
"chainId": 31337,
"rpc": "http://127.0.0.1:8545",
"tokenSymbol": "TEST",
"contracts": {}
"contracts": {
"InterchainGovernance": {
"minimumTimeDelay": 3600
},
"AxelarServiceGovernance": {
"minimumTimeDelay": 3600
}
}
}
}
}' > ./axelar-chains-config/info/local.json
Expand All @@ -52,13 +59,28 @@ jobs:
run: cat ./axelar-chains-config/info/local.json

- name: Deploy ConstAddressDeployer
run: node evm/deploy-contract.js -a ../node_modules/@axelar-network/axelar-gmp-sdk-solidity/artifacts/contracts/deploy/ -c ConstAddressDeployer -m create -y
run: node evm/deploy-contract.js -c ConstAddressDeployer -m create -y

- name: Deploy Create3Deployer
run: node evm/deploy-contract.js -a ../node_modules/@axelar-network/axelar-gmp-sdk-solidity/artifacts/contracts/deploy/ -c Create3Deployer -m create2 -y
run: node evm/deploy-contract.js -c Create3Deployer -m create2 -y

- name: Deploy AxelarGateway
run: node evm/deploy-gateway-v6.2.x.js -m create3 -s "AxelarGateway v6.2" -g 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 -m 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --keyID 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 -y

- name: Call Method on Gateway
run: node evm/gateway.js --action callContract --destinationChain test2 -y

- name: Deploy InterchainGovernance
run: node evm/deploy-contract.js -c InterchainGovernance -m create3 -y

- name: Deploy AxelarServiceGovernance
run: node evm/deploy-contract.js -c AxelarServiceGovernance -m create3 -y

- name: Deploy Multisig
run: node evm/deploy-contract.js -c Multisig -m create3 -y

- name: Deploy Operators
run: node evm/deploy-contract.js -c Operators -m create3 -y

- name: Deploy TokenDeployer
run: node evm/deploy-contract.js -c TokenDeployer -m create3 -y
2 changes: 1 addition & 1 deletion evm/deploy-const-address-deployer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const { addExtendedOptions } = require('./cli-utils');
const contractJson = require('@axelar-network/axelar-gmp-sdk-solidity/artifacts/contracts/deploy/ConstAddressDeployer.sol/ConstAddressDeployer.json');
const contractName = 'ConstAddressDeployer';

async function deployConstAddressDeployer(wallet, chain, options = null, verifyOptions = null) {
async function deployConstAddressDeployer(wallet, chain, options = {}, verifyOptions = null) {
printInfo('Deployer address', wallet.address);

const contracts = chain.contracts;
Expand Down
19 changes: 15 additions & 4 deletions evm/deploy-contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ async function getConstructorArgs(contractName, chain, wallet) {
throw new Error(`Missing AxelarGateway address in the chain info.`);
}

const governanceChain = contractConfig.governanceChain;
const governanceChain = contractConfig.governanceChain || 'Axelarnet';
contractConfig.governanceChain = governanceChain;

if (!isString(governanceChain)) {
throw new Error(`Missing AxelarServiceGovernance.governanceChain in the chain info.`);
}

const governanceAddress = contractConfig.governanceAddress;
const governanceAddress = contractConfig.governanceAddress || 'axelar10d07y265gmmuvt4z0w9aw880jnsr700j7v9daj';
contractConfig.governanceAddress = governanceAddress;

if (!isString(governanceAddress)) {
throw new Error(`Missing AxelarServiceGovernance.governanceAddress in the chain info.`);
Expand All @@ -59,13 +61,22 @@ async function getConstructorArgs(contractName, chain, wallet) {
throw new Error(`Missing AxelarServiceGovernance.minimumTimeDelay in the chain info.`);
}

const cosigners = contractConfig.cosigners;
const cosigners = contractConfig.cosigners || [
'0x3f5876a2b06E54949aB106651Ab6694d0289b2b4',
'0x9256Fd872118ed3a97754B0fB42c15015d17E0CC',
'0x1486157d505C7F7E546aD00E3E2Eee25BF665C9b',
'0x2eC991B5c0B742AbD9d2ea31fe6c14a85e91C821',
'0xf505462A29E36E26f25Ef0175Ca1eCBa09CC118f',
'0x027c1882B975E2cd771AE068b0389FA38B9dda73',
];
contractConfig.cosigners = cosigners;

if (!isAddressArray(cosigners)) {
throw new Error(`Missing AxelarServiceGovernance.cosigners in the chain info.`);
}

const threshold = contractConfig.threshold;
const threshold = contractConfig.threshold || Math.floor((cosigners.length + 1) / 2);
contractConfig.threshold = threshold;

if (!isNumber(threshold)) {
throw new Error(`Missing AxelarServiceGovernance.threshold in the chain info.`);
Expand Down
2 changes: 1 addition & 1 deletion evm/deploy-create3-deployer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const contractJson = require('@axelar-network/axelar-gmp-sdk-solidity/artifacts/
const { deployConstAddressDeployer } = require('./deploy-const-address-deployer');
const contractName = 'Create3Deployer';

async function deployCreate3Deployer(wallet, chain, options = null, verifyOptions = null) {
async function deployCreate3Deployer(wallet, chain, options = {}, verifyOptions = null) {
printInfo('Deployer address', wallet.address);

console.log(
Expand Down

0 comments on commit 84d501f

Please sign in to comment.