InputBox
Inherits: IInputBox
State Variables
_deploymentBlockNumber
Deployment block number
uint256 immutable _deploymentBlockNumber = block.number;
_inputBoxes
Mapping of application contract addresses to arrays of input hashes.
mapping(address => bytes32[]) private _inputBoxes;
Functions
addInput
Send an input to an application.
MUST fire an InputAdded
event.
function addInput(address appContract, bytes calldata payload)
external
override
returns (bytes32);
Parameters
Name | Type | Description |
---|---|---|
appContract | address | The application contract address |
payload | bytes | The input payload |
Returns
Name | Type | Description |
---|---|---|
<none> | bytes32 | The hash of the input blob |
getNumberOfInputs
Get the number of inputs sent to an application.
function getNumberOfInputs(address appContract)
external
view
override
returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
appContract | address | The application contract address |
getInputHash
Get the hash of an input in an application's input box.
The provided index must be valid.
function getInputHash(address appContract, uint256 index)
external
view
override
returns (bytes32);
Parameters
Name | Type | Description |
---|---|---|
appContract | address | The application contract address |
index | uint256 | The input index |
getDeploymentBlockNumber
Get number of block in which contract was deployed
function getDeploymentBlockNumber() external view override returns (uint256);