import { SolcMetadata } from "@owlprotocol/viem-utils";

export const IEntryPoint: SolcMetadata = {
    compiler: {
        version: "0.8.23+commit.f704f362",
    },
    language: "Solidity",
    output: {
        abi: [
            {
                inputs: [
                    {
                        internalType: "bool",
                        name: "success",
                        type: "bool",
                    },
                    {
                        internalType: "bytes",
                        name: "ret",
                        type: "bytes",
                    },
                ],
                name: "DelegateAndRevert",
                type: "error",
            },
            {
                inputs: [
                    {
                        internalType: "uint256",
                        name: "opIndex",
                        type: "uint256",
                    },
                    {
                        internalType: "string",
                        name: "reason",
                        type: "string",
                    },
                ],
                name: "FailedOp",
                type: "error",
            },
            {
                inputs: [
                    {
                        internalType: "uint256",
                        name: "opIndex",
                        type: "uint256",
                    },
                    {
                        internalType: "string",
                        name: "reason",
                        type: "string",
                    },
                    {
                        internalType: "bytes",
                        name: "inner",
                        type: "bytes",
                    },
                ],
                name: "FailedOpWithRevert",
                type: "error",
            },
            {
                inputs: [
                    {
                        internalType: "bytes",
                        name: "returnData",
                        type: "bytes",
                    },
                ],
                name: "PostOpReverted",
                type: "error",
            },
            {
                inputs: [
                    {
                        internalType: "address",
                        name: "sender",
                        type: "address",
                    },
                ],
                name: "SenderAddressResult",
                type: "error",
            },
            {
                inputs: [
                    {
                        internalType: "address",
                        name: "aggregator",
                        type: "address",
                    },
                ],
                name: "SignatureValidationFailed",
                type: "error",
            },
            {
                anonymous: false,
                inputs: [
                    {
                        indexed: true,
                        internalType: "bytes32",
                        name: "userOpHash",
                        type: "bytes32",
                    },
                    {
                        indexed: true,
                        internalType: "address",
                        name: "sender",
                        type: "address",
                    },
                    {
                        indexed: false,
                        internalType: "address",
                        name: "factory",
                        type: "address",
                    },
                    {
                        indexed: false,
                        internalType: "address",
                        name: "paymaster",
                        type: "address",
                    },
                ],
                name: "AccountDeployed",
                type: "event",
            },
            {
                anonymous: false,
                inputs: [],
                name: "BeforeExecution",
                type: "event",
            },
            {
                anonymous: false,
                inputs: [
                    {
                        indexed: true,
                        internalType: "address",
                        name: "account",
                        type: "address",
                    },
                    {
                        indexed: false,
                        internalType: "uint256",
                        name: "totalDeposit",
                        type: "uint256",
                    },
                ],
                name: "Deposited",
                type: "event",
            },
            {
                anonymous: false,
                inputs: [
                    {
                        indexed: true,
                        internalType: "bytes32",
                        name: "userOpHash",
                        type: "bytes32",
                    },
                    {
                        indexed: true,
                        internalType: "address",
                        name: "sender",
                        type: "address",
                    },
                    {
                        indexed: false,
                        internalType: "uint256",
                        name: "nonce",
                        type: "uint256",
                    },
                    {
                        indexed: false,
                        internalType: "bytes",
                        name: "revertReason",
                        type: "bytes",
                    },
                ],
                name: "PostOpRevertReason",
                type: "event",
            },
            {
                anonymous: false,
                inputs: [
                    {
                        indexed: true,
                        internalType: "address",
                        name: "aggregator",
                        type: "address",
                    },
                ],
                name: "SignatureAggregatorChanged",
                type: "event",
            },
            {
                anonymous: false,
                inputs: [
                    {
                        indexed: true,
                        internalType: "address",
                        name: "account",
                        type: "address",
                    },
                    {
                        indexed: false,
                        internalType: "uint256",
                        name: "totalStaked",
                        type: "uint256",
                    },
                    {
                        indexed: false,
                        internalType: "uint256",
                        name: "unstakeDelaySec",
                        type: "uint256",
                    },
                ],
                name: "StakeLocked",
                type: "event",
            },
            {
                anonymous: false,
                inputs: [
                    {
                        indexed: true,
                        internalType: "address",
                        name: "account",
                        type: "address",
                    },
                    {
                        indexed: false,
                        internalType: "uint256",
                        name: "withdrawTime",
                        type: "uint256",
                    },
                ],
                name: "StakeUnlocked",
                type: "event",
            },
            {
                anonymous: false,
                inputs: [
                    {
                        indexed: true,
                        internalType: "address",
                        name: "account",
                        type: "address",
                    },
                    {
                        indexed: false,
                        internalType: "address",
                        name: "withdrawAddress",
                        type: "address",
                    },
                    {
                        indexed: false,
                        internalType: "uint256",
                        name: "amount",
                        type: "uint256",
                    },
                ],
                name: "StakeWithdrawn",
                type: "event",
            },
            {
                anonymous: false,
                inputs: [
                    {
                        indexed: true,
                        internalType: "bytes32",
                        name: "userOpHash",
                        type: "bytes32",
                    },
                    {
                        indexed: true,
                        internalType: "address",
                        name: "sender",
                        type: "address",
                    },
                    {
                        indexed: true,
                        internalType: "address",
                        name: "paymaster",
                        type: "address",
                    },
                    {
                        indexed: false,
                        internalType: "uint256",
                        name: "nonce",
                        type: "uint256",
                    },
                    {
                        indexed: false,
                        internalType: "bool",
                        name: "success",
                        type: "bool",
                    },
                    {
                        indexed: false,
                        internalType: "uint256",
                        name: "actualGasCost",
                        type: "uint256",
                    },
                    {
                        indexed: false,
                        internalType: "uint256",
                        name: "actualGasUsed",
                        type: "uint256",
                    },
                ],
                name: "UserOperationEvent",
                type: "event",
            },
            {
                anonymous: false,
                inputs: [
                    {
                        indexed: true,
                        internalType: "bytes32",
                        name: "userOpHash",
                        type: "bytes32",
                    },
                    {
                        indexed: true,
                        internalType: "address",
                        name: "sender",
                        type: "address",
                    },
                    {
                        indexed: false,
                        internalType: "uint256",
                        name: "nonce",
                        type: "uint256",
                    },
                ],
                name: "UserOperationPrefundTooLow",
                type: "event",
            },
            {
                anonymous: false,
                inputs: [
                    {
                        indexed: true,
                        internalType: "bytes32",
                        name: "userOpHash",
                        type: "bytes32",
                    },
                    {
                        indexed: true,
                        internalType: "address",
                        name: "sender",
                        type: "address",
                    },
                    {
                        indexed: false,
                        internalType: "uint256",
                        name: "nonce",
                        type: "uint256",
                    },
                    {
                        indexed: false,
                        internalType: "bytes",
                        name: "revertReason",
                        type: "bytes",
                    },
                ],
                name: "UserOperationRevertReason",
                type: "event",
            },
            {
                anonymous: false,
                inputs: [
                    {
                        indexed: true,
                        internalType: "address",
                        name: "account",
                        type: "address",
                    },
                    {
                        indexed: false,
                        internalType: "address",
                        name: "withdrawAddress",
                        type: "address",
                    },
                    {
                        indexed: false,
                        internalType: "uint256",
                        name: "amount",
                        type: "uint256",
                    },
                ],
                name: "Withdrawn",
                type: "event",
            },
            {
                inputs: [
                    {
                        internalType: "uint32",
                        name: "_unstakeDelaySec",
                        type: "uint32",
                    },
                ],
                name: "addStake",
                outputs: [],
                stateMutability: "payable",
                type: "function",
            },
            {
                inputs: [
                    {
                        internalType: "address",
                        name: "account",
                        type: "address",
                    },
                ],
                name: "balanceOf",
                outputs: [
                    {
                        internalType: "uint256",
                        name: "",
                        type: "uint256",
                    },
                ],
                stateMutability: "view",
                type: "function",
            },
            {
                inputs: [
                    {
                        internalType: "address",
                        name: "target",
                        type: "address",
                    },
                    {
                        internalType: "bytes",
                        name: "data",
                        type: "bytes",
                    },
                ],
                name: "delegateAndRevert",
                outputs: [],
                stateMutability: "nonpayable",
                type: "function",
            },
            {
                inputs: [
                    {
                        internalType: "address",
                        name: "account",
                        type: "address",
                    },
                ],
                name: "depositTo",
                outputs: [],
                stateMutability: "payable",
                type: "function",
            },
            {
                inputs: [
                    {
                        internalType: "address",
                        name: "account",
                        type: "address",
                    },
                ],
                name: "getDepositInfo",
                outputs: [
                    {
                        components: [
                            {
                                internalType: "uint256",
                                name: "deposit",
                                type: "uint256",
                            },
                            {
                                internalType: "bool",
                                name: "staked",
                                type: "bool",
                            },
                            {
                                internalType: "uint112",
                                name: "stake",
                                type: "uint112",
                            },
                            {
                                internalType: "uint32",
                                name: "unstakeDelaySec",
                                type: "uint32",
                            },
                            {
                                internalType: "uint48",
                                name: "withdrawTime",
                                type: "uint48",
                            },
                        ],
                        internalType: "struct IStakeManager.DepositInfo",
                        name: "info",
                        type: "tuple",
                    },
                ],
                stateMutability: "view",
                type: "function",
            },
            {
                inputs: [
                    {
                        internalType: "address",
                        name: "sender",
                        type: "address",
                    },
                    {
                        internalType: "uint192",
                        name: "key",
                        type: "uint192",
                    },
                ],
                name: "getNonce",
                outputs: [
                    {
                        internalType: "uint256",
                        name: "nonce",
                        type: "uint256",
                    },
                ],
                stateMutability: "view",
                type: "function",
            },
            {
                inputs: [
                    {
                        internalType: "bytes",
                        name: "initCode",
                        type: "bytes",
                    },
                ],
                name: "getSenderAddress",
                outputs: [],
                stateMutability: "nonpayable",
                type: "function",
            },
            {
                inputs: [
                    {
                        components: [
                            {
                                internalType: "address",
                                name: "sender",
                                type: "address",
                            },
                            {
                                internalType: "uint256",
                                name: "nonce",
                                type: "uint256",
                            },
                            {
                                internalType: "bytes",
                                name: "initCode",
                                type: "bytes",
                            },
                            {
                                internalType: "bytes",
                                name: "callData",
                                type: "bytes",
                            },
                            {
                                internalType: "bytes32",
                                name: "accountGasLimits",
                                type: "bytes32",
                            },
                            {
                                internalType: "uint256",
                                name: "preVerificationGas",
                                type: "uint256",
                            },
                            {
                                internalType: "bytes32",
                                name: "gasFees",
                                type: "bytes32",
                            },
                            {
                                internalType: "bytes",
                                name: "paymasterAndData",
                                type: "bytes",
                            },
                            {
                                internalType: "bytes",
                                name: "signature",
                                type: "bytes",
                            },
                        ],
                        internalType: "struct PackedUserOperation",
                        name: "userOp",
                        type: "tuple",
                    },
                ],
                name: "getUserOpHash",
                outputs: [
                    {
                        internalType: "bytes32",
                        name: "",
                        type: "bytes32",
                    },
                ],
                stateMutability: "view",
                type: "function",
            },
            {
                inputs: [
                    {
                        components: [
                            {
                                components: [
                                    {
                                        internalType: "address",
                                        name: "sender",
                                        type: "address",
                                    },
                                    {
                                        internalType: "uint256",
                                        name: "nonce",
                                        type: "uint256",
                                    },
                                    {
                                        internalType: "bytes",
                                        name: "initCode",
                                        type: "bytes",
                                    },
                                    {
                                        internalType: "bytes",
                                        name: "callData",
                                        type: "bytes",
                                    },
                                    {
                                        internalType: "bytes32",
                                        name: "accountGasLimits",
                                        type: "bytes32",
                                    },
                                    {
                                        internalType: "uint256",
                                        name: "preVerificationGas",
                                        type: "uint256",
                                    },
                                    {
                                        internalType: "bytes32",
                                        name: "gasFees",
                                        type: "bytes32",
                                    },
                                    {
                                        internalType: "bytes",
                                        name: "paymasterAndData",
                                        type: "bytes",
                                    },
                                    {
                                        internalType: "bytes",
                                        name: "signature",
                                        type: "bytes",
                                    },
                                ],
                                internalType: "struct PackedUserOperation[]",
                                name: "userOps",
                                type: "tuple[]",
                            },
                            {
                                internalType: "contract IAggregator",
                                name: "aggregator",
                                type: "address",
                            },
                            {
                                internalType: "bytes",
                                name: "signature",
                                type: "bytes",
                            },
                        ],
                        internalType: "struct IEntryPoint.UserOpsPerAggregator[]",
                        name: "opsPerAggregator",
                        type: "tuple[]",
                    },
                    {
                        internalType: "address payable",
                        name: "beneficiary",
                        type: "address",
                    },
                ],
                name: "handleAggregatedOps",
                outputs: [],
                stateMutability: "nonpayable",
                type: "function",
            },
            {
                inputs: [
                    {
                        components: [
                            {
                                internalType: "address",
                                name: "sender",
                                type: "address",
                            },
                            {
                                internalType: "uint256",
                                name: "nonce",
                                type: "uint256",
                            },
                            {
                                internalType: "bytes",
                                name: "initCode",
                                type: "bytes",
                            },
                            {
                                internalType: "bytes",
                                name: "callData",
                                type: "bytes",
                            },
                            {
                                internalType: "bytes32",
                                name: "accountGasLimits",
                                type: "bytes32",
                            },
                            {
                                internalType: "uint256",
                                name: "preVerificationGas",
                                type: "uint256",
                            },
                            {
                                internalType: "bytes32",
                                name: "gasFees",
                                type: "bytes32",
                            },
                            {
                                internalType: "bytes",
                                name: "paymasterAndData",
                                type: "bytes",
                            },
                            {
                                internalType: "bytes",
                                name: "signature",
                                type: "bytes",
                            },
                        ],
                        internalType: "struct PackedUserOperation[]",
                        name: "ops",
                        type: "tuple[]",
                    },
                    {
                        internalType: "address payable",
                        name: "beneficiary",
                        type: "address",
                    },
                ],
                name: "handleOps",
                outputs: [],
                stateMutability: "nonpayable",
                type: "function",
            },
            {
                inputs: [
                    {
                        internalType: "uint192",
                        name: "key",
                        type: "uint192",
                    },
                ],
                name: "incrementNonce",
                outputs: [],
                stateMutability: "nonpayable",
                type: "function",
            },
            {
                inputs: [],
                name: "unlockStake",
                outputs: [],
                stateMutability: "nonpayable",
                type: "function",
            },
            {
                inputs: [
                    {
                        internalType: "address payable",
                        name: "withdrawAddress",
                        type: "address",
                    },
                ],
                name: "withdrawStake",
                outputs: [],
                stateMutability: "nonpayable",
                type: "function",
            },
            {
                inputs: [
                    {
                        internalType: "address payable",
                        name: "withdrawAddress",
                        type: "address",
                    },
                    {
                        internalType: "uint256",
                        name: "withdrawAmount",
                        type: "uint256",
                    },
                ],
                name: "withdrawTo",
                outputs: [],
                stateMutability: "nonpayable",
                type: "function",
            },
        ],
        devdoc: {
            errors: {
                "FailedOp(uint256,string)": [
                    {
                        params: {
                            opIndex:
                                "- Index into the array of ops to the failed one (in simulateValidation, this is always zero).",
                            reason: '- Revert reason. The string starts with a unique code "AAmn",                  where "m" is "1" for factory, "2" for account and "3" for paymaster issues,                  so a failure can be attributed to the correct entity.',
                        },
                    },
                ],
                "FailedOpWithRevert(uint256,string,bytes)": [
                    {
                        details: "note that inner is truncated to 2048 bytes",
                        params: {
                            inner: "- data from inner cought revert reason",
                            opIndex:
                                "- Index into the array of ops to the failed one (in simulateValidation, this is always zero).",
                            reason: "- Revert reason. see FailedOp(uint256,string), above",
                        },
                    },
                ],
                "SignatureValidationFailed(address)": [
                    {
                        params: {
                            aggregator: "The aggregator that failed to verify the signature",
                        },
                    },
                ],
            },
            events: {
                "AccountDeployed(bytes32,address,address,address)": {
                    params: {
                        factory: "- The factory used to deploy this account (in the initCode)",
                        paymaster: "- The paymaster used by this UserOp",
                        sender: "- The account that is deployed",
                        userOpHash: "- The userOp that deployed this account. UserOperationEvent will follow.",
                    },
                },
                "PostOpRevertReason(bytes32,address,uint256,bytes)": {
                    params: {
                        nonce: "- The nonce used in the request.",
                        revertReason: '- The return bytes from the (reverted) call to "callData".',
                        sender: "- The sender of this request.",
                        userOpHash: "- The request unique identifier.",
                    },
                },
                "SignatureAggregatorChanged(address)": {
                    params: {
                        aggregator: "- The aggregator used for the following UserOperationEvents.",
                    },
                },
                "UserOperationPrefundTooLow(bytes32,address,uint256)": {
                    params: {
                        nonce: "- The nonce used in the request.",
                        sender: "- The sender of this request.",
                        userOpHash: "- The request unique identifier.",
                    },
                },
                "UserOperationRevertReason(bytes32,address,uint256,bytes)": {
                    params: {
                        nonce: "- The nonce used in the request.",
                        revertReason: '- The return bytes from the (reverted) call to "callData".',
                        sender: "- The sender of this request.",
                        userOpHash: "- The request unique identifier.",
                    },
                },
            },
            kind: "dev",
            methods: {
                "addStake(uint32)": {
                    params: {
                        _unstakeDelaySec: "- The new lock duration before the deposit can be withdrawn.",
                    },
                },
                "balanceOf(address)": {
                    params: {
                        account: "- The account to query.",
                    },
                    returns: {
                        _0: "- The deposit (for gas payment) of the account.",
                    },
                },
                "delegateAndRevert(address,bytes)": {
                    details:
                        "calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.  The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace  actual EntryPoint code is less convenient.",
                    params: {
                        data: "data to pass to target in a delegatecall",
                        target: "a target contract to make a delegatecall from entrypoint",
                    },
                },
                "depositTo(address)": {
                    params: {
                        account: "- The account to add to.",
                    },
                },
                "getDepositInfo(address)": {
                    params: {
                        account: "- The account to query.",
                    },
                    returns: {
                        info: "  - Full deposit information of given account.",
                    },
                },
                "getNonce(address,uint192)": {
                    params: {
                        key: "the high 192 bit of the nonce",
                        sender: "the account address",
                    },
                    returns: {
                        nonce: "a full nonce to pass for next UserOp with this sender.",
                    },
                },
                "getSenderAddress(bytes)": {
                    params: {
                        initCode: "- The constructor code to be passed into the UserOperation.",
                    },
                },
                "getUserOpHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,bytes,bytes))": {
                    params: {
                        userOp: "- The user operation to generate the request ID for.",
                    },
                    returns: {
                        _0: "hash the hash of this UserOperation",
                    },
                },
                "handleAggregatedOps(((address,uint256,bytes,bytes,bytes32,uint256,bytes32,bytes,bytes)[],address,bytes)[],address)":
                    {
                        params: {
                            beneficiary: "- The address to receive the fees.",
                            opsPerAggregator:
                                "- The operations to execute, grouped by aggregator (or address(0) for no-aggregator accounts).",
                        },
                    },
                "handleOps((address,uint256,bytes,bytes,bytes32,uint256,bytes32,bytes,bytes)[],address)": {
                    params: {
                        beneficiary: "- The address to receive the fees.",
                        ops: "- The operations to execute.",
                    },
                },
                "withdrawStake(address)": {
                    params: {
                        withdrawAddress: "- The address to send withdrawn value.",
                    },
                },
                "withdrawTo(address,uint256)": {
                    params: {
                        withdrawAddress: "- The address to send withdrawn value.",
                        withdrawAmount: "- The amount to withdraw.",
                    },
                },
            },
            version: 1,
        },
        userdoc: {
            errors: {
                "FailedOp(uint256,string)": [
                    {
                        notice: "A custom revert error of handleOps, to identify the offending op. Should be caught in off-chain handleOps simulation and not happen on-chain. Useful for mitigating DoS attempts against batchers or for troubleshooting of factory/account/paymaster reverts. NOTE: If simulateValidation passes successfully, there should be no reason for handleOps to fail on it.",
                    },
                ],
                "FailedOpWithRevert(uint256,string,bytes)": [
                    {
                        notice: "A custom revert error of handleOps, to report a revert by account or paymaster.",
                    },
                ],
                "SignatureValidationFailed(address)": [
                    {
                        notice: "Error case when a signature aggregator fails to verify the aggregated signature it had created.",
                    },
                ],
            },
            events: {
                "AccountDeployed(bytes32,address,address,address)": {
                    notice: 'Account "sender" was deployed.',
                },
                "BeforeExecution()": {
                    notice: "An event emitted by handleOps(), before starting the execution loop. Any event emitted before this event, is part of the validation.",
                },
                "PostOpRevertReason(bytes32,address,uint256,bytes)": {
                    notice: 'An event emitted if the UserOperation Paymaster\'s "postOp" call reverted with non-zero length.',
                },
                "SignatureAggregatorChanged(address)": {
                    notice: "Signature aggregator used by the following UserOperationEvents within this bundle.",
                },
                "UserOperationPrefundTooLow(bytes32,address,uint256)": {
                    notice: "UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.",
                },
                "UserOperationRevertReason(bytes32,address,uint256,bytes)": {
                    notice: 'An event emitted if the UserOperation "callData" reverted with non-zero length.',
                },
            },
            kind: "user",
            methods: {
                "addStake(uint32)": {
                    notice: "Add to the account's stake - amount and delay any pending unstake is first cancelled.",
                },
                "balanceOf(address)": {
                    notice: "Get account balance.",
                },
                "delegateAndRevert(address,bytes)": {
                    notice: "Helper method for dry-run testing.",
                },
                "depositTo(address)": {
                    notice: "Add to the deposit of the given account.",
                },
                "getDepositInfo(address)": {
                    notice: "Get deposit info.",
                },
                "getNonce(address,uint192)": {
                    notice: "Return the next nonce for this sender. Within a given key, the nonce values are sequenced (starting with zero, and incremented by one on each userop) But UserOp with different keys can come with arbitrary order.",
                },
                "getSenderAddress(bytes)": {
                    notice: "Get counterfactual sender address. Calculate the sender contract address that will be generated by the initCode and salt in the UserOperation. This method always revert, and returns the address in SenderAddressResult error",
                },
                "getUserOpHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,bytes,bytes))": {
                    notice: "Generate a request Id - unique identifier for this request. The request ID is a hash over the content of the userOp (except the signature), the entrypoint and the chainid.",
                },
                "handleAggregatedOps(((address,uint256,bytes,bytes,bytes32,uint256,bytes32,bytes,bytes)[],address,bytes)[],address)":
                    {
                        notice: "Execute a batch of UserOperation with Aggregators",
                    },
                "handleOps((address,uint256,bytes,bytes,bytes32,uint256,bytes32,bytes,bytes)[],address)": {
                    notice: "Execute a batch of UserOperations. No signature aggregator is used. If any account requires an aggregator (that is, it returned an aggregator when performing simulateValidation), then handleAggregatedOps() must be used instead.",
                },
                "incrementNonce(uint192)": {
                    notice: 'Manually increment the nonce of the sender. This method is exposed just for completeness.. Account does NOT need to call it, neither during validation, nor elsewhere, as the EntryPoint will update the nonce regardless. Possible use-case is call it with various keys to "initialize" their nonces to one, so that future UserOperations will not pay extra for the first transaction with a given key.',
                },
                "unlockStake()": {
                    notice: "Attempt to unlock the stake. The value can be withdrawn (using withdrawStake) after the unstake delay.",
                },
                "withdrawStake(address)": {
                    notice: "Withdraw from the (unlocked) stake. Must first call unlockStake and wait for the unstakeDelay to pass.",
                },
                "withdrawTo(address,uint256)": {
                    notice: "Withdraw from the deposit.",
                },
            },
            version: 1,
        },
    },
    settings: {
        compilationTarget: {
            "@account-abstraction/contracts/interfaces/IEntryPoint.sol": "IEntryPoint",
        },
        evmVersion: "paris",
        libraries: {},
        metadata: {
            bytecodeHash: "ipfs",
            useLiteralContent: true,
        },
        optimizer: {
            enabled: true,
            runs: 1000000,
        },
        remappings: [],
        viaIR: true,
    },
    sources: {
        "@account-abstraction/contracts/interfaces/IAggregator.sol": {
            content:
                '// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\nimport "./PackedUserOperation.sol";\n\n/**\n * Aggregated Signatures validator.\n */\ninterface IAggregator {\n    /**\n     * Validate aggregated signature.\n     * Revert if the aggregated signature does not match the given list of operations.\n     * @param userOps   - Array of UserOperations to validate the signature for.\n     * @param signature - The aggregated signature.\n     */\n    function validateSignatures(\n        PackedUserOperation[] calldata userOps,\n        bytes calldata signature\n    ) external view;\n\n    /**\n     * Validate signature of a single userOp.\n     * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\n     * the aggregator this account uses.\n     * First it validates the signature over the userOp. Then it returns data to be used when creating the handleOps.\n     * @param userOp        - The userOperation received from the user.\n     * @return sigForUserOp - The value to put into the signature field of the userOp when calling handleOps.\n     *                        (usually empty, unless account and aggregator support some kind of "multisig".\n     */\n    function validateUserOpSignature(\n        PackedUserOperation calldata userOp\n    ) external view returns (bytes memory sigForUserOp);\n\n    /**\n     * Aggregate multiple signatures into a single value.\n     * This method is called off-chain to calculate the signature to pass with handleOps()\n     * bundler MAY use optimized custom code perform this aggregation.\n     * @param userOps              - Array of UserOperations to collect the signatures from.\n     * @return aggregatedSignature - The aggregated signature.\n     */\n    function aggregateSignatures(\n        PackedUserOperation[] calldata userOps\n    ) external view returns (bytes memory aggregatedSignature);\n}\n',
            keccak256: "0xf100d6fcc0c3b450b13e979b6a42c628c292a1bc340eccc2e7796b80e3975588",
            license: "GPL-3.0",
        },
        "@account-abstraction/contracts/interfaces/IEntryPoint.sol": {
            content:
                '/**\n ** Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\n ** Only one instance required on each chain.\n **/\n// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n/* solhint-disable reason-string */\n\nimport "./PackedUserOperation.sol";\nimport "./IStakeManager.sol";\nimport "./IAggregator.sol";\nimport "./INonceManager.sol";\n\ninterface IEntryPoint is IStakeManager, INonceManager {\n    /***\n     * An event emitted after each successful request.\n     * @param userOpHash    - Unique identifier for the request (hash its entire content, except signature).\n     * @param sender        - The account that generates this request.\n     * @param paymaster     - If non-null, the paymaster that pays for this request.\n     * @param nonce         - The nonce value from the request.\n     * @param success       - True if the sender transaction succeeded, false if reverted.\n     * @param actualGasCost - Actual amount paid (by account or paymaster) for this UserOperation.\n     * @param actualGasUsed - Total gas used by this UserOperation (including preVerification, creation,\n     *                        validation and execution).\n     */\n    event UserOperationEvent(\n        bytes32 indexed userOpHash,\n        address indexed sender,\n        address indexed paymaster,\n        uint256 nonce,\n        bool success,\n        uint256 actualGasCost,\n        uint256 actualGasUsed\n    );\n\n    /**\n     * Account "sender" was deployed.\n     * @param userOpHash - The userOp that deployed this account. UserOperationEvent will follow.\n     * @param sender     - The account that is deployed\n     * @param factory    - The factory used to deploy this account (in the initCode)\n     * @param paymaster  - The paymaster used by this UserOp\n     */\n    event AccountDeployed(\n        bytes32 indexed userOpHash,\n        address indexed sender,\n        address factory,\n        address paymaster\n    );\n\n    /**\n     * An event emitted if the UserOperation "callData" reverted with non-zero length.\n     * @param userOpHash   - The request unique identifier.\n     * @param sender       - The sender of this request.\n     * @param nonce        - The nonce used in the request.\n     * @param revertReason - The return bytes from the (reverted) call to "callData".\n     */\n    event UserOperationRevertReason(\n        bytes32 indexed userOpHash,\n        address indexed sender,\n        uint256 nonce,\n        bytes revertReason\n    );\n\n    /**\n     * An event emitted if the UserOperation Paymaster\'s "postOp" call reverted with non-zero length.\n     * @param userOpHash   - The request unique identifier.\n     * @param sender       - The sender of this request.\n     * @param nonce        - The nonce used in the request.\n     * @param revertReason - The return bytes from the (reverted) call to "callData".\n     */\n    event PostOpRevertReason(\n        bytes32 indexed userOpHash,\n        address indexed sender,\n        uint256 nonce,\n        bytes revertReason\n    );\n\n    /**\n     * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\n     * @param userOpHash   - The request unique identifier.\n     * @param sender       - The sender of this request.\n     * @param nonce        - The nonce used in the request.\n     */\n    event UserOperationPrefundTooLow(\n        bytes32 indexed userOpHash,\n        address indexed sender,\n        uint256 nonce\n    );\n\n    /**\n     * An event emitted by handleOps(), before starting the execution loop.\n     * Any event emitted before this event, is part of the validation.\n     */\n    event BeforeExecution();\n\n    /**\n     * Signature aggregator used by the following UserOperationEvents within this bundle.\n     * @param aggregator - The aggregator used for the following UserOperationEvents.\n     */\n    event SignatureAggregatorChanged(address indexed aggregator);\n\n    /**\n     * A custom revert error of handleOps, to identify the offending op.\n     * Should be caught in off-chain handleOps simulation and not happen on-chain.\n     * Useful for mitigating DoS attempts against batchers or for troubleshooting of factory/account/paymaster reverts.\n     * NOTE: If simulateValidation passes successfully, there should be no reason for handleOps to fail on it.\n     * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n     * @param reason  - Revert reason. The string starts with a unique code "AAmn",\n     *                  where "m" is "1" for factory, "2" for account and "3" for paymaster issues,\n     *                  so a failure can be attributed to the correct entity.\n     */\n    error FailedOp(uint256 opIndex, string reason);\n\n    /**\n     * A custom revert error of handleOps, to report a revert by account or paymaster.\n     * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n     * @param reason  - Revert reason. see FailedOp(uint256,string), above\n     * @param inner   - data from inner cought revert reason\n     * @dev note that inner is truncated to 2048 bytes\n     */\n    error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\n\n    error PostOpReverted(bytes returnData);\n\n    /**\n     * Error case when a signature aggregator fails to verify the aggregated signature it had created.\n     * @param aggregator The aggregator that failed to verify the signature\n     */\n    error SignatureValidationFailed(address aggregator);\n\n    // Return value of getSenderAddress.\n    error SenderAddressResult(address sender);\n\n    // UserOps handled, per aggregator.\n    struct UserOpsPerAggregator {\n        PackedUserOperation[] userOps;\n        // Aggregator address\n        IAggregator aggregator;\n        // Aggregated signature\n        bytes signature;\n    }\n\n    /**\n     * Execute a batch of UserOperations.\n     * No signature aggregator is used.\n     * If any account requires an aggregator (that is, it returned an aggregator when\n     * performing simulateValidation), then handleAggregatedOps() must be used instead.\n     * @param ops         - The operations to execute.\n     * @param beneficiary - The address to receive the fees.\n     */\n    function handleOps(\n        PackedUserOperation[] calldata ops,\n        address payable beneficiary\n    ) external;\n\n    /**\n     * Execute a batch of UserOperation with Aggregators\n     * @param opsPerAggregator - The operations to execute, grouped by aggregator (or address(0) for no-aggregator accounts).\n     * @param beneficiary      - The address to receive the fees.\n     */\n    function handleAggregatedOps(\n        UserOpsPerAggregator[] calldata opsPerAggregator,\n        address payable beneficiary\n    ) external;\n\n    /**\n     * Generate a request Id - unique identifier for this request.\n     * The request ID is a hash over the content of the userOp (except the signature), the entrypoint and the chainid.\n     * @param userOp - The user operation to generate the request ID for.\n     * @return hash the hash of this UserOperation\n     */\n    function getUserOpHash(\n        PackedUserOperation calldata userOp\n    ) external view returns (bytes32);\n\n    /**\n     * Gas and return values during simulation.\n     * @param preOpGas         - The gas used for validation (including preValidationGas)\n     * @param prefund          - The required prefund for this operation\n     * @param accountValidationData   - returned validationData from account.\n     * @param paymasterValidationData - return validationData from paymaster.\n     * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\n     */\n    struct ReturnInfo {\n        uint256 preOpGas;\n        uint256 prefund;\n        uint256 accountValidationData;\n        uint256 paymasterValidationData;\n        bytes paymasterContext;\n    }\n\n    /**\n     * Returned aggregated signature info:\n     * The aggregator returned by the account, and its current stake.\n     */\n    struct AggregatorStakeInfo {\n        address aggregator;\n        StakeInfo stakeInfo;\n    }\n\n    /**\n     * Get counterfactual sender address.\n     * Calculate the sender contract address that will be generated by the initCode and salt in the UserOperation.\n     * This method always revert, and returns the address in SenderAddressResult error\n     * @param initCode - The constructor code to be passed into the UserOperation.\n     */\n    function getSenderAddress(bytes memory initCode) external;\n\n    error DelegateAndRevert(bool success, bytes ret);\n\n    /**\n     * Helper method for dry-run testing.\n     * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\n     *  The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\n     *  actual EntryPoint code is less convenient.\n     * @param target a target contract to make a delegatecall from entrypoint\n     * @param data data to pass to target in a delegatecall\n     */\n    function delegateAndRevert(address target, bytes calldata data) external;\n}\n',
            keccak256: "0x1972a5fcb3a808b58c85af5741949ef6af11ab0debd3ae8c708171ae1ae0d0c4",
            license: "GPL-3.0",
        },
        "@account-abstraction/contracts/interfaces/INonceManager.sol": {
            content:
                '// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\ninterface INonceManager {\n\n    /**\n     * Return the next nonce for this sender.\n     * Within a given key, the nonce values are sequenced (starting with zero, and incremented by one on each userop)\n     * But UserOp with different keys can come with arbitrary order.\n     *\n     * @param sender the account address\n     * @param key the high 192 bit of the nonce\n     * @return nonce a full nonce to pass for next UserOp with this sender.\n     */\n    function getNonce(address sender, uint192 key)\n    external view returns (uint256 nonce);\n\n    /**\n     * Manually increment the nonce of the sender.\n     * This method is exposed just for completeness..\n     * Account does NOT need to call it, neither during validation, nor elsewhere,\n     * as the EntryPoint will update the nonce regardless.\n     * Possible use-case is call it with various keys to "initialize" their nonces to one, so that future\n     * UserOperations will not pay extra for the first transaction with a given key.\n     */\n    function incrementNonce(uint192 key) external;\n}\n',
            keccak256: "0xd575af0f6ebbd5f0b2933307d44cd7b4e03a69f4b817a67db5409bd3c89aeecb",
            license: "GPL-3.0",
        },
        "@account-abstraction/contracts/interfaces/IStakeManager.sol": {
            content:
                "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.7.5;\n\n/**\n * Manage deposits and stakes.\n * Deposit is just a balance used to pay for UserOperations (either by a paymaster or an account).\n * Stake is value locked for at least \"unstakeDelay\" by the staked entity.\n */\ninterface IStakeManager {\n    event Deposited(address indexed account, uint256 totalDeposit);\n\n    event Withdrawn(\n        address indexed account,\n        address withdrawAddress,\n        uint256 amount\n    );\n\n    // Emitted when stake or unstake delay are modified.\n    event StakeLocked(\n        address indexed account,\n        uint256 totalStaked,\n        uint256 unstakeDelaySec\n    );\n\n    // Emitted once a stake is scheduled for withdrawal.\n    event StakeUnlocked(address indexed account, uint256 withdrawTime);\n\n    event StakeWithdrawn(\n        address indexed account,\n        address withdrawAddress,\n        uint256 amount\n    );\n\n    /**\n     * @param deposit         - The entity's deposit.\n     * @param staked          - True if this entity is staked.\n     * @param stake           - Actual amount of ether staked for this entity.\n     * @param unstakeDelaySec - Minimum delay to withdraw the stake.\n     * @param withdrawTime    - First block timestamp where 'withdrawStake' will be callable, or zero if already locked.\n     * @dev Sizes were chosen so that deposit fits into one cell (used during handleOp)\n     *      and the rest fit into a 2nd cell (used during stake/unstake)\n     *      - 112 bit allows for 10^15 eth\n     *      - 48 bit for full timestamp\n     *      - 32 bit allows 150 years for unstake delay\n     */\n    struct DepositInfo {\n        uint256 deposit;\n        bool staked;\n        uint112 stake;\n        uint32 unstakeDelaySec;\n        uint48 withdrawTime;\n    }\n\n    // API struct used by getStakeInfo and simulateValidation.\n    struct StakeInfo {\n        uint256 stake;\n        uint256 unstakeDelaySec;\n    }\n\n    /**\n     * Get deposit info.\n     * @param account - The account to query.\n     * @return info   - Full deposit information of given account.\n     */\n    function getDepositInfo(\n        address account\n    ) external view returns (DepositInfo memory info);\n\n    /**\n     * Get account balance.\n     * @param account - The account to query.\n     * @return        - The deposit (for gas payment) of the account.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * Add to the deposit of the given account.\n     * @param account - The account to add to.\n     */\n    function depositTo(address account) external payable;\n\n    /**\n     * Add to the account's stake - amount and delay\n     * any pending unstake is first cancelled.\n     * @param _unstakeDelaySec - The new lock duration before the deposit can be withdrawn.\n     */\n    function addStake(uint32 _unstakeDelaySec) external payable;\n\n    /**\n     * Attempt to unlock the stake.\n     * The value can be withdrawn (using withdrawStake) after the unstake delay.\n     */\n    function unlockStake() external;\n\n    /**\n     * Withdraw from the (unlocked) stake.\n     * Must first call unlockStake and wait for the unstakeDelay to pass.\n     * @param withdrawAddress - The address to send withdrawn value.\n     */\n    function withdrawStake(address payable withdrawAddress) external;\n\n    /**\n     * Withdraw from the deposit.\n     * @param withdrawAddress - The address to send withdrawn value.\n     * @param withdrawAmount  - The amount to withdraw.\n     */\n    function withdrawTo(\n        address payable withdrawAddress,\n        uint256 withdrawAmount\n    ) external;\n}\n",
            keccak256: "0xbe5ca9e7f254d031687419e7b96ef48c9c63e9398bbe992dc72ffc6dc14e0a04",
            license: "GPL-3.0-only",
        },
        "@account-abstraction/contracts/interfaces/PackedUserOperation.sol": {
            content:
                "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.7.5;\n\n/**\n * User Operation struct\n * @param sender                - The sender account of this request.\n * @param nonce                 - Unique value the sender uses to verify it is not a replay.\n * @param initCode              - If set, the account contract will be created by this constructor/\n * @param callData              - The method call to execute on this account.\n * @param accountGasLimits      - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\n * @param preVerificationGas    - Gas not calculated by the handleOps method, but added to the gas paid.\n *                                Covers batch overhead.\n * @param gasFees               - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\n * @param paymasterAndData      - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\n *                                The paymaster will pay for the transaction instead of the sender.\n * @param signature             - Sender-verified signature over the entire request, the EntryPoint address and the chain ID.\n */\nstruct PackedUserOperation {\n    address sender;\n    uint256 nonce;\n    bytes initCode;\n    bytes callData;\n    bytes32 accountGasLimits;\n    uint256 preVerificationGas;\n    bytes32 gasFees;\n    bytes paymasterAndData;\n    bytes signature;\n}\n",
            keccak256: "0x1129b46381db68eddbc5cb49e50664667b66b03c480453858e7b25eabe444359",
            license: "GPL-3.0",
        },
    },
    version: 1,
};
