State Variables
ACCESS_CONTROLLER
Inheritance
IPAccountImpl inherits from:- ERC6551: Base implementation of the ERC-6551 standard
- IPAccountStorage: Storage contract for IP Account data
- IIPAccount: Interface for IP Account functionality
Functions
constructor
accessController
: The address of the AccessController contract to be used for permission checksipAssetRegistry
: The address of the IP Asset RegistrylicenseRegistry
: The address of the License RegistrymoduleRegistry
: The address of the Module Registry
supportsInterface
interfaceId
: The interface identifier, as specified in ERC-165
- Boolean indicating if the contract supports the interface
token
chainId
: The EIP-155 ID of the chain the token exists ontokenContract
: The contract address of the tokentokenId
: The ID of the token
isValidSigner
signer
: The signer to checkdata
: The data to be checked, encoded asabi.encode(address to, bytes calldata)
- The function selector if the signer is valid, 0 otherwise
isValidSigner
signer
: The signer to checkto
: The recipient of the transactiondata
: The calldata to check against
- Boolean indicating if the signer is valid
owner
- The address of the owner
state
- The current state (nonce) of the account
updateStateForValidSigner
signer
: The signer to checkto
: The recipient of the transactiondata
: The calldata to check against
executeWithSig
to
: The recipient of the transactionvalue
: The amount of Ether to senddata
: The data to send along with the transactionsigner
: The signer of the transactiondeadline
: The deadline of the transaction signaturesignature
: The signature of the transaction, EIP-712 encoded
- The return data from the transaction
execute
to
: The recipient of the transactionvalue
: The amount of Ether to senddata
: The data to send along with the transaction
- The return data from the transaction
execute
to
: The recipient of the transactionvalue
: The amount of Ether to senddata
: The data to send along with the transactionoperation
: The operation type to perform, only 0 - CALL is supported
- The return data from the transaction
executeBatch
calls
: The array of calls to executeoperation
: The operation type to perform, only 0 - CALL is supported
- The return data from the transactions
isValidSignature
hash
: The hash of the data to be signedsignature
: The signature to verify
- Always returns 0xffffffff (disabled)
Events
Executed
to
: The recipient of the transactionvalue
: The amount of Ether sentdata
: The data sent along with the transactionstate
: The new state (nonce) of the account
ExecutedWithSig
to
: The recipient of the transactionvalue
: The amount of Ether sentdata
: The data sent along with the transactionstate
: The new state (nonce) of the accountdeadline
: The deadline of the transaction signaturesigner
: The signer of the transactionsignature
: The signature of the transaction
Security Considerations
The IPAccountImpl contract implements several security measures:- Permission System: Uses an AccessController to manage permissions for different signers and operations.
- Signature Verification: Implements EIP-712 typed data signing for secure transaction authorization.
- Deadline Checking: Includes transaction deadlines to prevent replay attacks.
- Nonce Management: Uses a state (nonce) system to prevent transaction replay.
- Input Validation: Validates inputs and checks for edge cases, such as preventing invalid operations.
- Signature Malleability Protection: Includes protections against signature malleability attacks.
- Limited Operations: Only supports the CALL operation (0) for security reasons, restricting potentially dangerous operations.
- Upgradability Disabled: The contract disables UUPS upgradability to ensure contract immutability.