-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f137728
commit 5af17b2
Showing
3 changed files
with
36 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
[profile.default] | ||
src = 'src' | ||
src = 'interfaces' | ||
out = 'out' | ||
libs = ['lib'] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,18 @@ struct ResponseReceipt { | |
address relayer; | ||
} | ||
|
||
// Various frozen states of the IIsmpHost | ||
enum FrozenStatus { | ||
// Host is operating normally | ||
None, | ||
// Host is currently disallowing incoming datagrams | ||
Incoming, | ||
// Host is currently disallowing outgoing messages | ||
Outgoing, | ||
// All actions have been frozen | ||
All | ||
} | ||
|
||
/** | ||
* @title The Ismp Host Interface | ||
* @author Polytope Labs ([email protected]) | ||
|
@@ -64,22 +76,22 @@ interface IIsmpHost is IDispatcher { | |
*/ | ||
function timestamp() external view returns (uint256); | ||
|
||
/** | ||
* @dev Returns the nonce immediately available for requests | ||
* @return the `nonce` | ||
*/ | ||
function nonce() external view returns (uint256); | ||
/** | ||
* @dev Returns the nonce immediately available for requests | ||
* @return the `nonce` | ||
*/ | ||
function nonce() external view returns (uint256); | ||
|
||
/** | ||
* @dev Returns the fisherman responsible for vetoing the given state machine height. | ||
* @return the `fisherman` address | ||
*/ | ||
function vetoes(uint256 paraId, uint256 height) external view returns (address); | ||
/** | ||
* @dev Returns the fisherman responsible for vetoing the given state machine height. | ||
* @return the `fisherman` address | ||
*/ | ||
function vetoes(uint256 paraId, uint256 height) external view returns (address); | ||
|
||
/** | ||
* @return the `frozen` status | ||
*/ | ||
function frozen() external view returns (bool); | ||
function frozen() external view returns (FrozenStatus); | ||
|
||
/** | ||
* @dev Returns the address for the Uniswap V2 Router implementation used for swaps | ||
|
@@ -132,11 +144,11 @@ interface IIsmpHost is IDispatcher { | |
*/ | ||
function consensusState() external view returns (bytes memory); | ||
|
||
/** | ||
* @dev Check the response status for a given request. | ||
* @return `response` status | ||
*/ | ||
function responded(bytes32 commitment) external view returns (bool); | ||
/** | ||
* @dev Check the response status for a given request. | ||
* @return `response` status | ||
*/ | ||
function responded(bytes32 commitment) external view returns (bool); | ||
|
||
/** | ||
* @param commitment - commitment to the request | ||
|
@@ -172,6 +184,12 @@ interface IIsmpHost is IDispatcher { | |
*/ | ||
function unStakingPeriod() external view returns (uint256); | ||
|
||
/** | ||
* @dev set the new frozen state of the host, only the admin or handler can call this. | ||
* @param newState - the new frozen state | ||
*/ | ||
function setFrozenState(FrozenStatus newState) external; | ||
|
||
/** | ||
* @dev Store an encoded consensus state | ||
* @param state new consensus state | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@polytope-labs/ismp-solidity", | ||
"version": "0.2.7", | ||
"version": "0.3.0", | ||
"description": "Hyperbridge Solidity SDK for the Interoperable state machine protocol", | ||
"author": "Polytope Labs <[email protected]>", | ||
"license": "Apache-2.0", | ||
|