New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@axelar-network/axelar-cgp-solidity

Package Overview
Dependencies
Maintainers
6
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@axelar-network/axelar-cgp-solidity - npm Package Compare versions

Comparing version 6.2.1 to 6.3.0

artifacts/@axelar-network/axelar-gmp-sdk-solidity/contracts/gas-estimation/InterchainGasEstimation.sol/InterchainGasEstimation.dbg.json

2

artifacts/@axelar-network/axelar-gmp-sdk-solidity/contracts/executable/AxelarExecutable.sol/AxelarExecutable.dbg.json
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/85aae6b600f19b8f0cd3d65fc3bf5d2e.json"
"buildInfo": "../../../../../build-info/6d22295b554e61a4dbbf433b58733826.json"
}
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/85aae6b600f19b8f0cd3d65fc3bf5d2e.json"
"buildInfo": "../../../../../build-info/6d22295b554e61a4dbbf433b58733826.json"
}
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/85aae6b600f19b8f0cd3d65fc3bf5d2e.json"
"buildInfo": "../../../../../build-info/6d22295b554e61a4dbbf433b58733826.json"
}
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/85aae6b600f19b8f0cd3d65fc3bf5d2e.json"
"buildInfo": "../../../../../build-info/6d22295b554e61a4dbbf433b58733826.json"
}
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/85aae6b600f19b8f0cd3d65fc3bf5d2e.json"
"buildInfo": "../../../../../build-info/6d22295b554e61a4dbbf433b58733826.json"
}
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/85aae6b600f19b8f0cd3d65fc3bf5d2e.json"
"buildInfo": "../../../../../build-info/6d22295b554e61a4dbbf433b58733826.json"
}
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/85aae6b600f19b8f0cd3d65fc3bf5d2e.json"
"buildInfo": "../../../../../build-info/6d22295b554e61a4dbbf433b58733826.json"
}
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/85aae6b600f19b8f0cd3d65fc3bf5d2e.json"
"buildInfo": "../../../../../build-info/6d22295b554e61a4dbbf433b58733826.json"
}
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/85aae6b600f19b8f0cd3d65fc3bf5d2e.json"
"buildInfo": "../../../../../build-info/6d22295b554e61a4dbbf433b58733826.json"
}
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/85aae6b600f19b8f0cd3d65fc3bf5d2e.json"
"buildInfo": "../../../../../build-info/6d22295b554e61a4dbbf433b58733826.json"
}
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/85aae6b600f19b8f0cd3d65fc3bf5d2e.json"
"buildInfo": "../../../../../build-info/6d22295b554e61a4dbbf433b58733826.json"
}
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/85aae6b600f19b8f0cd3d65fc3bf5d2e.json"
"buildInfo": "../../../../../build-info/6d22295b554e61a4dbbf433b58733826.json"
}
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/85aae6b600f19b8f0cd3d65fc3bf5d2e.json"
"buildInfo": "../../../../../build-info/6d22295b554e61a4dbbf433b58733826.json"
}
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/85aae6b600f19b8f0cd3d65fc3bf5d2e.json"
"buildInfo": "../../../../../build-info/6d22295b554e61a4dbbf433b58733826.json"
}
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/85aae6b600f19b8f0cd3d65fc3bf5d2e.json"
"buildInfo": "../../../../../build-info/6d22295b554e61a4dbbf433b58733826.json"
}
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/85aae6b600f19b8f0cd3d65fc3bf5d2e.json"
"buildInfo": "../../../../../build-info/6d22295b554e61a4dbbf433b58733826.json"
}
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/85aae6b600f19b8f0cd3d65fc3bf5d2e.json"
"buildInfo": "../../../../../build-info/6d22295b554e61a4dbbf433b58733826.json"
}
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/85aae6b600f19b8f0cd3d65fc3bf5d2e.json"
"buildInfo": "../../../../../build-info/6d22295b554e61a4dbbf433b58733826.json"
}
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/85aae6b600f19b8f0cd3d65fc3bf5d2e.json"
"buildInfo": "../../../../../build-info/6d22295b554e61a4dbbf433b58733826.json"
}

@@ -19,2 +19,4 @@ require('@nomicfoundation/hardhat-toolbox');

