Skip to content

Commit

Permalink
Merge branch 'monitoring/failed-tx' into monitoring/role-update
Browse files Browse the repository at this point in the history
  • Loading branch information
blockchainguyy authored Nov 1, 2023
2 parents acb0b1e + 334ff8a commit 949cee3
Show file tree
Hide file tree
Showing 19 changed files with 235 additions and 103 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Linting

on:
- pull_request
on: pull_request

jobs:
lint:
Expand All @@ -13,7 +12,7 @@ jobs:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v3
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/publish-chains-config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: 'Publish Axelar Chains Config to NPM'

on:
workflow_dispatch:
workflow_dispatch:

jobs:
publish-to-npm:
name: 'Publish to NPM'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
working-directory: ./axelar-chains-config
- run: npm run build
working-directory: ./axelar-chains-config
- run: npm publish
working-directory: ./axelar-chains-config
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
publish-to-npm:
name: 'Publish to NPM'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
working-directory: ./axelar-chains-config
- run: npm run build
working-directory: ./axelar-chains-config
- run: npm publish
working-directory: ./axelar-chains-config
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
40 changes: 21 additions & 19 deletions .github/workflows/test-chains-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,27 @@ name: Run Axelar Chains Config Tests
on: pull_request

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
arch: [amd64]
steps:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
test:
strategy:
matrix:
node-version:
- 18.x
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Checkout code
uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v4

- name: Install
run: npm ci
working-directory: axelar-chains-config
- name: Install
run: npm ci
working-directory: axelar-chains-config

- name: Test
run: npm run test
working-directory: axelar-chains-config
- name: Test
run: npm run test
working-directory: axelar-chains-config
64 changes: 64 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Test

on: pull_request

jobs:
test:
strategy:
matrix:
node-version:
- 18.x
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Checkout code
uses: actions/checkout@v4

- name: Install
run: npm ci

- name: Spin up Hardhat Network
run: npx hardhat node &

- name: Prepare local.json
run: |
echo '{
"chains": {
"test": {
"name": "Test",
"id": "test",
"chainId": 31337,
"rpc": "http://127.0.0.1:8545",
"tokenSymbol": "TEST",
"contracts": {}
}
}
}' > ./axelar-chains-config/info/local.json
# Create .env file with default hardhat private key that's prefunded
- name: Prepare .env
run: |
echo 'PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80' >> .env
echo 'ENV=local' >> .env
echo 'CHAINS=test' >> .env
- name: Display local.json
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

- 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

