"use strict";
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.QueryResponse__factory = void 0;
const ethers_1 = require("ethers");
const _abi = [
    {
        inputs: [],
        name: "ChainIdMismatch",
        type: "error",
    },
    {
        inputs: [],
        name: "EmptyWormholeAddress",
        type: "error",
    },
    {
        inputs: [],
        name: "InvalidChainId",
        type: "error",
    },
    {
        inputs: [],
        name: "InvalidContractAddress",
        type: "error",
    },
    {
        inputs: [],
        name: "InvalidFunctionSignature",
        type: "error",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "received",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "expected",
                type: "uint256",
            },
        ],
        name: "InvalidPayloadLength",
        type: "error",
    },
    {
        inputs: [],
        name: "InvalidResponseVersion",
        type: "error",
    },
    {
        inputs: [],
        name: "NumberOfResponsesMismatch",
        type: "error",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "offset",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "length",
                type: "uint256",
            },
        ],
        name: "OutOfBounds",
        type: "error",
    },
    {
        inputs: [],
        name: "RequestTypeMismatch",
        type: "error",
    },
    {
        inputs: [],
        name: "StaleBlockNum",
        type: "error",
    },
    {
        inputs: [],
        name: "StaleBlockTime",
        type: "error",
    },
    {
        inputs: [],
        name: "UnexpectedNumberOfResults",
        type: "error",
    },
    {
        inputs: [],
        name: "UnsupportedQueryType",
        type: "error",
    },
    {
        inputs: [],
        name: "VersionMismatch",
        type: "error",
    },
    {
        inputs: [],
        name: "ZeroQueries",
        type: "error",
    },
    {
        inputs: [],
        name: "QT_ETH_CALL",
        outputs: [
            {
                internalType: "uint8",
                name: "",
                type: "uint8",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "QT_ETH_CALL_BY_TIMESTAMP",
        outputs: [
            {
                internalType: "uint8",
                name: "",
                type: "uint8",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "QT_ETH_CALL_WITH_FINALITY",
        outputs: [
            {
                internalType: "uint8",
                name: "",
                type: "uint8",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "QT_MAX",
        outputs: [
            {
                internalType: "uint8",
                name: "",
                type: "uint8",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "VERSION",
        outputs: [
            {
                internalType: "uint8",
                name: "",
                type: "uint8",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes",
                name: "response",
                type: "bytes",
            },
        ],
        name: "getResponseDigest",
        outputs: [
            {
                internalType: "bytes32",
                name: "",
                type: "bytes32",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes",
                name: "response",
                type: "bytes",
            },
        ],
        name: "getResponseHash",
        outputs: [
            {
                internalType: "bytes32",
                name: "",
                type: "bytes32",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes",
                name: "response",
                type: "bytes",
            },
            {
                components: [
                    {
                        internalType: "bytes32",
                        name: "r",
                        type: "bytes32",
                    },
                    {
                        internalType: "bytes32",
                        name: "s",
                        type: "bytes32",
                    },
                    {
                        internalType: "uint8",
                        name: "v",
                        type: "uint8",
                    },
                    {
                        internalType: "uint8",
                        name: "guardianIndex",
                        type: "uint8",
                    },
                ],
                internalType: "struct IWormhole.Signature[]",
                name: "signatures",
                type: "tuple[]",
            },
        ],
        name: "parseAndVerifyQueryResponse",
        outputs: [
            {
                components: [
                    {
                        internalType: "uint8",
                        name: "version",
                        type: "uint8",
                    },
                    {
                        internalType: "uint16",
                        name: "senderChainId",
                        type: "uint16",
                    },
                    {
                        internalType: "uint32",
                        name: "nonce",
                        type: "uint32",
                    },
                    {
                        internalType: "bytes",
                        name: "requestId",
                        type: "bytes",
                    },
                    {
                        components: [
                            {
                                internalType: "uint16",
                                name: "chainId",
                                type: "uint16",
                            },
                            {
                                internalType: "uint8",
                                name: "queryType",
                                type: "uint8",
                            },
                            {
                                internalType: "bytes",
                                name: "request",
                                type: "bytes",
                            },
                            {
                                internalType: "bytes",
                                name: "response",
                                type: "bytes",
                            },
                        ],
                        internalType: "struct ParsedPerChainQueryResponse[]",
                        name: "responses",
                        type: "tuple[]",
                    },
                ],
                internalType: "struct ParsedQueryResponse",
                name: "r",
                type: "tuple",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "uint16",
                        name: "chainId",
                        type: "uint16",
                    },
                    {
                        internalType: "uint8",
                        name: "queryType",
                        type: "uint8",
                    },
                    {
                        internalType: "bytes",
                        name: "request",
                        type: "bytes",
                    },
                    {
                        internalType: "bytes",
                        name: "response",
                        type: "bytes",
                    },
                ],
                internalType: "struct ParsedPerChainQueryResponse",
                name: "pcr",
                type: "tuple",
            },
        ],
        name: "parseEthCallByTimestampQueryResponse",
        outputs: [
            {
                components: [
                    {
                        internalType: "bytes",
                        name: "requestTargetBlockIdHint",
                        type: "bytes",
                    },
                    {
                        internalType: "bytes",
                        name: "requestFollowingBlockIdHint",
                        type: "bytes",
                    },
                    {
                        internalType: "uint64",
                        name: "requestTargetTimestamp",
                        type: "uint64",
                    },
                    {
                        internalType: "uint64",
                        name: "targetBlockNum",
                        type: "uint64",
                    },
                    {
                        internalType: "uint64",
                        name: "targetBlockTime",
                        type: "uint64",
                    },
                    {
                        internalType: "uint64",
                        name: "followingBlockNum",
                        type: "uint64",
                    },
                    {
                        internalType: "bytes32",
                        name: "targetBlockHash",
                        type: "bytes32",
                    },
                    {
                        internalType: "bytes32",
                        name: "followingBlockHash",
                        type: "bytes32",
                    },
                    {
                        internalType: "uint64",
                        name: "followingBlockTime",
                        type: "uint64",
                    },
                    {
                        components: [
                            {
                                internalType: "address",
                                name: "contractAddress",
                                type: "address",
                            },
                            {
                                internalType: "bytes",
                                name: "callData",
                                type: "bytes",
                            },
                            {
                                internalType: "bytes",
                                name: "result",
                                type: "bytes",
                            },
                        ],
                        internalType: "struct EthCallData[]",
                        name: "result",
                        type: "tuple[]",
                    },
                ],
                internalType: "struct EthCallByTimestampQueryResponse",
                name: "r",
                type: "tuple",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "uint16",
                        name: "chainId",
                        type: "uint16",
                    },
                    {
                        internalType: "uint8",
                        name: "queryType",
                        type: "uint8",
                    },
                    {
                        internalType: "bytes",
                        name: "request",
                        type: "bytes",
                    },
                    {
                        internalType: "bytes",
                        name: "response",
                        type: "bytes",
                    },
                ],
                internalType: "struct ParsedPerChainQueryResponse",
                name: "pcr",
                type: "tuple",
            },
        ],
        name: "parseEthCallQueryResponse",
        outputs: [
            {
                components: [
                    {
                        internalType: "bytes",
                        name: "requestBlockId",
                        type: "bytes",
                    },
                    {
                        internalType: "uint64",
                        name: "blockNum",
                        type: "uint64",
                    },
                    {
                        internalType: "uint64",
                        name: "blockTime",
                        type: "uint64",
                    },
                    {
                        internalType: "bytes32",
                        name: "blockHash",
                        type: "bytes32",
                    },
                    {
                        components: [
                            {
                                internalType: "address",
                                name: "contractAddress",
                                type: "address",
                            },
                            {
                                internalType: "bytes",
                                name: "callData",
                                type: "bytes",
                            },
                            {
                                internalType: "bytes",
                                name: "result",
                                type: "bytes",
                            },
                        ],
                        internalType: "struct EthCallData[]",
                        name: "result",
                        type: "tuple[]",
                    },
                ],
                internalType: "struct EthCallQueryResponse",
                name: "r",
                type: "tuple",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "uint16",
                        name: "chainId",
                        type: "uint16",
                    },
                    {
                        internalType: "uint8",
                        name: "queryType",
                        type: "uint8",
                    },
                    {
                        internalType: "bytes",
                        name: "request",
                        type: "bytes",
                    },
                    {
                        internalType: "bytes",
                        name: "response",
                        type: "bytes",
                    },
                ],
                internalType: "struct ParsedPerChainQueryResponse",
                name: "pcr",
                type: "tuple",
            },
        ],
        name: "parseEthCallWithFinalityQueryResponse",
        outputs: [
            {
                components: [
                    {
                        internalType: "bytes",
                        name: "requestBlockId",
                        type: "bytes",
                    },
                    {
                        internalType: "bytes",
                        name: "requestFinality",
                        type: "bytes",
                    },
                    {
                        internalType: "uint64",
                        name: "blockNum",
                        type: "uint64",
                    },
                    {
                        internalType: "uint64",
                        name: "blockTime",
                        type: "uint64",
                    },
                    {
                        internalType: "bytes32",
                        name: "blockHash",
                        type: "bytes32",
                    },
                    {
                        components: [
                            {
                                internalType: "address",
                                name: "contractAddress",
                                type: "address",
                            },
                            {
                                internalType: "bytes",
                                name: "callData",
                                type: "bytes",
                            },
                            {
                                internalType: "bytes",
                                name: "result",
                                type: "bytes",
                            },
                        ],
                        internalType: "struct EthCallData[]",
                        name: "result",
                        type: "tuple[]",
                    },
                ],
                internalType: "struct EthCallWithFinalityQueryResponse",
                name: "r",
                type: "tuple",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [],
        name: "responsePrefix",
        outputs: [
            {
                internalType: "bytes",
                name: "",
                type: "bytes",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint64",
                name: "_blockNum",
                type: "uint64",
            },
            {
                internalType: "uint256",
                name: "_minBlockNum",
                type: "uint256",
            },
        ],
        name: "validateBlockNum",
        outputs: [],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint64",
                name: "_blockTime",
                type: "uint64",
            },
            {
                internalType: "uint256",
                name: "_minBlockTime",
                type: "uint256",
            },
        ],
        name: "validateBlockTime",
        outputs: [],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint16",
                name: "chainId",
                type: "uint16",
            },
            {
                internalType: "uint16[]",
                name: "_validChainIds",
                type: "uint16[]",
            },
        ],
        name: "validateChainId",
        outputs: [],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "address",
                        name: "contractAddress",
                        type: "address",
                    },
                    {
                        internalType: "bytes",
                        name: "callData",
                        type: "bytes",
                    },
                    {
                        internalType: "bytes",
                        name: "result",
                        type: "bytes",
                    },
                ],
                internalType: "struct EthCallData",
                name: "r",
                type: "tuple",
            },
            {
                internalType: "address[]",
                name: "_expectedContractAddresses",
                type: "address[]",
            },
            {
                internalType: "bytes4[]",
                name: "_expectedFunctionSignatures",
                type: "bytes4[]",
            },
        ],
        name: "validateEthCallData",
        outputs: [],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "address",
                        name: "contractAddress",
                        type: "address",
                    },
                    {
                        internalType: "bytes",
                        name: "callData",
                        type: "bytes",
                    },
                    {
                        internalType: "bytes",
                        name: "result",
                        type: "bytes",
                    },
                ],
                internalType: "struct EthCallData[]",
                name: "r",
                type: "tuple[]",
            },
            {
                internalType: "address[]",
                name: "_expectedContractAddresses",
                type: "address[]",
            },
            {
                internalType: "bytes4[]",
                name: "_expectedFunctionSignatures",
                type: "bytes4[]",
            },
        ],
        name: "validateMultipleEthCallData",
        outputs: [],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes",
                name: "response",
                type: "bytes",
            },
            {
                components: [
                    {
                        internalType: "bytes32",
                        name: "r",
                        type: "bytes32",
                    },
                    {
                        internalType: "bytes32",
                        name: "s",
                        type: "bytes32",
                    },
                    {
                        internalType: "uint8",
                        name: "v",
                        type: "uint8",
                    },
                    {
                        internalType: "uint8",
                        name: "guardianIndex",
                        type: "uint8",
                    },
                ],
                internalType: "struct IWormhole.Signature[]",
                name: "signatures",
                type: "tuple[]",
            },
        ],
        name: "verifyQueryResponseSignatures",
        outputs: [],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "wormhole",
        outputs: [
            {
                internalType: "contract IWormhole",
                name: "",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
];
class QueryResponse__factory {
    static createInterface() {
        return new ethers_1.utils.Interface(_abi);
    }
    static connect(address, signerOrProvider) {
        return new ethers_1.Contract(address, _abi, signerOrProvider);
    }
}
exports.QueryResponse__factory = QueryResponse__factory;
QueryResponse__factory.abi = _abi;
