wormhole/ethereum/ts-scripts/relayer
derpy-duck faa397ca4f
AutoRelayer: v1.1 Release (#3313)
* AutoRelayer: remove forwards

* AutoRelayer: reentrancy guard

* AutoRelayer: remove forwards from sdk

* AutoRelayer: VaaKey -> MessageKey internals

* AutoRelayer: check delivery provider supports keyType

* AutoRelayer: VaaKey backcompat wire format

* AutoRelayer: sdk fix

* AutoRelayer: Add supported keys to delivery provider

* AutoRelayer: reintroduce reentrancy guard, revert when replay protection triggered

* AutoRelayer: fix manual delivery test

* AutoRelayer: review flups

* AutoRelayer: move libraries within relayer folder

* AutoRelayer: fix delivery provider config script

Also fix delivery provider revert bug

* AutoRelayer: Andreas code review flups

* AutoRelayer: js sdk includes MessageKey serde

* AutoRelayer: update sdk to use message key

* AutoRelayer: Simplify executeInstruction to internal call (#3352)

* refund instead of revert for replay protection (#3371)

* refund instead of revert for replay protection

* Remove mention of forward from IWormholeReceiver

* AutoRelayer: 1.1 reintroduce forwards (#3385)

* forward fallback WIP

* forward fallback no tmp storage

* Re-introduce testing of 'forward'

* Reintroduce forwards with original or default behavior for refund info + delivery provider info

* Reintroduce reentrant, only store refund information

---------

Co-authored-by: Joe Howarth <josephehowarth@gmail.com>
Co-authored-by: Joe Howarth <jhowarth@jumptrading.com>
2023-09-22 15:07:59 -04:00
..
config Relayer: base testnet deploy and script improvements (#3230) 2023-07-24 11:39:53 -04:00
create2Factory Relayer: Ethereum folder Changes for Merging into Main (#3038) 2023-06-13 17:01:43 -04:00
deliveryProvider AutoRelayer: v1.1 Release (#3313) 2023-09-22 15:07:59 -04:00
helpers Relayer: base testnet deploy and script improvements (#3230) 2023-07-24 11:39:53 -04:00
mockIntegration Relayer: base testnet deploy and script improvements (#3230) 2023-07-24 11:39:53 -04:00
shell Relayer: Ethereum folder Changes for Merging into Main (#3038) 2023-06-13 17:01:43 -04:00
wormholeRelayer Relayer: base testnet deploy and script improvements (#3230) 2023-07-24 11:39:53 -04:00
.env.ci Relayer: Ethereum folder Changes for Merging into Main (#3038) 2023-06-13 17:01:43 -04:00
.env.kubernetes Relayer: Ethereum folder Changes for Merging into Main (#3038) 2023-06-13 17:01:43 -04:00
.env.tilt Relayer: Ethereum folder Changes for Merging into Main (#3038) 2023-06-13 17:01:43 -04:00
.gitignore Relayer: Ethereum folder Changes for Merging into Main (#3038) 2023-06-13 17:01:43 -04:00
README.md Relayer: Ethereum folder Changes for Merging into Main (#3038) 2023-06-13 17:01:43 -04:00
eraseTypes.ts Relayer: Ethereum folder Changes for Merging into Main (#3038) 2023-06-13 17:01:43 -04:00

README.md

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.