@oceanprotocol/keeper-contracts
Version:
Integration of SEAs, DID and OceanToken in Solidity
78 lines (61 loc) • 1.75 kB
Markdown
# contract: LockRewardCondition
Documentation:
```
Lock Reward Condition
Ocean Protocol Team
* Implementation of the Lock Reward Condition
* For more information, please refer the following link
https://github.com/oceanprotocol/OEPs/issues/122
TODO: update the OEP link
```
## Variables
### private token
## Events
### Fulfilled
Parameters:
* bytes32 _agreementId
* address _rewardAddress
* bytes32 _conditionId
* uint256 _amount
## Functions
### external initialize
Documentation:
```
initialize init the
contract with the following parameters
this function is called only once during the contract
initialization.
_owner contract's owner account address
_conditionStoreManagerAddress condition store manager address
_tokenAddress Ocean Token contract address
```
Parameters:
* address _owner
* address _conditionStoreManagerAddress
* address _tokenAddress
### public hashValues
Documentation:
```
hashValues generates the hash of condition inputs
with the following parameters
_rewardAddress the contract address where the reward will be locked
_amount is the amount of the locked tokens
bytes32 hash of all these values
```
Parameters:
* address _rewardAddress
* uint256 _amount
### external fulfill
Documentation:
```
fulfill requires valid token transfer in order
to lock the amount of tokens based on the SEA
_agreementId SEA agreement identifier
_rewardAddress the contract address where the reward is locked
_amount is the amount of tokens to be transferred
condition state
```
Parameters:
* bytes32 _agreementId
* address _rewardAddress
* uint256 _amount