UNPKG

@owlprotocol/contracts-account-abstraction

Version:

ERC4337 Account Abstraction support for deploying relevant smart contracts and interacting with UserOps.

46 lines (43 loc) 3.47 kB
import { Hex, Address } from "viem"; export const _constructor = { inputs: [ { internalType: "address", name: "implementation", type: "address" }, { internalType: "bytes", name: "_data", type: "bytes" }, ], stateMutability: "payable", type: "constructor", } as const; export const AddressEmptyCode = { inputs: [{ internalType: "address", name: "target", type: "address" }], name: "AddressEmptyCode", type: "error", } as const; export const ERC1967InvalidImplementation = { inputs: [{ internalType: "address", name: "implementation", type: "address" }], name: "ERC1967InvalidImplementation", type: "error", } as const; export const ERC1967NonPayable = { inputs: [], name: "ERC1967NonPayable", type: "error" } as const; export const FailedInnerCall = { inputs: [], name: "FailedInnerCall", type: "error" } as const; export const Upgraded = { anonymous: false, inputs: [{ indexed: true, internalType: "address", name: "implementation", type: "address" }], name: "Upgraded", type: "event", } as const; export const fallback = { stateMutability: "payable", type: "fallback" } as const; export const functions = [_constructor, fallback] as const; export const events = [Upgraded] as const; export const errors = [AddressEmptyCode, ERC1967InvalidImplementation, ERC1967NonPayable, FailedInnerCall] as const; export const abi = [...functions, ...events, ...errors] as const; export const bytecode = "0x60806040526102de8038038061001481610194565b92833981019060408183031261018f5780516001600160a01b03811680820361018f5760208381015190936001600160401b03821161018f570184601f8201121561018f5780519061006d610068836101cf565b610194565b9582875285838301011161018f57849060005b83811061017b57505060009186010152813b15610163577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b03191682179055604051907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a28351156101455750600080848461012c96519101845af4903d1561013c573d61011c610068826101cf565b908152600081943d92013e6101ea565b505b6040516090908161024e8239f35b606092506101ea565b9250505034610154575061012e565b63b398979f60e01b8152600490fd5b60249060405190634c9c8ce360e01b82526004820152fd5b818101830151888201840152869201610080565b600080fd5b6040519190601f01601f191682016001600160401b038111838210176101b957604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b0381116101b957601f01601f191660200190565b9061021157508051156101ff57805190602001fd5b604051630a12f52160e11b8152600490fd5b81511580610244575b610222575090565b604051639996b31560e01b81526001600160a01b039091166004820152602490fd5b50803b1561021a56fe608060405273ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54166000808092368280378136915af43d82803e156056573d90f35b3d90fdfea2646970667358221220f5e8b644859296a96709b55dc361a99ce7d8e820f28337623c36da13ee1116b264736f6c63430008170033" as Hex; export const deployedBytecode = "0x608060405273ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54166000808092368280378136915af43d82803e156056573d90f35b3d90fdfea2646970667358221220f5e8b644859296a96709b55dc361a99ce7d8e820f28337623c36da13ee1116b264736f6c63430008170033" as Hex; export const implementation = "0xeE6f37d003e934e81C0Cc641f47d513f83AB628b" as Address; export const ERC1967Proxy = { abi, bytecode, deployedBytecode, implementation, };