^0.8.12
.
BaseAccount
: A contract that defines the interface for accounts and provides implementations for required methods for following the EIP4337 standards.UUPSUpgradeable
: A contract that enables the contract to be upgraded.Initializable
: A contract that provides support for initializer functions.TokenCallbackHandler
: A contract that defines the interface for token callbacks.IERC721Wallet
: A contract that provides support for ERC721 signature validation.AccessController
: A contract that provides support for owner and guardian management._entryPoint
: An IEntryPoint variable that holds the address of the entry point contract._filler
: A bytes28 variable that serves as a filler._nonce
: A uint96 variable that holds the current nonce.EtherspotWalletInitialized
: Emitted when the contract is initialized.EtherspotWalletReceived
: Emitted when the contract receives ether.EntryPointChanged
: Emitted when the entry point contract address is changed.onlyOwner
: Allows only the owners of the contract to call the function.onlyOwnerOrGuardian
: Allows only the owners or guardians of the contract to call the function.onlyOwnerOrEntryPoint
: Allows only the owners or the entry point contract to call the function.nonce() public view virtual override returns (uint256)
: Returns the current nonce.entryPoint() public view virtual override returns (IEntryPoint)
: Returns the entry point contract address.initialize(IEntryPoint anEntryPoint, address anOwner) public virtual initializer
: Initializes the contract. Calls _initialize
.getDeposit() public view
: Returns the balance of the wallet deposited to the EntryPoint
contract.addDeposit() public payable
: This function deposits tokens to the EntryPoint
contract from wallet’s address.withdrawDepositTo(address payable withdrawAddress, uint256 amount) public onlyOwner
: Withdraws deposited tokens in the EntryPoint
contract for the wallet to an external address. Only callable by wallet owner.receive() external payable
: A fallback function that is triggered when the contract receives ether.
EtherspotWalletReceived(address indexed from, uint256 indexed amount)
.execute(address dest, uint256 value, bytes calldata func) external onlyOwnerOrEntryPoint
: Executes a transaction. It can only be called by the owners or the entry point contract. It calls the _call() function.executeBatch(address[] calldata dest, bytes[] calldata func) external onlyOwnerOrEntryPoint
: Executes a sequence of transactions. It can only be called by the owners or the entry point contract. It calls the _call() function.updateEntryPoint(address _newEntryPoint) external
: Updates the EntryPoint
contract stored in the wallet. Only callable by wallet owner.
EntryPointChanged(address(_entryPoint), _newEntryPoint)
.addOwner(address _newOwner) external onlyOwnerOrGuardian
: Adds a new owner to the EtherspotWallet
. Interacts with the Owned.sol
. Only callable by a wallet owner or an approved guardian. See OWNED.md for more information regarding this.removeOwner(address _owner) external onlyOwnerOrGuardian
: Removes an owner from the EtherspotWallet
. Interacts with the Owned.sol
. Only callable by a wallet owner or an approved guardian. See OWNED.md for more information regarding this.addGuardian(address _newGuardian) external onlyOwner
: Adds a new guardian to the EtherspotWallet
. Interacts with the Guarded.sol
. Only callable by a wallet owner. See GUARDED.md for more information regarding this.removeGuardian(address _guardian) external onlyOwner
: Removes a guardian from the EtherspotWallet
. Interacts with the Guarded.sol
. Only callable by a wallet owner. See GUARDED.md for more information regarding this._initialize(IEntryPoint anEntryPoint, address anOwner) internal virtual
: Initializes the contract. It sets the entry point contract address and adds the initial owner.
event EtherspotWalletInitialized(IEntryPoint indexed entryPoint, address indexed owner)
._validateAndUpdateNonce(UserOperation calldata userOp) internal override
: This function validates the user operation nonce and updates the wallet’s nonce._validateSignature(UserOperation calldata userOp, bytes32 userOpHash) internal virtual override
: This function validates the UserOperation signature._call(address target, uint256 value, bytes memory data) internal
: Makes a contract call to another smart contract._authorizeUpgrade(address newImplementation) internal view override
: Upgrades EtherspotWallet
. Only callable by wallet owner.