"use strict";
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.WormholeRelayerDelivery__factory = void 0;
const ethers_1 = require("ethers");
const _abi = [
    {
        inputs: [
            {
                internalType: "Gas",
                name: "gasUsed",
                type: "uint256",
            },
            {
                internalType: "LocalNative",
                name: "available",
                type: "uint256",
            },
            {
                internalType: "LocalNative",
                name: "required",
                type: "uint256",
            },
        ],
        name: "Cancelled",
        type: "error",
    },
    {
        inputs: [],
        name: "DeliveryProviderCannotReceivePayment",
        type: "error",
    },
    {
        inputs: [
            {
                internalType: "Gas",
                name: "gasUsed",
                type: "uint256",
            },
        ],
        name: "DeliveryProviderPaymentFailed",
        type: "error",
    },
    {
        inputs: [
            {
                internalType: "Gas",
                name: "gasUsed",
                type: "uint256",
            },
        ],
        name: "DeliveryProviderReverted",
        type: "error",
    },
    {
        inputs: [
            {
                internalType: "LocalNative",
                name: "msgValue",
                type: "uint256",
            },
            {
                internalType: "LocalNative",
                name: "minimum",
                type: "uint256",
            },
        ],
        name: "InsufficientRelayerFunds",
        type: "error",
    },
    {
        inputs: [
            {
                internalType: "string",
                name: "reason",
                type: "string",
            },
        ],
        name: "InvalidDeliveryVaa",
        type: "error",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "emitter",
                type: "bytes32",
            },
            {
                internalType: "bytes32",
                name: "registered",
                type: "bytes32",
            },
            {
                internalType: "uint16",
                name: "chainId",
                type: "uint16",
            },
        ],
        name: "InvalidEmitter",
        type: "error",
    },
    {
        inputs: [],
        name: "InvalidOverrideGasLimit",
        type: "error",
    },
    {
        inputs: [],
        name: "InvalidOverrideReceiverValue",
        type: "error",
    },
    {
        inputs: [],
        name: "InvalidOverrideRefundPerGasUnused",
        type: "error",
    },
    {
        inputs: [
            {
                internalType: "uint8",
                name: "parsed",
                type: "uint8",
            },
            {
                internalType: "uint8",
                name: "expected",
                type: "uint8",
            },
        ],
        name: "InvalidPayloadId",
        type: "error",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "received",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "expected",
                type: "uint256",
            },
        ],
        name: "InvalidPayloadLength",
        type: "error",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "",
                type: "bytes32",
            },
        ],
        name: "NotAnEvmAddress",
        type: "error",
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "msgSender",
                type: "address",
            },
            {
                internalType: "address",
                name: "lockedBy",
                type: "address",
            },
        ],
        name: "ReentrantDelivery",
        type: "error",
    },
    {
        inputs: [],
        name: "RequesterNotWormholeRelayer",
        type: "error",
    },
    {
        inputs: [
            {
                internalType: "uint16",
                name: "targetChain",
                type: "uint16",
            },
        ],
        name: "TargetChainIsNotThisChain",
        type: "error",
    },
    {
        inputs: [
            {
                internalType: "uint8",
                name: "version",
                type: "uint8",
            },
            {
                internalType: "uint8",
                name: "expectedVersion",
                type: "uint8",
            },
        ],
        name: "UnexpectedExecutionInfoVersion",
        type: "error",
    },
    {
        inputs: [
            {
                internalType: "uint8",
                name: "index",
                type: "uint8",
            },
        ],
        name: "VaaKeysDoNotMatchVaas",
        type: "error",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "keys",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "vaas",
                type: "uint256",
            },
        ],
        name: "VaaKeysLengthDoesNotMatchVaasLength",
        type: "error",
    },
    {
        inputs: [
            {
                internalType: "uint8",
                name: "instructionVersion",
                type: "uint8",
            },
            {
                internalType: "uint8",
                name: "overrideVersion",
                type: "uint8",
            },
        ],
        name: "VersionMismatchOverride",
        type: "error",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "address",
                name: "recipientContract",
                type: "address",
            },
            {
                indexed: true,
                internalType: "uint16",
                name: "sourceChain",
                type: "uint16",
            },
            {
                indexed: true,
                internalType: "uint64",
                name: "sequence",
                type: "uint64",
            },
            {
                indexed: false,
                internalType: "bytes32",
                name: "deliveryVaaHash",
                type: "bytes32",
            },
            {
                indexed: false,
                internalType: "enum IWormholeRelayerDelivery.DeliveryStatus",
                name: "status",
                type: "uint8",
            },
            {
                indexed: false,
                internalType: "Gas",
                name: "gasUsed",
                type: "uint256",
            },
            {
                indexed: false,
                internalType: "enum IWormholeRelayerDelivery.RefundStatus",
                name: "refundStatus",
                type: "uint8",
            },
            {
                indexed: false,
                internalType: "bytes",
                name: "additionalStatusInfo",
                type: "bytes",
            },
            {
                indexed: false,
                internalType: "bytes",
                name: "overridesInfo",
                type: "bytes",
            },
        ],
        name: "Delivery",
        type: "event",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "uint64",
                name: "sequence",
                type: "uint64",
            },
            {
                indexed: false,
                internalType: "LocalNative",
                name: "deliveryQuote",
                type: "uint256",
            },
            {
                indexed: false,
                internalType: "LocalNative",
                name: "paymentForExtraReceiverValue",
                type: "uint256",
            },
        ],
        name: "SendEvent",
        type: "event",
    },
    {
        inputs: [
            {
                internalType: "bytes[]",
                name: "encodedVMs",
                type: "bytes[]",
            },
            {
                internalType: "bytes",
                name: "encodedDeliveryVAA",
                type: "bytes",
            },
            {
                internalType: "address payable",
                name: "relayerRefundAddress",
                type: "address",
            },
            {
                internalType: "bytes",
                name: "deliveryOverrides",
                type: "bytes",
            },
        ],
        name: "deliver",
        outputs: [],
        stateMutability: "payable",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "deliveryHash",
                type: "bytes32",
            },
        ],
        name: "deliveryAttempted",
        outputs: [
            {
                internalType: "bool",
                name: "attempted",
                type: "bool",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "deliveryHash",
                type: "bytes32",
            },
        ],
        name: "deliveryFailureBlock",
        outputs: [
            {
                internalType: "uint256",
                name: "blockNumber",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "deliveryHash",
                type: "bytes32",
            },
        ],
        name: "deliverySuccessBlock",
        outputs: [
            {
                internalType: "uint256",
                name: "blockNumber",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "uint16",
                        name: "sourceChain",
                        type: "uint16",
                    },
                    {
                        internalType: "bytes32",
                        name: "targetAddress",
                        type: "bytes32",
                    },
                    {
                        internalType: "bytes",
                        name: "payload",
                        type: "bytes",
                    },
                    {
                        internalType: "Gas",
                        name: "gasLimit",
                        type: "uint256",
                    },
                    {
                        internalType: "TargetNative",
                        name: "totalReceiverValue",
                        type: "uint256",
                    },
                    {
                        internalType: "GasPrice",
                        name: "targetChainRefundPerGasUnused",
                        type: "uint256",
                    },
                    {
                        internalType: "bytes32",
                        name: "senderAddress",
                        type: "bytes32",
                    },
                    {
                        internalType: "bytes32",
                        name: "deliveryHash",
                        type: "bytes32",
                    },
                    {
                        internalType: "bytes[]",
                        name: "signedVaas",
                        type: "bytes[]",
                    },
                ],
                internalType: "struct EvmDeliveryInstruction",
                name: "evmInstruction",
                type: "tuple",
            },
        ],
        name: "executeInstruction",
        outputs: [
            {
                internalType: "uint8",
                name: "status",
                type: "uint8",
            },
            {
                internalType: "Gas",
                name: "gasUsed",
                type: "uint256",
            },
            {
                internalType: "bytes",
                name: "targetRevertDataTruncated",
                type: "bytes",
            },
        ],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint16",
                name: "chainId",
                type: "uint16",
            },
        ],
        name: "getRegisteredWormholeRelayerContract",
        outputs: [
            {
                internalType: "bytes32",
                name: "",
                type: "bytes32",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
];
class WormholeRelayerDelivery__factory {
    static createInterface() {
        return new ethers_1.utils.Interface(_abi);
    }
    static connect(address, signerOrProvider) {
        return new ethers_1.Contract(address, _abi, signerOrProvider);
    }
}
exports.WormholeRelayerDelivery__factory = WormholeRelayerDelivery__factory;
WormholeRelayerDelivery__factory.abi = _abi;
