IStakeManager
manage deposits and stakes. deposit is just a balance used to pay for UserOperations (either by a paymaster or an account) stake is value locked for at least "unstakeDelay" by the staked entity.
Methods
addStake
function addStake(uint32 _unstakeDelaySec) external payable
add to the account's stake - amount and delay any pending unstake is first cancelled.
Parameters
_unstakeDelaySec
uint32
the new lock duration before the deposit can be withdrawn.
balanceOf
function balanceOf(address account) external view returns (uint256)
Parameters
account
address
undefined
Returns
_0
uint256
the deposit (for gas payment) of the account
depositTo
function depositTo(address account) external payable
add to the deposit of the given account
Parameters
account
address
undefined
getDepositInfo
function getDepositInfo(address account) external view returns (struct IStakeManager.DepositInfo info)
Parameters
account
address
undefined
Returns
info
IStakeManager.DepositInfo
- full deposit information of given account
unlockStake
function unlockStake() external nonpayable
attempt to unlock the stake. the value can be withdrawn (using withdrawStake) after the unstake delay.
withdrawStake
function withdrawStake(address payable withdrawAddress) external nonpayable
withdraw from the (unlocked) stake. must first call unlockStake and wait for the unstakeDelay to pass
Parameters
withdrawAddress
address payable
the address to send withdrawn value.
withdrawTo
function withdrawTo(address payable withdrawAddress, uint256 withdrawAmount) external nonpayable
withdraw from the deposit.
Parameters
withdrawAddress
address payable
the address to send withdrawn value.
withdrawAmount
uint256
the amount to withdraw.
Events
Deposited
event Deposited(address indexed account, uint256 totalDeposit)
Parameters
account indexed
address
undefined
totalDeposit
uint256
undefined
StakeLocked
event StakeLocked(address indexed account, uint256 totalStaked, uint256 unstakeDelaySec)
Emitted when stake or unstake delay are modified
Parameters
account indexed
address
undefined
totalStaked
uint256
undefined
unstakeDelaySec
uint256
undefined
StakeUnlocked
event StakeUnlocked(address indexed account, uint256 withdrawTime)
Emitted once a stake is scheduled for withdrawal
Parameters
account indexed
address
undefined
withdrawTime
uint256
undefined
StakeWithdrawn
event StakeWithdrawn(address indexed account, address withdrawAddress, uint256 amount)
Parameters
account indexed
address
undefined
withdrawAddress
address
undefined
amount
uint256
undefined
Withdrawn
event Withdrawn(address indexed account, address withdrawAddress, uint256 amount)
Parameters
account indexed
address
undefined
withdrawAddress
address
undefined
amount
uint256
undefined
Last updated