PolicyManager¶
- details
v6.1.3
- notice
Contract holds policy data and locks accrued policy fees
methods¶
calculateRefundValue(bytes16,address)¶
- notice
Calculate amount of refund
params¶
- _node
Node
- _policyId
Policy id
createPolicy(bytes16,address,uint64,address[])¶
- details
Generate policy id before creation
- notice
Create policy
params¶
- _endTimestamp
End timestamp of the policy in seconds
- _nodes
Nodes that will handle policy
- _policyId
Policy id
- _policyOwner
Policy owner. Zero address means sender is owner
finishUpgrade(address)¶
- details
the
onlyWhileUpgrading
modifier works through a call to the parentfinishUpgrade
getArrangementInfo(bytes16,uint256)¶
- notice
Return the information about arrangement
getArrangementsLength(bytes16)¶
- notice
Get number of arrangements in the policy
params¶
- _policyId
Policy id
getMinFeeRate(address)¶
- notice
Get the minimum acceptable fee rate (set by staker for their associated worker)
getNodeFeeDelta(address,uint16)¶
- notice
Get information about staker’s fee rate
params¶
- _node
Address of staker
- _period
Period to get fee delta
getPolicyOwner(bytes16)¶
- notice
Get policy owner
getRevocationHash(bytes16,address)¶
- notice
Get unsigned hash for revocation
params¶
- _node
Node that will be excluded
- _policyId
Policy id
returns¶
- _0
Revocation hash, EIP191 version 0x45 (‘E’)
ping(address,uint16,uint16,uint16)¶
- notice
Call from StakingEscrow to update node info once per period. Set default
feeDelta
value for specified period and update node fee
params¶
- _node
Node address
- _periodToSetDefault
Period to set
- _processedPeriod1
Processed period
- _processedPeriod2
Processed period
refund(bytes16,address)¶
- notice
Refund part of one node’s fee by the sponsor
params¶
- _node
Node address
- _policyId
Policy id
renounceOwnership()¶
- details
Allows the current owner to relinquish control of the contract.
- notice
Renouncing to ownership will leave the contract without an owner. It will not be possible to call the functions with the
onlyOwner
modifier anymore.
revoke(bytes16,address,bytes)¶
- notice
Revoke policy or arrangement using owner’s signature
params¶
- _node
Node that will be excluded, zero address if whole policy will be revoked
- _policyId
Policy id
- _signature
Signature of owner, EIP191 version 0x45 (‘E’)
revokeArrangement(bytes16,address)¶
- notice
Revoke arrangement by the sponsor
params¶
- _node
Node that will be excluded
- _policyId
Policy id
setFeeRateRange(uint128,uint128,uint128)¶
- notice
Set minimum, default & maximum fee rate for all stakers and all policies (‘global fee range’)
setMinFeeRate(uint256)¶
- notice
Set the minimum acceptable fee rate (set by staker for their associated worker)
- details
Input value must fall within
feeRateRange
(global fee range)
transferOwnership(address)¶
- details
Allows the current owner to transfer control of the contract to a newOwner.
params¶
- newOwner
The address to transfer ownership to.
verifyState(address)¶
- details
the
onlyWhileUpgrading
modifier works through a call to the parentverifyState
withdraw()¶
- notice
Withdraw fee by node