UNPKG

@astonic-io/astonic-router-ts

Version:
230 lines (229 loc) 6.81 kB
"use strict"; /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ Object.defineProperty(exports, "__esModule", { value: true }); exports.IAstonicRouter__factory = void 0; var ethers_1 = require("ethers"); var _abi = [ { type: "function", name: "drain", inputs: [ { name: "asset", type: "address", internalType: "address", }, ], outputs: [], stateMutability: "nonpayable", }, { type: "function", name: "getAmountIn", inputs: [ { name: "amountOut", type: "uint256", internalType: "uint256", }, { name: "path", type: "tuple[]", internalType: "struct IAstonicRouter.Step[]", components: [ { name: "exchangeProvider", type: "address", internalType: "address", }, { name: "exchangeId", type: "bytes32", internalType: "bytes32", }, { name: "assetIn", type: "address", internalType: "address", }, { name: "assetOut", type: "address", internalType: "address", }, ], }, ], outputs: [ { name: "amountIn", type: "uint256", internalType: "uint256", }, ], stateMutability: "view", }, { type: "function", name: "getAmountOut", inputs: [ { name: "amountIn", type: "uint256", internalType: "uint256", }, { name: "path", type: "tuple[]", internalType: "struct IAstonicRouter.Step[]", components: [ { name: "exchangeProvider", type: "address", internalType: "address", }, { name: "exchangeId", type: "bytes32", internalType: "bytes32", }, { name: "assetIn", type: "address", internalType: "address", }, { name: "assetOut", type: "address", internalType: "address", }, ], }, ], outputs: [ { name: "amountOut", type: "uint256", internalType: "uint256", }, ], stateMutability: "view", }, { type: "function", name: "swapExactTokensForTokens", inputs: [ { name: "amountIn", type: "uint256", internalType: "uint256", }, { name: "amountOutMin", type: "uint256", internalType: "uint256", }, { name: "path", type: "tuple[]", internalType: "struct IAstonicRouter.Step[]", components: [ { name: "exchangeProvider", type: "address", internalType: "address", }, { name: "exchangeId", type: "bytes32", internalType: "bytes32", }, { name: "assetIn", type: "address", internalType: "address", }, { name: "assetOut", type: "address", internalType: "address", }, ], }, ], outputs: [ { name: "amounts", type: "uint256[]", internalType: "uint256[]", }, ], stateMutability: "nonpayable", }, { type: "function", name: "swapTokensForExactTokens", inputs: [ { name: "amountOut", type: "uint256", internalType: "uint256", }, { name: "amountInMax", type: "uint256", internalType: "uint256", }, { name: "path", type: "tuple[]", internalType: "struct IAstonicRouter.Step[]", components: [ { name: "exchangeProvider", type: "address", internalType: "address", }, { name: "exchangeId", type: "bytes32", internalType: "bytes32", }, { name: "assetIn", type: "address", internalType: "address", }, { name: "assetOut", type: "address", internalType: "address", }, ], }, ], outputs: [ { name: "amounts", type: "uint256[]", internalType: "uint256[]", }, ], stateMutability: "nonpayable", }, ]; var IAstonicRouter__factory = /** @class */ (function () { function IAstonicRouter__factory() { } IAstonicRouter__factory.createInterface = function () { return new ethers_1.utils.Interface(_abi); }; IAstonicRouter__factory.connect = function (address, signerOrProvider) { return new ethers_1.Contract(address, _abi, signerOrProvider); }; IAstonicRouter__factory.abi = _abi; return IAstonicRouter__factory; }()); exports.IAstonicRouter__factory = IAstonicRouter__factory;