xdapp-book/projects/evm-messenger
Nikhil Suri 9e88898428
Smoother Onboarding (#25)
* Autoformatter changes

* Updated guardiand script for x86_64

* Added .nvmrc files

* Updated evm-messenger README with common errors

* Revert "Autoformatter changes"

This reverts commit 9c9816c657.
2022-10-21 10:32:10 -05:00
..
chains added orechestator code 2022-06-22 21:37:26 -05:00
tests cert error trying on personal 2022-06-22 21:43:28 -05:00
.gitignore modified wormhole.sh to add cleanup 2022-06-27 09:48:42 -05:00
.nvmrc Smoother Onboarding (#25) 2022-10-21 10:32:10 -05:00
README.md Smoother Onboarding (#25) 2022-10-21 10:32:10 -05:00
orchestrator.js linux guardiand works 2022-06-26 18:29:43 -05:00
package-lock.json updated wormhole to use docker networking for arm64 (mac) 2022-06-27 13:32:38 -05:00
package.json added wormhole-local-validator and evm messenger docs 2022-06-30 23:14:08 -05:00
xdapp.config.json stubbing files & minor fixes 2022-07-05 11:37:49 -04:00

README.md

EVM Messenger

Simple messenger project that sends a "Hello World" message between two EVM chains using Wormhole.

Dependencies

This project uses Foundry to compile and deploy EVM contracts. You can find install instructions at https://getfoundry.sh

The javascript dependencies can be installed via npm install in this folder.

Test Scripts

After you have Guardiand running (you can use the wormhole-local-validator, you can run the basic test with npm run test. This will:

  • Deploy a simple Messenger contract (found in chains/evm/src/Messenger.sol) to each EVM chain
  • Register each contract with the other chain
  • Send a message from each contract
  • Fetch the VAA from the Guardian
  • Submit the VAA to each contract
  • Print out the Message

If everything goes correctly, you should get a printout with the Hello World messages on each chain.

Common Errors

Nonce Issues

If you see transactions failing due to nonce mismatch errors, restart your local evm chain. If using the wormhole-local-validator, just rerun npm run evm and then retry npm run test.

This is intermittent and likely caused by the js lib and evm chain being out of sync.

Transaction Underpriced Issues

Transactions failing with the message transaction underpriced is an intermittent issue. Restart the evm chains and rerun npm run test. If the issue persists, you may need to manually set gas prices when calling the Messenger contract in the send_msg logic in orchestrator.js.