-
Notifications
You must be signed in to change notification settings - Fork 5
/
InterledgerSenderInterface.sol
35 lines (29 loc) · 1.22 KB
/
InterledgerSenderInterface.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
32
33
34
35
pragma solidity ^0.5.0;
/**
* This is the abstract interface to be implemented by potential data sender
*/
contract InterledgerSenderInterface {
// Event for sending data to another ledger
event InterledgerEventSending(uint256 id, bytes data);
/**
* @dev Function that will be called when the recipient has accepted the data
* @param id The identifier of data sending event
*/
function interledgerCommit(uint256 id) public;
/**
* @dev Function that will be called when the recipient has accepted the data,
* this function contains also an additional data parameter, which can be
* used to pass information to the Sender. Used by e.g. KSI Responder
* to pass KSI id back to the Sender.
* @param id The identifier of data sending event
* @param data Arbitrary data as bytes
*/
function interledgerCommit(uint256 id, bytes memory data) public;
/**
* @dev Function that will be called when the recipient has rejected the data,
* or there have been an error.
* @param id The identifier of data sending event
* @param reason The error code indicating the reason for failure
*/
function interledgerAbort(uint256 id, uint256 reason) public;
}