Contract Configuration
To enable cross-chain communication in your blockchain application, you need two key functions: sendMessage()
and messageProcess()
. These functions handle sending and receiving messages between different blockchains.
sendMessage(): This function packages and sends data to another blockchain.
messageProcess(): This function receives and processes data from another blockchain.
Simple Code Example
Here's a straightforward example to demonstrate the simplicity of using these functions:
In this example:
bridge: Burns the tokens. Sends a message to the recipient blockchain with the burn amount
messageProcess: Decodes the message from the recipient blockchain and mints the corresponding token amount.
This simple example shows how easy it is to set up cross-chain communication using these functions.
Developers can use the Developer Documentation to dive further into these functions.
Last updated