For full instructions on how to set up, deploy and run a “Hello World” example dApp, please see “Hello World” example dApp.
Overview of the full transaction flow
- Starting local developer environment to run local EVM blockchains.
- First node script deploys this smart contract to all the EVM chains in our local developer environment.
- second node script runs this test script on local Moonbeam, which:
- Calculates the estimated gas cost of executing the method on Avalanche.
- Invokes
setRemoteValue
on the deployed Moonbeam smart contract. This method first pays the gas receiver on Moonbeam the estimated gas cost, then callscallContractWithToken
on the Moonbeam Gateway contract.
- After some time, the relay services detect the gas paid on Moonbeam and executes the smart contract on Avalanche, invoking the
_execute
method that updated the value to the message parameter.