Module IthacaAccount

Module IthacaAccount 

Source
Expand description

Generated by the following Solidity interface…

library ERC7821 {
    struct Call {
        address to;
        uint256 value;
        bytes data;
    }
}

library GuardedExecutor {
    type SpendPeriod is uint8;
    struct CallCheckerInfo {
        address target;
        address checker;
    }
    struct SpendInfo {
        address token;
        SpendPeriod period;
        uint256 limit;
        uint256 spent;
        uint256 lastUpdated;
        uint256 currentSpent;
        uint256 current;
    }
}

interface IthacaAccount {
    type KeyType is uint8;
    struct Key {
        uint40 expiry;
        KeyType keyType;
        bool isSuperAdmin;
        bytes publicKey;
    }

    error BatchOfBatchesDecodingError();
    error CannotSelfExecute();
    error ExceededSpendLimit(address token);
    error ExceedsCapacity();
    error FnSelectorNotRecognized();
    error IndexOutOfBounds();
    error InvalidNonce();
    error InvalidPublicKey();
    error KeyDoesNotExist();
    error KeyHashIsZero();
    error KeyTypeCannotBeSuperAdmin();
    error NewImplementationIsZero();
    error NewSequenceMustBeLarger();
    error NoSpendPermissions();
    error OpDataError();
    error SuperAdminCanExecuteEverything();
    error SuperAdminCanSpendAnything();
    error Unauthorized();
    error UnauthorizedCall(bytes32 keyHash, address target, bytes data);
    error UnsupportedExecutionMode();

    event Authorized(bytes32 indexed keyHash, Key key);
    event CallCheckerSet(bytes32 keyHash, address target, address checker);
    event CanExecuteSet(bytes32 keyHash, address target, bytes4 fnSel, bool can);
    event ImplementationApprovalSet(address indexed implementation, bool isApproved);
    event ImplementationCallerApprovalSet(address indexed implementation, address indexed caller, bool isApproved);
    event LabelSet(string newLabel);
    event NonceInvalidated(uint256 nonce);
    event Revoked(bytes32 indexed keyHash);
    event SignatureCheckerApprovalSet(bytes32 indexed keyHash, address indexed checker, bool isApproved);
    event SpendLimitRemoved(bytes32 keyHash, address token, GuardedExecutor.SpendPeriod period);
    event SpendLimitSet(bytes32 keyHash, address token, GuardedExecutor.SpendPeriod period, uint256 limit);

    constructor(address orchestrator) payable;

    fallback() external payable;

    receive() external payable;

