base constructor. subclass SHOULD add parameters that define the owner (signer) of this wallet
check if the contract is already deployed.
helper method: create and sign a user operation.
transaction details for the userOp
create a UserOperation, filling all details (except signature)
destroys
return the account's address. this value is valid even before deploying the contract.
calculate the account address even before it is deployed
return initCode value to into the UserOp. (either deployment code, or empty hex if contract already deployed)
should cover cost of putting calldata on-chain, and some overhead. actual overhead depends on the expected bundle size
return userOpHash for signing. This value matches entryPoint.getUserOpHash (calculated off-chain, to avoid a view call)
userOperation, (signature field ignored)
get the transaction that has this userOpHash mined, or null if not found
returned by sendUserOpToBundler (or by getUserOpHash..)
stop waiting after this timeout
time to wait between polls.
the transactionHash this userOp was mined, or null if not found.
return maximum gas used for verification. NOTE: createUnsignedUserOp will add to this value the cost of creation, if the contract is not yet created.
ABI-encode a user operation. used for calldata cost estimation
signs message
Promise
Sign the filled userOp.
the UserOperation to sign (with signature field ignored)
Base class for all Smart Wallet ERC-4337 Clients to implement. Subclass should inherit 5 methods to support a specific wallet contract:
The user can use the following APIs: