"use strict";
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.PythImplementation__factory = void 0;
var ethers_1 = require("ethers");
var _abi = [
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: "address",
                name: "previousAdmin",
                type: "address",
            },
            {
                indexed: false,
                internalType: "address",
                name: "newAdmin",
                type: "address",
            },
        ],
        name: "AdminChanged",
        type: "event",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "address",
                name: "beacon",
                type: "address",
            },
        ],
        name: "BeaconUpgraded",
        type: "event",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "address",
                name: "oldContract",
                type: "address",
            },
            {
                indexed: true,
                internalType: "address",
                name: "newContract",
                type: "address",
            },
        ],
        name: "ContractUpgraded",
        type: "event",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "address",
                name: "implementation",
                type: "address",
            },
        ],
        name: "Upgraded",
        type: "event",
    },
    {
        inputs: [
            {
                internalType: "bytes",
                name: "encodedVm",
                type: "bytes",
            },
        ],
        name: "attestPrice",
        outputs: [
            {
                components: [
                    {
                        internalType: "uint32",
                        name: "magic",
                        type: "uint32",
                    },
                    {
                        internalType: "uint16",
                        name: "version",
                        type: "uint16",
                    },
                    {
                        internalType: "uint8",
                        name: "payloadId",
                        type: "uint8",
                    },
                    {
                        internalType: "bytes32",
                        name: "productId",
                        type: "bytes32",
                    },
                    {
                        internalType: "bytes32",
                        name: "priceId",
                        type: "bytes32",
                    },
                    {
                        internalType: "uint8",
                        name: "priceType",
                        type: "uint8",
                    },
                    {
                        internalType: "int64",
                        name: "price",
                        type: "int64",
                    },
                    {
                        internalType: "int32",
                        name: "exponent",
                        type: "int32",
                    },
                    {
                        components: [
                            {
                                internalType: "int64",
                                name: "value",
                                type: "int64",
                            },
                            {
                                internalType: "int64",
                                name: "numerator",
                                type: "int64",
                            },
                            {
                                internalType: "int64",
                                name: "denominator",
                                type: "int64",
                            },
                        ],
                        internalType: "struct PythStructs.Ema",
                        name: "twap",
                        type: "tuple",
                    },
                    {
                        components: [
                            {
                                internalType: "int64",
                                name: "value",
                                type: "int64",
                            },
                            {
                                internalType: "int64",
                                name: "numerator",
                                type: "int64",
                            },
                            {
                                internalType: "int64",
                                name: "denominator",
                                type: "int64",
                            },
                        ],
                        internalType: "struct PythStructs.Ema",
                        name: "twac",
                        type: "tuple",
                    },
                    {
                        internalType: "uint64",
                        name: "confidenceInterval",
                        type: "uint64",
                    },
                    {
                        internalType: "uint8",
                        name: "status",
                        type: "uint8",
                    },
                    {
                        internalType: "uint8",
                        name: "corpAct",
                        type: "uint8",
                    },
                    {
                        internalType: "uint64",
                        name: "timestamp",
                        type: "uint64",
                    },
                ],
                internalType: "struct PythStructs.PriceAttestation",
                name: "pa",
                type: "tuple",
            },
        ],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [],
        name: "chainId",
        outputs: [
            {
                internalType: "uint16",
                name: "",
                type: "uint16",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "hash",
                type: "bytes32",
            },
        ],
        name: "governanceActionIsConsumed",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "governanceChainId",
        outputs: [
            {
                internalType: "uint16",
                name: "",
                type: "uint16",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "governanceContract",
        outputs: [
            {
                internalType: "bytes32",
                name: "",
                type: "bytes32",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "impl",
                type: "address",
            },
        ],
        name: "isInitialized",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "product",
                type: "bytes32",
            },
            {
                internalType: "uint8",
                name: "priceType",
                type: "uint8",
            },
        ],
        name: "latestAttestation",
        outputs: [
            {
                components: [
                    {
                        internalType: "uint32",
                        name: "magic",
                        type: "uint32",
                    },
                    {
                        internalType: "uint16",
                        name: "version",
                        type: "uint16",
                    },
                    {
                        internalType: "uint8",
                        name: "payloadId",
                        type: "uint8",
                    },
                    {
                        internalType: "bytes32",
                        name: "productId",
                        type: "bytes32",
                    },
                    {
                        internalType: "bytes32",
                        name: "priceId",
                        type: "bytes32",
                    },
                    {
                        internalType: "uint8",
                        name: "priceType",
                        type: "uint8",
                    },
                    {
                        internalType: "int64",
                        name: "price",
                        type: "int64",
                    },
                    {
                        internalType: "int32",
                        name: "exponent",
                        type: "int32",
                    },
                    {
                        components: [
                            {
                                internalType: "int64",
                                name: "value",
                                type: "int64",
                            },
                            {
                                internalType: "int64",
                                name: "numerator",
                                type: "int64",
                            },
                            {
                                internalType: "int64",
                                name: "denominator",
                                type: "int64",
                            },
                        ],
                        internalType: "struct PythStructs.Ema",
                        name: "twap",
                        type: "tuple",
                    },
                    {
                        components: [
                            {
                                internalType: "int64",
                                name: "value",
                                type: "int64",
                            },
                            {
                                internalType: "int64",
                                name: "numerator",
                                type: "int64",
                            },
                            {
                                internalType: "int64",
                                name: "denominator",
                                type: "int64",
                            },
                        ],
                        internalType: "struct PythStructs.Ema",
                        name: "twac",
                        type: "tuple",
                    },
                    {
                        internalType: "uint64",
                        name: "confidenceInterval",
                        type: "uint64",
                    },
                    {
                        internalType: "uint8",
                        name: "status",
                        type: "uint8",
                    },
                    {
                        internalType: "uint8",
                        name: "corpAct",
                        type: "uint8",
                    },
                    {
                        internalType: "uint64",
                        name: "timestamp",
                        type: "uint64",
                    },
                ],
                internalType: "struct PythStructs.PriceAttestation",
                name: "attestation",
                type: "tuple",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes",
                name: "encodedUpgrade",
                type: "bytes",
            },
        ],
        name: "parseContractUpgrade",
        outputs: [
            {
                components: [
                    {
                        internalType: "bytes32",
                        name: "module",
                        type: "bytes32",
                    },
                    {
                        internalType: "uint8",
                        name: "action",
                        type: "uint8",
                    },
                    {
                        internalType: "uint16",
                        name: "chain",
                        type: "uint16",
                    },
                    {
                        internalType: "address",
                        name: "newContract",
                        type: "address",
                    },
                ],
                internalType: "struct PythStructs.UpgradeContract",
                name: "cu",
                type: "tuple",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes",
                name: "encodedPriceAttestation",
                type: "bytes",
            },
        ],
        name: "parsePriceAttestation",
        outputs: [
            {
                components: [
                    {
                        internalType: "uint32",
                        name: "magic",
                        type: "uint32",
                    },
                    {
                        internalType: "uint16",
                        name: "version",
                        type: "uint16",
                    },
                    {
                        internalType: "uint8",
                        name: "payloadId",
                        type: "uint8",
                    },
                    {
                        internalType: "bytes32",
                        name: "productId",
                        type: "bytes32",
                    },
                    {
                        internalType: "bytes32",
                        name: "priceId",
                        type: "bytes32",
                    },
                    {
                        internalType: "uint8",
                        name: "priceType",
                        type: "uint8",
                    },
                    {
                        internalType: "int64",
                        name: "price",
                        type: "int64",
                    },
                    {
                        internalType: "int32",
                        name: "exponent",
                        type: "int32",
                    },
                    {
                        components: [
                            {
                                internalType: "int64",
                                name: "value",
                                type: "int64",
                            },
                            {
                                internalType: "int64",
                                name: "numerator",
                                type: "int64",
                            },
                            {
                                internalType: "int64",
                                name: "denominator",
                                type: "int64",
                            },
                        ],
                        internalType: "struct PythStructs.Ema",
                        name: "twap",
                        type: "tuple",
                    },
                    {
                        components: [
                            {
                                internalType: "int64",
                                name: "value",
                                type: "int64",
                            },
                            {
                                internalType: "int64",
                                name: "numerator",
                                type: "int64",
                            },
                            {
                                internalType: "int64",
                                name: "denominator",
                                type: "int64",
                            },
                        ],
                        internalType: "struct PythStructs.Ema",
                        name: "twac",
                        type: "tuple",
                    },
                    {
                        internalType: "uint64",
                        name: "confidenceInterval",
                        type: "uint64",
                    },
                    {
                        internalType: "uint8",
                        name: "status",
                        type: "uint8",
                    },
                    {
                        internalType: "uint8",
                        name: "corpAct",
                        type: "uint8",
                    },
                    {
                        internalType: "uint64",
                        name: "timestamp",
                        type: "uint64",
                    },
                ],
                internalType: "struct PythStructs.PriceAttestation",
                name: "pa",
                type: "tuple",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [],
        name: "pyth2WormholeChainId",
        outputs: [
            {
                internalType: "uint16",
                name: "",
                type: "uint16",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "pyth2WormholeEmitter",
        outputs: [
            {
                internalType: "bytes32",
                name: "",
                type: "bytes32",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes",
                name: "encodedVM",
                type: "bytes",
            },
        ],
        name: "upgrade",
        outputs: [],
        stateMutability: "nonpayable",
        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 Structs.Signature[]",
                        name: "signatures",
                        type: "tuple[]",
                    },
                    {
                        internalType: "bytes32",
                        name: "hash",
                        type: "bytes32",
                    },
                ],
                internalType: "struct Structs.VM",
                name: "vm",
                type: "tuple",
            },
        ],
        name: "verifyPythVM",
        outputs: [
            {
                internalType: "bool",
                name: "valid",
                type: "bool",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "wormhole",
        outputs: [
            {
                internalType: "contract IWormhole",
                name: "",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
];
var _bytecode = " ";
var PythImplementation__factory = /** @class */ (function (_super) {
    __extends(PythImplementation__factory, _super);
    function PythImplementation__factory(signer) {
        return _super.call(this, _abi, _bytecode, signer) || this;
    }
    PythImplementation__factory.prototype.deploy = function (overrides) {
        return _super.prototype.deploy.call(this, overrides || {});
    };
    PythImplementation__factory.prototype.getDeployTransaction = function (overrides) {
        return _super.prototype.getDeployTransaction.call(this, overrides || {});
    };
    PythImplementation__factory.prototype.attach = function (address) {
        return _super.prototype.attach.call(this, address);
    };
    PythImplementation__factory.prototype.connect = function (signer) {
        return _super.prototype.connect.call(this, signer);
    };
    PythImplementation__factory.createInterface = function () {
        return new ethers_1.utils.Interface(_abi);
    };
    PythImplementation__factory.connect = function (address, signerOrProvider) {
        return new ethers_1.Contract(address, _abi, signerOrProvider);
    };
    PythImplementation__factory.bytecode = _bytecode;
    PythImplementation__factory.abi = _abi;
    return PythImplementation__factory;
}(ethers_1.ContractFactory));
exports.PythImplementation__factory = PythImplementation__factory;
