-
Notifications
You must be signed in to change notification settings - Fork 273
Description
In Step 11 Register State Sync
Register RootChainManager and ChildChainManager on StateSender
Set stateSenderAddress on RootChainManager
Grant STATE_SYNCER_ROLE on ChildChainManager
Can anyone explain how to Register RootChainManager and ChildChainManager on StateSender?
Here is the StateSender contract
`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);
}
}`