    function ANY_FN_SEL() external view returns (bytes4);
    function ANY_KEYHASH() external view returns (bytes32);
    function ANY_TARGET() external view returns (address);
    function CALL_TYPEHASH() external view returns (bytes32);
    function DOMAIN_TYPEHASH() external view returns (bytes32);
    function EMPTY_CALLDATA_FN_SEL() external view returns (bytes4);
    function EXECUTE_TYPEHASH() external view returns (bytes32);
    function MULTICHAIN_NONCE_PREFIX() external view returns (uint16);
    function ORCHESTRATOR() external view returns (address);
    function SIGN_TYPEHASH() external view returns (bytes32);
    function approvedSignatureCheckers(bytes32 keyHash) external view returns (address[] memory);
    function authorize(Key memory key) external returns (bytes32 keyHash);
    function callCheckerInfos(bytes32 keyHash) external view returns (GuardedExecutor.CallCheckerInfo[] memory results);
    function canExecute(bytes32 keyHash, address target, bytes memory data) external view returns (bool);
    function canExecutePackedInfos(bytes32 keyHash) external view returns (bytes32[] memory);
    function checkAndIncrementNonce(uint256 nonce) external payable;
    function computeDigest(ERC7821.Call[] memory calls, uint256 nonce) external view returns (bytes32 result);
    function eip712Domain() external view returns (bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions);
    function execute(bytes32 mode, bytes memory executionData) external payable;
    function getContextKeyHash() external view returns (bytes32);
    function getKey(bytes32 keyHash) external view returns (Key memory key);
    function getKeys() external view returns (Key[] memory keys, bytes32[] memory keyHashes);
    function getNonce(uint192 seqKey) external view returns (uint256);
    function hash(Key memory key) external pure returns (bytes32);
    function invalidateNonce(uint256 nonce) external;
    function isValidSignature(bytes32 digest, bytes memory signature) external view returns (bytes4);
    function keyAt(uint256 i) external view returns (Key memory);
    function keyCount() external view returns (uint256);
    function label() external view returns (string memory);
    function pay(uint256 paymentAmount, bytes32 keyHash, bytes32 intentDigest, bytes memory encodedIntent) external;
    function removeSpendLimit(bytes32 keyHash, address token, GuardedExecutor.SpendPeriod period) external;
    function revoke(bytes32 keyHash) external;
    function setCallChecker(bytes32 keyHash, address target, address checker) external;
    function setCanExecute(bytes32 keyHash, address target, bytes4 fnSel, bool can) external;
    function setLabel(string memory newLabel) external;
    function setSignatureCheckerApproval(bytes32 keyHash, address checker, bool isApproved) external;
    function setSpendLimit(bytes32 keyHash, address token, GuardedExecutor.SpendPeriod period, uint256 limit) external;
    function spendAndExecuteInfos(bytes32[] memory keyHashes) external view returns (GuardedExecutor.SpendInfo[][] memory spends, bytes32[][] memory executes);
    function spendInfos(bytes32 keyHash) external view returns (GuardedExecutor.SpendInfo[] memory results);
    function startOfSpendPeriod(uint256 unixTimestamp, GuardedExecutor.SpendPeriod period) external pure returns (uint256);
    function supportsExecutionMode(bytes32 mode) external view returns (bool result);
    function unwrapAndValidateSignature(bytes32 digest, bytes memory signature) external view returns (bool isValid, bytes32 keyHash);
    function upgradeHook(bytes32 previousVersion) external returns (bool);
    function upgradeProxyAccount(address newImplementation) external;
}

…which was generated by the following JSON ABI:

