- Name: constructor
- Inputs:
- _stakingToken: ERC20 token to be used for staking
- Name: stake
- Inputs:
- _amount: Number of tokens staked
- _data: Used in Staked event, to add signalling information in more complex staking applications
- Name: stakeFor
- Inputs:
- _user: The final staker of the tokens
- _amount: Number of tokens staked
- _data: Used in Staked event, to add signalling information in more complex staking applications
- Name: unstake
- Inputs:
- _amount: Number of tokens to unstake
- _data: Used in Unstaked event, to add signalling information in more complex staking applications
- Name: token
- Outputs:
- Address of the staking token
- Name: supportsHistory
- Outputs:
- true
- Name: lastStakedFor
- Inputs:
- _user: Account requesting for
- Outputs:
- Last block number when account’s balance was modified
- Name: totalStakedForAt
- Inputs:
- _user: Account requesting for
- _blockNumber: Block number at which we are requesting
- Outputs:
- The amount of tokens staked by the account at the given block number
- Name: totalStakedAt
- Inputs:
- _blockNumber: Block number at which we are requesting
- Outputs:
- The amount of tokens staked at the given block number
- Name: totalStakedFor
- Inputs:
- _user: Account requesting for
- Outputs:
- The amount of tokens staked by the given account
- Name: totalStaked
- Outputs:
- The total amount of tokens staked by all users
- Name: allowManager
- Inputs:
- _lockManager: The manager entity for this particular lock
- _allowance: Amount of tokens that the manager can lock
- _data: Used in
NewLockManager
event and to parametrize logic for the lock to be enforced by the manager
- Name: transfer
- Inputs:
- _to: Recipient of the tokens
- _amount: Number of tokens to be transferred
- Name: transferAndUnstake
- Inputs:
- _to: Recipient of the tokens
- _amount: Number of tokens to be transferred
- Name: slash
- Inputs:
- _from: Owner of locked tokens
- _to: Recipient of the tokens
- _amount: Number of tokens to be transferred
- Name: slashAndUnstake
- Inputs:
- _from: Owner of locked tokens
- _to: Recipient of the tokens
- _amount: Number of tokens to be transferred
- Name: slashAndUnlock
- Inputs:
- _from: Owner of locked tokens
- _to: Recipient of the tokens
- _unlockAmount: Number of tokens to be unlocked
- _slashAmount: Number of tokens to be transferred
- Name: increaseLockAllowance
- Inputs:
- _lockManager: The manager entity for this particular lock
- _allowance: Amount of allowed tokens increase
- Name: decreaseLockAllowance
- Inputs:
- _user: Owner of locked tokens
- _lockManager: The manager entity for this particular lock
- _allowance: Amount of allowed tokens decrease
- Name: lock
- Inputs:
- _user: Owner of locked tokens
- _amount: Amount of locked tokens increase
- Name: unlock
- Inputs:
- _user: Owner of locked tokens
- _lockManager: The manager entity for this particular lock
- _amount: Amount of locked tokens decrease
- Name: unlockAndRemoveManager
- Inputs:
- _user: Owner of locked tokens
- _lockManager: The manager entity for this particular lock
- Name: getTotalLockedOf
- Inputs:
- _user: Owner of locks
- Outputs:
- Total amount of locked tokens for the requested account
- Name: getLock
- Inputs:
- _user: Owner of lock
- _lockManager: Manager of the lock for the given account
- Outputs:
- _amount: Amount of locked tokens
- _allowance: Amount of tokens that lock manager is allowed to lock
- Name: getBalancesOf
- Inputs:
- _user: Account being requested
- Outputs:
- staked: Amount of staked tokens
- locked: Amount of total locked tokens
- Name: unlockedBalanceOf
- Inputs:
- _user: Owner of the staked but unlocked balance
- Outputs:
- Amount of tokens staked but not locked by given account
- Name: canUnlock
- Inputs:
- _user: Owner of lock
- _lockManager: Manager of the lock for the given account
- _amount: Amount of tokens to be potentially unlocked. If zero, it means the whole locked amount
- Outputs:
- True if caller is allowed to unlock the requested amount (all the lock if amount requested is zero)
- Name: receiveApproval
- Inputs:
- _from: Account approving tokens
- _amount: Amount of
_token
tokens being approved - _token: MiniMeToken that is being approved and that the call comes from
- _data: Used in Staked event, to add signalling information in more complex staking applications