IEntryPoint
Methods
addStake
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
Parameters
account
address
undefined
Returns
_0
uint256
the deposit (for gas payment) of the account
depositTo
add to the deposit of the given account
Parameters
account
address
undefined
getDepositInfo
Parameters
account
address
undefined
Returns
info
IStakeManager.DepositInfo
- full deposit information of given account
getSenderAddress
Get counterfactual sender address. Calculate the sender contract address that will be generated by the initCode and salt in the UserOperation. this method always revert, and returns the address in SenderAddressResult error
Parameters
initCode
bytes
the constructor code to be passed into the UserOperation.
getUserOpHash
Parameters
userOp
UserOperation
undefined
Returns
_0
bytes32
undefined
handleAggregatedOps
Parameters
opsPerAggregator
IEntryPoint.UserOpsPerAggregator[]
undefined
beneficiary
address payable
undefined
handleOps
Parameters
ops
UserOperation[]
undefined
beneficiary
address payable
undefined
simulateHandleOp
Parameters
op
UserOperation
undefined
target
address
undefined
targetCallData
bytes
undefined
simulateValidation
Parameters
userOp
UserOperation
undefined
unlockStake
attempt to unlock the stake. the value can be withdrawn (using withdrawStake) after the unstake delay.
withdrawStake
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
withdraw from the deposit.
Parameters
withdrawAddress
address payable
the address to send withdrawn value.
withdrawAmount
uint256
the amount to withdraw.
Events
AccountDeployed
account "sender" was deployed.
Parameters
userOpHash indexed
bytes32
the userOp that deployed this account. UserOperationEvent will follow.
sender indexed
address
the account that is deployed
factory
address
the factory used to deploy this account (in the initCode)
paymaster
address
the paymaster used by this UserOp
Deposited
Parameters
account indexed
address
undefined
totalDeposit
uint256
undefined
SignatureAggregatorChanged
signature aggregator used by the following UserOperationEvents within this bundle.
Parameters
aggregator indexed
address
undefined
StakeLocked
Emitted when stake or unstake delay are modified
Parameters
account indexed
address
undefined
totalStaked
uint256
undefined
unstakeDelaySec
uint256
undefined
StakeUnlocked
Emitted once a stake is scheduled for withdrawal
Parameters
account indexed
address
undefined
withdrawTime
uint256
undefined
StakeWithdrawn
Parameters
account indexed
address
undefined
withdrawAddress
address
undefined
amount
uint256
undefined
UserOperationEvent
Parameters
userOpHash indexed
bytes32
undefined
sender indexed
address
undefined
paymaster indexed
address
undefined
nonce
uint256
undefined
success
bool
undefined
actualGasCost
uint256
undefined
actualGasUsed
uint256
undefined
UserOperationRevertReason
An event emitted if the UserOperation "callData" reverted with non-zero length
Parameters
userOpHash indexed
bytes32
the request unique identifier.
sender indexed
address
the sender of this request
nonce
uint256
the nonce used in the request
revertReason
bytes
- the return bytes from the (reverted) call to "callData".
Withdrawn
Parameters
account indexed
address
undefined
withdrawAddress
address
undefined
amount
uint256
undefined
Errors
ExecutionResult
return value of simulateHandleOp
Parameters
preOpGas
uint256
undefined
paid
uint256
undefined
validAfter
uint48
undefined
validUntil
uint48
undefined
targetSuccess
bool
undefined
targetResult
bytes
undefined
FailedOp
a custom revert error of handleOps, to identify the offending op. NOTE: if simulateValidation passes successfully, there should be no reason for handleOps to fail on it.
Parameters
opIndex
uint256
- index into the array of ops to the failed one (in simulateValidation, this is always zero)
reason
string
- revert reason The string starts with a unique code "AAmn", where "m" is "1" for factory, "2" for account and "3" for paymaster issues, so a failure can be attributed to the correct entity. Should be caught in off-chain handleOps simulation and not happen on-chain. Useful for mitigating DoS attempts against batchers or for troubleshooting of factory/account/paymaster reverts.
SenderAddressResult
return value of getSenderAddress
Parameters
sender
address
undefined
SignatureValidationFailed
error case when a signature aggregator fails to verify the aggregated signature it had created.
Parameters
aggregator
address
undefined
ValidationResult
Successful result from simulateValidation.
Parameters
returnInfo
IEntryPoint.ReturnInfo
gas and time-range returned values
senderInfo
IStakeManager.StakeInfo
stake information about the sender
factoryInfo
IStakeManager.StakeInfo
stake information about the factory (if any)
paymasterInfo
IStakeManager.StakeInfo
stake information about the paymaster (if any)
ValidationResultWithAggregation
Successful result from simulateValidation, if the account returns a signature aggregator
Parameters
returnInfo
IEntryPoint.ReturnInfo
gas and time-range returned values
senderInfo
IStakeManager.StakeInfo
stake information about the sender
factoryInfo
IStakeManager.StakeInfo
stake information about the factory (if any)
paymasterInfo
IStakeManager.StakeInfo
stake information about the paymaster (if any)
aggregatorInfo
IEntryPoint.AggregatorStakeInfo
signature aggregation info (if the account requires signature aggregator) bundler MUST use it to verify the signature, or reject the UserOperation
Last updated