"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SigningWormholeSimulator__factory = void 0;
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
const ethers_1 = require("ethers");
const _abi = [
    {
        inputs: [
            {
                internalType: "contract IWormhole",
                name: "wormhole_",
                type: "address",
            },
            {
                internalType: "uint256",
                name: "devnetGuardian",
                type: "uint256",
            },
        ],
        stateMutability: "nonpayable",
        type: "constructor",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "uint8",
                        name: "version",
                        type: "uint8",
                    },
                    {
                        internalType: "uint32",
                        name: "timestamp",
                        type: "uint32",
                    },
                    {
                        internalType: "uint32",
                        name: "nonce",
                        type: "uint32",
                    },
                    {
                        internalType: "uint16",
                        name: "emitterChainId",
                        type: "uint16",
                    },
                    {
                        internalType: "bytes32",
                        name: "emitterAddress",
                        type: "bytes32",
                    },
                    {
                        internalType: "uint64",
                        name: "sequence",
                        type: "uint64",
                    },
                    {
                        internalType: "uint8",
                        name: "consistencyLevel",
                        type: "uint8",
                    },
                    {
                        internalType: "bytes",
                        name: "payload",
                        type: "bytes",
                    },
                    {
                        internalType: "uint32",
                        name: "guardianSetIndex",
                        type: "uint32",
                    },
                    {
                        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[]",
                    },
                    {
                        internalType: "bytes32",
                        name: "hash",
                        type: "bytes32",
                    },
                ],
                internalType: "struct IWormhole.VM",
                name: "vm_",
                type: "tuple",
            },
        ],
        name: "encodeAndSignMessage",
        outputs: [
            {
                internalType: "bytes",
                name: "signedMessage",
                type: "bytes",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "uint8",
                        name: "version",
                        type: "uint8",
                    },
                    {
                        internalType: "uint32",
                        name: "timestamp",
                        type: "uint32",
                    },
                    {
                        internalType: "uint32",
                        name: "nonce",
                        type: "uint32",
                    },
                    {
                        internalType: "uint16",
                        name: "emitterChainId",
                        type: "uint16",
                    },
                    {
                        internalType: "bytes32",
                        name: "emitterAddress",
                        type: "bytes32",
                    },
                    {
                        internalType: "uint64",
                        name: "sequence",
                        type: "uint64",
                    },
                    {
                        internalType: "uint8",
                        name: "consistencyLevel",
                        type: "uint8",
                    },
                    {
                        internalType: "bytes",
                        name: "payload",
                        type: "bytes",
                    },
                    {
                        internalType: "uint32",
                        name: "guardianSetIndex",
                        type: "uint32",
                    },
                    {
                        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[]",
                    },
                    {
                        internalType: "bytes32",
                        name: "hash",
                        type: "bytes32",
                    },
                ],
                internalType: "struct IWormhole.VM",
                name: "vm_",
                type: "tuple",
            },
        ],
        name: "encodeObservation",
        outputs: [
            {
                internalType: "bytes",
                name: "encodedObservation",
                type: "bytes",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "bytes32[]",
                        name: "topics",
                        type: "bytes32[]",
                    },
                    {
                        internalType: "bytes",
                        name: "data",
                        type: "bytes",
                    },
                    {
                        internalType: "address",
                        name: "emitter",
                        type: "address",
                    },
                ],
                internalType: "struct VmSafe.Log",
                name: "log",
                type: "tuple",
            },
            {
                internalType: "uint16",
                name: "emitterChainId",
                type: "uint16",
            },
            {
                internalType: "address",
                name: "emitterAddress",
                type: "address",
            },
        ],
        name: "fetchSignedMessageFromLogs",
        outputs: [
            {
                internalType: "bytes",
                name: "signedMessage",
                type: "bytes",
            },
        ],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "bytes32[]",
                        name: "topics",
                        type: "bytes32[]",
                    },
                    {
                        internalType: "bytes",
                        name: "data",
                        type: "bytes",
                    },
                    {
                        internalType: "address",
                        name: "emitter",
                        type: "address",
                    },
                ],
                internalType: "struct VmSafe.Log[]",
                name: "logs",
                type: "tuple[]",
            },
        ],
        name: "fetchWormholeMessageFromLog",
        outputs: [
            {
                components: [
                    {
                        internalType: "bytes32[]",
                        name: "topics",
                        type: "bytes32[]",
                    },
                    {
                        internalType: "bytes",
                        name: "data",
                        type: "bytes",
                    },
                    {
                        internalType: "address",
                        name: "emitter",
                        type: "address",
                    },
                ],
                internalType: "struct VmSafe.Log[]",
                name: "",
                type: "tuple[]",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes",
                name: "message",
                type: "bytes",
            },
        ],
        name: "invalidateVM",
        outputs: [],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "bytes32[]",
                        name: "topics",
                        type: "bytes32[]",
                    },
                    {
                        internalType: "bytes",
                        name: "data",
                        type: "bytes",
                    },
                    {
                        internalType: "address",
                        name: "emitter",
                        type: "address",
                    },
                ],
                internalType: "struct VmSafe.Log",
                name: "log",
                type: "tuple",
            },
        ],
        name: "parseVMFromLogs",
        outputs: [
            {
                components: [
                    {
                        internalType: "uint8",
                        name: "version",
                        type: "uint8",
                    },
                    {
                        internalType: "uint32",
                        name: "timestamp",
                        type: "uint32",
                    },
                    {
                        internalType: "uint32",
                        name: "nonce",
                        type: "uint32",
                    },
                    {
                        internalType: "uint16",
                        name: "emitterChainId",
                        type: "uint16",
                    },
                    {
                        internalType: "bytes32",
                        name: "emitterAddress",
                        type: "bytes32",
                    },
                    {
                        internalType: "uint64",
                        name: "sequence",
                        type: "uint64",
                    },
                    {
                        internalType: "uint8",
                        name: "consistencyLevel",
                        type: "uint8",
                    },
                    {
                        internalType: "bytes",
                        name: "payload",
                        type: "bytes",
                    },
                    {
                        internalType: "uint32",
                        name: "guardianSetIndex",
                        type: "uint32",
                    },
                    {
                        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[]",
                    },
                    {
                        internalType: "bytes32",
                        name: "hash",
                        type: "bytes32",
                    },
                ],
                internalType: "struct IWormhole.VM",
                name: "vm_",
                type: "tuple",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "newFee",
                type: "uint256",
            },
        ],
        name: "setMessageFee",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [],
        name: "vm",
        outputs: [
            {
                internalType: "contract Vm",
                name: "",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "wormhole",
        outputs: [
            {
                internalType: "contract IWormhole",
                name: "",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
];
const _bytecode = " ";
const isSuperArgs = (xs) => xs.length > 1;
class SigningWormholeSimulator__factory extends ethers_1.ContractFactory {
    constructor(...args) {
        if (isSuperArgs(args)) {
            super(...args);
        }
        else {
            super(_abi, _bytecode, args[0]);
        }
    }
    deploy(wormhole_, devnetGuardian, overrides) {
        return super.deploy(wormhole_, devnetGuardian, overrides || {});
    }
    getDeployTransaction(wormhole_, devnetGuardian, overrides) {
        return super.getDeployTransaction(wormhole_, devnetGuardian, 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.SigningWormholeSimulator__factory = SigningWormholeSimulator__factory;
SigningWormholeSimulator__factory.bytecode = _bytecode;
SigningWormholeSimulator__factory.abi = _abi;