[
  {
    "type": "constructor",
    "inputs": [
      {
        "name": "orchestrator",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "payable"
  },
  {
    "type": "fallback",
    "stateMutability": "payable"
  },
  {
    "type": "receive",
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "ANY_FN_SEL",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "ANY_KEYHASH",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "ANY_TARGET",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "CALL_TYPEHASH",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "DOMAIN_TYPEHASH",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "EMPTY_CALLDATA_FN_SEL",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "EXECUTE_TYPEHASH",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "MULTICHAIN_NONCE_PREFIX",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "ORCHESTRATOR",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "SIGN_TYPEHASH",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "approvedSignatureCheckers",
    "inputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "address[]",
        "internalType": "address[]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "authorize",
    "inputs": [
      {
        "name": "key",
        "type": "tuple",
        "internalType": "struct IthacaAccount.Key",
        "components": [
          {
            "name": "expiry",
            "type": "uint40",
            "internalType": "uint40"
          },
          {
            "name": "keyType",
            "type": "uint8",
            "internalType": "enum IthacaAccount.KeyType"
          },
          {
            "name": "isSuperAdmin",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "publicKey",
            "type": "bytes",
            "internalType": "bytes"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "callCheckerInfos",
    "inputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [
      {
        "name": "results",
        "type": "tuple[]",
        "internalType": "struct GuardedExecutor.CallCheckerInfo[]",
        "components": [
          {
            "name": "target",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "checker",
            "type": "address",
            "internalType": "address"
          }
        ]
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "canExecute",
    "inputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "target",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "data",
        "type": "bytes",
        "internalType": "bytes"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "canExecutePackedInfos",
    "inputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bytes32[]",
        "internalType": "bytes32[]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "checkAndIncrementNonce",
    "inputs": [
      {
        "name": "nonce",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "computeDigest",
    "inputs": [
      {
        "name": "calls",
        "type": "tuple[]",
        "internalType": "struct ERC7821.Call[]",
        "components": [
          {
            "name": "to",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "value",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "data",
            "type": "bytes",
            "internalType": "bytes"
          }
        ]
      },
      {
        "name": "nonce",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "result",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "eip712Domain",
    "inputs": [],
    "outputs": [
      {
        "name": "fields",
        "type": "bytes1",
        "internalType": "bytes1"
      },
      {
        "name": "name",
        "type": "string",
        "internalType": "string"
      },
      {
        "name": "version",
        "type": "string",
        "internalType": "string"
      },
      {
        "name": "chainId",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "verifyingContract",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "salt",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "extensions",
        "type": "uint256[]",
        "internalType": "uint256[]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "execute",
    "inputs": [
      {
        "name": "mode",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "executionData",
        "type": "bytes",
        "internalType": "bytes"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "getContextKeyHash",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getKey",
    "inputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [
      {
        "name": "key",
        "type": "tuple",
        "internalType": "struct IthacaAccount.Key",
        "components": [
          {
            "name": "expiry",
            "type": "uint40",
            "internalType": "uint40"
          },
          {
            "name": "keyType",
            "type": "uint8",
            "internalType": "enum IthacaAccount.KeyType"
          },
          {
            "name": "isSuperAdmin",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "publicKey",
            "type": "bytes",
            "internalType": "bytes"
          }
        ]
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getKeys",
    "inputs": [],
    "outputs": [
      {
        "name": "keys",
        "type": "tuple[]",
        "internalType": "struct IthacaAccount.Key[]",
        "components": [
          {
            "name": "expiry",
            "type": "uint40",
            "internalType": "uint40"
          },
          {
            "name": "keyType",
            "type": "uint8",
            "internalType": "enum IthacaAccount.KeyType"
          },
          {
            "name": "isSuperAdmin",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "publicKey",
            "type": "bytes",
            "internalType": "bytes"
          }
        ]
      },
      {
        "name": "keyHashes",
        "type": "bytes32[]",
        "internalType": "bytes32[]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getNonce",
    "inputs": [
      {
        "name": "seqKey",
        "type": "uint192",
        "internalType": "uint192"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "hash",
    "inputs": [
      {
        "name": "key",
        "type": "tuple",
        "internalType": "struct IthacaAccount.Key",
        "components": [
          {
            "name": "expiry",
            "type": "uint40",
            "internalType": "uint40"
          },
          {
            "name": "keyType",
            "type": "uint8",
            "internalType": "enum IthacaAccount.KeyType"
          },
          {
            "name": "isSuperAdmin",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "publicKey",
            "type": "bytes",
            "internalType": "bytes"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "invalidateNonce",
    "inputs": [
      {
        "name": "nonce",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "isValidSignature",
    "inputs": [
      {
        "name": "digest",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "signature",
        "type": "bytes",
        "internalType": "bytes"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "keyAt",
    "inputs": [
      {
        "name": "i",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "tuple",
        "internalType": "struct IthacaAccount.Key",
        "components": [
          {
            "name": "expiry",
            "type": "uint40",
            "internalType": "uint40"
          },
          {
            "name": "keyType",
            "type": "uint8",
            "internalType": "enum IthacaAccount.KeyType"
          },
          {
            "name": "isSuperAdmin",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "publicKey",
            "type": "bytes",
            "internalType": "bytes"
          }
        ]
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "keyCount",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "label",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "string",
        "internalType": "string"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "pay",
    "inputs": [
      {
        "name": "paymentAmount",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "keyHash",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "intentDigest",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "encodedIntent",
        "type": "bytes",
        "internalType": "bytes"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "removeSpendLimit",
    "inputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "token",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "period",
        "type": "uint8",
        "internalType": "enum GuardedExecutor.SpendPeriod"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "revoke",
    "inputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "setCallChecker",
    "inputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "target",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "checker",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "setCanExecute",
    "inputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "target",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "fnSel",
        "type": "bytes4",
        "internalType": "bytes4"
      },
      {
        "name": "can",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "setLabel",
    "inputs": [
      {
        "name": "newLabel",
        "type": "string",
        "internalType": "string"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "setSignatureCheckerApproval",
    "inputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "checker",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "isApproved",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "setSpendLimit",
    "inputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "token",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "period",
        "type": "uint8",
        "internalType": "enum GuardedExecutor.SpendPeriod"
      },
      {
        "name": "limit",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "spendAndExecuteInfos",
    "inputs": [
      {
        "name": "keyHashes",
        "type": "bytes32[]",
        "internalType": "bytes32[]"
      }
    ],
    "outputs": [
      {
        "name": "spends",
        "type": "tuple[][]",
        "internalType": "struct GuardedExecutor.SpendInfo[][]",
        "components": [
          {
            "name": "token",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "period",
            "type": "uint8",
            "internalType": "enum GuardedExecutor.SpendPeriod"
          },
          {
            "name": "limit",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "spent",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "lastUpdated",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "currentSpent",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "current",
            "type": "uint256",
            "internalType": "uint256"
          }
        ]
      },
      {
        "name": "executes",
        "type": "bytes32[][]",
        "internalType": "bytes32[][]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "spendInfos",
    "inputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [
      {
        "name": "results",
        "type": "tuple[]",
        "internalType": "struct GuardedExecutor.SpendInfo[]",
        "components": [
          {
            "name": "token",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "period",
            "type": "uint8",
            "internalType": "enum GuardedExecutor.SpendPeriod"
          },
          {
            "name": "limit",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "spent",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "lastUpdated",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "currentSpent",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "current",
            "type": "uint256",
            "internalType": "uint256"
          }
        ]
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "startOfSpendPeriod",
    "inputs": [
      {
        "name": "unixTimestamp",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "period",
        "type": "uint8",
        "internalType": "enum GuardedExecutor.SpendPeriod"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "supportsExecutionMode",
    "inputs": [
      {
        "name": "mode",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [
      {
        "name": "result",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "unwrapAndValidateSignature",
    "inputs": [
      {
        "name": "digest",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "signature",
        "type": "bytes",
        "internalType": "bytes"
      }
    ],
    "outputs": [
      {
        "name": "isValid",
        "type": "bool",
        "internalType": "bool"
      },
      {
        "name": "keyHash",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "upgradeHook",
    "inputs": [
      {
        "name": "previousVersion",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "upgradeProxyAccount",
    "inputs": [
      {
        "name": "newImplementation",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "event",
    "name": "Authorized",
    "inputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "key",
        "type": "tuple",
        "indexed": false,
        "internalType": "struct IthacaAccount.Key",
        "components": [
          {
            "name": "expiry",
            "type": "uint40",
            "internalType": "uint40"
          },
          {
            "name": "keyType",
            "type": "uint8",
            "internalType": "enum IthacaAccount.KeyType"
          },
          {
            "name": "isSuperAdmin",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "publicKey",
            "type": "bytes",
            "internalType": "bytes"
          }
        ]
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "CallCheckerSet",
    "inputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "indexed": false,
        "internalType": "bytes32"
      },
      {
        "name": "target",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      },
      {
        "name": "checker",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "CanExecuteSet",
    "inputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "indexed": false,
        "internalType": "bytes32"
      },
      {
        "name": "target",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      },
      {
        "name": "fnSel",
        "type": "bytes4",
        "indexed": false,
        "internalType": "bytes4"
      },
      {
        "name": "can",
        "type": "bool",
        "indexed": false,
        "internalType": "bool"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ImplementationApprovalSet",
    "inputs": [
      {
        "name": "implementation",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "isApproved",
        "type": "bool",
        "indexed": false,
        "internalType": "bool"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ImplementationCallerApprovalSet",
    "inputs": [
      {
        "name": "implementation",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "caller",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "isApproved",
        "type": "bool",
        "indexed": false,
        "internalType": "bool"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "LabelSet",
    "inputs": [
      {
        "name": "newLabel",
        "type": "string",
        "indexed": false,
        "internalType": "string"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "NonceInvalidated",
    "inputs": [
      {
        "name": "nonce",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "Revoked",
    "inputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "SignatureCheckerApprovalSet",
    "inputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "checker",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "isApproved",
        "type": "bool",
        "indexed": false,
        "internalType": "bool"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "SpendLimitRemoved",
    "inputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "indexed": false,
        "internalType": "bytes32"
      },
      {
        "name": "token",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      },
      {
        "name": "period",
        "type": "uint8",
        "indexed": false,
        "internalType": "enum GuardedExecutor.SpendPeriod"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "SpendLimitSet",
    "inputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "indexed": false,
        "internalType": "bytes32"
      },
      {
        "name": "token",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      },
      {
        "name": "period",
        "type": "uint8",
        "indexed": false,
        "internalType": "enum GuardedExecutor.SpendPeriod"
      },
      {
        "name": "limit",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "type": "error",
    "name": "BatchOfBatchesDecodingError",
    "inputs": []
  },
  {
    "type": "error",
    "name": "CannotSelfExecute",
    "inputs": []
  },
  {
    "type": "error",
    "name": "ExceededSpendLimit",
    "inputs": [
      {
        "name": "token",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "ExceedsCapacity",
    "inputs": []
  },
  {
    "type": "error",
    "name": "FnSelectorNotRecognized",
    "inputs": []
  },
  {
    "type": "error",
    "name": "IndexOutOfBounds",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidNonce",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidPublicKey",
    "inputs": []
  },
  {
    "type": "error",
    "name": "KeyDoesNotExist",
    "inputs": []
  },
  {
    "type": "error",
    "name": "KeyHashIsZero",
    "inputs": []
  },
  {
    "type": "error",
    "name": "KeyTypeCannotBeSuperAdmin",
    "inputs": []
  },
  {
    "type": "error",
    "name": "NewImplementationIsZero",
    "inputs": []
  },
  {
    "type": "error",
    "name": "NewSequenceMustBeLarger",
    "inputs": []
  },
  {
    "type": "error",
    "name": "NoSpendPermissions",
    "inputs": []
  },
  {
    "type": "error",
    "name": "OpDataError",
    "inputs": []
  },
  {
    "type": "error",
    "name": "SuperAdminCanExecuteEverything",
    "inputs": []
  },
  {
    "type": "error",
    "name": "SuperAdminCanSpendAnything",
    "inputs": []
  },
  {
    "type": "error",
    "name": "Unauthorized",
    "inputs": []
  },
  {
    "type": "error",
    "name": "UnauthorizedCall",
    "inputs": [
      {
        "name": "keyHash",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "target",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "data",
        "type": "bytes",
        "internalType": "bytes"
      }
    ]
  },
  {
    "type": "error",
    "name": "UnsupportedExecutionMode",
    "inputs": []
  }
]

Structs§

ANY_FN_SELCall
Function with signature ANY_FN_SEL() and selector 0x35058501.
ANY_FN_SELReturn
Container type for the return parameters of the ANY_FN_SEL() function.
ANY_KEYHASHCall
Function with signature ANY_KEYHASH() and selector 0x515c9d6d.
ANY_KEYHASHReturn
Container type for the return parameters of the ANY_KEYHASH() function.
ANY_TARGETCall
Function with signature ANY_TARGET() and selector 0x11a86fd6.
ANY_TARGETReturn
Container type for the return parameters of the ANY_TARGET() function.
Authorized
Event with signature Authorized(bytes32,(uint40,uint8,bool,bytes)) and selector 0x3d3a48be5a98628ecf98a6201185102da78bbab8f63a4b2d6b9eef354f5131f5.
BatchOfBatchesDecodingError
Custom error with signature BatchOfBatchesDecodingError() and selector 0x3995943b.
CALL_TYPEHASHCall
Function with signature CALL_TYPEHASH() and selector 0x1a912f3e.
CALL_TYPEHASHReturn
Container type for the return parameters of the CALL_TYPEHASH() function.
CallCheckerSet
Event with signature CallCheckerSet(bytes32,address,address) and selector 0x7e2baa9c3a554d7c6587682e28fe9607c29d1d8c8a46968368d5614607c60799.
CanExecuteSet
Event with signature CanExecuteSet(bytes32,address,bytes4,bool) and selector 0x7eb91b8ac56c0864a4e4f5598082d140d04bed1a4dd62a41d605be2430c494e1.
CannotSelfExecute
Custom error with signature CannotSelfExecute() and selector 0x0e9be31c.
DOMAIN_TYPEHASHCall
Function with signature DOMAIN_TYPEHASH() and selector 0x20606b70.
DOMAIN_TYPEHASHReturn
Container type for the return parameters of the DOMAIN_TYPEHASH() function.
EMPTY_CALLDATA_FN_SELCall
Function with signature EMPTY_CALLDATA_FN_SEL() and selector 0x2f3f30c7.
EMPTY_CALLDATA_FN_SELReturn
Container type for the return parameters of the EMPTY_CALLDATA_FN_SEL() function.
EXECUTE_TYPEHASHCall
Function with signature EXECUTE_TYPEHASH() and selector 0x60d2f33d.
EXECUTE_TYPEHASHReturn
Container type for the return parameters of the EXECUTE_TYPEHASH() function.
ExceededSpendLimit
Custom error with signature ExceededSpendLimit(address) and selector 0x9054c912.
ExceedsCapacity
Custom error with signature ExceedsCapacity() and selector 0x2aa2ed72.
FnSelectorNotRecognized
Custom error with signature FnSelectorNotRecognized() and selector 0x3c10b94e.
ImplementationApprovalSet
Event with signature ImplementationApprovalSet(address,bool) and selector 0x31471c9e79dc8535d9341d73e61eaf5e72e4134b3e5b16943305041201581d88.
ImplementationCallerApprovalSet
Event with signature ImplementationCallerApprovalSet(address,address,bool) and selector 0x22e306b6bdb65906c2b1557fba289ced7fe45decec4c8df8dbc9c21a65ac3052.
IndexOutOfBounds
Custom error with signature IndexOutOfBounds() and selector 0x4e23d035.
InvalidNonce
Custom error with signature InvalidNonce() and selector 0x756688fe.
InvalidPublicKey
Custom error with signature InvalidPublicKey() and selector 0xa2d0fee8.
IthacaAccountInstance
A IthacaAccount instance.
Key
KeyDoesNotExist
Custom error with signature KeyDoesNotExist() and selector 0xe57b6304.
KeyHashIsZero
Custom error with signature KeyHashIsZero() and selector 0x87075105.
KeyType
KeyTypeCannotBeSuperAdmin
Custom error with signature KeyTypeCannotBeSuperAdmin() and selector 0x86e6cce4.
LabelSet
Event with signature LabelSet(string) and selector 0xaec6ef4baadc9acbdf52442522dfffda03abe29adba8d4af611bcef4cbe0c9ad.
MULTICHAIN_NONCE_PREFIXCall
Function with signature MULTICHAIN_NONCE_PREFIX() and selector 0xfcd4e707.
MULTICHAIN_NONCE_PREFIXReturn
Container type for the return parameters of the MULTICHAIN_NONCE_PREFIX() function.
NewImplementationIsZero
Custom error with signature NewImplementationIsZero() and selector 0x95bd7546.
NewSequenceMustBeLarger
Custom error with signature NewSequenceMustBeLarger() and selector 0x12ee5c93.
NoSpendPermissions
Custom error with signature NoSpendPermissions() and selector 0x5ee7e5b1.
NonceInvalidated
Event with signature NonceInvalidated(uint256) and selector 0x4d9dbebf1d909894d9c26fe228c27cec643b2cb490124e5b658f4edd203c20c1.
ORCHESTRATORCall
Function with signature ORCHESTRATOR() and selector 0xc885f95a.
ORCHESTRATORReturn
Container type for the return parameters of the ORCHESTRATOR() function.
OpDataError
Custom error with signature OpDataError() and selector 0x871d302a.
Revoked
Event with signature Revoked(bytes32) and selector 0xe5af7daed5ab2a2dc5f98d53619f05089c0c14d11a6621f6b906a2366c9a7ab3.
SIGN_TYPEHASHCall
Function with signature SIGN_TYPEHASH() and selector 0x2f1d14cb.
SIGN_TYPEHASHReturn
Container type for the return parameters of the SIGN_TYPEHASH() function.
SignatureCheckerApprovalSet
Event with signature SignatureCheckerApprovalSet(bytes32,address,bool) and selector 0x30653b7562c17b712ebc81c7a2373ea1c255cf2a055380385273b5bf7192cc99.
SpendLimitRemoved
Event with signature SpendLimitRemoved(bytes32,address,uint8) and selector 0xa17fd662986af6bbcda33ce6b68c967b609aebe07da86cd25ee7bfbd01a65a27.
SpendLimitSet
Event with signature SpendLimitSet(bytes32,address,uint8,uint256) and selector 0x68c781b0acb659616fc73da877ee77ae95c51ce973b6c7a762c8692058351b4a.
SuperAdminCanExecuteEverything
Custom error with signature SuperAdminCanExecuteEverything() and selector 0x04420815.
SuperAdminCanSpendAnything
Custom error with signature SuperAdminCanSpendAnything() and selector 0xf2fee1e1.
Unauthorized
Custom error with signature Unauthorized() and selector 0x82b42900.
UnauthorizedCall
Custom error with signature UnauthorizedCall(bytes32,address,bytes) and selector 0xf78c1b53.
UnsupportedExecutionMode
Custom error with signature UnsupportedExecutionMode() and selector 0x7f181275.
approvedSignatureCheckersCall
Function with signature approvedSignatureCheckers(bytes32) and selector 0xad077083.
approvedSignatureCheckersReturn
Container type for the return parameters of the approvedSignatureCheckers(bytes32) function.
authorizeCall
Function with signature authorize((uint40,uint8,bool,bytes)) and selector 0xcebfe336.
authorizeReturn
Container type for the return parameters of the authorize((uint40,uint8,bool,bytes)) function.
callCheckerInfosCall
Function with signature callCheckerInfos(bytes32) and selector 0x8e87cf47.
callCheckerInfosReturn
Container type for the return parameters of the callCheckerInfos(bytes32) function.
canExecuteCall
Function with signature canExecute(bytes32,address,bytes) and selector 0xff619c6b.
canExecutePackedInfosCall
Function with signature canExecutePackedInfos(bytes32) and selector 0xe5adda71.
canExecutePackedInfosReturn
Container type for the return parameters of the canExecutePackedInfos(bytes32) function.
canExecuteReturn
Container type for the return parameters of the canExecute(bytes32,address,bytes) function.
checkAndIncrementNonceCall
Function with signature checkAndIncrementNonce(uint256) and selector 0x9e49fbf1.
checkAndIncrementNonceReturn
Container type for the return parameters of the checkAndIncrementNonce(uint256) function.
computeDigestCall
Function with signature computeDigest((address,uint256,bytes)[],uint256) and selector 0x6fd91454.
computeDigestReturn
Container type for the return parameters of the computeDigest((address,uint256,bytes)[],uint256) function.
constructorCall
Constructor`.
eip712DomainCall
Function with signature eip712Domain() and selector 0x84b0196e.
eip712DomainReturn
Container type for the return parameters of the eip712Domain() function.
executeCall
Function with signature execute(bytes32,bytes) and selector 0xe9ae5c53.
executeReturn
Container type for the return parameters of the execute(bytes32,bytes) function.
getContextKeyHashCall
Function with signature getContextKeyHash() and selector 0xbe766d15.
getContextKeyHashReturn
Container type for the return parameters of the getContextKeyHash() function.
getKeyCall
Function with signature getKey(bytes32) and selector 0x12aaac70.
getKeyReturn
Container type for the return parameters of the getKey(bytes32) function.
getKeysCall
Function with signature getKeys() and selector 0x2150c518.
getKeysReturn
Container type for the return parameters of the getKeys() function.
getNonceCall
Function with signature getNonce(uint192) and selector 0x3e1b0812.
getNonceReturn
Container type for the return parameters of the getNonce(uint192) function.
hashCall
Function with signature hash((uint40,uint8,bool,bytes)) and selector 0xa840fe49.
hashReturn
Container type for the return parameters of the hash((uint40,uint8,bool,bytes)) function.
invalidateNonceCall
Function with signature invalidateNonce(uint256) and selector 0xb70e36f0.
invalidateNonceReturn
Container type for the return parameters of the invalidateNonce(uint256) function.
isValidSignatureCall
Function with signature isValidSignature(bytes32,bytes) and selector 0x1626ba7e.
isValidSignatureReturn
Container type for the return parameters of the isValidSignature(bytes32,bytes) function.
keyAtCall
Function with signature keyAt(uint256) and selector 0x4223b5c2.
keyAtReturn
Container type for the return parameters of the keyAt(uint256) function.
keyCountCall
Function with signature keyCount() and selector 0xfac750e0.
keyCountReturn
Container type for the return parameters of the keyCount() function.
labelCall
Function with signature label() and selector 0xcb4774c4.
labelReturn
Container type for the return parameters of the label() function.
payCall
Function with signature pay(uint256,bytes32,bytes32,bytes) and selector 0xf81d87a7.
payReturn
Container type for the return parameters of the pay(uint256,bytes32,bytes32,bytes) function.
removeSpendLimitCall
Function with signature removeSpendLimit(bytes32,address,uint8) and selector 0x2081a278.
removeSpendLimitReturn
Container type for the return parameters of the removeSpendLimit(bytes32,address,uint8) function.
revokeCall
Function with signature revoke(bytes32) and selector 0xb75c7dc6.
revokeReturn
Container type for the return parameters of the revoke(bytes32) function.
setCallCheckerCall
Function with signature setCallChecker(bytes32,address,address) and selector 0x57022451.
setCallCheckerReturn
Container type for the return parameters of the setCallChecker(bytes32,address,address) function.
setCanExecuteCall
Function with signature setCanExecute(bytes32,address,bytes4,bool) and selector 0x136a12f7.
setCanExecuteReturn
Container type for the return parameters of the setCanExecute(bytes32,address,bytes4,bool) function.
setLabelCall
Function with signature setLabel(string) and selector 0xbf530969.
setLabelReturn
Container type for the return parameters of the setLabel(string) function.
setSignatureCheckerApprovalCall
Function with signature setSignatureCheckerApproval(bytes32,address,bool) and selector 0x7656d304.
setSignatureCheckerApprovalReturn
Container type for the return parameters of the setSignatureCheckerApproval(bytes32,address,bool) function.
setSpendLimitCall
Function with signature setSpendLimit(bytes32,address,uint8,uint256) and selector 0x598daac4.
setSpendLimitReturn
Container type for the return parameters of the setSpendLimit(bytes32,address,uint8,uint256) function.
spendAndExecuteInfosCall
Function with signature spendAndExecuteInfos(bytes32[]) and selector 0xbc2c554a.
spendAndExecuteInfosReturn
Container type for the return parameters of the spendAndExecuteInfos(bytes32[]) function.
spendInfosCall
Function with signature spendInfos(bytes32) and selector 0xdcc09ebf.
spendInfosReturn
Container type for the return parameters of the spendInfos(bytes32) function.
startOfSpendPeriodCall
Function with signature startOfSpendPeriod(uint256,uint8) and selector 0xfaba56d8.
startOfSpendPeriodReturn
Container type for the return parameters of the startOfSpendPeriod(uint256,uint8) function.
supportsExecutionModeCall
Function with signature supportsExecutionMode(bytes32) and selector 0xd03c7914.
supportsExecutionModeReturn
Container type for the return parameters of the supportsExecutionMode(bytes32) function.
unwrapAndValidateSignatureCall
Function with signature unwrapAndValidateSignature(bytes32,bytes) and selector 0x0cef73b4.
unwrapAndValidateSignatureReturn
Container type for the return parameters of the unwrapAndValidateSignature(bytes32,bytes) function.
upgradeHookCall
Function with signature upgradeHook(bytes32) and selector 0x17e69ab8.
upgradeHookReturn
Container type for the return parameters of the upgradeHook(bytes32) function.
upgradeProxyAccountCall
Function with signature upgradeProxyAccount(address) and selector 0x912aa1b8.
upgradeProxyAccountReturn
Container type for the return parameters of the upgradeProxyAccount(address) function.

Enums§

IthacaAccountCalls
Container for all the IthacaAccount function calls.
IthacaAccountErrors
Container for all the IthacaAccount custom errors.
IthacaAccountEvents
Container for all the IthacaAccount events.

Statics§

BYTECODE
The creation / init bytecode of the contract.
DEPLOYED_BYTECODE
The runtime bytecode of the contract, as deployed on the network.

Functions§

deploy
Deploys this contract using the given provider and constructor arguments, if any.
deploy_builder
Creates a RawCallBuilder for deploying this contract using the given provider and constructor arguments, if any.
new
Creates a new wrapper around an on-chain IthacaAccount contract instance.