-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from valory-xyz/base_bridge
Base bridge
- Loading branch information
Showing
17 changed files
with
851 additions
and
101 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Bridge-related deployment scripts | ||
This process is the same as described in the original deployment procedure: [deployment](https://github.com/valory-xyz/autonolas-governance/blob/main/scripts/deployment). | ||
|
||
## Steps to engage | ||
The project has submodules to get the dependencies. Make sure you run `git clone --recursive` or init the submodules yourself. | ||
The dependency list is managed by the `package.json` file, and the setup parameters are stored in the `hardhat.config.js` file. | ||
Simply run the following command to install the project: | ||
``` | ||
yarn install | ||
``` | ||
command and compiled with the | ||
``` | ||
npx hardhat compile | ||
``` | ||
|
||
Create a `globals.json` file in the root folder, or copy it from the file with pre-defined parameters (i.e., `scripts/deployment/bridges/base/globals_base_sepolia.json` for the chiado testnet). | ||
|
||
Parameters of the `globals.json` file: | ||
- `contractVerification`: flag for verifying contracts in deployment scripts (`true`) or skipping it (`false`); | ||
- `useLedger`: flag whether to use the hardware wallet (`true`) or proceed with the seed-phrase accounts (`false`); | ||
- `derivationPath`: string with the derivation path; | ||
- `gasPriceInGwei`: gas price in Gwei; | ||
- `L2CrossDomainMessengerAddress`: (Base) CFM Contract Proxy address serving as a system processor of inbound calls across the bridge; | ||
- `timelockAddress`: Timelock address on the root L1 network; | ||
|
||
The script file name identifies the number of deployment steps taken up to the number in the file name. | ||
|
||
Export network-related API keys defined in `hardhat.config.js` file that correspond to the required network. | ||
|
||
To run the script, use the following command: | ||
`npx hardhat run scripts/deployment/bridges/script_name --network network_type`, | ||
where `script_number_and_name` is a script number and name, i.e. `deploy_01_home_mediator.js`, `network_type` is a network type corresponding to the `hardhat.config.js` network configuration. | ||
|
||
## Validity checks and contract verification | ||
Each script controls the obtained values by checking them against the expected ones. Also, each script has a contract verification procedure. | ||
If a contract is deployed with arguments, these arguments are taken from the corresponding `verify_number_and_name` file, where `number_and_name` corresponds to the deployment script number and name. | ||
|
||
## Data packing for cross-bridge transactions | ||
In order to correctly pack the data and supply it to the Timelock such that it is correctly processed across the bridge, | ||
use the following script: [cross-bridge data packing](https://github.com/valory-xyz/autonolas-governance/blob/main/scripts/deployment/bridges/pack-data.js). | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.