This folder contains deployment scripts for the following contracts.
npm ci
For contract verification to work, copy over the appropriate build artifacts
and contracts
folder from the source repo into this repo. And update the hardhat config to use the same compiler version and optimizer runs setting.
You also need to create a keys.json
file. See evm/.example.keys.json
for an example.
- Compile the contracts from the source repo
- Copy the
artifacts
folder at the root level of this repo - Add the deployer private key in
.env
folder (see.example.env
for reference) - Add additional params in
.env
such as admin addresses, governance etc. - If you'd like to auto-verify the contract on the explorer, then add the explorer API key under
keys.json
(see.example.keys.json
), and add--verify
flag - Run the following depending on the service,
node evm/deploy-gateway-v5.0.x.js --env testnet -n fantom
- 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-v5.0.x.js -e testnet -n fantom --reuseProxy
ORnode evm/deploy-gateway-v5.0.x.js -e testnet -n fantom --reuseProxy --reuseHelpers
- This sets the new
implementation
in the chain config. - Upgrade to the new implementation contract
node evm/deploy-gateway-v5.0.x.js -e testnet -n fantom --upgrade
- Compile the contracts from the source repo
- Copy the
artifacts
folder at the root level of this repo - Add the deployer private key in
.env
folder (see.example.env
for reference) - If you'd like to auto-verify the contract on the explorer, then add the explorer API key under
keys.json
(see.example.keys.json
), and add--verify
flag - Use the
--upgrade
flag to upgrade the contract instead - Run the following depending on the service,
node evm/deploy-upgradable.js deploy --env testnet -n fantom -c AxelarGasService -a ../artifacts/contracts/gas-service/
Install and copy default setting with
npm ci && cp example.env .env
To test the Interchain Token Service deployment
node evm/deploy-its -n ${chain-name} -s [salt]
Run again with -v only
to verify deployed contracts.
You can change .env
to run the above script to testnet instead of local. Change the SALT
to get a new address.
- 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