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. How it works
  4. Signer Service

Event Hash

PreviousSigner ServiceNextSigner interface

Last updated 2 years ago

eventHash is calculated from the eventId and eventArgs:

eventHash = keccak256(eventId,eventArgs)

eventId is the event params combined together to create a unique id.

eventId = EventName + EventChainId + EventContract + EventTransactionHash

where:

  • EventName - the name of the event

  • EventChainId - chainId of the transaction with invoked event

  • EventContract - a contract that invoked the event

  • EventTransactionHash - hash of the transaction with invoked event

EventArgs is the event's arguments. All event arguments will be combined in the same order as they were in the event.

eventArgs = eventArg_1 + eventArg_2 + ... 

For example, for Transfer event, eventHash will be:

message=keccak256(
    "Transfer",
    1,
    "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "0xa3b1123b8181f27c30f9cae42340325f0fcecf80c7886045dc159a8b8abd9a63",
    "0x974CaA59e49682CdA0AD2bbe82983419A2ECC400",
    "0x59169f3c0e9e3630D0EBa5E5561dC1677D9451F3",
    "1574766820"
    )="0x9d4776df88b0ab9bc77fdd2170fc62ce668886290c49b5306bb003d0a751bdc1"
🔀
this