"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MockPyth__factory = void 0;
const ethers_1 = require("ethers");
const _abi = [
    {
        inputs: [
            {
                internalType: "uint256",
                name: "_validTimePeriod",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "_singleUpdateFeeInWei",
                type: "uint256",
            },
        ],
        stateMutability: "nonpayable",
        type: "constructor",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: "uint16",
                name: "chainId",
                type: "uint16",
            },
            {
                indexed: false,
                internalType: "uint64",
                name: "sequenceNumber",
                type: "uint64",
            },
            {
                indexed: false,
                internalType: "uint256",
                name: "batchSize",
                type: "uint256",
            },
            {
                indexed: false,
                internalType: "uint256",
                name: "freshPricesInBatch",
                type: "uint256",
            },
        ],
        name: "BatchPriceFeedUpdate",
        type: "event",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "bytes32",
                name: "id",
                type: "bytes32",
            },
            {
                indexed: true,
                internalType: "bool",
                name: "fresh",
                type: "bool",
            },
            {
                indexed: false,
                internalType: "uint16",
                name: "chainId",
                type: "uint16",
            },
            {
                indexed: false,
                internalType: "uint64",
                name: "sequenceNumber",
                type: "uint64",
            },
            {
                indexed: false,
                internalType: "uint256",
                name: "lastPublishTime",
                type: "uint256",
            },
            {
                indexed: false,
                internalType: "uint256",
                name: "publishTime",
                type: "uint256",
            },
            {
                indexed: false,
                internalType: "int64",
                name: "price",
                type: "int64",
            },
            {
                indexed: false,
                internalType: "uint64",
                name: "conf",
                type: "uint64",
            },
        ],
        name: "PriceFeedUpdate",
        type: "event",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "address",
                name: "sender",
                type: "address",
            },
            {
                indexed: false,
                internalType: "uint256",
                name: "batchCount",
                type: "uint256",
            },
            {
                indexed: false,
                internalType: "uint256",
                name: "fee",
                type: "uint256",
            },
        ],
        name: "UpdatePriceFeeds",
        type: "event",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "id",
                type: "bytes32",
            },
            {
                internalType: "int64",
                name: "price",
                type: "int64",
            },
            {
                internalType: "uint64",
                name: "conf",
                type: "uint64",
            },
            {
                internalType: "int32",
                name: "expo",
                type: "int32",
            },
            {
                internalType: "int64",
                name: "emaPrice",
                type: "int64",
            },
            {
                internalType: "uint64",
                name: "emaConf",
                type: "uint64",
            },
            {
                internalType: "uint64",
                name: "publishTime",
                type: "uint64",
            },
        ],
        name: "createPriceFeedUpdateData",
        outputs: [
            {
                internalType: "bytes",
                name: "priceFeedData",
                type: "bytes",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "id",
                type: "bytes32",
            },
        ],
        name: "getEmaPrice",
        outputs: [
            {
                components: [
                    {
                        internalType: "int64",
                        name: "price",
                        type: "int64",
                    },
                    {
                        internalType: "uint64",
                        name: "conf",
                        type: "uint64",
                    },
                    {
                        internalType: "int32",
                        name: "expo",
                        type: "int32",
                    },
                    {
                        internalType: "uint256",
                        name: "publishTime",
                        type: "uint256",
                    },
                ],
                internalType: "struct PythStructs.Price",
                name: "price",
                type: "tuple",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "id",
                type: "bytes32",
            },
            {
                internalType: "uint256",
                name: "age",
                type: "uint256",
            },
        ],
        name: "getEmaPriceNoOlderThan",
        outputs: [
            {
                components: [
                    {
                        internalType: "int64",
                        name: "price",
                        type: "int64",
                    },
                    {
                        internalType: "uint64",
                        name: "conf",
                        type: "uint64",
                    },
                    {
                        internalType: "int32",
                        name: "expo",
                        type: "int32",
                    },
                    {
                        internalType: "uint256",
                        name: "publishTime",
                        type: "uint256",
                    },
                ],
                internalType: "struct PythStructs.Price",
                name: "price",
                type: "tuple",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "id",
                type: "bytes32",
            },
        ],
        name: "getEmaPriceUnsafe",
        outputs: [
            {
                components: [
                    {
                        internalType: "int64",
                        name: "price",
                        type: "int64",
                    },
                    {
                        internalType: "uint64",
                        name: "conf",
                        type: "uint64",
                    },
                    {
                        internalType: "int32",
                        name: "expo",
                        type: "int32",
                    },
                    {
                        internalType: "uint256",
                        name: "publishTime",
                        type: "uint256",
                    },
                ],
                internalType: "struct PythStructs.Price",
                name: "price",
                type: "tuple",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "id",
                type: "bytes32",
            },
        ],
        name: "getPrice",
        outputs: [
            {
                components: [
                    {
                        internalType: "int64",
                        name: "price",
                        type: "int64",
                    },
                    {
                        internalType: "uint64",
                        name: "conf",
                        type: "uint64",
                    },
                    {
                        internalType: "int32",
                        name: "expo",
                        type: "int32",
                    },
                    {
                        internalType: "uint256",
                        name: "publishTime",
                        type: "uint256",
                    },
                ],
                internalType: "struct PythStructs.Price",
                name: "price",
                type: "tuple",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "id",
                type: "bytes32",
            },
            {
                internalType: "uint256",
                name: "age",
                type: "uint256",
            },
        ],
        name: "getPriceNoOlderThan",
        outputs: [
            {
                components: [
                    {
                        internalType: "int64",
                        name: "price",
                        type: "int64",
                    },
                    {
                        internalType: "uint64",
                        name: "conf",
                        type: "uint64",
                    },
                    {
                        internalType: "int32",
                        name: "expo",
                        type: "int32",
                    },
                    {
                        internalType: "uint256",
                        name: "publishTime",
                        type: "uint256",
                    },
                ],
                internalType: "struct PythStructs.Price",
                name: "price",
                type: "tuple",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "id",
                type: "bytes32",
            },
        ],
        name: "getPriceUnsafe",
        outputs: [
            {
                components: [
                    {
                        internalType: "int64",
                        name: "price",
                        type: "int64",
                    },
                    {
                        internalType: "uint64",
                        name: "conf",
                        type: "uint64",
                    },
                    {
                        internalType: "int32",
                        name: "expo",
                        type: "int32",
                    },
                    {
                        internalType: "uint256",
                        name: "publishTime",
                        type: "uint256",
                    },
                ],
                internalType: "struct PythStructs.Price",
                name: "price",
                type: "tuple",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "updateDataSize",
                type: "uint256",
            },
        ],
        name: "getUpdateFee",
        outputs: [
            {
                internalType: "uint256",
                name: "feeAmount",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "getValidTimePeriod",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "id",
                type: "bytes32",
            },
        ],
        name: "priceFeedExists",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "id",
                type: "bytes32",
            },
        ],
        name: "queryPriceFeed",
        outputs: [
            {
                components: [
                    {
                        internalType: "bytes32",
                        name: "id",
                        type: "bytes32",
                    },
                    {
                        components: [
                            {
                                internalType: "int64",
                                name: "price",
                                type: "int64",
                            },
                            {
                                internalType: "uint64",
                                name: "conf",
                                type: "uint64",
                            },
                            {
                                internalType: "int32",
                                name: "expo",
                                type: "int32",
                            },
                            {
                                internalType: "uint256",
                                name: "publishTime",
                                type: "uint256",
                            },
                        ],
                        internalType: "struct PythStructs.Price",
                        name: "price",
                        type: "tuple",
                    },
                    {
                        components: [
                            {
                                internalType: "int64",
                                name: "price",
                                type: "int64",
                            },
                            {
                                internalType: "uint64",
                                name: "conf",
                                type: "uint64",
                            },
                            {
                                internalType: "int32",
                                name: "expo",
                                type: "int32",
                            },
                            {
                                internalType: "uint256",
                                name: "publishTime",
                                type: "uint256",
                            },
                        ],
                        internalType: "struct PythStructs.Price",
                        name: "emaPrice",
                        type: "tuple",
                    },
                ],
                internalType: "struct PythStructs.PriceFeed",
                name: "priceFeed",
                type: "tuple",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes[]",
                name: "updateData",
                type: "bytes[]",
            },
        ],
        name: "updatePriceFeeds",
        outputs: [],
        stateMutability: "payable",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "bytes32",
                        name: "id",
                        type: "bytes32",
                    },
                    {
                        components: [
                            {
                                internalType: "int64",
                                name: "price",
                                type: "int64",
                            },
                            {
                                internalType: "uint64",
                                name: "conf",
                                type: "uint64",
                            },
                            {
                                internalType: "int32",
                                name: "expo",
                                type: "int32",
                            },
                            {
                                internalType: "uint256",
                                name: "publishTime",
                                type: "uint256",
                            },
                        ],
                        internalType: "struct PythStructs.Price",
                        name: "price",
                        type: "tuple",
                    },
                    {
                        components: [
                            {
                                internalType: "int64",
                                name: "price",
                                type: "int64",
                            },
                            {
                                internalType: "uint64",
                                name: "conf",
                                type: "uint64",
                            },
                            {
                                internalType: "int32",
                                name: "expo",
                                type: "int32",
                            },
                            {
                                internalType: "uint256",
                                name: "publishTime",
                                type: "uint256",
                            },
                        ],
                        internalType: "struct PythStructs.Price",
                        name: "emaPrice",
                        type: "tuple",
                    },
                ],
                internalType: "struct PythStructs.PriceFeed[]",
                name: "feeds",
                type: "tuple[]",
            },
        ],
        name: "updatePriceFeedsHarness",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes[]",
                name: "updateData",
                type: "bytes[]",
            },
            {
                internalType: "bytes32[]",
                name: "priceIds",
                type: "bytes32[]",
            },
            {
                internalType: "uint64[]",
                name: "publishTimes",
                type: "uint64[]",
            },
        ],
        name: "updatePriceFeedsIfNecessary",
        outputs: [],
        stateMutability: "payable",
        type: "function",
    },
];
const _bytecode = " ";
const isSuperArgs = (xs) => xs.length > 1;
class MockPyth__factory extends ethers_1.ContractFactory {
    constructor(...args) {
        if (isSuperArgs(args)) {
            super(...args);
        }
        else {
            super(_abi, _bytecode, args[0]);
        }
    }
    deploy(_validTimePeriod, _singleUpdateFeeInWei, overrides) {
        return super.deploy(_validTimePeriod, _singleUpdateFeeInWei, overrides || {});
    }
    getDeployTransaction(_validTimePeriod, _singleUpdateFeeInWei, overrides) {
        return super.getDeployTransaction(_validTimePeriod, _singleUpdateFeeInWei, 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.MockPyth__factory = MockPyth__factory;
MockPyth__factory.bytecode = _bytecode;
MockPyth__factory.abi = _abi;
//# sourceMappingURL=MockPyth__factory.js.map