logoAcademy

Call simple Calculator

Execute a function in one chain from another chain

Alright, now let's call our Calculators:

cast send --rpc-url local-c --private-key $PK $SENDER_ADDRESS "sendAddMessage(address, uint256, uint256)" $RECEIVER_ADDRESS 2 3

Verify Message Receipt

To check wether the message has been received, we can call the result_num() function on the sender contract.

cast call --rpc-url myblockchain $RECEIVER_ADDRESS "result_num()(uint)"
Updated:

On this page

Edit on Github