Skip to content

HashLockCondition

Implementation of the Hash Lock Condition

Functions

initialize

  function initialize(
    address _owner,
    address _conditionStoreManagerAddress
  ) external
initialize init the contract with the following parameters

this function is called only once during the contract initialization.

Parameters:

Name Type Description
_owner address contract's owner account address
_conditionStoreManagerAddress address condition store manager address

hashValues

  function hashValues(
    uint256 _preimage
  ) public returns (bytes32)
hashValues generates the hash of condition inputs with the following parameters

Parameters:

Name Type Description
_preimage uint256 refers uint value of the hash pre-image.

Return Values:

Name Type Description
bytes32 uint256 hash of all these values
### hashValues
  function hashValues(
    string _preimage
  ) public returns (bytes32)
hashValues generates the hash of condition inputs
with the following parameters

Parameters:

Name Type Description
_preimage string refers string value of the hash pre-image.

Return Values:

Name Type Description
bytes32 string hash of all these values
### hashValues
  function hashValues(
    bytes32 _preimage
  ) public returns (bytes32)
hashValues generates the hash of condition inputs
with the following parameters

Parameters:

Name Type Description
_preimage bytes32 refers bytes32 value of the hash pre-image.

Return Values:

Name Type Description
bytes32 bytes32 hash of all these values
### fulfill
  function fulfill(
    bytes32 _agreementId
  ) external returns (enum ConditionStoreLibrary.ConditionState)
fulfill the condition by calling check the
the hash and the pre-image uint value

Parameters:

Name Type Description
_agreementId bytes32 SEA agreement identifier

Return Values:

Name Type Description
condition bytes32 state
### fulfill
  function fulfill(
    bytes32 _agreementId
  ) public returns (enum ConditionStoreLibrary.ConditionState)
fulfill the condition by calling check the
the hash and the pre-image string value

Parameters:

Name Type Description
_agreementId bytes32 SEA agreement identifier

Return Values:

Name Type Description
condition bytes32 state
### fulfill
  function fulfill(
    bytes32 _agreementId
  ) external returns (enum ConditionStoreLibrary.ConditionState)
fulfill the condition by calling check the
the hash and the pre-image bytes32 value

Parameters:

Name Type Description
_agreementId bytes32 SEA agreement identifier

Return Values:

Name Type Description
condition bytes32 state