- 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
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
},
{
"files": "*.json",
"options": {
"tabWidth": 2,
"parser": "json-stringify"
}
},
{
"files": "*.yaml",
"options": {
"tabWidth": 2
}
Expand Down
60 changes: 45 additions & 15 deletions axelar-chains-config/info/mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"AxelarGateway": {
"address": "0x4F4495243837681061C4743b74B3eEdf548D56A5",
"deployer": "0x6f24A47Fc8AE5441Eb47EFfC3665e70e69Ac3F05",
"startingKeyIDs": ["evm-ethereum-9169970"],
"startingKeyIDs": [
"evm-ethereum-9169970"
],
"implementation": "0x99B5FA03a5ea4315725c43346e55a6A6fbd94098",
"implementationCodehash": "0x7d8ba71c940fc633465d77bc7c2b2d7c4d7fcc0d397d8f699d0345fcad136216",
"authModule": "0xE3B83f79Fbf01B25659f8A814945aB82186A8AD0",
Expand Down Expand Up @@ -104,7 +106,9 @@
"tokenDeployer": "0xb28478319B64f8D47e19A120209A211D902F8b8f",
"deploymentMethod": "create3",
"salt": "AxelarGateway v6.2",
"startingKeyIDs": ["evm-avalanche-9169969"]
"startingKeyIDs": [
"evm-avalanche-9169969"
]
},
"AxelarGasService": {
"salt": "AxelarGasService",
Expand Down Expand Up @@ -186,7 +190,9 @@
"AxelarGateway": {
"address": "0x304acf330bbE08d1e512eefaa92F6a57871fD895",
"deployer": "0x6f24A47Fc8AE5441Eb47EFfC3665e70e69Ac3F05",
"startingKeyIDs": ["evm-fantom-9169993"],
"startingKeyIDs": [
"evm-fantom-9169993"
],
"implementation": "0x99B5FA03a5ea4315725c43346e55a6A6fbd94098",
"implementationCodehash": "0x85db006683bdfff99e7e8518d8eb23a89b6174b6c2c4cea2f5e06d66b0e09a9c",
"authModule": "0xFcf8b865177c45A86a4977e518B44a1eD90191bd",
Expand Down Expand Up @@ -277,7 +283,9 @@
"AxelarGateway": {
"address": "0x6f015F16De9fC8791b234eF68D486d2bF203FBA8",
"deployer": "0x6f24A47Fc8AE5441Eb47EFfC3665e70e69Ac3F05",
"startingKeyIDs": ["evm-polygon-9170074"],
"startingKeyIDs": [
"evm-polygon-9170074"
],
"implementation": "0x99B5FA03a5ea4315725c43346e55a6A6fbd94098",
"implementationCodehash": "0x85db006683bdfff99e7e8518d8eb23a89b6174b6c2c4cea2f5e06d66b0e09a9c",
"authModule": "0xFcf8b865177c45A86a4977e518B44a1eD90191bd",
Expand Down Expand Up @@ -368,7 +376,9 @@
"AxelarGateway": {
"address": "0x4F4495243837681061C4743b74B3eEdf548D56A5",
"deployer": "0x6f24A47Fc8AE5441Eb47EFfC3665e70e69Ac3F05",
"startingKeyIDs": ["evm-moonbeam-9169938"],
"startingKeyIDs": [
"evm-moonbeam-9169938"
],
"implementation": "0x99B5FA03a5ea4315725c43346e55a6A6fbd94098",
"implementationCodehash": "0x7d8ba71c940fc633465d77bc7c2b2d7c4d7fcc0d397d8f699d0345fcad136216",
"authModule": "0xE3B83f79Fbf01B25659f8A814945aB82186A8AD0",
Expand Down Expand Up @@ -457,7 +467,9 @@
"AxelarGateway": {
"address": "0x304acf330bbE08d1e512eefaa92F6a57871fD895",
"deployer": "0x6f24A47Fc8AE5441Eb47EFfC3665e70e69Ac3F05",
"startingKeyIDs": ["evm-binance-9170027"],
"startingKeyIDs": [
"evm-binance-9170027"
],
"implementation": "0x99B5FA03a5ea4315725c43346e55a6A6fbd94098",
"implementationCodehash": "0x021b7a78521cc2d80e7010e7b6c0dcb4e1200df45a89f00ee2b88ba60bacccbb",
"authModule": "0x242E937CE1B5894bf92c343e56eC63fAe522d627",
Expand Down Expand Up @@ -548,7 +560,9 @@
"AxelarGateway": {
"address": "0xe432150cce91c13a887f7D836923d5597adD8E31",
"deployer": "0x6f24A47Fc8AE5441Eb47EFfC3665e70e69Ac3F05",
"startingKeyIDs": ["evm-arbitrum-9170015"],
"startingKeyIDs": [
"evm-arbitrum-9170015"
],
"implementation": "0x99B5FA03a5ea4315725c43346e55a6A6fbd94098",
"implementationCodehash": "0x815c3711b7191c2598de8b4b7d977ac2d1903d20883bd25c26cf2c4a8ca37827",
"authModule": "0x96eEE595f0ACD7d232a9B1dE4FCc2a4b2F6b0f3a",
Expand Down Expand Up @@ -639,7 +653,9 @@
"AxelarGateway": {
"address": "0xe432150cce91c13a887f7D836923d5597adD8E31",
"deployer": "0x6f24A47Fc8AE5441Eb47EFfC3665e70e69Ac3F05",
"startingKeyIDs": ["evm-celo-9170074"],
"startingKeyIDs": [
"evm-celo-9170074"
],
"implementation": "0x99B5FA03a5ea4315725c43346e55a6A6fbd94098",
"implementationCodehash": "0x815c3711b7191c2598de8b4b7d977ac2d1903d20883bd25c26cf2c4a8ca37827",
"authModule": "0x96eEE595f0ACD7d232a9B1dE4FCc2a4b2F6b0f3a",
Expand Down Expand Up @@ -729,7 +745,9 @@
"AxelarGateway": {
"address": "0xe432150cce91c13a887f7D836923d5597adD8E31",
"deployer": "0x6f24A47Fc8AE5441Eb47EFfC3665e70e69Ac3F05",
"startingKeyIDs": ["evm-kava-9169958"],
"startingKeyIDs": [
"evm-kava-9169958"
],
"implementation": "0x99B5FA03a5ea4315725c43346e55a6A6fbd94098",
"implementationCodehash": "0x815c3711b7191c2598de8b4b7d977ac2d1903d20883bd25c26cf2c4a8ca37827",
"authModule": "0x96eEE595f0ACD7d232a9B1dE4FCc2a4b2F6b0f3a",
Expand Down Expand Up @@ -819,7 +837,9 @@
"authModule": "0x96eEE595f0ACD7d232a9B1dE4FCc2a4b2F6b0f3a",
"tokenDeployer": "0xb28478319B64f8D47e19A120209A211D902F8b8f",
"deployer": "0x6f24A47Fc8AE5441Eb47EFfC3665e70e69Ac3F05",
"startingKeyIDs": ["evm-filecoin-9169887"],
"startingKeyIDs": [
"evm-filecoin-9169887"
],
"implementationCodehash": "0x815c3711b7191c2598de8b4b7d977ac2d1903d20883bd25c26cf2c4a8ca37827",
"deploymentMethod": "create3",
"salt": "AxelarGateway v6.2"
Expand Down Expand Up @@ -911,7 +931,9 @@
"authModule": "0x96eEE595f0ACD7d232a9B1dE4FCc2a4b2F6b0f3a",
"tokenDeployer": "0xb28478319B64f8D47e19A120209A211D902F8b8f",
"deployer": "0x6f24A47Fc8AE5441Eb47EFfC3665e70e69Ac3F05",
"startingKeyIDs": ["evm-optimism-9169964"],
"startingKeyIDs": [
"evm-optimism-9169964"
],
"implementationCodehash": "0x815c3711b7191c2598de8b4b7d977ac2d1903d20883bd25c26cf2c4a8ca37827",
"deploymentMethod": "create3",
"salt": "AxelarGateway v6.2"
Expand Down Expand Up @@ -1003,7 +1025,9 @@
"authModule": "0x96eEE595f0ACD7d232a9B1dE4FCc2a4b2F6b0f3a",
"tokenDeployer": "0xb28478319B64f8D47e19A120209A211D902F8b8f",
"deployer": "0x6f24A47Fc8AE5441Eb47EFfC3665e70e69Ac3F05",
"startingKeyIDs": ["evm-linea-9169923"],
"startingKeyIDs": [
"evm-linea-9169923"
],
"implementationCodehash": "0x815c3711b7191c2598de8b4b7d977ac2d1903d20883bd25c26cf2c4a8ca37827",
"deploymentMethod": "create3",
"salt": "AxelarGateway v6.2"
Expand Down Expand Up @@ -1091,7 +1115,9 @@
"authModule": "0x96eEE595f0ACD7d232a9B1dE4FCc2a4b2F6b0f3a",
"tokenDeployer": "0xb28478319B64f8D47e19A120209A211D902F8b8f",
"deployer": "0x6f24A47Fc8AE5441Eb47EFfC3665e70e69Ac3F05",
"startingKeyIDs": ["evm-base-9169992"],
"startingKeyIDs": [
"evm-base-9169992"
],
"implementationCodehash": "0x815c3711b7191c2598de8b4b7d977ac2d1903d20883bd25c26cf2c4a8ca37827",
"deploymentMethod": "create3",
"salt": "AxelarGateway v6.2"
Expand Down Expand Up @@ -1180,7 +1206,9 @@
"implementation": "0x99B5FA03a5ea4315725c43346e55a6A6fbd94098",
"authModule": "0x4EC83aE13097EF1Fb1dC9fC98592bf607A22A55D",
"tokenDeployer": "0xb28478319B64f8D47e19A120209A211D902F8b8f",
"startingKeyIDs": ["evm-mantle-9169917"],
"startingKeyIDs": [
"evm-mantle-9169917"
],
"implementationCodehash": "0x44a3e78ebfbd139f4023ba77ffced61aeea29f0a20eec807d260e805e272c5c9",
"deploymentMethod": "create3",
"salt": "AxelarGateway v6.2"
Expand Down Expand Up @@ -1274,7 +1302,9 @@
"implementationCodehash": "0xbfae4d9f9280a802bd594ee14e35b2da6bfb5e89d2542c366faaa96702ece420",
"authModule": "0xdC46f07661B673Fc262f61FC5b05B10A58a3b7fE",
"tokenDeployer": "0xb28478319B64f8D47e19A120209A211D902F8b8f",
"startingKeyIDs": ["evm-scroll-genesis"],
"startingKeyIDs": [
"evm-scroll-genesis"
],
"deploymentMethod": "create3",
"salt": "AxelarGateway v6.2"
},
Expand Down
5 changes: 4 additions & 1 deletion evm/.example.keys.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
"api": "EXPLORER_API_KEY"
}
},
"accounts": ["private key 1", "private key 2"]
"accounts": [
"private key 1",
"private key 2"
]
}
2 changes: 1 addition & 1 deletion evm/balances.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if (require.main === module) {
.makeOptionMandatory(true)
.env('ENV'),
);
program.addOption(new Option('-n, --chainNames <chainNames>', 'chain names').makeOptionMandatory(true));
program.addOption(new Option('-n, --chainNames <chainNames>', 'chain names').makeOptionMandatory(true).env('CHAINS'));
program.addOption(new Option('-p, --privateKey <privateKey>', 'private key').makeOptionMandatory(true).env('PRIVATE_KEY'));

program.action((options) => {
Expand Down
4 changes: 2 additions & 2 deletions evm/check-wallet-balance.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ async function processCommand(_, chain, options) {
return;
}

const gasLimit = BigNumber.from(staticGasOptions.gasLimit);
const gasPrice = BigNumber.from(staticGasOptions.gasPrice);
const gasLimit = BigNumber.from(chain.staticGasOptions.gasLimit);
const gasPrice = BigNumber.from(chain.eip1559 ? staticGasOptions.maxFeePerGas : staticGasOptions.gasPrice);
const minRequiredBalance = gasLimit * gasPrice * 1.5;
printError(`${chain.name} minimum required Balance`, `${minRequiredBalance / 1e18}`);

Expand Down
4 changes: 2 additions & 2 deletions evm/deploy-contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ program.addOption(
);
program.addOption(new Option('-a, --artifactPath <artifactPath>', 'artifact path').makeOptionMandatory(true));
program.addOption(new Option('-c, --contractName <contractName>', 'contract name').makeOptionMandatory(true));
program.addOption(new Option('-n, --chainNames <chainNames>', 'chain names').makeOptionMandatory(true));
program.addOption(new Option('-n, --chainNames <chainNames>', 'chain names').makeOptionMandatory(true).env('CHAINS'));
program.addOption(new Option('--skipChains <skipChains>', 'chains to skip over'));
program.addOption(
new Option('-m, --deployMethod <deployMethod>', 'deployment method').choices(['create', 'create2', 'create3']).default('create2'),
Expand All @@ -358,7 +358,7 @@ program.addOption(new Option('-p, --privateKey <privateKey>', 'private key').mak
program.addOption(new Option('-s, --salt <salt>', 'salt to use for create2 deployment'));
program.addOption(new Option('-v, --verify <verify>', 'verify the deployed contract on the explorer').env('VERIFY'));
program.addOption(new Option('-y, --yes', 'skip deployment prompt confirmation').env('YES'));
program.addOption(new Option('-x, --skipExisting', 'skip existing if contract was already deployed on chain').env('YES'));
program.addOption(new Option('-x, --skipExisting', 'skip existing if contract was already deployed on chain'));
program.addOption(new Option('--ignoreError', 'ignore errors during deployment for a given chain'));

program.action((options) => {
Expand Down
Loading

0 comments on commit 949cee3

Please sign in to comment.