SaplingStakerContext
SaplingStakerContext
Provides staker access control, and a basic close functionality.
Close functionality is implemented in the same fashion as Openzeppelin's Pausable.
staker
Staker address
_closed
Flag indicating whether or not the pool is closed
Closed
Event for when the contract is closed
Opened
Event for when the contract is reopened
StakerSet
Event for when a new staker is set
onlyStaker
A modifier to limit access only to the staker
onlyUser
A modifier to limit access only to users without roles
whenNotClosed
Modifier to limit function access to when the contract is not closed
whenClosed
Modifier to limit function access to when the contract is closed
__SaplingStakerContext_init
Create a new SaplingStakerContext.
Addresses must not be 0.
setStaker
Designates a new staker for the pool.
Caller must be the governance. There can only be one staker in the pool. Staked funds remain staked in the pool and will be owned by the new staker.
close
Close the pool.
_Only the functions using whenClosed and whenNotClosed modifiers will be affected by close. Caller must have the staker role. Pool must be open.
open
Open the pool for normal operations.
Only the functions using whenClosed and whenNotClosed modifiers will be affected by open. Caller must have the staker role. Pool must be closed.
closed
Indicates whether or not the contract is closed.
isNonUserAddress
Verify if an address has any non-user/management roles
Overrides the same function in SaplingContext
canClose
Indicates whether or not the contract can be closed in it's current state.
A hook for the extending contract to implement.
canOpen
Indicates whether or not the contract can be opened in it's current state.
A hook for the extending contract to implement.
__gap
Slots reserved for future state variables
Last updated