Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update salt for deployment #36

Merged
merged 6 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Get up and running with integrating your governance system using Axelar. Here ar

### Prerequisite

- Requires Node v16
- Requires Node v16+

### 1. Local Testing

Expand All @@ -67,18 +67,11 @@ Once you're comfortable with the process, use the deployed addresses to integrat

## Interchain Proposal Execution

In order to execute interchain proposals, deploy your instance of `InterchainProposalSender`. Alternatively, use our predefined contract for the **testnet** listed below. On the destination chain, deploy `InterchainProposalExecutor` and set up access control for whitelisted senders from the source chain.
In order to execute interchain proposals, you can use `InterchainProposalSender` on all EVM chains supported by [Axelar](https://docs.axelar.dev/resources/mainnet). You can also deploy your own instance of it. On the destination chain, deploy `InterchainProposalExecutor` and set up access control by whitelisting the `InterchainProposalSender` sender address and the governance DAO caller address through which proposals can be received.

| Chain | InterchainProposalSender | InterchainProposalExecutor |
| --------- | ------------------------------------------ | ------------------------------------------ |
| Avalanche | 0xB9d31cDc0b5c7949EcAE38E069299222FF72A899 | 0x5076782ffC839183Eaf5f68f097c6D205216F1AB |
| Ethereum | 0xB9d31cDc0b5c7949EcAE38E069299222FF72A899 | 0x5076782ffC839183Eaf5f68f097c6D205216F1AB |
| Polygon | 0xB9d31cDc0b5c7949EcAE38E069299222FF72A899 | 0x5076782ffC839183Eaf5f68f097c6D205216F1AB |
| Moonbeam | 0xB9d31cDc0b5c7949EcAE38E069299222FF72A899 | 0x5076782ffC839183Eaf5f68f097c6D205216F1AB |
| Fantom | 0xB9d31cDc0b5c7949EcAE38E069299222FF72A899 | 0x5076782ffC839183Eaf5f68f097c6D205216F1AB |
| Filecoin | 0xd664612d8FAa124b1f9A8bce4376F1a5AC3909d0 | 0x1dA39C49f4ABCd7D76014F45D03F214D2eF12a0d |

Note: The `InterchainProposalExecutor` contract's whitelisted caller feature has been removed to simplify the testing process.
| InterchainProposalSender |
| ------------------------------------------ |
| 0x29abdf2246557226f31c7f112b6030c5CAbA084b |

## Deployment Guide

Expand Down
4 changes: 1 addition & 3 deletions deploy/01-deploy-proposal-sender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ import { contracts } from '../constants';

const contractName = 'InterchainProposalSender';
const deploy: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const [deployer] = await hre.getUnnamedAccounts();
const { gateway, gasService } = contracts[hre.network.name];
const artifact = await hre.artifacts.readArtifact(contractName);
const salt = [deployer, artifact.bytecode, 'v1'].join();
const salt = [contractName, 'v1'].join(' ');
await deploy3(hre, contractName, salt, [gateway, gasService]);
};

Expand Down
3 changes: 1 addition & 2 deletions deploy/02-deploy-proposal-executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ const contractName = "InterchainProposalExecutor";
const deploy: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const [deployer] = await hre.getUnnamedAccounts();
const { gateway } = contracts[hre.network.name];
const artifact = await hre.artifacts.readArtifact(contractName);
const salt = [deployer, artifact.bytecode, "v1"].join()
const salt = [contractName, "v1"].join(' ')
await deploy3(hre, contractName, salt, [gateway, deployer]);
};

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"task": "hardhat"
},
"devDependencies": {
"@axelar-network/axelar-contract-deployments": "git+https://github.com/axelarnetwork/axelar-contract-deployments.git#acfe0fb83cc20fee11206dacbb607f1c0b048434",
"@axelar-network/axelar-contract-deployments": "git+https://github.com/axelarnetwork/axelar-contract-deployments.git#a11a260daef6a74b0a45f391d1565452ccf980d0",
"@axelar-network/axelarjs-sdk": "^0.13.4",
"@nomicfoundation/hardhat-chai-matchers": "^1.0.0",
"@nomicfoundation/hardhat-network-helpers": "^1.0.8",
Expand Down Expand Up @@ -46,7 +46,7 @@
},
"dependencies": {
"@axelar-network/axelar-cgp-solidity": "^4.5.0",
"@axelar-network/axelar-gmp-sdk-solidity": "^5.0.0",
"@axelar-network/axelar-gmp-sdk-solidity": "^5.1.1",
"@axelar-network/axelar-local-dev": "^2.0.1",
"cross-env": "^7.0.3",
"dotenv": "^16.0.3"
Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HardhatRuntimeEnvironment } from "hardhat/types";
const {
deployCreate3Contract,
create3DeployContract,
} = require("@axelar-network/axelar-gmp-sdk-solidity");
import {contracts} from '../constants'

