bitoftrade docs
  • 👋Welcome to the bitoftrade docs!
  • 🤖bitoftrade intro
  • 📨Contact Us
  • For traders
    • ✅Cross-Chain Swaps
      • How it works
        • Liquidity providers & validators
        • Security
      • User Guide
    • 🔄Trading platform
      • Features
        • Leverage trading
        • Token swaps
        • Buy crypto with fiat
        • Market screener
      • Quick start
        • How do I swap tokens on bitoftrade?
        • How to buy crypto with fiat?
        • How to trade with leverage on bitoftrade?
        • How to use the Markets page?
        • How to place limit order?
      • Fees
      • FAQ
  • For businesses
    • 🛒AllPay Widget
      • Use cases
        • Token Owners
        • Personal Exchange
        • Creators
        • GameFi, Metaverse
        • Crypto Payments (soon)
      • Quick start
        • Customization Panel
        • Swap and Sale Integration
        • NFT Widget Integration
          • NFT Listing
          • Code Integration
      • FAQ
  • For developers
    • 🔀Cross-Chain Messaging Protocol
      • How it works
        • Signer Service
          • Event Hash
          • Signer interface
        • Signers Registry Contract
      • Quick start
        • Emit event
        • Verify event
        • Receive event
      • Smart contracts
      • Advanced
        • Threshold Signature
        • Hosted TSS signer
      • Security
      • FAQ
  • Guides
    • 📚General
      • How to download and connect MetaMask for desktop?
      • How do I download and connect MetaMask for mobile?
      • How do I import ERC20 tokens to MetaMask?
      • How do I manage my funds in a volatile market?
      • How to invest in cryptocurrency
    • ⛓️Polygon
      • How to swap on the Polygon network
      • How to bridge my Polygon tokens
      • How to add Polygon to my MetaMask
    • ⛓️Binance Smart Chain
      • How to bridge my BSC tokens
      • How to swap on the BSC network
      • How to add BSC to my MetaMask
    • ⛓️Fantom
      • How to bridge my Fantom tokens
      • How to swap on the Fantom network
      • How to add Fantom to my MetaMask
    • ⛓️Avalanche
      • How to bridge my Avalanche tokens
      • How to swap on the Avalanche network
      • How to add Avalanche to my MetaMask
Powered by GitBook
On this page
  1. For developers
  2. Cross-Chain Messaging Protocol
  3. Quick start

Emit event

PreviousQuick startNextVerify event

Last updated 2 years ago

Cross Chain Messaging Protocol makes it possible to send events between different chains. CCMP relies on the events. To start interacting with it, modify your Src smart contract to emit the event.

pragma solidity ^0.8.0;

contract MsgSender {
    event MyMessage(string message);

    function sendMessage(string memory _message) external {
        emit MyMessage(_message);
    }
}

You could also add destChainId and destAddress params to the event to make it more specific. However, none of those are required, and you could pass any parameters depending on your internal dApp logic.

See the example of sendMessage transaction on the .

🔀
explorer