Skip to main content

StateSyncMock

StateSyncMock#

Dummy State Sender contract to simulate plasma state sender while testing

Functions#

syncState(address receiver, bytes data) (external)

called to send data to child chain

sender and receiver contracts need to be registered in case of actual state sender contract

Parameters:#

  • receiver: the contract receiving data on child chain
  • data: bytes data to be sent

Events#

StateSynced(uint256 id, address contractAddress, bytes data)

Event emitted when when syncState is called

Heimdall bridge listens to this event and sends the data to receiver contract on child chain

Parameters:

  • id: Id of the sync, increamented for each event in case of actual state sender contract
  • contractAddress: the contract receiving data on child chain
  • data: bytes data to be sent