Sender Contract
Adapt the sender contract to also receive messages
The sender contract has now two tasks:
- Send a message to the receiver: Same as in the last example
- Receive a message back from the receiver: Now our sender contract needs to be able to receive a message back from the receiver.
Therefore, we need to change the sender contract to be able to receive a message back. We will need to implement the same interface ITeleporterReceiver
as the receiver contract and implement the receiveTeleporterMessage
function.
Don't forget to replace the destinationBlockchainID with the one from your Subnet!