Expand All @@ -19,7 +19,7 @@ export async function deploy3(
.then((d) => d.address);

const artifact = await hre.artifacts.readArtifact(contractName);
const result = await deployCreate3Contract(
const result = await create3DeployContract(
create3Address,
signer,
artifact,
Expand Down
22 changes: 11 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,29 @@
dependencies:
"@axelar-network/axelar-gmp-sdk-solidity" "^4.0.2"

"@axelar-network/axelar-contract-deployments@git+https://github.com/axelarnetwork/axelar-contract-deployments.git#acfe0fb83cc20fee11206dacbb607f1c0b048434":
"@axelar-network/axelar-contract-deployments@git+https://github.com/axelarnetwork/axelar-contract-deployments.git#a11a260daef6a74b0a45f391d1565452ccf980d0":
version "0.1.0"
resolved "git+https://github.com/axelarnetwork/axelar-contract-deployments.git#acfe0fb83cc20fee11206dacbb607f1c0b048434"
resolved "git+https://github.com/axelarnetwork/axelar-contract-deployments.git#a11a260daef6a74b0a45f391d1565452ccf980d0"
dependencies:
"@0xpolygonhermez/zkevm-commonjs" "github:0xpolygonhermez/zkevm-commonjs#v1.0.0"
"@axelar-network/axelar-gmp-sdk-solidity" "4.0.1"
"@axelar-network/axelar-gmp-sdk-solidity" "5.1.1"
"@axelar-network/interchain-token-service" "0.3.0"
ethers "^5.7.2"

"@axelar-network/axelar-gmp-sdk-solidity@4.0.1":
version "4.0.1"
resolved "https://registry.yarnpkg.com/@axelar-network/axelar-gmp-sdk-solidity/-/axelar-gmp-sdk-solidity-4.0.1.tgz#4b3e20f33cbaccc3d8cca8a01445154e1b3d9227"
integrity sha512-3UN0RDpgGzXxmBKR9bn26ReLwCd47kbmh9RXjytRykj5WqoK4Ioi+bnL7tcZgA5TrFrk6enkCxzzQBjNG1L3uw==
"@axelar-network/axelar-gmp-sdk-solidity@5.1.1":
version "5.1.1"
resolved "https://registry.yarnpkg.com/@axelar-network/axelar-gmp-sdk-solidity/-/axelar-gmp-sdk-solidity-5.1.1.tgz#e3c8a28052b6bc302de2e021e9c4b22c20b50ea1"
integrity sha512-Dwt6GxZo2u5cUco9vwxwP2mhEqjpdO80M5dcrmGePHHU+pUmoI+Hc49n3D89lUCm3eE2WMVGtQ2opEQSybzv3Q==

"@axelar-network/axelar-gmp-sdk-solidity@^4.0.0", "@axelar-network/axelar-gmp-sdk-solidity@^4.0.2":
version "4.0.3"
resolved "https://registry.yarnpkg.com/@axelar-network/axelar-gmp-sdk-solidity/-/axelar-gmp-sdk-solidity-4.0.3.tgz#8430b1d7db26aa33bc4eef97ba6a1eac226bf012"
integrity sha512-7u1pGP66YXnBTRgYRb01ZCAewgYv7+0xjco5uxbG1Rj5S8Nv56GQU8zwE3Y4b424NWlajEiRyf4kmTzKrNORRA==

"@axelar-network/axelar-gmp-sdk-solidity@^5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@axelar-network/axelar-gmp-sdk-solidity/-/axelar-gmp-sdk-solidity-5.0.0.tgz#f092a409f627ef5b08eab58d3412d8f397d533e3"
integrity sha512-qxlWa2MrjOCy16H9iNQAQVyHSAOr6ArA2b+F46Z0ryWwfh3MF5wL4Zn5/FLeGIJZsePUnzb934s0n5FZ1CV9fw==
"@axelar-network/axelar-gmp-sdk-solidity@^5.1.1":
version "5.1.1"
resolved "https://registry.yarnpkg.com/@axelar-network/axelar-gmp-sdk-solidity/-/axelar-gmp-sdk-solidity-5.1.1.tgz#e3c8a28052b6bc302de2e021e9c4b22c20b50ea1"
integrity sha512-Dwt6GxZo2u5cUco9vwxwP2mhEqjpdO80M5dcrmGePHHU+pUmoI+Hc49n3D89lUCm3eE2WMVGtQ2opEQSybzv3Q==

"@axelar-network/axelar-local-dev@^2.0.1":
version "2.0.5"
Expand Down
Loading