Call simple Calculator
Execute a function in one chain from another chain
Alright, now let's call our Calculators:
Call the Sender Contract
We need to call the sendAddMessage
function on the sender contract with the address of the receiver contract and the two numbers we want to add.
For this example we will add 2 + 3.
Verify Message Receipt
To check wether the message has been received, we can call the result_num()
function on the Receiver
contract.
2 + 3 = 5. Our cross-chain calculation was successful!