Brain Account
Contract Interface
interface IBrainAccount {
/// @notice Called by the ERC-4337 EntryPoint during UserOperation validation.
/// Verifies signature, agent authorization, policy proofs, spend limits,
/// allowlists, expiry, and replay protection.
function validateUserOp(bytes calldata userOp) external returns (bool);
/// @notice Execute a call after successful validation.
function execute(
address target,
uint256 value,
bytes calldata data
) external;
/// @notice Grant or update agent permissions.
function authorizeAgent(address agent, bytes32 permissions) external;
/// @notice Store a hash of the active policy definition on-chain.
function setPolicy(bytes32 policyHash) external;
}Responsibilities
Validation Checks in validateUserOp
validateUserOpDeployment
Interoperability Standards
Standard
Role
Last updated
