"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 __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.VendingMachine__factory = void 0;
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
var ethers_1 = require("ethers");
var _abi = [
    {
        inputs: [
            {
                internalType: "contract IERC20",
                name: "_wrappedToken",
                type: "address",
            },
            {
                internalType: "contract T",
                name: "_tToken",
                type: "address",
            },
            {
                internalType: "uint96",
                name: "_wrappedTokenAllocation",
                type: "uint96",
            },
            {
                internalType: "uint96",
                name: "_tTokenAllocation",
                type: "uint96",
            },
        ],
        stateMutability: "nonpayable",
        type: "constructor",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "address",
                name: "recipient",
                type: "address",
            },
            {
                indexed: false,
                internalType: "uint256",
                name: "tTokenAmount",
                type: "uint256",
            },
            {
                indexed: false,
                internalType: "uint256",
                name: "wrappedTokenAmount",
                type: "uint256",
            },
        ],
        name: "Unwrapped",
        type: "event",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "address",
                name: "recipient",
                type: "address",
            },
            {
                indexed: false,
                internalType: "uint256",
                name: "wrappedTokenAmount",
                type: "uint256",
            },
            {
                indexed: false,
                internalType: "uint256",
                name: "tTokenAmount",
                type: "uint256",
            },
        ],
        name: "Wrapped",
        type: "event",
    },
    {
        inputs: [],
        name: "FLOATING_POINT_DIVISOR",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "WRAPPED_TOKEN_CONVERSION_PRECISION",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "amount",
                type: "uint256",
            },
        ],
        name: "conversionFromT",
        outputs: [
            {
                internalType: "uint256",
                name: "wrappedAmount",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "tRemainder",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "amount",
                type: "uint256",
            },
        ],
        name: "conversionToT",
        outputs: [
            {
                internalType: "uint256",
                name: "tAmount",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "wrappedRemainder",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "ratio",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "from",
                type: "address",
            },
            {
                internalType: "uint256",
                name: "amount",
                type: "uint256",
            },
            {
                internalType: "address",
                name: "token",
                type: "address",
            },
            {
                internalType: "bytes",
                name: "",
                type: "bytes",
            },
        ],
        name: "receiveApproval",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [],
        name: "tToken",
        outputs: [
            {
                internalType: "contract T",
                name: "",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "amount",
                type: "uint256",
            },
        ],
        name: "unwrap",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "amount",
                type: "uint256",
            },
        ],
        name: "wrap",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "",
                type: "address",
            },
        ],
        name: "wrappedBalance",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "wrappedToken",
        outputs: [
            {
                internalType: "contract IERC20",
                name: "",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
];
var _bytecode = " ";
var isSuperArgs = function (xs) { return xs.length > 1; };
var VendingMachine__factory = /** @class */ (function (_super) {
    __extends(VendingMachine__factory, _super);
    function VendingMachine__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, args) || this;
        }
        else {
            _this = _super.call(this, _abi, _bytecode, args[0]) || this;
        }
        return _this;
    }
    VendingMachine__factory.prototype.deploy = function (_wrappedToken, _tToken, _wrappedTokenAllocation, _tTokenAllocation, overrides) {
        return _super.prototype.deploy.call(this, _wrappedToken, _tToken, _wrappedTokenAllocation, _tTokenAllocation, overrides || {});
    };
    VendingMachine__factory.prototype.getDeployTransaction = function (_wrappedToken, _tToken, _wrappedTokenAllocation, _tTokenAllocation, overrides) {
        return _super.prototype.getDeployTransaction.call(this, _wrappedToken, _tToken, _wrappedTokenAllocation, _tTokenAllocation, overrides || {});
    };
    VendingMachine__factory.prototype.attach = function (address) {
        return _super.prototype.attach.call(this, address);
    };
    VendingMachine__factory.prototype.connect = function (signer) {
        return _super.prototype.connect.call(this, signer);
    };
    VendingMachine__factory.createInterface = function () {
        return new ethers_1.utils.Interface(_abi);
    };
    VendingMachine__factory.connect = function (address, signerOrProvider) {
        return new ethers_1.Contract(address, _abi, signerOrProvider);
    };
    VendingMachine__factory.bytecode = _bytecode;
    VendingMachine__factory.abi = _abi;
    return VendingMachine__factory;
}(ethers_1.ContractFactory));
exports.VendingMachine__factory = VendingMachine__factory;
