"use strict";
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 __());
    };
})();
var __read = (this && this.__read) || function (o, n) {
    var m = typeof Symbol === "function" && o[Symbol.iterator];
    if (!m) return o;
    var i = m.call(o), r, ar = [], e;
    try {
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
    }
    catch (error) { e = { error: error }; }
    finally {
        try {
            if (r && !r.done && (m = i["return"])) m.call(i);
        }
        finally { if (e) throw e.error; }
    }
    return ar;
};
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
        if (ar || !(i in from)) {
            if (!ar) ar = Array.prototype.slice.call(from, 0, i);
            ar[i] = from[i];
        }
    }
    return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.StargateStrategy__factory = void 0;
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
var ethers_1 = require("ethers");
var _abi = [
    {
        inputs: [
            {
                internalType: "address",
                name: "_vault",
                type: "address",
            },
            {
                internalType: "address",
                name: "_stargatePool",
                type: "address",
            },
            {
                internalType: "address",
                name: "_stargateRouter",
                type: "address",
            },
            {
                internalType: "uint16",
                name: "_pId",
                type: "uint16",
            },
            {
                components: [
                    {
                        internalType: "address",
                        name: "farm",
                        type: "address",
                    },
                    {
                        internalType: "uint16",
                        name: "farmId",
                        type: "uint16",
                    },
                    {
                        internalType: "address",
                        name: "router",
                        type: "address",
                    },
                    {
                        internalType: "address",
                        name: "farmToken",
                        type: "address",
                    },
                ],
                internalType: "struct FarmConfig",
                name: "_farmConfig",
                type: "tuple",
            },
        ],
        stateMutability: "nonpayable",
        type: "constructor",
    },
    {
        inputs: [],
        name: "InvalidPathData",
        type: "error",
    },
    {
        inputs: [],
        name: "MaxTvlReached",
        type: "error",
    },
    {
        inputs: [],
        name: "MinLiquidity",
        type: "error",
    },
    {
        inputs: [],
        name: "NotImplemented",
        type: "error",
    },
    {
        inputs: [],
        name: "OnlyVault",
        type: "error",
    },
    {
        inputs: [],
        name: "StrategyHasBalance",
        type: "error",
    },
    {
        inputs: [],
        name: "ZeroAmount",
        type: "error",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "address",
                name: "target",
                type: "address",
            },
            {
                indexed: false,
                internalType: "bytes",
                name: "data",
                type: "bytes",
            },
        ],
        name: "EmergencyAction",
        type: "event",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: "address",
                name: "token",
                type: "address",
            },
            {
                indexed: false,
                internalType: "uint256",
                name: "amount",
                type: "uint256",
            },
            {
                indexed: false,
                internalType: "uint256",
                name: "amountUnderlying",
                type: "uint256",
            },
        ],
        name: "HarvestedToken",
        type: "event",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        name: "closePosition",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [],
        name: "collateralToUnderlying",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "amount",
                type: "uint256",
            },
        ],
        name: "deposit",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "address",
                        name: "target",
                        type: "address",
                    },
                    {
                        internalType: "uint256",
                        name: "value",
                        type: "uint256",
                    },
                    {
                        internalType: "bytes",
                        name: "data",
                        type: "bytes",
                    },
                ],
                internalType: "struct EAction[]",
                name: "actions",
                type: "tuple[]",
            },
        ],
        name: "emergencyAction",
        outputs: [],
        stateMutability: "payable",
        type: "function",
    },
    {
        inputs: [],
        name: "farm",
        outputs: [
            {
                internalType: "contract IStarchef",
                name: "",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "farmId",
        outputs: [
            {
                internalType: "uint16",
                name: "",
                type: "uint16",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "farmRouter",
        outputs: [
            {
                internalType: "contract ISwapRouter",
                name: "",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "farmToken",
        outputs: [
            {
                internalType: "contract IERC20",
                name: "",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "getAndUpdateTvl",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "uAmnt",
                type: "uint256",
            },
        ],
        name: "getDepositAmnt",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "getLpBalance",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "getLpToken",
        outputs: [
            {
                internalType: "address",
                name: "",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "getMaxTvl",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "getTvl",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "lpTokens",
                type: "uint256",
            },
        ],
        name: "getWithdrawAmnt",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "address[]",
                        name: "path",
                        type: "address[]",
                    },
                    {
                        internalType: "uint256",
                        name: "min",
                        type: "uint256",
                    },
                    {
                        internalType: "uint256",
                        name: "deadline",
                        type: "uint256",
                    },
                    {
                        internalType: "bytes",
                        name: "pathData",
                        type: "bytes",
                    },
                ],
                internalType: "struct HarvestSwapParams[]",
                name: "params",
                type: "tuple[]",
            },
            {
                components: [
                    {
                        internalType: "address[]",
                        name: "path",
                        type: "address[]",
                    },
                    {
                        internalType: "uint256",
                        name: "min",
                        type: "uint256",
                    },
                    {
                        internalType: "uint256",
                        name: "deadline",
                        type: "uint256",
                    },
                    {
                        internalType: "bytes",
                        name: "pathData",
                        type: "bytes",
                    },
                ],
                internalType: "struct HarvestSwapParams[]",
                name: "",
                type: "tuple[]",
            },
        ],
        name: "harvest",
        outputs: [
            {
                internalType: "uint256[]",
                name: "harvested",
                type: "uint256[]",
            },
            {
                internalType: "uint256[]",
                name: "",
                type: "uint256[]",
            },
        ],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [],
        name: "recieve",
        outputs: [],
        stateMutability: "payable",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "recipient",
                type: "address",
            },
            {
                internalType: "uint256",
                name: "amount",
                type: "uint256",
            },
        ],
        name: "redeem",
        outputs: [
            {
                internalType: "uint256",
                name: "amountOut",
                type: "uint256",
            },
        ],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint16",
                name: "_dstChainId",
                type: "uint16",
            },
            {
                internalType: "uint256",
                name: "_srcPoolId",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "_dstPoolId",
                type: "uint256",
            },
            {
                internalType: "address payable",
                name: "_refundAddress",
                type: "address",
            },
            {
                internalType: "uint256",
                name: "_amountLP",
                type: "uint256",
            },
            {
                internalType: "bytes",
                name: "_to",
                type: "bytes",
            },
            {
                components: [
                    {
                        internalType: "uint256",
                        name: "dstGasForCall",
                        type: "uint256",
                    },
                    {
                        internalType: "uint256",
                        name: "dstNativeAmount",
                        type: "uint256",
                    },
                    {
                        internalType: "bytes",
                        name: "dstNativeAddr",
                        type: "bytes",
                    },
                ],
                internalType: "struct lzTxObj",
                name: "_lzTxParams",
                type: "tuple",
            },
        ],
        name: "redeemLocal",
        outputs: [],
        stateMutability: "payable",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint16",
                name: "_dstChainId",
                type: "uint16",
            },
            {
                internalType: "uint256",
                name: "_srcPoolId",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "_dstPoolId",
                type: "uint256",
            },
            {
                internalType: "address payable",
                name: "_refundAddress",
                type: "address",
            },
            {
                internalType: "uint256",
                name: "_amountLP",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "_minAmountLD",
                type: "uint256",
            },
            {
                internalType: "bytes",
                name: "_to",
                type: "bytes",
            },
            {
                components: [
                    {
                        internalType: "uint256",
                        name: "dstGasForCall",
                        type: "uint256",
                    },
                    {
                        internalType: "uint256",
                        name: "dstNativeAmount",
                        type: "uint256",
                    },
                    {
                        internalType: "bytes",
                        name: "dstNativeAddr",
                        type: "bytes",
                    },
                ],
                internalType: "struct lzTxObj",
                name: "_lzTxParams",
                type: "tuple",
            },
        ],
        name: "redeemRemote",
        outputs: [],
        stateMutability: "payable",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint16",
                name: "_dstChainId",
                type: "uint16",
            },
            {
                internalType: "uint256",
                name: "_srcPoolId",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "_dstPoolId",
                type: "uint256",
            },
            {
                internalType: "address payable",
                name: "_refundAddress",
                type: "address",
            },
        ],
        name: "sendCredits",
        outputs: [],
        stateMutability: "payable",
        type: "function",
    },
    {
        inputs: [],
        name: "stargatePool",
        outputs: [
            {
                internalType: "contract IStargatePool",
                name: "",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "stargateRouter",
        outputs: [
            {
                internalType: "contract IStargateRouter",
                name: "",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "underlying",
        outputs: [
            {
                internalType: "contract IERC20",
                name: "",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "vault",
        outputs: [
            {
                internalType: "address",
                name: "",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
];
var _bytecode = " ";
var isSuperArgs = function (xs) { return xs.length > 1; };
var StargateStrategy__factory = /** @class */ (function (_super) {
    __extends(StargateStrategy__factory, _super);
    function StargateStrategy__factory() {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        var _this = this;
        if (isSuperArgs(args)) {
            _this = _super.apply(this, __spreadArray([], __read(args), false)) || this;
        }
        else {
            _this = _super.call(this, _abi, _bytecode, args[0]) || this;
        }
        return _this;
    }
    StargateStrategy__factory.prototype.deploy = function (_vault, _stargatePool, _stargateRouter, _pId, _farmConfig, overrides) {
        return _super.prototype.deploy.call(this, _vault, _stargatePool, _stargateRouter, _pId, _farmConfig, overrides || {});
    };
    StargateStrategy__factory.prototype.getDeployTransaction = function (_vault, _stargatePool, _stargateRouter, _pId, _farmConfig, overrides) {
        return _super.prototype.getDeployTransaction.call(this, _vault, _stargatePool, _stargateRouter, _pId, _farmConfig, overrides || {});
    };
    StargateStrategy__factory.prototype.attach = function (address) {
        return _super.prototype.attach.call(this, address);
    };
    StargateStrategy__factory.prototype.connect = function (signer) {
        return _super.prototype.connect.call(this, signer);
    };
    StargateStrategy__factory.createInterface = function () {
        return new ethers_1.utils.Interface(_abi);
    };
    StargateStrategy__factory.connect = function (address, signerOrProvider) {
        return new ethers_1.Contract(address, _abi, signerOrProvider);
    };
    StargateStrategy__factory.bytecode = _bytecode;
    StargateStrategy__factory.abi = _abi;
    return StargateStrategy__factory;
}(ethers_1.ContractFactory));
exports.StargateStrategy__factory = StargateStrategy__factory;
//# sourceMappingURL=StargateStrategy__factory.js.map