cp .env.example .env
yarn
forge build- Find the source transaction hash of the message that has failed on LayerZero Scan
- Populate the .env file with the following:
SOURCE_CHAIN_TX_HASH=<your_source_tx_hash>MAINNET=trueorMAINNET=false(for the scan API)DESTINATION_CHAIN_RPC_URL=<your_rpc_url>CAST_ACCOUNT=<your_cast_account>(usecast wallet import -i <ACCOUNT_NAME>to import a private key into cast)- You can optionally use the RPC URL shortcuts in foundry.toml, for example
bnb
- You can optionally use the RPC URL shortcuts in foundry.toml, for example
- Run
make simulateto simulate the workflow, this assumes you have an account in cast, alternatively you can edit the Makefile to use--private-key <PRIVATE_KEY>instead. Runmake broadcastto broadcast the transaction.
If you get an error from SimulateReceive script eg. script failed: custom error 7182306f you can do:
cast 4byte 7182306f
Example result:
LZ_PayloadHashNotFound(bytes32,bytes32)