-
Notifications
You must be signed in to change notification settings - Fork 16
146 lines (116 loc) · 5.87 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
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",
"axelarId": "test",
"chainId": 31337,
"rpc": "http://127.0.0.1:8545",
"tokenSymbol": "TEST",
"contracts": {
"AxelarGasService": {
"collector": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
},
"InterchainGovernance": {
"minimumTimeDelay": 3600
},
"AxelarServiceGovernance": {
"minimumTimeDelay": 3600,
"cosigners": [
"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
"0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
"0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC"
],
"threshold": 2
},
"Multisig": {
"signers": [
"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
"0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
"0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC"
],
"threshold": 2
}
}
}
}
}' > ./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 -c ConstAddressDeployer -m create -y
- name: Deploy Create3Deployer
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" --governance 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --mintLimiter 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --keyID 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 -y
- name: Call Method on Gateway
run: node evm/gateway.js --action callContract --destinationChain test2 -y
- name: Deploy InterchainGovernance using create
run: node evm/deploy-contract.js -c InterchainGovernance -m create -y
- name: Deploy InterchainGovernance using create2
run: node evm/deploy-contract.js -c InterchainGovernance -m create2 -y
- name: Deploy InterchainGovernance using create3
run: node evm/deploy-contract.js -c InterchainGovernance -m create3 -y
- name: Transfer gateway governance
run: node evm/gateway.js --action transferGovernance -y
- name: Generate governance upgrade proposal
run: node evm/governance.js --targetContractName AxelarGateway --action upgrade --proposalAction schedule --date 2100-01-01T12:00:00
- name: Deploy AxelarServiceGovernance using create3
run: node evm/deploy-contract.js -c AxelarServiceGovernance -m create3 -y
- name: Deploy Multisig using create3
run: node evm/deploy-contract.js -c Multisig -m create3 -y
- name: Deploy Operators using create3
run: node evm/deploy-contract.js -c Operators -m create3 -y
- name: Deploy AxelarGasService using create2
run: node evm/deploy-upgradable.js -c AxelarGasService -m create2 -y
- name: Deploy ITS using create2
run: node evm/deploy-its.js -s "v1.0.0" -m create2 -y
- name: Deploy new ITS implementation
run: node evm/deploy-its.js -s "v1.1.0" -m create2 --reuseProxy -y
- name: Upgrade ITS using create2
run: node evm/deploy-its.js -m create2 -u -y
- name: InterchainTokenFactory deploy interchain token on current chain
run: node evm/interchainTokenFactory.js --action deployInterchainToken --name "test" --symbol "TST" --decimals 18 --minter 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --salt "salt" -y
- name: InterchainTokenService deploy interchain token on current chain
run: node evm/its.js --action deployInterchainToken --name "test" --symbol "TST" --decimals 18 --minter 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 --destinationChain '' --gasValue 0 --salt "salt" -y
- name: Add gasOptions to local.json
run: |
jq '.chains.test += {"gasOptions": {"gasLimit": 8000000}} | .chains.test.contracts.AxelarGateway += {"gasOptions": {"gasLimit": 8000000}}' ./axelar-chains-config/info/local.json > temp.json && mv temp.json ./axelar-chains-config/info/local.json
- name: Redeploy AxelarGateway with gasOptions
run: node evm/deploy-gateway-v6.2.x.js -m create3 -s "AxelarGateway v6.2" --governance 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --mintLimiter 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --keyID 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 -y
- name: Redeploy ITS with gasOptions in Chain Config
run: node evm/deploy-its.js -s "v1.0.0" -m create2 -y
- name: Redeploy ITS with gasOptions override via CLI
run: |
node evm/deploy-its.js -s "v1.0.0" -m create2 -y --gasOptions \
'{"gasLimit": 9000000,"gasPriceAdjustment": 1.1}'