The OmniDictionary is a simple dApp demo that demonstrates how cross-chain contract interaction is processed through mapo omnichain service contract. It basically allows user to send request to adding a new entry in a dictionary(a simple mapping) on a foreign chain with a simple key and its corresponding value.
Tech Details
In order to achieve inter-blockchain contract execution, developers first needs to process their execution logic in a logic contract and then send the generated calldata from the source chain through the 'TransferOut' method through mapo omnichain service contract.
In our example, 'TransferOut' method is called as following and calldata is also generated in the middle process:
secondly, the messenger picks up the event generated by the above transaction and constructed a corresponding proof, then it packs them together and send it to the mapo omnichain service contract on MAP Relay Chain:
And finally, the above process will be repeated by messenger and send it all the data to the destination chain by a 'TransferIn' method which will also execute the user input calldata: