"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MockPermit2__factory = void 0;
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
const ethers_1 = require("ethers");
const _abi = [
    {
        type: "function",
        name: "DOMAIN_SEPARATOR",
        inputs: [],
        outputs: [
            {
                name: "",
                type: "bytes32",
                internalType: "bytes32",
            },
        ],
        stateMutability: "view",
    },
    {
        type: "function",
        name: "_PERMIT_TRANSFER_FROM_WITNESS_TYPEHASH_STUB",
        inputs: [],
        outputs: [
            {
                name: "",
                type: "string",
                internalType: "string",
            },
        ],
        stateMutability: "view",
    },
    {
        type: "function",
        name: "_TOKEN_PERMISSIONS_TYPEHASH",
        inputs: [],
        outputs: [
            {
                name: "",
                type: "bytes32",
                internalType: "bytes32",
            },
        ],
        stateMutability: "view",
    },
    {
        type: "function",
        name: "allowance",
        inputs: [
            {
                name: "",
                type: "address",
                internalType: "address",
            },
            {
                name: "",
                type: "address",
                internalType: "address",
            },
            {
                name: "",
                type: "address",
                internalType: "address",
            },
        ],
        outputs: [
            {
                name: "",
                type: "uint256",
                internalType: "uint256",
            },
        ],
        stateMutability: "view",
    },
    {
        type: "function",
        name: "nonceBitmap",
        inputs: [
            {
                name: "",
                type: "address",
                internalType: "address",
            },
            {
                name: "",
                type: "uint256",
                internalType: "uint256",
            },
        ],
        outputs: [
            {
                name: "",
                type: "uint256",
                internalType: "uint256",
            },
        ],
        stateMutability: "view",
    },
    {
        type: "function",
        name: "permit",
        inputs: [
            {
                name: "owner",
                type: "address",
                internalType: "address",
            },
            {
                name: "permitSingle",
                type: "tuple",
                internalType: "struct IPermit2.PermitSingle",
                components: [
                    {
                        name: "details",
                        type: "tuple",
                        internalType: "struct IPermit2.PermitDetails",
                        components: [
                            {
                                name: "token",
                                type: "address",
                                internalType: "address",
                            },
                            {
                                name: "amount",
                                type: "uint160",
                                internalType: "uint160",
                            },
                            {
                                name: "expiration",
                                type: "uint48",
                                internalType: "uint48",
                            },
                            {
                                name: "nonce",
                                type: "uint48",
                                internalType: "uint48",
                            },
                        ],
                    },
                    {
                        name: "spender",
                        type: "address",
                        internalType: "address",
                    },
                    {
                        name: "sigDeadline",
                        type: "uint256",
                        internalType: "uint256",
                    },
                ],
            },
            {
                name: "signature",
                type: "bytes",
                internalType: "bytes",
            },
        ],
        outputs: [],
        stateMutability: "nonpayable",
    },
    {
        type: "function",
        name: "permitWitnessTransferFrom",
        inputs: [
            {
                name: "_permit",
                type: "tuple",
                internalType: "struct IPermit2.PermitTransferFrom",
                components: [
                    {
                        name: "permitted",
                        type: "tuple",
                        internalType: "struct IPermit2.TokenPermissions",
                        components: [
                            {
                                name: "token",
                                type: "address",
                                internalType: "address",
                            },
                            {
                                name: "amount",
                                type: "uint256",
                                internalType: "uint256",
                            },
                        ],
                    },
                    {
                        name: "nonce",
                        type: "uint256",
                        internalType: "uint256",
                    },
                    {
                        name: "deadline",
                        type: "uint256",
                        internalType: "uint256",
                    },
                ],
            },
            {
                name: "transferDetails",
                type: "tuple",
                internalType: "struct IPermit2.SignatureTransferDetails",
                components: [
                    {
                        name: "to",
                        type: "address",
                        internalType: "address",
                    },
                    {
                        name: "requestedAmount",
                        type: "uint256",
                        internalType: "uint256",
                    },
                ],
            },
            {
                name: "owner",
                type: "address",
                internalType: "address",
            },
            {
                name: "witness",
                type: "bytes32",
                internalType: "bytes32",
            },
            {
                name: "witnessTypeString",
                type: "string",
                internalType: "string",
            },
            {
                name: "signature",
                type: "bytes",
                internalType: "bytes",
            },
        ],
        outputs: [],
        stateMutability: "nonpayable",
    },
    {
        type: "function",
        name: "transferFrom",
        inputs: [
            {
                name: "from",
                type: "address",
                internalType: "address",
            },
            {
                name: "to",
                type: "address",
                internalType: "address",
            },
            {
                name: "amount",
                type: "uint160",
                internalType: "uint160",
            },
            {
                name: "token",
                type: "address",
                internalType: "address",
            },
        ],
        outputs: [],
        stateMutability: "nonpayable",
    },
    {
        type: "error",
        name: "AllowanceExpired",
        inputs: [],
    },
    {
        type: "error",
        name: "InsufficientAllowance",
        inputs: [],
    },
    {
        type: "error",
        name: "InvalidAmount",
        inputs: [],
    },
    {
        type: "error",
        name: "InvalidContractSignature",
        inputs: [],
    },
    {
        type: "error",
        name: "InvalidNonce",
        inputs: [],
    },
    {
        type: "error",
        name: "InvalidSignature",
        inputs: [],
    },
    {
        type: "error",
        name: "InvalidSignatureLength",
        inputs: [],
    },
    {
        type: "error",
        name: "InvalidSigner",
        inputs: [],
    },
    {
        type: "error",
        name: "SignatureExpired",
        inputs: [],
    },
];
const _bytecode = " ";
const isSuperArgs = (xs) => xs.length > 1;
class MockPermit2__factory extends ethers_1.ContractFactory {
    constructor(...args) {
        if (isSuperArgs(args)) {
            super(...args);
        }
        else {
            super(_abi, _bytecode, args[0]);
        }
    }
    deploy(overrides) {
        return super.deploy(overrides || {});
    }
    getDeployTransaction(overrides) {
        return super.getDeployTransaction(overrides || {});
    }
    attach(address) {
        return super.attach(address);
    }
    connect(signer) {
        return super.connect(signer);
    }
    static createInterface() {
        return new ethers_1.utils.Interface(_abi);
    }
    static connect(address, signerOrProvider) {
        return new ethers_1.Contract(address, _abi, signerOrProvider);
    }
}
exports.MockPermit2__factory = MockPermit2__factory;
MockPermit2__factory.bytecode = _bytecode;
MockPermit2__factory.abi = _abi;