networks.hardhat.hardfork = process.env.EVM_VERSION || 'merge';
const optimizerSettings = {

@@ -45,2 +47,10 @@ enabled: true,

const gasServiceSettings = {
version: '0.8.23',
settings: {
evmVersion: process.env.EVM_VERSION || 'london',
optimizer: optimizerSettings,
},
};
/**

@@ -53,9 +63,12 @@ * @type import('hardhat/config').HardhatUserConfig

// Fix the Proxy bytecodes
overrides: {
'contracts/AxelarGatewayProxy.sol': compilerSettings,
'contracts/BurnableMintableCappedERC20.sol': compilerSettings,
'contracts/DepositHandler.sol': compilerSettings,
'contracts/gas-service/AxelarGasServiceProxy.sol': compilerSettings,
'contracts/deposit-service/AxelarDepositServiceProxy.sol': compilerSettings,
},
overrides: process.env.NO_OVERRIDES
? {}
: {
'contracts/AxelarGatewayProxy.sol': compilerSettings,
'contracts/BurnableMintableCappedERC20.sol': compilerSettings,
'contracts/DepositHandler.sol': compilerSettings,
'contracts/gas-service/AxelarGasServiceProxy.sol': compilerSettings,
'contracts/deposit-service/AxelarDepositServiceProxy.sol': compilerSettings,
'contracts/gas-service/AxelarGasService.sol': gasServiceSettings, // use optimized setting for the gas service
},
},

@@ -62,0 +75,0 @@ defaultNetwork: 'hardhat',

{
"name": "@axelar-network/axelar-cgp-solidity",
"version": "6.2.1",
"version": "6.3.0",
"description": "EVM Smart Contracts for Axelar Network",

@@ -13,3 +13,3 @@ "main": "index.js",

"lint": "solhint 'contracts/**/*.sol' && eslint 'test/**/*.js'",
"prettier": "prettier --write 'contracts/**/*.sol' 'scripts/**/*.js' 'test/**/*.js' '*.js' 'package.json' '.solhint.json' '.prettierrc' 'slither.config.json' '.github/**/*.yaml'",
"prettier": "prettier --write 'contracts/**/*.sol' 'test/**/*.js' '*.js' 'package.json' '.solhint.json' '.prettierrc' 'slither.config.json' '.github/**/*.yaml'",
"flatten": "sh scripts/flatten-contracts.sh",

@@ -34,6 +34,7 @@ "coverage": "cross-env COVERAGE=true hardhat coverage",

"dependencies": {
"@axelar-network/axelar-gmp-sdk-solidity": "5.6.4"
"@axelar-network/axelar-gmp-sdk-solidity": "5.7.0"
},
"devDependencies": {
"@axelar-network/axelar-chains-config": "^1.0.0",
"@0xpolygonhermez/zkevm-commonjs": "github:0xpolygonhermez/zkevm-commonjs#v1.0.0",
"@axelar-network/axelar-chains-config": "^1.2.0",
"@nomicfoundation/hardhat-toolbox": "^2.0.2",

@@ -43,20 +44,18 @@ "chai": "^4.3.7",

"dotenv": "^16.0.1",
"eslint": "^8.36.0",
"eslint": "^8.57.0",
"eslint-config-richardpringle": "^2.0.0",
"ethers": "^5.7.2",
"fs-extra": "^11.1.1",
"hardhat": "^2.19.1",
"hardhat": "~2.22.2",
"hardhat-contract-sizer": "^2.10.0",
"hardhat-storage-layout": "^0.1.7",
"hardhat-contract-sizer": "^2.10.0",
"lodash": "^4.17.21",
"mocha": "^10.2.0",
"prettier": "^2.8.7",
"prettier": "^2.8.8",
"prettier-plugin-solidity": "1.0.0-beta.19",
"readline-sync": "^1.4.10",
"solhint": "^3.4.1",
"solidity-coverage": "^0.8.4",
"@0xpolygonhermez/zkevm-commonjs": "github:0xpolygonhermez/zkevm-commonjs#v1.0.0"
"solhint": "^4.5.2"
},
"engines": {
"node": ">=16"
"node": ">=18"
},

@@ -63,0 +62,0 @@ "files": [

@@ -28,2 +28,3 @@ # Axelar cross-chain gateway protocol solidity implementation

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

@@ -39,2 +40,10 @@ npm i @axelar-network/axelar-cgp-solidity

## Deploying contracts
See the Axelar contract deployments [repository](https://github.com/axelarnetwork/axelar-contract-deployments) for relevant deployment/upgrade scripts:
1. [Gateway deployment](https://github.com/axelarnetwork/axelar-contract-deployments/tree/main/evm#axelargateway)
2. [Gateway upgrade](https://github.com/axelarnetwork/axelar-contract-deployments/tree/main/evm#gateway-upgrade)
3. [Gas service and deposit service deployment and upgrades](https://github.com/axelarnetwork/axelar-contract-deployments/tree/main/evm#axelargasservice-and-axelardepositservice)
## Live network testing

@@ -45,20 +54,25 @@

3. Within the contract deployments repo, edit the environment specific file inside the `axelar-chains-config/info` folder 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
}
"chains": {
"example": {
"name": "Example",
"axelarId": "example",
"chainId": 123,
"rpc": "PROVIDER_RPC",
"tokenSymbol": "EXM",
"gasOptions": {
"gasLimit": 8000000
},
"confirmations": 1
}
}
}
}
```
`gasLimit` override will skip auto gas estimation (which might be unreliable on certain chains for certain txs). `confirmations` indicates the number of block confirmations to wait for. `axelarId` is the unique id used to reference the chain on Axelar.
4. Return to the `axelar-cgp-solidity` repository. Once there, in the root directory of this repository, navigate to the `hardhat.config.js` file and modify the chains import line as shown below:
```javascript

@@ -69,6 +83,7 @@ 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"]
"chains": {},
"accounts": ["PRIVATE_KEY1", "PRIVATE_KEY2"]
}

@@ -79,2 +94,3 @@ ```

7. Run
```bash

@@ -99,19 +115,21 @@ npm ci

- Explicitly pass `getGasOptions()` using utils.js file for some spceific transactions. See the code below for example
- Explicitly pass `getGasOptions()` using utils.js file for some spceific transactions. See the code below for example
```javascript
await sourceChainGateway
.execute(
await getSignedWeightedExecuteInput(await getTokenDeployData(false), [operatorWallet], [1], 1, [operatorWallet]),
getGasOptions(),
)
.then((tx) => tx.wait(network.config.confirmations));
.execute(
await getSignedWeightedExecuteInput(await getTokenDeployData(false), [operatorWallet], [1], 1, [operatorWallet]),
getGasOptions()
)
.then((tx) => tx.wait(network.config.confirmations));
```
- Using the most up to date and fast rpc can help in tests execution runtime. Make sure the rate limit for the rpc is not exceeded.
- Using the most up to date and fast rpc can help in tests execution runtime. Make sure the rate limit for the rpc is not exceeded.
- Make sure that the account being used to broadcast transactions has enough native balance. The maximum `gasLimit` for a chain should be fetched from an explorer and set it in config file. You may also need to update the `confirmations` required for a transaction to be successfully included in a block in the config [here](https://github.com/axelarnetwork/axelar-contract-deployments/tree/main/axelar-chains-config/info) depending on the network.
- Make sure that the account being used to broadcast transactions has enough native balance. The maximum `gasLimit` for a chain should be fetched from an explorer and set it in config file. You may also need to update the `confirmations` required for a transaction to be successfully included in a block in the config [here](https://github.com/axelarnetwork/axelar-contract-deployments/tree/main/axelar-chains-config/info) depending on the network.
- Note that certain tests can require upto 3 accounts.
- Note that certain tests can require upto 3 accounts.
- Transactions can fail if previous transactions are not mined and picked up by the provide, therefore wait for a transaction to be mined after broadcasting. See the code below for example
- Transactions can fail if previous transactions are not mined and picked up by the provide, therefore wait for a transaction to be mined after broadcasting. See the code below for example
```javascript

@@ -122,13 +140,7 @@ await testToken.mint(userWallet.address, 1e9).then((tx) => tx.wait(network.config.confirmations));

const txExecute = await interchainGovernance.execute(
commandIdGateway,
governanceChain,
governanceAddress,
payload,
getGasOptions(),
);
const txExecute = await interchainGovernance.execute(commandIdGateway, governanceChain, governanceAddress, payload, getGasOptions());
const receiptExecute = await txExecute.wait(network.config.confirmations);
```
```
- The `changeEtherBalance` check expects one tx in a block so change in balances might need to be tested explicitly for unit tests using `changeEtherBalance`.
- The `changeEtherBalance` check expects one tx in a block so change in balances might need to be tested explicitly for unit tests using `changeEtherBalance`.

@@ -135,0 +147,0 @@ ## Example flows

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc