wormhole/ethereum/ts-scripts/relayer/README.md

40 lines
2.1 KiB
Markdown
Raw Normal View History

Relayer: Ethereum folder Changes for Merging into Main (#3038) * gRelayer: surrounding files * modification to get compilation * restore devnet * remove generic relayer docker * remove wait for relayer engine * keep build time 20 * sh -> bash * sh -> bash * Remove comment * bash -> sh * Revert "bash -> sh" This reverts commit 5c37e92fa19bbdbefc79c8ee0dbceeb127c53373. * bash->sh * gRelayer: ethereum folder changes for generic-relayer-merge * add eth-devnet * Adds .github because workflow needs to install forge * sdk-ci-tests need to install forge * don't wait for nonexistent relayer engine * update package.json and package-lock.json * Remove unnecessary types from package.json * ts-node * gRelayer: ethereum folder changes for generic-relayer-merge * sdk-ci-tests need to install forge * don't wait for nonexistent relayer engine * update package.json and package-lock.json * remove these changes * Relayer: Natspec documentation in IWormholeRelayer (#3032) * WIP * Fixes * Updated interfaces * remove bash * Forward uses same refund chain id and refund address (#3034) * WIP * Fixes * Forward uses same refund chain id and refund address * Updated interfaces * Remove forge build warnings * Add note to interface for resend * via-ir on unless in Tilt * Correct IWormholeReceiver interface * Wormhole message fee now part of quoteDeliveryPrice (#3043) * Fix to PR 3043 * Remove compiler warning * Relayer/address drew review (#3060) * Fix typo in Create2Factory * Add event for contract upgrades * Prevent registering contract if it is already registered * Prevent allowing unset chainId for default delivery provider governance VAA * memory to calldata for external functions in WormholeRelayerSend * continue memory to calldata for external functions * Fix pricing in delivery provider * Sanity check new default delivery provider isn't 0 address * Don't save vaaKey as local variable * cache the length of array rather than iterate every time for vaaKeys * Replacing memory with calldata in few locations * Remove stale file DeliveryProviderMessages * Remove batch VAA sender script * Remove batch VAA from WormholeSimulator * Wait for a confirmation in deploy scripts * remove unnecessary comments * Fix Delivery Provider Pricing and add a test * remove console logs * Revert "continue memory to calldata for external functions" This reverts commit f322afb6c0bbd09e3d04ab42a90e592ff752f6bf. * Revert "memory to calldata for external functions in WormholeRelayerSend" This reverts commit 42fcaad8842d0c81506c9586d8d0fd98f6bb6ae1. * Revert "Don't save vaaKey as local variable" This reverts commit a9172379c564fd430a083645c1c42c78e014d68d. * Revert "cache the length of array rather than iterate every time for vaaKeys" This reverts commit d61380a9b0c0671e67e3bd5d874ae339e180dd34. * Revert "Replacing memory with calldata in few locations" This reverts commit 94e47b6e72eaaa52ac0ba2980c439180401fafd7. * Revert "Fix typo in Create2Factory" This reverts commit a9f7bdf461945c8abf020007d16bbc6b4301d051. * Update contract addresses for via-ir * Slight improvements to delivery provider implementation * typed errors for delivery provider * enable VIA-IR in CI and not in Tilt * correct contract address for via ir * WormholeRelayerSend and WormholeRelayerDelivery (#3082)
2023-06-13 14:01:43 -07:00
# How to use these scripts
## Configuration
Private keys should be placed in a .env file corresponding to the Environment you intend to work in. For example, tilt private keys should be kept in ./.env.tilt
If you do not set an environment, the 'default' environment will be used, and .env will be read.
All other configuration is done through files in the ./config/\${env} directory.
./config/\${env}/chains.json is the file which controls how many chains will be executed against, as well as their RPC and basic info.
./config/\${env}/contracts.json is the file which allows you to target specific contracts on each chain.
./config/\${env}/scriptConfigs contains custom configurations for individual scripts. Not all scripts have custom arguments.
## Running the scripts
All files in the coreRelayer, deliveryProvider, and MockIntegration directories are runnable. These are intended to run from the /ethereum directory.
The target environment must be passed in as an environment variable. So, for example, you can run the DeliveryProvider deployment script by running:
```
ENV=tilt ts-node ./ts-scripts/relayer/deliveryProvider/deployDeliveryProvider.ts
```
## Chaining multiple scripts
Scripts are meant to be run individually or successively. Scripts which deploy contracts will write the deployed addresses into the ./output folder.
If "useLastRun" is set to true in the contracts.json configuration file, the lastrun files from the deployment scripts will be used, rather than the deployed addresses of the contracts.json file. This allows you to easily run things like
```
ENV=tilt ts-node ./ts-scripts/relayer/deliveryProvider/upgradeDeliveryProvider.ts && ts-node ./ts-scripts/relayer/mockIntegration/messageTest.ts
```
The ./shell directory contains shell scripts which combine commonly chained actions together.
For example, ./shell/deployConfigureTest.sh will deploy the DeliveryProvider, WormholeRelayer, and MockIntegration contracts. Configure them all to point at eachother, and then run messageTest to test that everything worked. Note: useLastRun in contracts.json needs to be set to "true" in order for this script to work.