This folder contains deployment and operational scripts for various contracts.
By default the version of contracts specified in package.json
will be used for deployment.
npm ci
Add the deployer private key in .env
folder (see .example.env
for reference).
Deploy the gateway contract.
node evm/deploy-gateway-v6.2.x.js -e testnet -n ethereum
- When upgrading the gateway, the proxy contract will be reused.
- Depending on the upgrade process, Axelar auth and token deployer helper contracts might be reused as well.
node evm/deploy-gateway-v6.2.x.js -e testnet -n ethereum --reuseProxy
ORnode evm/deploy-gateway-v6.2.x.js -e testnet -n ethereum --reuseProxy --reuseHelpers
- This sets the new
implementation
in the chain config. - Upgrade to the new implementation contract
node evm/deploy-gateway-v6.2.x.js -e testnet -n ethereum --upgrade
- Run the following depending on the service,
node evm/deploy-upgradable.js -e testnet -n ethereum -c AxelarGasService
- Use the
--upgrade
flag to upgrade the contract instead
To test the Interchain Token Service deployment
node evm/deploy-its -e testnet -n ethereum -s [salt]
Change the -s SALT
to derive a new address.
To update the min deposit on Axelar with a param change proposal, you can generate the proposal via
node evm/min-deposit-proposal.js -e mainnet -n all --deposit 1000000
- Clone the repo containing the contract source code.
git clone https://github.com/axelarnetwork/axelar-cgp-solidity.git
- Checkout to the version of contracts to verify in the directory provided to the command before compiling artifacts used by the command.
git checkout vX.Y.Z
npm ci
npm run build
- Update
.hardhat.config.js
to havechains
andkeys
to point to the current repo.
const chains = require(`../axelar-contract-deployments/axelar-chains-config/info/${env}.json`);
const keys = readJSON(`../axelar-contract-deployments/keys.json`);
keys.json
is expected to be in the format described here. You can generate the explorer API key via creating an account on the explorer.
Verify the Axelar gateway contract. -a [address]
can be optionally specified to override the contract address to verify.
node evm/verify-contract.js -e mainnet -n [chain] -c AxelarGateway --dir /path/to/axelar-cgp-solidity
Verify Axelar wrapped tokens deployed via the gateway (BurnableMintableCappedERC20
contract) on the chain in appropriate environment. The address will be retrieved from the gateway by default but can be provided explicitly.
node evm/verify-contract.js -e mainnet -n [chain] -c BurnableMintableCappedERC20 --dir /path/to/axelar-cgp-solidity --args axlUSDC
To get details of options provided in the command run:
node evm/verify-contract.js --help