@axelar-network/axelar-cgp-solidity
Advanced tools
Comparing version 6.1.0 to 6.1.2
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/07cb21efacd947cd6735543d0fd3272f.json" | ||
"buildInfo": "../../../../../build-info/5605b3f42fde35fe036581781cd6b150.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/07cb21efacd947cd6735543d0fd3272f.json" | ||
"buildInfo": "../../../../../build-info/5605b3f42fde35fe036581781cd6b150.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/07cb21efacd947cd6735543d0fd3272f.json" | ||
"buildInfo": "../../../../../build-info/5605b3f42fde35fe036581781cd6b150.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/07cb21efacd947cd6735543d0fd3272f.json" | ||
"buildInfo": "../../../../../build-info/5605b3f42fde35fe036581781cd6b150.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/07cb21efacd947cd6735543d0fd3272f.json" | ||
"buildInfo": "../../../../../build-info/5605b3f42fde35fe036581781cd6b150.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/07cb21efacd947cd6735543d0fd3272f.json" | ||
"buildInfo": "../../../../../build-info/5605b3f42fde35fe036581781cd6b150.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/07cb21efacd947cd6735543d0fd3272f.json" | ||
"buildInfo": "../../../../../build-info/5605b3f42fde35fe036581781cd6b150.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/07cb21efacd947cd6735543d0fd3272f.json" | ||
"buildInfo": "../../../../../build-info/5605b3f42fde35fe036581781cd6b150.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/07cb21efacd947cd6735543d0fd3272f.json" | ||
"buildInfo": "../../../../../build-info/5605b3f42fde35fe036581781cd6b150.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/07cb21efacd947cd6735543d0fd3272f.json" | ||
"buildInfo": "../../../../../build-info/5605b3f42fde35fe036581781cd6b150.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/07cb21efacd947cd6735543d0fd3272f.json" | ||
"buildInfo": "../../../../../build-info/5605b3f42fde35fe036581781cd6b150.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/07cb21efacd947cd6735543d0fd3272f.json" | ||
"buildInfo": "../../../../../build-info/5605b3f42fde35fe036581781cd6b150.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/07cb21efacd947cd6735543d0fd3272f.json" | ||
"buildInfo": "../../../../../build-info/5605b3f42fde35fe036581781cd6b150.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/07cb21efacd947cd6735543d0fd3272f.json" | ||
"buildInfo": "../../../../../build-info/5605b3f42fde35fe036581781cd6b150.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/07cb21efacd947cd6735543d0fd3272f.json" | ||
"buildInfo": "../../../../../build-info/5605b3f42fde35fe036581781cd6b150.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/07cb21efacd947cd6735543d0fd3272f.json" | ||
"buildInfo": "../../../../../build-info/5605b3f42fde35fe036581781cd6b150.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/07cb21efacd947cd6735543d0fd3272f.json" | ||
"buildInfo": "../../../../../build-info/5605b3f42fde35fe036581781cd6b150.json" | ||
} |
require('@nomicfoundation/hardhat-toolbox'); | ||
require('solidity-coverage'); | ||
const { importNetworks, readJSON } = require('@axelar-network/axelar-contract-deployments/evm/utils'); | ||
const { importNetworks, readJSON } = require('@axelar-network/axelar-chains-config'); | ||
@@ -10,4 +10,4 @@ if (process.env.STORAGE_LAYOUT) { | ||
const env = process.env.ENV || 'testnet'; | ||
const chains = require(`@axelar-network/axelar-contract-deployments/info/${env}.json`); | ||
const keys = readJSON(`${__dirname}/info/keys.json`); | ||
const chains = require(`@axelar-network/axelar-chains-config/info/${env}.json`); | ||
const keys = readJSON(`${__dirname}/keys.json`); | ||
const { networks, etherscan } = importNetworks(chains, keys); | ||
@@ -14,0 +14,0 @@ |
{ | ||
"name": "@axelar-network/axelar-cgp-solidity", | ||
"version": "6.1.0", | ||
"version": "6.1.2", | ||
"description": "EVM Smart Contracts for Axelar Network", | ||
@@ -33,6 +33,6 @@ "main": "index.js", | ||
"dependencies": { | ||
"@axelar-network/axelar-gmp-sdk-solidity": "^5.3.0" | ||
"@axelar-network/axelar-gmp-sdk-solidity": "^5.3.3" | ||
}, | ||
"devDependencies": { | ||
"@axelar-network/axelar-contract-deployments": "git://github.com/axelarnetwork/axelar-contract-deployments.git#205c77c0e2f9884c6db6c8e46529d0936356bacc", | ||
"@axelar-network/axelar-chains-config": "^0.1.2", | ||
"@nomicfoundation/hardhat-toolbox": "^2.0.2", | ||
@@ -39,0 +39,0 @@ "chai": "^4.3.7", |
@@ -16,5 +16,4 @@ # Axelar cross-chain gateway protocol solidity implementation | ||
We recommend using the current Node.js [LTS version](https://nodejs.org/en/about/releases/) for satisfying the hardhat compiler | ||
We recommend using the latest Node.js [LTS version](https://nodejs.org/en/about/releases/). | ||
Run in your terminal | ||
```bash | ||
@@ -28,2 +27,68 @@ npm ci | ||
Pre-compiled bytecodes can be found under [Releases](https://github.com/axelarnetwork/axelar-cgp-solidity/releases). | ||
Furthermore, pre-compiled bytecodes and ABI are shipped in the [npm package](https://www.npmjs.com/package/@axelar-network/axelar-cgp-solidity) and can be imported via: | ||
```bash | ||
npm i @axelar-network/axelar-cgp-solidity | ||
``` | ||
```javascript | ||
const IAxelarGateway = require('@axelar-network/axelar-cgp-solidity/artifacts/interfaces/IAxelarGateway.json'); | ||
const AxelarGateway = require('@axelar-network/axelar-cgp-solidity/artifacts/contracts/AxelarGateway.sol/AxelarGateway.json'); | ||
``` | ||
## Live network testing | ||
1. Check if the contract deployments repository supports the chain you will be using. Supported chains can be found [here](https://github.com/axelarnetwork/axelar-contract-deployments/tree/main/axelar-chains-config). If the chain is not already supported, proceed to steps 2-4, otherwise you may skip to step 5. | ||
2. Navigate to the contract deployments repo [here](https://github.com/axelarnetwork/axelar-contract-deployments/) and clone the repository locally. | ||
3. Within the info folder, edit the environment specific file to add the chain you'll be testing. The following values need to be provided: | ||
```json | ||
{ | ||
"chains": { | ||
"example": { | ||
"name": "Example", | ||
"id": "example", | ||
"chainId": 123, | ||
"rpc": "PROVIDER_RPC", | ||
"tokenSymbol": "EXM", | ||
"gasOptions": { | ||
"gasLimit": 8000000 | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
4. In the root directory of this repository, navigate to the `hardhat.config.js` file and modify the chains import line as shown below: | ||
```javascript | ||
const chains = require(`/path/to/axelar-contract-deployments/axelar-chains-config/info/${env}.json`); | ||
``` | ||
5. Create a `keys.json` file in this repo that contains the private keys for your accounts that will be used for testing. For some tests, such as the Axelar gateway tests, you may need to provide at least two private keys (you can refer the [test](https://github.com/axelarnetwork/axelar-cgp-solidity/blob/d0c040330d7498d52dee7eedbebf2aefeb5c87fb/test/BurnableMintableCappedERC20.js#L22) to find the number of accounts needed). At this point the `keys.json` file should resemble the example file below (`chains` can be left empty): | ||
```json | ||
{ | ||
"chains": {}, | ||
"accounts": ["PRIVATE_KEY1", "PRIVATE_KEY2"] | ||
} | ||
``` | ||
6. Ensure that your accounts corresponding to the private keys provided have sufficient gas tokens on the chain. | ||
7. Run | ||
```bash | ||
npm ci | ||
npx hardhat test --network example | ||
``` | ||
8. To run specific tests you may modify the test scripts by adding `.only` to `describe` and/or `it` blocks as shown below or grep the specific test names: | ||
```javascript | ||
describe.only(); | ||
it.only(); | ||
``` | ||
```bash | ||
npx hardhat test --network example --grep 'AxelarGateway' | ||
``` | ||
## Example flows | ||
@@ -30,0 +95,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
935127
151
151