IOutputsMerkleRootValidator
Inherits: IERC165
Provides valid outputs Merkle roots for validation.
ERC-165 can be used to determine whether this contract also supports any other interface (e.g. for submitting claims).
Functions
isOutputsMerkleRootValid
Check whether an outputs Merkle root is valid.
function isOutputsMerkleRootValid(address appContract, bytes32 outputsMerkleRoot)
external
view
returns (bool);
Parameters
| Name | Type | Description |
|---|---|---|
appContract | address | The application contract address |
outputsMerkleRoot | bytes32 | The outputs Merkle root |
getLastFinalizedMachineMerkleRoot
Get the last finalized machine Merkle root.
Returns zero if no machine merkle root has been finalized yet for that particular application. This should not be a problem given that the pre-image Keccak-256 hash of zero is unknown.
function getLastFinalizedMachineMerkleRoot(address appContract)
external
view
returns (bytes32);
Parameters
| Name | Type | Description |
|---|---|---|
appContract | address | The application contract address |
wasInputFinalized
Check whether an input was finalized.
This function assumes that an input with such an index exists in the input box of the application, and that it was added in such a base-layer block. Foreclosed applications can use this function to issue refunds for deposit inputs that were not finalized.
function wasInputFinalized(
address appContract,
uint256 inputIndex,
uint256 blockNumber
) external view returns (bool);
Parameters
| Name | Type | Description |
|---|---|---|
appContract | address | The application contract address |
inputIndex | uint256 | The index of the input in the application's input box |
blockNumber | uint256 | The number of the base-layer block in which the input was added |
Returns
| Name | Type | Description |
|---|---|---|
<none> | bool | Whether the input was finalized |