-
Notifications
You must be signed in to change notification settings - Fork 243
/
DummyStateSender.sol
31 lines (28 loc) · 1.12 KB
/
DummyStateSender.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
pragma solidity 0.6.6;
import {IStateSender} from "../StateSender/IStateSender.sol";
/**
* @notice Dummy State Sender contract to simulate plasma state sender while testing
*/
contract DummyStateSender is IStateSender {
/**
* @notice Event emitted when when syncState is called
* @dev Heimdall bridge listens to this event and sends the data to receiver contract on child chain
* @param id Id of the sync, increamented for each event in case of actual state sender contract
* @param contractAddress the contract receiving data on child chain
* @param data bytes data to be sent
*/
event StateSynced(
uint256 indexed id,
address indexed contractAddress,
bytes data
);
/**
* @notice called to send data to child chain
* @dev sender and receiver contracts need to be registered in case of actual state sender contract
* @param receiver the contract receiving data on child chain
* @param data bytes data to be sent
*/
function syncState(address receiver, bytes calldata data) external override {
emit StateSynced(1, receiver, data);
}
}