Add scripts for deploying Hyperlane (#1)
parent
d3fe92f730
commit
d62af0495a
@ -0,0 +1,69 @@ |
||||
name: CI |
||||
|
||||
on: |
||||
pull_request: |
||||
branches: [main] |
||||
|
||||
# Allows you to run this workflow manually from the Actions tab |
||||
workflow_dispatch: |
||||
|
||||
jobs: |
||||
yarn-install: |
||||
runs-on: ubuntu-latest |
||||
steps: |
||||
- uses: actions/checkout@v3 |
||||
with: |
||||
submodules: recursive |
||||
|
||||
- uses: actions/cache@v3 |
||||
with: |
||||
path: '**/node_modules' |
||||
key: ${{ runner.os }}-yarn-cache4-${{ hashFiles('./yarn.lock') }} |
||||
|
||||
- name: yarn-install |
||||
# Check out the lockfile from main, reinstall, and then |
||||
# verify the lockfile matches what was committed. |
||||
run: | |
||||
yarn install |
||||
CHANGES=$(git status -s --ignore-submodules) |
||||
if [[ ! -z $CHANGES ]]; then |
||||
echo "Changes found: $CHANGES" |
||||
git diff |
||||
exit 1 |
||||
fi |
||||
|
||||
build: |
||||
needs: [yarn-install] |
||||
runs-on: ubuntu-latest |
||||
steps: |
||||
- uses: actions/checkout@v3 |
||||
- uses: actions/cache@v3 |
||||
with: |
||||
path: '**/node_modules' |
||||
key: ${{ runner.os }}-yarn-cache4-${{ hashFiles('./yarn.lock') }} |
||||
|
||||
- name: Install Foundry |
||||
uses: onbjerg/foundry-toolchain@v1 |
||||
with: |
||||
version: nightly |
||||
|
||||
- name: Build |
||||
run: forge build |
||||
|
||||
lint: |
||||
needs: [yarn-install] |
||||
runs-on: ubuntu-latest |
||||
steps: |
||||
- uses: actions/checkout@v3 |
||||
- uses: actions/cache@v3 |
||||
with: |
||||
path: '**/node_modules' |
||||
key: ${{ runner.os }}-yarn-cache4-${{ hashFiles('./yarn.lock') }} |
||||
- name: prettier |
||||
run: | |
||||
yarn prettier |
||||
CHANGES=$(git status -s) |
||||
if [[ ! -z $CHANGES ]]; then |
||||
echo "Changes found: $CHANGES" |
||||
exit 1 |
||||
fi |
@ -0,0 +1,6 @@ |
||||
node_modules/ |
||||
broadcast/ |
||||
out/ |
||||
forge-cache/ |
||||
cache/ |
||||
config/*_agent_config.json |
@ -0,0 +1,4 @@ |
||||
[submodule "lib/forge-std"] |
||||
path = lib/forge-std |
||||
url = https://github.com/foundry-rs/forge-std |
||||
tag = v1.1.1 |
@ -0,0 +1 @@ |
||||
lib/forge-std |
@ -0,0 +1,17 @@ |
||||
{ |
||||
"tabWidth": 2, |
||||
"singleQuote": true, |
||||
"trailingComma": "all", |
||||
"overrides": [ |
||||
{ |
||||
"files": "*.sol", |
||||
"options": { |
||||
"printWidth": 80, |
||||
"tabWidth": 4, |
||||
"useTabs": false, |
||||
"singleQuote": false, |
||||
"bracketSpacing": false |
||||
} |
||||
} |
||||
] |
||||
} |
@ -1,2 +1,78 @@ |
||||
# hyperlane-deploy |
||||
Scripts for deploying Hyperlane contracts |
||||
# Hyperlane Deploy |
||||
|
||||
## Overview |
||||
|
||||
Hyperlane is an interchain messaging protocol that allows applications to communicate between blockchains. |
||||
|
||||
Developers can use Hyperlane to share state between blockchains, allowing them to build interchain applications that live natively across multiple chains. |
||||
|
||||
To read more about interchain applications, how the protocol works, and how to integrate with Hyperlane, please see the [documentation](https://docs.hyperlane.xyz/). |
||||
|
||||
## Deploying Hyperlane |
||||
|
||||
For more detailed instructions on how to deploy Hyperlane to the EVM chain of your choice, see docs.hyperlane.xyz. |
||||
|
||||
### Setup |
||||
|
||||
- Installing foundry |
||||
See https://github.com/foundry-rs/foundry#installation |
||||
|
||||
- Installing dependencies |
||||
|
||||
```bash |
||||
yarn install |
||||
``` |
||||
|
||||
### Deploying core contracts |
||||
|
||||
This script is used to incrementally deploy the core Hyperlane smart contracts to a new chain. |
||||
|
||||
If a contract address for `$LOCAL` is set to `0x0` in `./config/networks.json`, that contract will be deployed. If not, the script will assert that the contract is configured according to the config in `./config`. |
||||
|
||||
If you're deploying to a new chain, ensure there is a corresponding entry for `$LOCAL` in `./config/networks.json` with all contract addresses set to `0x0`. |
||||
|
||||
The script deploys: |
||||
|
||||
- A `ProxyAdmin`, used to administer `TransparentUpgradableProxies` for `Mailbox` and `InterchainGasPaymaster` |
||||
- A `Mailbox`, which applications can use to send and receive messages |
||||
- A `MultisigIsm`. Applications can optionally use this ISM to verify interchain messages sent to the local chain. |
||||
- An `InterchainGasPaymaster`. Applications can optionally use this contract to pay a relayer to deliver their interchain messages to remote chains. |
||||
- A `TestRecipient`. Users can send messages to this contract to verify that everything is working properly. |
||||
|
||||
```bash |
||||
# The private key that will be used to deploy the contracts. Does not have any |
||||
# permissions post-deployment, any key with a balance will do. |
||||
export PRIVATE_KEY=0x1234 |
||||
# The name of the chain to deploy to. Used to configure the localDomain for the |
||||
# Mailbox contract. |
||||
export LOCAL=YOUR_CHAIN_NAME |
||||
# An RPC url for the chain to deploy to. |
||||
export RPC_URL=YOUR_CHAIN_RPC_URL |
||||
# The comma separated name(s) of the chains to receive messages from. |
||||
# Used to configure the default MultisigIsm. |
||||
export REMOTES=ethereum,polygon,avalanche,celo,arbitrum,optimism,bsc,moonbeam |
||||
|
||||
forge script scripts/DeployCore.s.sol --broadcast --rpc-url $RPC_URL --private-key $PRIVATE_KEY |
||||
``` |
||||
|
||||
### Deploying a MultisigIsm |
||||
|
||||
This script is used to deploy a `MultigsigIsm` to the chain of your choice. It will be initialized to verify messages from `$REMOTES` using the config for each remote chain specified in `./config/multisig_ism.json`. |
||||
|
||||
Applications can optionally use this ISM to verify interchain messages. |
||||
|
||||
The script will also deploy a `TestRecipient`, configured to use the deployed ISM. |
||||
|
||||
```bash |
||||
# This address will wind up owning the MultisigIsm after it's deployed. |
||||
export OWNER=0x1234 |
||||
# The private key that will be used to deploy the contracts. Does not have any |
||||
# permissions post-deployment, any key with a balance will do. |
||||
export PRIVATE_KEY=0x1234 |
||||
# An RPC url for the chain to deploy to. |
||||
export RPC_URL=YOUR_CHAIN_RPC_URL |
||||
# The comma separated name(s) of the chain(s) to receive messages from. |
||||
export REMOTES=YOUR_CHAIN_NAME |
||||
|
||||
forge script scripts/DeployMultisigIsm.s.sol --broadcast --rpc-url $RPC_URL --private-key $PRIVATE_KEY |
||||
``` |
||||
|
@ -0,0 +1,198 @@ |
||||
{ |
||||
"foochain": { |
||||
"threshold": 1, |
||||
"validators": [ |
||||
{ |
||||
"address": "0xb17861defd784d13c257f2430c4724ffa7ffc554", |
||||
"name": "asa test validator" |
||||
} |
||||
] |
||||
}, |
||||
"alfajores": { |
||||
"threshold": 2, |
||||
"validators": [ |
||||
{ |
||||
"address": "0xe6072396568e73ce6803b12b7e04164e839f1e54", |
||||
"name": "hyperlane-testnet3-alfajores-validator-0" |
||||
}, |
||||
{ |
||||
"address": "0x9f177f51289b22515f41f95872e1511391b8e105", |
||||
"name": "hyperlane-testnet3-alfajores-validator-1" |
||||
}, |
||||
{ |
||||
"address": "0x15f77400845eb1c971ad08de050861d5508cad6c", |
||||
"name": "hyperlane-testnet3-alfajores-validator-2" |
||||
} |
||||
] |
||||
}, |
||||
"fuji": { |
||||
"threshold": 2, |
||||
"validators": [ |
||||
{ |
||||
"address": "0x9fa19ead5ec76e437948b35e227511b106293c40", |
||||
"name": "hyperlane-testnet3-fuji-validator-0" |
||||
}, |
||||
{ |
||||
"address": "0x227e7d6507762ece0c94678f8c103eff9d682476", |
||||
"name": "hyperlane-testnet3-fuji-validator-1" |
||||
}, |
||||
{ |
||||
"address": "0x2379e43740e4aa4fde48cf4f00a3106df1d8420d", |
||||
"name": "hyperlane-testnet3-fuji-validator-2" |
||||
} |
||||
] |
||||
}, |
||||
"mumbai": { |
||||
"threshold": 2, |
||||
"validators": [ |
||||
{ |
||||
"address": "0x0a664ea799447da6b15645cf8b9e82072a68343f", |
||||
"name": "hyperlane-testnet3-mumbai-validator-0" |
||||
}, |
||||
{ |
||||
"address": "0x6ae6f12929a960aba24ba74ea310e3d37d0ac045", |
||||
"name": "hyperlane-testnet3-mumbai-validator-1" |
||||
}, |
||||
{ |
||||
"address": "0x51f70c047cd73bc7873273707501568857a619c4", |
||||
"name": "hyperlane-testnet3-mumbai-validator-2" |
||||
} |
||||
] |
||||
}, |
||||
"bsctestnet": { |
||||
"threshold": 2, |
||||
"validators": [ |
||||
{ |
||||
"address": "0x23338c8714976dd4a57eaeff17cbd26d7e275c08", |
||||
"name": "hyperlane-testnet3-bsctestnet-validator-0" |
||||
}, |
||||
{ |
||||
"address": "0x85a618d7450ebc37e0d682371f08dac94eec7a76", |
||||
"name": "hyperlane-testnet3-bsctestnet-validator-1" |
||||
}, |
||||
{ |
||||
"address": "0x95b76562e4ba1791a27ba4236801271c9115b141", |
||||
"name": "hyperlane-testnet3-bsctestnet-validator-2" |
||||
} |
||||
] |
||||
}, |
||||
"goerli": { |
||||
"threshold": 2, |
||||
"validators": [ |
||||
{ |
||||
"address": "0xf43fbd072fd38e1121d4b3b0b8a35116bbb01ea9", |
||||
"name": "hyperlane-testnet3-goerli-validator-0" |
||||
}, |
||||
{ |
||||
"address": "0xa33020552a21f35e75bd385c6ab95c3dfa82d930", |
||||
"name": "hyperlane-testnet3-goerli-validator-1" |
||||
}, |
||||
{ |
||||
"address": "0x0bba4043ff242f8bf3f39bafa8930a84d644d947", |
||||
"name": "hyperlane-testnet3-goerli-validator-2" |
||||
} |
||||
] |
||||
}, |
||||
"moonbasealpha": { |
||||
"threshold": 2, |
||||
"validators": [ |
||||
{ |
||||
"address": "0x890c2aeac157c3f067f3e42b8afc797939c59a32", |
||||
"name": "hyperlane-testnet3-moonbasealpha-validator-0" |
||||
}, |
||||
{ |
||||
"address": "0x1b06d6fe69b972ed7420c83599d5a5c0fc185904", |
||||
"name": "hyperlane-testnet3-moonbasealpha-validator-1" |
||||
}, |
||||
{ |
||||
"address": "0xe70b85206a968a99a597581f0fa09c99e7681093", |
||||
"name": "hyperlane-testnet3-moonbasealpha-validator-2" |
||||
} |
||||
] |
||||
}, |
||||
"optimismgoerli": { |
||||
"threshold": 2, |
||||
"validators": [ |
||||
{ |
||||
"address": "0xbb8d77eefbecc55db6e5a19b0fc3dc290776f189", |
||||
"name": "hyperlane-testnet3-optimismgoerli-validator-0" |
||||
}, |
||||
{ |
||||
"address": "0x69792508b4ddaa3ca52241ccfcd1e0b119a1ee65", |
||||
"name": "hyperlane-testnet3-optimismgoerli-validator-1" |
||||
}, |
||||
{ |
||||
"address": "0x11ddb46c6b653e0cdd7ad5bee32ae316e18f8453", |
||||
"name": "hyperlane-testnet3-optimismgoerli-validator-2" |
||||
} |
||||
] |
||||
}, |
||||
"arbitrumgoerli": { |
||||
"threshold": 2, |
||||
"validators": [ |
||||
{ |
||||
"address": "0xce798fa21e323f6b24d9838a10ffecdefdfc4f30", |
||||
"name": "hyperlane-testnet3-arbitrumgoerli-validator-0" |
||||
}, |
||||
{ |
||||
"address": "0xa792d39dca4426927e0f00c1618d61c9cb41779d", |
||||
"name": "hyperlane-testnet3-arbitrumgoerli-validator-1" |
||||
}, |
||||
{ |
||||
"address": "0xdf181fcc11dfac5d01467e4547101a856dd5aa04", |
||||
"name": "hyperlane-testnet3-arbitrumgoerli-validator-2" |
||||
} |
||||
] |
||||
}, |
||||
"test1": { |
||||
"threshold": 2, |
||||
"validators": [ |
||||
{ |
||||
"address": "0xf2561178e8ad8cadd161a855adc6eb02282b426d", |
||||
"name": "random address for testing" |
||||
}, |
||||
{ |
||||
"address": "0x28d638618aca345450604a4bb17e50ce6fe6ee0e", |
||||
"name": "random address for testing" |
||||
}, |
||||
{ |
||||
"address": "0x8dc5bd07ffd0a0053bbf4499747ba6da8442ab36", |
||||
"name": "random address for testing" |
||||
} |
||||
] |
||||
}, |
||||
"test2": { |
||||
"threshold": 2, |
||||
"validators": [ |
||||
{ |
||||
"address": "0xf2561178e8ad8cadd161a855adc6eb02282b426d", |
||||
"name": "random address for testing" |
||||
}, |
||||
{ |
||||
"address": "0x28d638618aca345450604a4bb17e50ce6fe6ee0e", |
||||
"name": "random address for testing" |
||||
}, |
||||
{ |
||||
"address": "0x8dc5bd07ffd0a0053bbf4499747ba6da8442ab36", |
||||
"name": "random address for testing" |
||||
} |
||||
] |
||||
}, |
||||
"test3": { |
||||
"threshold": 2, |
||||
"validators": [ |
||||
{ |
||||
"address": "0xf2561178e8ad8cadd161a855adc6eb02282b426d", |
||||
"name": "random address for testing" |
||||
}, |
||||
{ |
||||
"address": "0x28d638618aca345450604a4bb17e50ce6fe6ee0e", |
||||
"name": "random address for testing" |
||||
}, |
||||
{ |
||||
"address": "0x8dc5bd07ffd0a0053bbf4499747ba6da8442ab36", |
||||
"name": "random address for testing" |
||||
} |
||||
] |
||||
} |
||||
} |
@ -0,0 +1,110 @@ |
||||
{ |
||||
"foochain": { |
||||
"id": 1174786466, |
||||
"owner": "0xfaD1C94469700833717Fa8a3017278BC1cA8031C", |
||||
"contracts": { |
||||
"proxyAdmin": "0xBAaF28F2EFfc4349CFf9901ccdCA007aBAF9Ec83", |
||||
"create2Factory": "0x0000000000000000000000000000000000000000", |
||||
"mailbox": "0xF939e1c22fc562A7a3fB28b94e90CD6d52d385bB", |
||||
"interchainGasPaymaster": "0x592294235892007A608548e8Cbb823FeF6a6bddb", |
||||
"testRecipient": "0xAE791405766B9c3ed253517463196BEF5e4833d7" |
||||
} |
||||
}, |
||||
"alfajores": { |
||||
"id": 44787, |
||||
"owner": "0xfaD1C94469700833717Fa8a3017278BC1cA8031C", |
||||
"contracts": { |
||||
"proxyAdmin": "0x4e4D563e2cBFC35c4BC16003685443Fae2FA702f", |
||||
"mailbox": "0xCC737a94FecaeC165AbCf12dED095BB13F037685", |
||||
"interchainGasPaymaster": "0xf857706CE59Cb7AE6df81Bbd0B0a656dB3e6beDA", |
||||
"create2Factory": "0xc97D8e6f57b0d64971453dDc6EB8483fec9d163a", |
||||
"testRecipient": "0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE" |
||||
} |
||||
}, |
||||
"fuji": { |
||||
"id": 43113, |
||||
"owner": "0xfaD1C94469700833717Fa8a3017278BC1cA8031C", |
||||
"contracts": { |
||||
"proxyAdmin": "0x4e4D563e2cBFC35c4BC16003685443Fae2FA702f", |
||||
"mailbox": "0xCC737a94FecaeC165AbCf12dED095BB13F037685", |
||||
"interchainGasPaymaster": "0xf857706CE59Cb7AE6df81Bbd0B0a656dB3e6beDA", |
||||
"create2Factory": "0xc97D8e6f57b0d64971453dDc6EB8483fec9d163a", |
||||
"testRecipient": "0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE" |
||||
} |
||||
}, |
||||
"mumbai": { |
||||
"id": 80001, |
||||
"owner": "0xfaD1C94469700833717Fa8a3017278BC1cA8031C", |
||||
"contracts": { |
||||
"proxyAdmin": "0x4e4D563e2cBFC35c4BC16003685443Fae2FA702f", |
||||
"mailbox": "0xCC737a94FecaeC165AbCf12dED095BB13F037685", |
||||
"interchainGasPaymaster": "0xf857706CE59Cb7AE6df81Bbd0B0a656dB3e6beDA", |
||||
"create2Factory": "0xc97D8e6f57b0d64971453dDc6EB8483fec9d163a", |
||||
"testRecipient": "0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE" |
||||
} |
||||
}, |
||||
"bsctestnet": { |
||||
"id": 97, |
||||
"owner": "0xfaD1C94469700833717Fa8a3017278BC1cA8031C", |
||||
"contracts": { |
||||
"proxyAdmin": "0x4e4D563e2cBFC35c4BC16003685443Fae2FA702f", |
||||
"mailbox": "0xCC737a94FecaeC165AbCf12dED095BB13F037685", |
||||
"interchainGasPaymaster": "0xf857706CE59Cb7AE6df81Bbd0B0a656dB3e6beDA", |
||||
"create2Factory": "0xc97D8e6f57b0d64971453dDc6EB8483fec9d163a", |
||||
"testRecipient": "0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE" |
||||
} |
||||
}, |
||||
"goerli": { |
||||
"id": 5, |
||||
"owner": "0xfaD1C94469700833717Fa8a3017278BC1cA8031C", |
||||
"contracts": { |
||||
"proxyAdmin": "0x4e4D563e2cBFC35c4BC16003685443Fae2FA702f", |
||||
"mailbox": "0xCC737a94FecaeC165AbCf12dED095BB13F037685", |
||||
"interchainGasPaymaster": "0xf857706CE59Cb7AE6df81Bbd0B0a656dB3e6beDA", |
||||
"create2Factory": "0xc97D8e6f57b0d64971453dDc6EB8483fec9d163a", |
||||
"testRecipient": "0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE" |
||||
} |
||||
}, |
||||
"moonbasealpha": { |
||||
"id": 1287, |
||||
"owner": "0xfaD1C94469700833717Fa8a3017278BC1cA8031C", |
||||
"contracts": { |
||||
"proxyAdmin": "0x4e4D563e2cBFC35c4BC16003685443Fae2FA702f", |
||||
"mailbox": "0xCC737a94FecaeC165AbCf12dED095BB13F037685", |
||||
"interchainGasPaymaster": "0xf857706CE59Cb7AE6df81Bbd0B0a656dB3e6beDA", |
||||
"create2Factory": "0xc97D8e6f57b0d64971453dDc6EB8483fec9d163a", |
||||
"testRecipient": "0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE" |
||||
} |
||||
}, |
||||
"optimismgoerli": { |
||||
"id": 420, |
||||
"owner": "0xfaD1C94469700833717Fa8a3017278BC1cA8031C", |
||||
"contracts": { |
||||
"proxyAdmin": "0x4e4D563e2cBFC35c4BC16003685443Fae2FA702f", |
||||
"mailbox": "0xCC737a94FecaeC165AbCf12dED095BB13F037685", |
||||
"interchainGasPaymaster": "0xf857706CE59Cb7AE6df81Bbd0B0a656dB3e6beDA", |
||||
"create2Factory": "0xc97D8e6f57b0d64971453dDc6EB8483fec9d163a", |
||||
"testRecipient": "0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE" |
||||
} |
||||
}, |
||||
"arbitrumgoerli": { |
||||
"id": 421613, |
||||
"owner": "0xfaD1C94469700833717Fa8a3017278BC1cA8031C", |
||||
"contracts": { |
||||
"proxyAdmin": "0x4e4D563e2cBFC35c4BC16003685443Fae2FA702f", |
||||
"mailbox": "0xCC737a94FecaeC165AbCf12dED095BB13F037685", |
||||
"interchainGasPaymaster": "0xf857706CE59Cb7AE6df81Bbd0B0a656dB3e6beDA", |
||||
"create2Factory": "0xc97D8e6f57b0d64971453dDc6EB8483fec9d163a", |
||||
"testRecipient": "0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE" |
||||
} |
||||
}, |
||||
"test1": { |
||||
"id": 13371 |
||||
}, |
||||
"test2": { |
||||
"id": 13372 |
||||
}, |
||||
"test3": { |
||||
"id": 13373 |
||||
} |
||||
} |
@ -0,0 +1,14 @@ |
||||
[profile.default] |
||||
src = 'scripts' |
||||
out = 'out' |
||||
libs = ['node_modules', 'lib'] |
||||
test = 'test' |
||||
cache_path = 'forge-cache' |
||||
allow_paths = ["../node_modules"] |
||||
solc = '0.8.17' |
||||
optimizer = true |
||||
optimizer_runs = 999_999 |
||||
fs_permissions = [{ access = "read-write", path = "./"}] |
||||
|
||||
[profile.ci] |
||||
verbosity = 4 |
@ -0,0 +1,80 @@ |
||||
// from https://gist.github.com/rmeissner/76d6345796909ee41fb9f36fdaa4d15f |
||||
pragma solidity >=0.8.0 <0.9.0; |
||||
|
||||
library BytesLib { |
||||
function slice( |
||||
bytes memory _bytes, |
||||
uint256 _start, |
||||
uint256 _length |
||||
) internal pure returns (bytes memory) { |
||||
require(_length + 31 >= _length, "slice_overflow"); |
||||
require(_bytes.length >= _start + _length, "slice_outOfBounds"); |
||||
|
||||
bytes memory tempBytes; |
||||
|
||||
// Check length is 0. `iszero` return 1 for `true` and 0 for `false`. |
||||
assembly { |
||||
switch iszero(_length) |
||||
case 0 { |
||||
// Get a location of some free memory and store it in tempBytes as |
||||
// Solidity does for memory variables. |
||||
tempBytes := mload(0x40) |
||||
|
||||
// Calculate length mod 32 to handle slices that are not a multiple of 32 in size. |
||||
let lengthmod := and(_length, 31) |
||||
|
||||
// tempBytes will have the following format in memory: <length><data> |
||||
// When copying data we will offset the start forward to avoid allocating additional memory |
||||
// Therefore part of the length area will be written, but this will be overwritten later anyways. |
||||
// In case no offset is require, the start is set to the data region (0x20 from the tempBytes) |
||||
// mc will be used to keep track where to copy the data to. |
||||
let mc := add( |
||||
add(tempBytes, lengthmod), |
||||
mul(0x20, iszero(lengthmod)) |
||||
) |
||||
let end := add(mc, _length) |
||||
|
||||
for { |
||||
// Same logic as for mc is applied and additionally the start offset specified for the method is added |
||||
let cc := add( |
||||
add( |
||||
add(_bytes, lengthmod), |
||||
mul(0x20, iszero(lengthmod)) |
||||
), |
||||
_start |
||||
) |
||||
} lt(mc, end) { |
||||
// increase `mc` and `cc` to read the next word from memory |
||||
mc := add(mc, 0x20) |
||||
cc := add(cc, 0x20) |
||||
} { |
||||
// Copy the data from source (cc location) to the slice data (mc location) |
||||
mstore(mc, mload(cc)) |
||||
} |
||||
|
||||
// Store the length of the slice. This will overwrite any partial data that |
||||
// was copied when having slices that are not a multiple of 32. |
||||
mstore(tempBytes, _length) |
||||
|
||||
// update free-memory pointer |
||||
// allocating the array padded to 32 bytes like the compiler does now |
||||
// To set the used memory as a multiple of 32, add 31 to the actual memory usage (mc) |
||||
// and remove the modulo 32 (the `and` with `not(31)`) |
||||
mstore(0x40, and(add(mc, 31), not(31))) |
||||
} |
||||
// if we want a zero-length slice let's just return a zero-length array |
||||
default { |
||||
tempBytes := mload(0x40) |
||||
// zero out the 32 bytes slice we are about to return |
||||
// we need to do it because Solidity does not garbage collect |
||||
mstore(tempBytes, 0) |
||||
|
||||
// update free-memory pointer |
||||
// tempBytes uses 32 bytes in memory (even when empty) for the length. |
||||
mstore(0x40, add(tempBytes, 0x20)) |
||||
} |
||||
} |
||||
|
||||
return tempBytes; |
||||
} |
||||
} |
@ -0,0 +1,105 @@ |
||||
// SPDX-License-Identifier: UNLICENSED |
||||
pragma solidity ^0.8.17; |
||||
import "../lib/forge-std/src/console.sol"; |
||||
|
||||
import {ConfigLib} from "../lib/ConfigLib.sol"; |
||||
import {MultisigIsm} from "@hyperlane-xyz/core/contracts/isms/MultisigIsm.sol"; |
||||
import {TransparentUpgradeableProxy} from "@hyperlane-xyz/core/contracts/upgrade/TransparentUpgradeableProxy.sol"; |
||||
|
||||
library CheckLib { |
||||
function check( |
||||
ConfigLib.HyperlaneDomainConfig memory config, |
||||
ConfigLib.MultisigIsmConfig memory ismConfig |
||||
) internal view { |
||||
checkOwners(config); |
||||
checkAdmins(config); |
||||
checkMailboxIsm(config, ismConfig); |
||||
console.log( |
||||
"Succesfully checked Hyperlane deployment for %s", |
||||
config.chainName |
||||
); |
||||
} |
||||
|
||||
function checkOwners( |
||||
ConfigLib.HyperlaneDomainConfig memory config |
||||
) private view { |
||||
require( |
||||
config.admin.owner() == config.owner, |
||||
"ProxyAdmin owner misconfigured" |
||||
); |
||||
require( |
||||
config.igp.owner() == config.owner, |
||||
"InterchainGasPaymaster owner misconfigured" |
||||
); |
||||
require( |
||||
config.mailbox.owner() == config.owner, |
||||
"Mailbox owner misconfigured" |
||||
); |
||||
} |
||||
|
||||
function checkAdmins( |
||||
ConfigLib.HyperlaneDomainConfig memory config |
||||
) private view { |
||||
require( |
||||
config.admin.getProxyAdmin( |
||||
TransparentUpgradeableProxy(payable(address(config.igp))) |
||||
) == address(config.admin), |
||||
"InterchainGasPaymaster proxy admin misconfigured" |
||||
); |
||||
require( |
||||
config.admin.getProxyAdmin( |
||||
TransparentUpgradeableProxy(payable(address(config.mailbox))) |
||||
) == address(config.admin), |
||||
"Mailbox proxy admin misconfigured" |
||||
); |
||||
} |
||||
|
||||
function checkMailboxIsm( |
||||
ConfigLib.HyperlaneDomainConfig memory config, |
||||
ConfigLib.MultisigIsmConfig memory ismConfig |
||||
) private view { |
||||
MultisigIsm ism = MultisigIsm(address(config.mailbox.defaultIsm())); |
||||
check(ismConfig, ism, config.owner); |
||||
} |
||||
|
||||
function contains( |
||||
address[] memory set, |
||||
address element |
||||
) internal pure returns (bool) { |
||||
for (uint256 i = 0; i < set.length; i++) { |
||||
if (set[i] == element) { |
||||
return true; |
||||
} |
||||
} |
||||
return false; |
||||
} |
||||
|
||||
function check( |
||||
ConfigLib.MultisigIsmConfig memory config, |
||||
MultisigIsm ism, |
||||
address owner |
||||
) internal view { |
||||
require(ism.owner() == owner, "MultisigIsm owner misconfigured"); |
||||
for (uint256 i = 0; i < config.domains.length; i++) { |
||||
ConfigLib.MultisigIsmDomainConfig memory domain = config.domains[i]; |
||||
require( |
||||
domain.threshold == ism.threshold(domain.domainId), |
||||
string.concat( |
||||
"Default MultisigIsm threshold misconfigured for", |
||||
domain.chainName |
||||
) |
||||
); |
||||
address[] memory validators = ism.validators(domain.domainId); |
||||
require(domain.validators.length == validators.length); |
||||
for (uint256 j = 0; j < validators.length; j++) { |
||||
require( |
||||
contains(domain.validators, validators[j]), |
||||
string.concat( |
||||
"Default MultisigIsm validator set misconfigured for ", |
||||
domain.chainName |
||||
) |
||||
); |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,216 @@ |
||||
// SPDX-License-Identifier: UNLICENSED |
||||
pragma solidity ^0.8.17; |
||||
import "../lib/forge-std/src/Script.sol"; |
||||
import {Vm} from "../lib/forge-std/src/Vm.sol"; |
||||
|
||||
import {BytesLib} from "../lib/BytesLib.sol"; |
||||
import {MultisigIsm} from "@hyperlane-xyz/core/contracts/isms/MultisigIsm.sol"; |
||||
import {Mailbox} from "@hyperlane-xyz/core/contracts/Mailbox.sol"; |
||||
import {InterchainGasPaymaster} from "@hyperlane-xyz/core/contracts/InterchainGasPaymaster.sol"; |
||||
import {ProxyAdmin} from "@hyperlane-xyz/core/contracts/upgrade/ProxyAdmin.sol"; |
||||
import {TransparentUpgradeableProxy} from "@hyperlane-xyz/core/contracts/upgrade/TransparentUpgradeableProxy.sol"; |
||||
import {Create2Factory} from "@hyperlane-xyz/core/contracts/Create2Factory.sol"; |
||||
import {TestRecipient} from "@hyperlane-xyz/core/contracts/test/TestRecipient.sol"; |
||||
|
||||
library ConfigLib { |
||||
using stdJson for string; |
||||
using BytesLib for bytes; |
||||
|
||||
struct HyperlaneDomainConfig { |
||||
string chainName; |
||||
uint32 domainId; |
||||
address owner; |
||||
Mailbox mailbox; |
||||
InterchainGasPaymaster igp; |
||||
ProxyAdmin admin; |
||||
Create2Factory create2; |
||||
TestRecipient testRecipient; |
||||
} |
||||
|
||||
struct MultisigIsmDomainConfig { |
||||
string chainName; |
||||
uint32 domainId; |
||||
uint8 threshold; |
||||
address[] validators; |
||||
} |
||||
|
||||
struct MultisigIsmConfig { |
||||
MultisigIsmDomainConfig[] domains; |
||||
} |
||||
|
||||
function readContractAddress( |
||||
Vm vm, |
||||
string memory chainName, |
||||
string memory contractName |
||||
) private view returns (address) { |
||||
string memory json = vm.readFile("config/networks.json"); |
||||
string memory prefix = ".contracts."; |
||||
try |
||||
vm.parseJson( |
||||
json, |
||||
string.concat(chainName, string.concat(prefix, contractName)) |
||||
) |
||||
returns (bytes memory result) { |
||||
address parsedAddr = abi.decode(result, (address)); |
||||
return parsedAddr == address(0x20) ? address(0) : parsedAddr; |
||||
} catch { |
||||
return address(0); |
||||
} |
||||
} |
||||
|
||||
function readHyperlaneDomainConfig( |
||||
Vm vm, |
||||
string memory chainName |
||||
) internal view returns (HyperlaneDomainConfig memory) { |
||||
string memory json = vm.readFile("config/networks.json"); |
||||
uint32 domainId = abi.decode( |
||||
vm.parseJson(json, string.concat(chainName, ".id")), |
||||
(uint32) |
||||
); |
||||
address owner = abi.decode( |
||||
vm.parseJson(json, string.concat(chainName, ".owner")), |
||||
(address) |
||||
); |
||||
Mailbox mailbox = Mailbox( |
||||
readContractAddress(vm, chainName, "mailbox") |
||||
); |
||||
InterchainGasPaymaster igp = InterchainGasPaymaster( |
||||
readContractAddress(vm, chainName, "interchainGasPaymaster") |
||||
); |
||||
ProxyAdmin admin = ProxyAdmin( |
||||
readContractAddress(vm, chainName, "proxyAdmin") |
||||
); |
||||
Create2Factory create2 = Create2Factory( |
||||
readContractAddress(vm, chainName, "create2Factory") |
||||
); |
||||
TestRecipient recipient = TestRecipient( |
||||
readContractAddress(vm, chainName, "testRecipient") |
||||
); |
||||
return |
||||
HyperlaneDomainConfig( |
||||
chainName, |
||||
domainId, |
||||
owner, |
||||
mailbox, |
||||
igp, |
||||
admin, |
||||
create2, |
||||
recipient |
||||
); |
||||
} |
||||
|
||||
function readMultisigIsmDomainConfig( |
||||
Vm vm, |
||||
string memory chainName |
||||
) private view returns (MultisigIsmDomainConfig memory) { |
||||
string memory json = vm.readFile("config/multisig_ism.json"); |
||||
uint8 threshold = abi.decode( |
||||
vm.parseJson(json, string.concat(chainName, ".threshold")), |
||||
(uint8) |
||||
); |
||||
bytes memory validatorBytes = json.parseRaw( |
||||
string.concat(chainName, ".validators[*].address") |
||||
); |
||||
uint256 numValidators = validatorBytes.length / 32; |
||||
address[] memory validators = new address[](numValidators); |
||||
for (uint256 i = 0; i < validators.length; i++) { |
||||
validators[i] = abi.decode( |
||||
validatorBytes.slice(i * 32, 32), |
||||
(address) |
||||
); |
||||
} |
||||
|
||||
json = vm.readFile("config/networks.json"); |
||||
uint32 domainId = abi.decode( |
||||
vm.parseJson(json, string.concat(chainName, ".id")), |
||||
(uint32) |
||||
); |
||||
return |
||||
MultisigIsmDomainConfig(chainName, domainId, threshold, validators); |
||||
} |
||||
|
||||
function readMultisigIsmConfig( |
||||
Vm vm, |
||||
string[] memory chainNames |
||||
) internal view returns (MultisigIsmConfig memory) { |
||||
MultisigIsmDomainConfig[] |
||||
memory domains = new MultisigIsmDomainConfig[](chainNames.length); |
||||
for (uint256 i = 0; i < chainNames.length; i++) { |
||||
string memory chainName = chainNames[i]; |
||||
domains[i] = readMultisigIsmDomainConfig(vm, chainName); |
||||
} |
||||
return MultisigIsmConfig(domains); |
||||
} |
||||
|
||||
function writeAgentConfig( |
||||
HyperlaneDomainConfig memory config, |
||||
Vm vm, |
||||
uint256 startBlock |
||||
) internal { |
||||
string memory baseConfig = "config"; |
||||
vm.serializeString( |
||||
baseConfig, |
||||
"domain", |
||||
vm.toString(uint256(config.domainId)) |
||||
); |
||||
vm.serializeString(baseConfig, "rpcStyle", "ethereum"); |
||||
vm.serializeString(baseConfig, "finalityBlocks", "POPULATE_ME"); |
||||
|
||||
string memory addresses = "addresses"; |
||||
vm.serializeAddress(addresses, "mailbox", address(config.mailbox)); |
||||
vm.serializeString( |
||||
baseConfig, |
||||
"addresses", |
||||
vm.serializeAddress( |
||||
addresses, |
||||
"interchainGasPaymaster", |
||||
address(config.igp) |
||||
) |
||||
); |
||||
|
||||
string memory connection = "connection"; |
||||
vm.serializeString(connection, "type", "http"); |
||||
vm.serializeString( |
||||
baseConfig, |
||||
"connection", |
||||
vm.serializeString(connection, "url", "") |
||||
); |
||||
|
||||
string memory index = "index"; |
||||
vm.serializeString( |
||||
baseConfig, |
||||
"index", |
||||
vm.serializeString(index, "from", vm.toString(startBlock)) |
||||
); |
||||
|
||||
vm.serializeString(baseConfig, "name", config.chainName).write( |
||||
string.concat("./config/", config.chainName, "_agent_config.json") |
||||
); |
||||
} |
||||
|
||||
function write(HyperlaneDomainConfig memory config, Vm vm) internal { |
||||
string memory contracts = "contracts"; |
||||
vm.serializeAddress(contracts, "mailbox", address(config.mailbox)); |
||||
vm.serializeAddress( |
||||
contracts, |
||||
"interchainGasPaymaster", |
||||
address(config.igp) |
||||
); |
||||
vm.serializeAddress(contracts, "proxyAdmin", address(config.admin)); |
||||
vm.serializeAddress( |
||||
contracts, |
||||
"testRecipient", |
||||
address(config.testRecipient) |
||||
); |
||||
vm |
||||
.serializeAddress( |
||||
contracts, |
||||
"create2Factory", |
||||
address(config.create2) |
||||
) |
||||
.write( |
||||
"./config/networks.json", |
||||
string.concat(".", config.chainName, ".contracts") |
||||
); |
||||
} |
||||
} |
@ -0,0 +1,144 @@ |
||||
// SPDX-License-Identifier: UNLICENSED |
||||
pragma solidity ^0.8.17; |
||||
import "../lib/forge-std/src/console.sol"; |
||||
|
||||
import {ConfigLib} from "../lib/ConfigLib.sol"; |
||||
import {MultisigIsm} from "@hyperlane-xyz/core/contracts/isms/MultisigIsm.sol"; |
||||
import {Mailbox} from "@hyperlane-xyz/core/contracts/Mailbox.sol"; |
||||
import {InterchainGasPaymaster} from "@hyperlane-xyz/core/contracts/InterchainGasPaymaster.sol"; |
||||
import {ProxyAdmin} from "@hyperlane-xyz/core/contracts/upgrade/ProxyAdmin.sol"; |
||||
import {TransparentUpgradeableProxy} from "@hyperlane-xyz/core/contracts/upgrade/TransparentUpgradeableProxy.sol"; |
||||
import {Create2Factory} from "@hyperlane-xyz/core/contracts/Create2Factory.sol"; |
||||
import {TestRecipient} from "@hyperlane-xyz/core/contracts/test/TestRecipient.sol"; |
||||
|
||||
library DeployLib { |
||||
function deploy( |
||||
ConfigLib.HyperlaneDomainConfig memory config, |
||||
ConfigLib.MultisigIsmConfig memory ismConfig |
||||
) internal { |
||||
deployProxyAdmin(config); |
||||
deployIgp(config); |
||||
deployMailbox(config, ismConfig); |
||||
deployTestRecipient(config); |
||||
} |
||||
|
||||
function deployProxyAdmin( |
||||
ConfigLib.HyperlaneDomainConfig memory config |
||||
) private { |
||||
if (address(config.admin) == address(0)) { |
||||
config.admin = new ProxyAdmin(); |
||||
console.log( |
||||
"ProxyAdmin deployed at address %s", |
||||
address(config.admin) |
||||
); |
||||
config.admin.transferOwnership(config.owner); |
||||
} else { |
||||
console.log( |
||||
"Found ProxyAdmin at address %s, skipping deployment", |
||||
address(config.admin) |
||||
); |
||||
} |
||||
} |
||||
|
||||
function deployIgp(ConfigLib.HyperlaneDomainConfig memory config) private { |
||||
require( |
||||
address(config.admin) != address(0), |
||||
"Must deploy ProxyAdmin before InterchainGasPaymaster" |
||||
); |
||||
if (address(config.igp) == address(0)) { |
||||
InterchainGasPaymaster impl = new InterchainGasPaymaster(); |
||||
bytes memory initData = abi.encodeCall( |
||||
InterchainGasPaymaster.initialize, |
||||
() |
||||
); |
||||
TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy( |
||||
address(impl), |
||||
address(config.admin), |
||||
initData |
||||
); |
||||
console.log( |
||||
"InterchainGasPaymaster deployed at address %s", |
||||
address(proxy) |
||||
); |
||||
config.igp = InterchainGasPaymaster(address(proxy)); |
||||
config.igp.transferOwnership(config.owner); |
||||
} else { |
||||
console.log( |
||||
"Found InterchainGasPaymaster at address %s, skipping deployment", |
||||
address(config.igp) |
||||
); |
||||
} |
||||
} |
||||
|
||||
function deployMailbox( |
||||
ConfigLib.HyperlaneDomainConfig memory config, |
||||
ConfigLib.MultisigIsmConfig memory ismConfig |
||||
) private { |
||||
require( |
||||
address(config.admin) != address(0), |
||||
"Must deploy ProxyAdmin before Mailbox" |
||||
); |
||||
if (address(config.mailbox) == address(0)) { |
||||
MultisigIsm ism = deploy(ismConfig, config.owner); |
||||
|
||||
Mailbox mailbox = new Mailbox(config.domainId); |
||||
bytes memory initData = abi.encodeCall( |
||||
Mailbox.initialize, |
||||
(config.owner, address(ism)) |
||||
); |
||||
TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy( |
||||
address(mailbox), |
||||
address(config.admin), |
||||
initData |
||||
); |
||||
console.log("Mailbox deployed at address %s", address(proxy)); |
||||
config.mailbox = Mailbox(address(proxy)); |
||||
} else { |
||||
console.log( |
||||
"Found Mailbox at address %s, skipping deployment", |
||||
address(config.igp) |
||||
); |
||||
} |
||||
} |
||||
|
||||
function deployTestRecipient( |
||||
ConfigLib.HyperlaneDomainConfig memory config |
||||
) private { |
||||
if (address(config.testRecipient) == address(0)) { |
||||
config.testRecipient = new TestRecipient(); |
||||
console.log( |
||||
"TestRecipient deployed at address %s", |
||||
address(config.testRecipient) |
||||
); |
||||
} else { |
||||
console.log( |
||||
"Found TestRecipient at address %s, skipping deployment", |
||||
address(config.igp) |
||||
); |
||||
} |
||||
} |
||||
|
||||
function deploy( |
||||
ConfigLib.MultisigIsmConfig memory config, |
||||
address owner |
||||
) internal returns (MultisigIsm) { |
||||
// Deploy a default MultisigIsm and enroll validators for remote |
||||
// networks. |
||||
MultisigIsm ism = new MultisigIsm(); |
||||
console.log("MultisigIsm deployed at address %s", address(ism)); |
||||
uint32[] memory remoteDomainIds = new uint32[](config.domains.length); |
||||
uint8[] memory remoteThresholds = new uint8[](config.domains.length); |
||||
address[][] memory remoteValidators = new address[][]( |
||||
config.domains.length |
||||
); |
||||
for (uint256 i = 0; i < config.domains.length; i++) { |
||||
remoteDomainIds[i] = config.domains[i].domainId; |
||||
remoteThresholds[i] = config.domains[i].threshold; |
||||
remoteValidators[i] = config.domains[i].validators; |
||||
} |
||||
ism.enrollValidators(remoteDomainIds, remoteValidators); |
||||
ism.setThresholds(remoteDomainIds, remoteThresholds); |
||||
ism.transferOwnership(owner); |
||||
return ism; |
||||
} |
||||
} |
@ -0,0 +1 @@ |
||||
Subproject commit b78fdb5aed571e20c8b1f52a67566ed5bac0be59 |
@ -0,0 +1,18 @@ |
||||
{ |
||||
"name": "@hyperlane-xyz/deploy", |
||||
"version": "0.0.0", |
||||
"description": "Utilities for deploying Hyperlane", |
||||
"main": "index.js", |
||||
"repository": "git@github.com:hyperlane-xyz/hyperlane-deploy.git", |
||||
"author": "asa@hyperlane.xyz", |
||||
"license": "Apache 2.0", |
||||
"private": false, |
||||
"scripts": { |
||||
"prettier": "prettier --write ./scripts ./lib" |
||||
}, |
||||
"dependencies": { |
||||
"@hyperlane-xyz/core": "1.0.0-beta6", |
||||
"prettier": "^2.8.2", |
||||
"prettier-plugin-solidity": "^1.1.1" |
||||
} |
||||
} |
@ -0,0 +1,42 @@ |
||||
// SPDX-License-Identifier: UNLICENSED |
||||
pragma solidity ^0.8.17; |
||||
|
||||
import "../lib/forge-std/src/Script.sol"; |
||||
import "../lib/forge-std/src/console.sol"; |
||||
|
||||
import {BytesLib} from "../lib/BytesLib.sol"; |
||||
import {ConfigLib} from "../lib/ConfigLib.sol"; |
||||
import {Mailbox} from "@hyperlane-xyz/core/contracts/Mailbox.sol"; |
||||
import {TypeCasts} from "@hyperlane-xyz/core/contracts/libs/TypeCasts.sol"; |
||||
|
||||
// TODO: Maybe take recipient as an arg.. |
||||
contract CheckMessage is Script { |
||||
using TypeCasts for address; |
||||
using BytesLib for bytes; |
||||
|
||||
function run() public view { |
||||
string memory destination = vm.envString("DESTINATION"); |
||||
bytes32 messageId = vm.envBytes32("MESSAGE_ID"); |
||||
Mailbox mailbox = ConfigLib |
||||
.readHyperlaneDomainConfig(vm, destination) |
||||
.mailbox; |
||||
bool delivered = mailbox.delivered(messageId); |
||||
if (delivered) { |
||||
console.log( |
||||
"Message ID '%s' was delivered to %s", |
||||
vm.toString(messageId), |
||||
destination |
||||
); |
||||
} else { |
||||
console.log( |
||||
"Message ID '%s' was delivered to %s", |
||||
vm.toString(messageId), |
||||
destination |
||||
); |
||||
} |
||||
console.log( |
||||
"https://explorer-v2.hyperlane.xyz/message/%s", |
||||
string(abi.encodePacked(vm.toString(messageId)).slice(2, 64)) |
||||
); |
||||
} |
||||
} |
@ -0,0 +1,33 @@ |
||||
// SPDX-License-Identifier: UNLICENSED |
||||
pragma solidity ^0.8.17; |
||||
|
||||
import "../lib/forge-std/src/Script.sol"; |
||||
|
||||
import {ConfigLib} from "../lib/ConfigLib.sol"; |
||||
import {CheckLib} from "../lib/CheckLib.sol"; |
||||
import {DeployLib} from "../lib/DeployLib.sol"; |
||||
|
||||
contract DeployCore is Script { |
||||
using ConfigLib for ConfigLib.HyperlaneDomainConfig; |
||||
using CheckLib for ConfigLib.HyperlaneDomainConfig; |
||||
using DeployLib for ConfigLib.HyperlaneDomainConfig; |
||||
|
||||
function run() public { |
||||
string memory local = vm.envString("LOCAL"); |
||||
string[] memory remotes = vm.envString("REMOTES", ","); |
||||
ConfigLib.HyperlaneDomainConfig memory config = ConfigLib |
||||
.readHyperlaneDomainConfig(vm, local); |
||||
ConfigLib.MultisigIsmConfig memory ismConfig = ConfigLib |
||||
.readMultisigIsmConfig(vm, remotes); |
||||
|
||||
vm.startBroadcast(); |
||||
uint256 startBlock = block.number; |
||||
|
||||
config.deploy(ismConfig); |
||||
config.check(ismConfig); |
||||
|
||||
// Write the output to disk |
||||
config.write(vm); |
||||
config.writeAgentConfig(vm, startBlock); |
||||
} |
||||
} |
@ -0,0 +1,32 @@ |
||||
// SPDX-License-Identifier: UNLICENSED |
||||
pragma solidity ^0.8.17; |
||||
|
||||
import "../lib/forge-std/src/Script.sol"; |
||||
import "../lib/forge-std/src/console.sol"; |
||||
|
||||
import {ConfigLib} from "../lib/ConfigLib.sol"; |
||||
import {CheckLib} from "../lib/CheckLib.sol"; |
||||
import {DeployLib} from "../lib/DeployLib.sol"; |
||||
import {MultisigIsm} from "@hyperlane-xyz/core/contracts/isms/MultisigIsm.sol"; |
||||
import {TestRecipient} from "@hyperlane-xyz/core/contracts/test/TestRecipient.sol"; |
||||
|
||||
// TODO: Deploy test recipient, maybe write to networks. |
||||
contract DeployMultisigIsm is Script { |
||||
using CheckLib for ConfigLib.MultisigIsmConfig; |
||||
using DeployLib for ConfigLib.MultisigIsmConfig; |
||||
|
||||
function run() public { |
||||
address owner = vm.envAddress("OWNER"); |
||||
string[] memory remotes = vm.envString("REMOTES", ","); |
||||
ConfigLib.MultisigIsmConfig memory config = ConfigLib |
||||
.readMultisigIsmConfig(vm, remotes); |
||||
|
||||
vm.startBroadcast(); |
||||
|
||||
MultisigIsm ism = config.deploy(owner); |
||||
TestRecipient recipient = new TestRecipient(); |
||||
recipient.setInterchainSecurityModule(address(ism)); |
||||
console.log("TestRecipient deployed at address %s", address(recipient)); |
||||
config.check(ism, owner); |
||||
} |
||||
} |
@ -0,0 +1,44 @@ |
||||
// SPDX-License-Identifier: UNLICENSED |
||||
pragma solidity ^0.8.17; |
||||
|
||||
import "../lib/forge-std/src/Script.sol"; |
||||
import "../lib/forge-std/src/console.sol"; |
||||
|
||||
import {BytesLib} from "../lib/BytesLib.sol"; |
||||
import {ConfigLib} from "../lib/ConfigLib.sol"; |
||||
import {Mailbox} from "@hyperlane-xyz/core/contracts/Mailbox.sol"; |
||||
import {TypeCasts} from "@hyperlane-xyz/core/contracts/libs/TypeCasts.sol"; |
||||
|
||||
contract SendTestMessage is Script { |
||||
using TypeCasts for address; |
||||
using BytesLib for bytes; |
||||
|
||||
function run() public { |
||||
string memory origin = vm.envString("ORIGIN"); |
||||
string memory destination = vm.envString("DESTINATION"); |
||||
address recipient = vm.envAddress("RECIPIENT"); |
||||
string memory body = vm.envString("BODY"); |
||||
Mailbox mailbox = ConfigLib |
||||
.readHyperlaneDomainConfig(vm, origin) |
||||
.mailbox; |
||||
ConfigLib.HyperlaneDomainConfig memory config = ConfigLib |
||||
.readHyperlaneDomainConfig(vm, destination); |
||||
|
||||
vm.startBroadcast(); |
||||
bytes32 messageId = mailbox.dispatch( |
||||
config.domainId, |
||||
address(recipient).addressToBytes32(), |
||||
abi.encode(body) |
||||
); |
||||
console.log( |
||||
"Sent message with ID %s from %s to %s", |
||||
vm.toString(messageId), |
||||
origin, |
||||
destination |
||||
); |
||||
console.log( |
||||
"https://explorer-v2.hyperlane.xyz/message/%s", |
||||
string(abi.encodePacked(vm.toString(messageId)).slice(2, 64)) |
||||
); |
||||
} |
||||
} |
@ -0,0 +1,542 @@ |
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. |
||||
# yarn lockfile v1 |
||||
|
||||
|
||||
"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" |
||||
integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== |
||||
dependencies: |
||||
"@ethersproject/address" "^5.7.0" |
||||
"@ethersproject/bignumber" "^5.7.0" |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/constants" "^5.7.0" |
||||
"@ethersproject/hash" "^5.7.0" |
||||
"@ethersproject/keccak256" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
"@ethersproject/properties" "^5.7.0" |
||||
"@ethersproject/strings" "^5.7.0" |
||||
|
||||
"@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" |
||||
integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== |
||||
dependencies: |
||||
"@ethersproject/bignumber" "^5.7.0" |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
"@ethersproject/networks" "^5.7.0" |
||||
"@ethersproject/properties" "^5.7.0" |
||||
"@ethersproject/transactions" "^5.7.0" |
||||
"@ethersproject/web" "^5.7.0" |
||||
|
||||
"@ethersproject/abstract-signer@5.7.0", "@ethersproject/abstract-signer@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" |
||||
integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== |
||||
dependencies: |
||||
"@ethersproject/abstract-provider" "^5.7.0" |
||||
"@ethersproject/bignumber" "^5.7.0" |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
"@ethersproject/properties" "^5.7.0" |
||||
|
||||
"@ethersproject/address@5.7.0", "@ethersproject/address@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" |
||||
integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== |
||||
dependencies: |
||||
"@ethersproject/bignumber" "^5.7.0" |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/keccak256" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
"@ethersproject/rlp" "^5.7.0" |
||||
|
||||
"@ethersproject/base64@5.7.0", "@ethersproject/base64@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" |
||||
integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== |
||||
dependencies: |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
|
||||
"@ethersproject/basex@5.7.0", "@ethersproject/basex@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.7.0.tgz#97034dc7e8938a8ca943ab20f8a5e492ece4020b" |
||||
integrity sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw== |
||||
dependencies: |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/properties" "^5.7.0" |
||||
|
||||
"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" |
||||
integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== |
||||
dependencies: |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
bn.js "^5.2.1" |
||||
|
||||
"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" |
||||
integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== |
||||
dependencies: |
||||
"@ethersproject/logger" "^5.7.0" |
||||
|
||||
"@ethersproject/constants@5.7.0", "@ethersproject/constants@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" |
||||
integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== |
||||
dependencies: |
||||
"@ethersproject/bignumber" "^5.7.0" |
||||
|
||||
"@ethersproject/contracts@5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" |
||||
integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== |
||||
dependencies: |
||||
"@ethersproject/abi" "^5.7.0" |
||||
"@ethersproject/abstract-provider" "^5.7.0" |
||||
"@ethersproject/abstract-signer" "^5.7.0" |
||||
"@ethersproject/address" "^5.7.0" |
||||
"@ethersproject/bignumber" "^5.7.0" |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/constants" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
"@ethersproject/properties" "^5.7.0" |
||||
"@ethersproject/transactions" "^5.7.0" |
||||
|
||||
"@ethersproject/hash@5.7.0", "@ethersproject/hash@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" |
||||
integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== |
||||
dependencies: |
||||
"@ethersproject/abstract-signer" "^5.7.0" |
||||
"@ethersproject/address" "^5.7.0" |
||||
"@ethersproject/base64" "^5.7.0" |
||||
"@ethersproject/bignumber" "^5.7.0" |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/keccak256" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
"@ethersproject/properties" "^5.7.0" |
||||
"@ethersproject/strings" "^5.7.0" |
||||
|
||||
"@ethersproject/hdnode@5.7.0", "@ethersproject/hdnode@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.7.0.tgz#e627ddc6b466bc77aebf1a6b9e47405ca5aef9cf" |
||||
integrity sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg== |
||||
dependencies: |
||||
"@ethersproject/abstract-signer" "^5.7.0" |
||||
"@ethersproject/basex" "^5.7.0" |
||||
"@ethersproject/bignumber" "^5.7.0" |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
"@ethersproject/pbkdf2" "^5.7.0" |
||||
"@ethersproject/properties" "^5.7.0" |
||||
"@ethersproject/sha2" "^5.7.0" |
||||
"@ethersproject/signing-key" "^5.7.0" |
||||
"@ethersproject/strings" "^5.7.0" |
||||
"@ethersproject/transactions" "^5.7.0" |
||||
"@ethersproject/wordlists" "^5.7.0" |
||||
|
||||
"@ethersproject/json-wallets@5.7.0", "@ethersproject/json-wallets@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz#5e3355287b548c32b368d91014919ebebddd5360" |
||||
integrity sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g== |
||||
dependencies: |
||||
"@ethersproject/abstract-signer" "^5.7.0" |
||||
"@ethersproject/address" "^5.7.0" |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/hdnode" "^5.7.0" |
||||
"@ethersproject/keccak256" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
"@ethersproject/pbkdf2" "^5.7.0" |
||||
"@ethersproject/properties" "^5.7.0" |
||||
"@ethersproject/random" "^5.7.0" |
||||
"@ethersproject/strings" "^5.7.0" |
||||
"@ethersproject/transactions" "^5.7.0" |
||||
aes-js "3.0.0" |
||||
scrypt-js "3.0.1" |
||||
|
||||
"@ethersproject/keccak256@5.7.0", "@ethersproject/keccak256@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" |
||||
integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== |
||||
dependencies: |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
js-sha3 "0.8.0" |
||||
|
||||
"@ethersproject/logger@5.7.0", "@ethersproject/logger@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" |
||||
integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== |
||||
|
||||
"@ethersproject/networks@5.7.1", "@ethersproject/networks@^5.7.0": |
||||
version "5.7.1" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6" |
||||
integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ== |
||||
dependencies: |
||||
"@ethersproject/logger" "^5.7.0" |
||||
|
||||
"@ethersproject/pbkdf2@5.7.0", "@ethersproject/pbkdf2@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz#d2267d0a1f6e123f3771007338c47cccd83d3102" |
||||
integrity sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw== |
||||
dependencies: |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/sha2" "^5.7.0" |
||||
|
||||
"@ethersproject/properties@5.7.0", "@ethersproject/properties@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" |
||||
integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== |
||||
dependencies: |
||||
"@ethersproject/logger" "^5.7.0" |
||||
|
||||
"@ethersproject/providers@5.7.2": |
||||
version "5.7.2" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" |
||||
integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== |
||||
dependencies: |
||||
"@ethersproject/abstract-provider" "^5.7.0" |
||||
"@ethersproject/abstract-signer" "^5.7.0" |
||||
"@ethersproject/address" "^5.7.0" |
||||
"@ethersproject/base64" "^5.7.0" |
||||
"@ethersproject/basex" "^5.7.0" |
||||
"@ethersproject/bignumber" "^5.7.0" |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/constants" "^5.7.0" |
||||
"@ethersproject/hash" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
"@ethersproject/networks" "^5.7.0" |
||||
"@ethersproject/properties" "^5.7.0" |
||||
"@ethersproject/random" "^5.7.0" |
||||
"@ethersproject/rlp" "^5.7.0" |
||||
"@ethersproject/sha2" "^5.7.0" |
||||
"@ethersproject/strings" "^5.7.0" |
||||
"@ethersproject/transactions" "^5.7.0" |
||||
"@ethersproject/web" "^5.7.0" |
||||
bech32 "1.1.4" |
||||
ws "7.4.6" |
||||
|
||||
"@ethersproject/random@5.7.0", "@ethersproject/random@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.7.0.tgz#af19dcbc2484aae078bb03656ec05df66253280c" |
||||
integrity sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ== |
||||
dependencies: |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
|
||||
"@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" |
||||
integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== |
||||
dependencies: |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
|
||||
"@ethersproject/sha2@5.7.0", "@ethersproject/sha2@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.7.0.tgz#9a5f7a7824ef784f7f7680984e593a800480c9fb" |
||||
integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw== |
||||
dependencies: |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
hash.js "1.1.7" |
||||
|
||||
"@ethersproject/signing-key@5.7.0", "@ethersproject/signing-key@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" |
||||
integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== |
||||
dependencies: |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
"@ethersproject/properties" "^5.7.0" |
||||
bn.js "^5.2.1" |
||||
elliptic "6.5.4" |
||||
hash.js "1.1.7" |
||||
|
||||
"@ethersproject/solidity@5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" |
||||
integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== |
||||
dependencies: |
||||
"@ethersproject/bignumber" "^5.7.0" |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/keccak256" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
"@ethersproject/sha2" "^5.7.0" |
||||
"@ethersproject/strings" "^5.7.0" |
||||
|
||||
"@ethersproject/strings@5.7.0", "@ethersproject/strings@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" |
||||
integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== |
||||
dependencies: |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/constants" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
|
||||
"@ethersproject/transactions@5.7.0", "@ethersproject/transactions@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" |
||||
integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== |
||||
dependencies: |
||||
"@ethersproject/address" "^5.7.0" |
||||
"@ethersproject/bignumber" "^5.7.0" |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/constants" "^5.7.0" |
||||
"@ethersproject/keccak256" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
"@ethersproject/properties" "^5.7.0" |
||||
"@ethersproject/rlp" "^5.7.0" |
||||
"@ethersproject/signing-key" "^5.7.0" |
||||
|
||||
"@ethersproject/units@5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.7.0.tgz#637b563d7e14f42deeee39245275d477aae1d8b1" |
||||
integrity sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg== |
||||
dependencies: |
||||
"@ethersproject/bignumber" "^5.7.0" |
||||
"@ethersproject/constants" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
|
||||
"@ethersproject/wallet@5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" |
||||
integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== |
||||
dependencies: |
||||
"@ethersproject/abstract-provider" "^5.7.0" |
||||
"@ethersproject/abstract-signer" "^5.7.0" |
||||
"@ethersproject/address" "^5.7.0" |
||||
"@ethersproject/bignumber" "^5.7.0" |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/hash" "^5.7.0" |
||||
"@ethersproject/hdnode" "^5.7.0" |
||||
"@ethersproject/json-wallets" "^5.7.0" |
||||
"@ethersproject/keccak256" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
"@ethersproject/properties" "^5.7.0" |
||||
"@ethersproject/random" "^5.7.0" |
||||
"@ethersproject/signing-key" "^5.7.0" |
||||
"@ethersproject/transactions" "^5.7.0" |
||||
"@ethersproject/wordlists" "^5.7.0" |
||||
|
||||
"@ethersproject/web@5.7.1", "@ethersproject/web@^5.7.0": |
||||
version "5.7.1" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae" |
||||
integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w== |
||||
dependencies: |
||||
"@ethersproject/base64" "^5.7.0" |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
"@ethersproject/properties" "^5.7.0" |
||||
"@ethersproject/strings" "^5.7.0" |
||||
|
||||
"@ethersproject/wordlists@5.7.0", "@ethersproject/wordlists@^5.7.0": |
||||
version "5.7.0" |
||||
resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.7.0.tgz#8fb2c07185d68c3e09eb3bfd6e779ba2774627f5" |
||||
integrity sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA== |
||||
dependencies: |
||||
"@ethersproject/bytes" "^5.7.0" |
||||
"@ethersproject/hash" "^5.7.0" |
||||
"@ethersproject/logger" "^5.7.0" |
||||
"@ethersproject/properties" "^5.7.0" |
||||
"@ethersproject/strings" "^5.7.0" |
||||
|
||||
"@hyperlane-xyz/core@1.0.0-beta6": |
||||
version "1.0.0-beta6" |
||||
resolved "https://registry.yarnpkg.com/@hyperlane-xyz/core/-/core-1.0.0-beta6.tgz#ffb54f4d0ffecf751c0326d782ce7221585cbb63" |
||||
integrity sha512-Ucjp07uQGvSa5K4Zsk3/nrAjpvhO83QDwndjxKGS8yw8KQgXHs9x6wl0UPDHtgrC1Kiv14Yn4vfCd/0vJhOWGA== |
||||
dependencies: |
||||
"@hyperlane-xyz/utils" "1.0.0-beta6" |
||||
"@openzeppelin/contracts" "^4.8.0" |
||||
"@openzeppelin/contracts-upgradeable" "^4.8.0" |
||||
|
||||
"@hyperlane-xyz/utils@1.0.0-beta6": |
||||
version "1.0.0-beta6" |
||||
resolved "https://registry.yarnpkg.com/@hyperlane-xyz/utils/-/utils-1.0.0-beta6.tgz#3ae72c0e29798df82739b88728013348d9bfabaf" |
||||
integrity sha512-vRBnQwgiijQB0KqBiDm9RhqVPm5nnNk+Wu89MT3a8Ff3BUGTYBd2Shrb7gvtz6kXpxqk1l4/v9GU86NZ99J9BA== |
||||
dependencies: |
||||
ethers "^5.7.2" |
||||
|
||||
"@openzeppelin/contracts-upgradeable@^4.8.0": |
||||
version "4.8.0" |
||||
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.8.0.tgz#26688982f46969018e3ed3199e72a07c8d114275" |
||||
integrity sha512-5GeFgqMiDlqGT8EdORadp1ntGF0qzWZLmEY7Wbp/yVhN7/B3NNzCxujuI77ktlyG81N3CUZP8cZe3ZAQ/cW10w== |
||||
|
||||
"@openzeppelin/contracts@^4.8.0": |
||||
version "4.8.0" |
||||
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.8.0.tgz#6854c37df205dd2c056bdfa1b853f5d732109109" |
||||
integrity sha512-AGuwhRRL+NaKx73WKRNzeCxOCOCxpaqF+kp8TJ89QzAipSwZy/NoflkWaL9bywXFRhIzXt8j38sfF7KBKCPWLw== |
||||
|
||||
"@solidity-parser/parser@^0.14.5": |
||||
version "0.14.5" |
||||
resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.5.tgz#87bc3cc7b068e08195c219c91cd8ddff5ef1a804" |
||||
integrity sha512-6dKnHZn7fg/iQATVEzqyUOyEidbn05q7YA2mQ9hC0MMXhhV3/JrsxmFSYZAcr7j1yUP700LLhTruvJ3MiQmjJg== |
||||
dependencies: |
||||
antlr4ts "^0.5.0-alpha.4" |
||||
|
||||
aes-js@3.0.0: |
||||
version "3.0.0" |
||||
resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" |
||||
integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== |
||||
|
||||
antlr4ts@^0.5.0-alpha.4: |
||||
version "0.5.0-alpha.4" |
||||
resolved "https://registry.yarnpkg.com/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a" |
||||
integrity sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ== |
||||
|
||||
bech32@1.1.4: |
||||
version "1.1.4" |
||||
resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" |
||||
integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== |
||||
|
||||
bn.js@^4.11.9: |
||||
version "4.12.0" |
||||
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" |
||||
integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== |
||||
|
||||
bn.js@^5.2.1: |
||||
version "5.2.1" |
||||
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" |
||||
integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== |
||||
|
||||
brorand@^1.1.0: |
||||
version "1.1.0" |
||||
resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" |
||||
integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== |
||||
|
||||
elliptic@6.5.4: |
||||
version "6.5.4" |
||||
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" |
||||
integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== |
||||
dependencies: |
||||
bn.js "^4.11.9" |
||||
brorand "^1.1.0" |
||||
hash.js "^1.0.0" |
||||
hmac-drbg "^1.0.1" |
||||
inherits "^2.0.4" |
||||
minimalistic-assert "^1.0.1" |
||||
minimalistic-crypto-utils "^1.0.1" |
||||
|
||||
ethers@^5.7.2: |
||||
version "5.7.2" |
||||
resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" |
||||
integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== |
||||
dependencies: |
||||
"@ethersproject/abi" "5.7.0" |
||||
"@ethersproject/abstract-provider" "5.7.0" |
||||
"@ethersproject/abstract-signer" "5.7.0" |
||||
"@ethersproject/address" "5.7.0" |
||||
"@ethersproject/base64" "5.7.0" |
||||
"@ethersproject/basex" "5.7.0" |
||||
"@ethersproject/bignumber" "5.7.0" |
||||
"@ethersproject/bytes" "5.7.0" |
||||
"@ethersproject/constants" "5.7.0" |
||||
"@ethersproject/contracts" "5.7.0" |
||||
"@ethersproject/hash" "5.7.0" |
||||
"@ethersproject/hdnode" "5.7.0" |
||||
"@ethersproject/json-wallets" "5.7.0" |
||||
"@ethersproject/keccak256" "5.7.0" |
||||
"@ethersproject/logger" "5.7.0" |
||||
"@ethersproject/networks" "5.7.1" |
||||
"@ethersproject/pbkdf2" "5.7.0" |
||||
"@ethersproject/properties" "5.7.0" |
||||
"@ethersproject/providers" "5.7.2" |
||||
"@ethersproject/random" "5.7.0" |
||||
"@ethersproject/rlp" "5.7.0" |
||||
"@ethersproject/sha2" "5.7.0" |
||||
"@ethersproject/signing-key" "5.7.0" |
||||
"@ethersproject/solidity" "5.7.0" |
||||
"@ethersproject/strings" "5.7.0" |
||||
"@ethersproject/transactions" "5.7.0" |
||||
"@ethersproject/units" "5.7.0" |
||||
"@ethersproject/wallet" "5.7.0" |
||||
"@ethersproject/web" "5.7.1" |
||||
"@ethersproject/wordlists" "5.7.0" |
||||
|
||||
hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: |
||||
version "1.1.7" |
||||
resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" |
||||
integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== |
||||
dependencies: |
||||
inherits "^2.0.3" |
||||
minimalistic-assert "^1.0.1" |
||||
|
||||
hmac-drbg@^1.0.1: |
||||
version "1.0.1" |
||||
resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" |
||||
integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== |
||||
dependencies: |
||||
hash.js "^1.0.3" |
||||
minimalistic-assert "^1.0.0" |
||||
minimalistic-crypto-utils "^1.0.1" |
||||
|
||||
inherits@^2.0.3, inherits@^2.0.4: |
||||
version "2.0.4" |
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" |
||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== |
||||
|
||||
js-sha3@0.8.0: |
||||
version "0.8.0" |
||||
resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" |
||||
integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== |
||||
|
||||
lru-cache@^6.0.0: |
||||
version "6.0.0" |
||||
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" |
||||
integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== |
||||
dependencies: |
||||
yallist "^4.0.0" |
||||
|
||||
minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: |
||||
version "1.0.1" |
||||
resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" |
||||
integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== |
||||
|
||||
minimalistic-crypto-utils@^1.0.1: |
||||
version "1.0.1" |
||||
resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" |
||||
integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== |
||||
|
||||
prettier-plugin-solidity@^1.1.1: |
||||
version "1.1.1" |
||||
resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.1.1.tgz#4d3375b85f97812ffcbe48d5a8b3fe914d69c91f" |
||||
integrity sha512-uD24KO26tAHF+zMN2nt1OUzfknzza5AgxjogQQrMLZc7j8xiQrDoNWNeOlfFC0YLTwo12CLD10b9niLyP6AqXg== |
||||
dependencies: |
||||
"@solidity-parser/parser" "^0.14.5" |
||||
semver "^7.3.8" |
||||
solidity-comments-extractor "^0.0.7" |
||||
|
||||
prettier@^2.8.2: |
||||
version "2.8.2" |
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.2.tgz#c4ea1b5b454d7c4b59966db2e06ed7eec5dfd160" |
||||
integrity sha512-BtRV9BcncDyI2tsuS19zzhzoxD8Dh8LiCx7j7tHzrkz8GFXAexeWFdi22mjE1d16dftH2qNaytVxqiRTGlMfpw== |
||||
|
||||
scrypt-js@3.0.1: |
||||
version "3.0.1" |
||||
resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" |
||||
integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== |
||||
|
||||
semver@^7.3.8: |
||||
version "7.3.8" |
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" |
||||
integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== |
||||
dependencies: |
||||
lru-cache "^6.0.0" |
||||
|
||||
solidity-comments-extractor@^0.0.7: |
||||
version "0.0.7" |
||||
resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz#99d8f1361438f84019795d928b931f4e5c39ca19" |
||||
integrity sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw== |
||||
|
||||
ws@7.4.6: |
||||
version "7.4.6" |
||||
resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" |
||||
integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== |
||||
|
||||
yallist@^4.0.0: |
||||
version "4.0.0" |
||||
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" |
||||
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== |
Loading…
Reference in new issue