@curvefi/api 1.25.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +797 -590
- package/docs/v1/README.md +916 -0
- package/lib/boosting.d.ts +12 -12
- package/lib/boosting.js +23 -23
- package/lib/constants/abis/{json/2pool → 2pool}/swap.json +0 -0
- package/lib/constants/abis/{json/3pool → 3pool}/swap.json +0 -0
- package/lib/constants/abis/{json/4pool → 4pool}/swap.json +0 -0
- package/lib/constants/abis/{json/ERC20.json → ERC20.json} +0 -0
- package/lib/constants/abis/{json/aave → aave}/rewards.json +0 -0
- package/lib/constants/abis/{json/aave → aave}/swap.json +0 -0
- package/lib/constants/abis/{json/address_provider.json → address_provider.json} +0 -0
- package/lib/constants/abis/{json/ankreth → ankreth}/sCurveRewards.json +0 -0
- package/lib/constants/abis/{json/ankreth → ankreth}/swap.json +0 -0
- package/lib/constants/abis/{json/atricrypto3 → atricrypto3}/swap.json +0 -0
- package/lib/constants/abis/{json/atricrypto3 → atricrypto3}/zap.json +0 -0
- package/lib/constants/abis/{json/bbtc → bbtc}/deposit.json +0 -0
- package/lib/constants/abis/{json/bbtc → bbtc}/swap.json +0 -0
- package/lib/constants/abis/{json/busd → busd}/deposit.json +0 -0
- package/lib/constants/abis/{json/busd → busd}/swap.json +0 -0
- package/lib/constants/abis/{json/cERC20.json → cERC20.json} +0 -0
- package/lib/constants/abis/{json/compound → compound}/deposit.json +0 -0
- package/lib/constants/abis/{json/compound → compound}/swap.json +0 -0
- package/lib/constants/abis/{json/crveth → crveth}/swap.json +0 -0
- package/lib/constants/abis/{json/deposit_and_stake.json → deposit_and_stake.json} +0 -0
- package/lib/constants/abis/{json/dusd → dusd}/deposit.json +0 -0
- package/lib/constants/abis/{json/dusd → dusd}/sCurveRewards.json +0 -0
- package/lib/constants/abis/{json/dusd → dusd}/swap.json +0 -0
- package/lib/constants/abis/{json/eurs → eurs}/sCurveRewards.json +0 -0
- package/lib/constants/abis/{json/eurs → eurs}/swap.json +0 -0
- package/lib/constants/abis/{json/eursusd → eursusd}/swap.json +0 -0
- package/lib/constants/abis/{json/eurt → eurt}/swap.json +0 -0
- package/lib/constants/abis/{json/eurtusd → eurtusd}/deposit.json +0 -0
- package/lib/constants/abis/{json/eurtusd → eurtusd}/swap.json +0 -0
- package/lib/constants/abis/{json/factory-crypto → factory-crypto}/factory-crypto-pool-2.json +0 -0
- package/lib/constants/abis/{json/factory-crypto.json → factory-crypto.json} +0 -0
- package/lib/constants/abis/{json/factory-v2 → factory-v2}/DepositZapMetaBtcPolygon.json +0 -0
- package/lib/constants/abis/{json/factory-v2 → factory-v2}/DepositZapMetaUsdPolygon.json +0 -0
- package/lib/constants/abis/{json/factory-v2 → factory-v2}/MetaBTC.json +0 -0
- package/lib/constants/abis/{json/factory-v2 → factory-v2}/MetaBTCBalances.json +0 -0
- package/lib/constants/abis/{json/factory-v2 → factory-v2}/MetaBTCBalancesRen.json +0 -0
- package/lib/constants/abis/{json/factory-v2 → factory-v2}/MetaBTCRen.json +0 -0
- package/lib/constants/abis/{json/factory-v2 → factory-v2}/MetaUSD.json +0 -0
- package/lib/constants/abis/{json/factory-v2 → factory-v2}/MetaUSDBalances.json +0 -0
- package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain2Balances.json +0 -0
- package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain2Basic.json +0 -0
- package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain2ETH.json +0 -0
- package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain2Optimized.json +0 -0
- package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain3Balances.json +0 -0
- package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain3Basic.json +0 -0
- package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain3ETH.json +0 -0
- package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain3Optimized.json +0 -0
- package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain4Balances.json +0 -0
- package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain4Basic.json +0 -0
- package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain4ETH.json +0 -0
- package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain4Optimized.json +0 -0
- package/lib/constants/abis/{json/factory.json → factory.json} +0 -0
- package/lib/constants/abis/{json/factoryPools → factoryPools}/deposit.json +0 -0
- package/lib/constants/abis/{json/factoryPools → factoryPools}/rewards.json +0 -0
- package/lib/constants/abis/{json/factoryPools → factoryPools}/swap.json +0 -0
- package/lib/constants/abis/{json/gauge.json → gauge.json} +0 -0
- package/lib/constants/abis/{json/gauge_factory.json → gauge_factory.json} +0 -0
- package/lib/constants/abis/{json/gauge_rewards_only.json → gauge_rewards_only.json} +0 -0
- package/lib/constants/abis/{json/gauge_synthetix.json → gauge_synthetix.json} +0 -0
- package/lib/constants/abis/{json/gauge_v2.json → gauge_v2.json} +0 -0
- package/lib/constants/abis/{json/gauge_v3.json → gauge_v3.json} +0 -0
- package/lib/constants/abis/{json/gauge_v4.json → gauge_v4.json} +0 -0
- package/lib/constants/abis/{json/gauge_v5.json → gauge_v5.json} +0 -0
- package/lib/constants/abis/{json/gaugecontroller.json → gaugecontroller.json} +0 -0
- package/lib/constants/abis/{json/gusd → gusd}/deposit.json +0 -0
- package/lib/constants/abis/{json/gusd → gusd}/swap.json +0 -0
- package/lib/constants/abis/{json/hbtc → hbtc}/swap.json +0 -0
- package/lib/constants/abis/{json/husd → husd}/deposit.json +0 -0
- package/lib/constants/abis/{json/husd → husd}/swap.json +0 -0
- package/lib/constants/abis/{json/ib → ib}/swap.json +0 -0
- package/lib/constants/abis/{json/iearn → iearn}/deposit.json +0 -0
- package/lib/constants/abis/{json/iearn → iearn}/sCurveRewards.json +0 -0
- package/lib/constants/abis/{json/iearn → iearn}/swap.json +0 -0
- package/lib/constants/abis/{json/link → link}/swap.json +0 -0
- package/lib/constants/abis/{json/minter.json → minter.json} +0 -0
- package/lib/constants/abis/{json/musd → musd}/deposit.json +0 -0
- package/lib/constants/abis/{json/musd → musd}/sCurveRewards.json +0 -0
- package/lib/constants/abis/{json/musd → musd}/swap.json +0 -0
- package/lib/constants/abis/{json/obtc → obtc}/deposit.json +0 -0
- package/lib/constants/abis/{json/obtc → obtc}/sCurveRewards.json +0 -0
- package/lib/constants/abis/{json/obtc → obtc}/swap.json +0 -0
- package/lib/constants/abis/{json/paave → paave}/rewards.json +0 -0
- package/lib/constants/abis/{json/pax → pax}/deposit.json +0 -0
- package/lib/constants/abis/{json/pax → pax}/swap.json +0 -0
- package/lib/constants/abis/{json/pbtc → pbtc}/deposit.json +0 -0
- package/lib/constants/abis/{json/pbtc → pbtc}/sCurveRewards.json +0 -0
- package/lib/constants/abis/{json/pbtc → pbtc}/swap.json +0 -0
- package/lib/constants/abis/{json/rai → rai}/deposit.json +0 -0
- package/lib/constants/abis/{json/rai → rai}/swap.json +0 -0
- package/lib/constants/abis/{json/registry_exchange.json → registry_exchange.json} +0 -0
- package/lib/constants/abis/{json/ren → ren}/swap.json +0 -0
- package/lib/constants/abis/{json/ren-polygon → ren-polygon}/swap.json +0 -0
- package/lib/constants/abis/{json/reth → reth}/swap.json +0 -0
- package/lib/constants/abis/{json/router.json → router.json} +0 -0
- package/lib/constants/abis/{json/rsv → rsv}/deposit.json +0 -0
- package/lib/constants/abis/{json/rsv → rsv}/sCurveRewards.json +0 -0
- package/lib/constants/abis/{json/rsv → rsv}/swap.json +0 -0
- package/lib/constants/abis/{json/saave → saave}/swap.json +0 -0
- package/lib/constants/abis/{json/sbtc → sbtc}/sCurveRewards.json +0 -0
- package/lib/constants/abis/{json/sbtc → sbtc}/swap.json +0 -0
- package/lib/constants/abis/{json/seth → seth}/swap.json +0 -0
- package/lib/constants/abis/{json/steth → steth}/sCurveRewards.json +0 -0
- package/lib/constants/abis/{json/steth → steth}/swap.json +0 -0
- package/lib/constants/abis/{json/streamer.json → streamer.json} +0 -0
- package/lib/constants/abis/{json/susdv2 → susdv2}/deposit.json +0 -0
- package/lib/constants/abis/{json/susdv2 → susdv2}/sCurveRewards.json +0 -0
- package/lib/constants/abis/{json/susdv2 → susdv2}/swap.json +0 -0
- package/lib/constants/abis/{json/tbtc → tbtc}/deposit.json +0 -0
- package/lib/constants/abis/{json/tbtc → tbtc}/sCurveRewards.json +0 -0
- package/lib/constants/abis/{json/tbtc → tbtc}/swap.json +0 -0
- package/lib/constants/abis/{json/tricrypto2 → tricrypto2}/deposit.json +0 -0
- package/lib/constants/abis/{json/tricrypto2 → tricrypto2}/swap.json +0 -0
- package/lib/constants/abis/{json/usdk → usdk}/deposit.json +0 -0
- package/lib/constants/abis/{json/usdk → usdk}/swap.json +0 -0
- package/lib/constants/abis/{json/usdn → usdn}/deposit.json +0 -0
- package/lib/constants/abis/{json/usdn → usdn}/swap.json +0 -0
- package/lib/constants/abis/{json/usdp → usdp}/deposit.json +0 -0
- package/lib/constants/abis/{json/usdp → usdp}/swap.json +0 -0
- package/lib/constants/abis/{json/usdt → usdt}/deposit.json +0 -0
- package/lib/constants/abis/{json/usdt → usdt}/swap.json +0 -0
- package/lib/constants/abis/{json/ust → ust}/deposit.json +0 -0
- package/lib/constants/abis/{json/ust → ust}/swap.json +0 -0
- package/lib/constants/abis/{json/votingescrow.json → votingescrow.json} +0 -0
- package/lib/constants/abis/{json/yERC20.json → yERC20.json} +0 -0
- package/lib/constants/aliases.d.ts +2 -24
- package/lib/constants/aliases.js +5 -4
- package/lib/constants/{coins-ethereum.d.ts → coins/ethereum.d.ts} +0 -9
- package/lib/constants/{coins-ethereum.js → coins/ethereum.js} +12 -23
- package/lib/constants/{coins-polygon.d.ts → coins/polygon.d.ts} +0 -12
- package/lib/constants/{coins-polygon.js → coins/polygon.js} +8 -20
- package/lib/constants/pools/ethereum.d.ts +2 -0
- package/lib/constants/{abis/abis-ethereum.js → pools/ethereum.js} +517 -1012
- package/lib/constants/pools/index.d.ts +3 -0
- package/lib/constants/pools/index.js +7 -0
- package/lib/constants/pools/polygon.d.ts +4 -0
- package/lib/constants/{abis/abis-polygon.js → pools/polygon.js} +53 -81
- package/lib/constants/utils.d.ts +5 -0
- package/lib/constants/utils.js +69 -0
- package/lib/curve.d.ts +10 -32
- package/lib/curve.js +188 -232
- package/lib/external-api.d.ts +3 -1
- package/lib/external-api.js +34 -1
- package/lib/factory/constants.d.ts +15 -15
- package/lib/factory/constants.js +19 -19
- package/lib/factory/factory-api.d.ts +2 -2
- package/lib/factory/factory-api.js +52 -45
- package/lib/factory/factory-crypto.d.ts +2 -2
- package/lib/factory/factory-crypto.js +23 -31
- package/lib/factory/factory.d.ts +2 -2
- package/lib/factory/factory.js +53 -66
- package/lib/index.d.ts +37 -53
- package/lib/index.js +28 -35
- package/lib/interfaces.d.ts +35 -72
- package/lib/pools/PoolTemplate.d.ts +212 -0
- package/lib/pools/PoolTemplate.js +2371 -0
- package/lib/pools/index.d.ts +3 -0
- package/lib/pools/index.js +7 -0
- package/lib/pools/mixins/common.d.ts +3 -0
- package/lib/pools/mixins/common.js +77 -0
- package/lib/pools/mixins/depositBalancedAmountsMixins.d.ts +5 -0
- package/lib/pools/mixins/depositBalancedAmountsMixins.js +145 -0
- package/lib/pools/mixins/depositBonusMixins.d.ts +5 -0
- package/lib/pools/mixins/depositBonusMixins.js +164 -0
- package/lib/pools/mixins/depositMixins.d.ts +5 -0
- package/lib/pools/mixins/depositMixins.js +373 -0
- package/lib/pools/mixins/depositWrappedMixins.d.ts +3 -0
- package/lib/pools/mixins/depositWrappedMixins.js +243 -0
- package/lib/pools/mixins/poolBalancesMixin.d.ts +4 -0
- package/lib/pools/mixins/poolBalancesMixin.js +129 -0
- package/lib/pools/mixins/swapMixins.d.ts +4 -0
- package/lib/pools/mixins/swapMixins.js +313 -0
- package/lib/pools/mixins/swapWrappedMixins.d.ts +4 -0
- package/lib/pools/mixins/swapWrappedMixins.js +297 -0
- package/lib/pools/mixins/withdrawExpectedMixins.d.ts +6 -0
- package/lib/pools/mixins/withdrawExpectedMixins.js +164 -0
- package/lib/pools/mixins/withdrawImbalanceMixins.d.ts +5 -0
- package/lib/pools/mixins/withdrawImbalanceMixins.js +348 -0
- package/lib/pools/mixins/withdrawImbalanceWrappedMixins.d.ts +3 -0
- package/lib/pools/mixins/withdrawImbalanceWrappedMixins.js +207 -0
- package/lib/pools/mixins/withdrawMixins.d.ts +5 -0
- package/lib/pools/mixins/withdrawMixins.js +347 -0
- package/lib/pools/mixins/withdrawOneCoinExpectedMixins.d.ts +5 -0
- package/lib/pools/mixins/withdrawOneCoinExpectedMixins.js +104 -0
- package/lib/pools/mixins/withdrawOneCoinMixins.d.ts +5 -0
- package/lib/pools/mixins/withdrawOneCoinMixins.js +347 -0
- package/lib/pools/mixins/withdrawOneCoinWrappedExpectedMixins.d.ts +3 -0
- package/lib/pools/mixins/withdrawOneCoinWrappedExpectedMixins.js +72 -0
- package/lib/pools/mixins/withdrawOneCoinWrappedMixins.d.ts +3 -0
- package/lib/pools/mixins/withdrawOneCoinWrappedMixins.js +205 -0
- package/lib/pools/mixins/withdrawWrappedMixins.d.ts +3 -0
- package/lib/pools/mixins/withdrawWrappedMixins.js +206 -0
- package/lib/pools/poolConstructor.d.ts +2 -0
- package/lib/pools/poolConstructor.js +228 -0
- package/lib/pools/utils.d.ts +4 -0
- package/lib/pools/utils.js +85 -0
- package/lib/router.d.ts +13 -0
- package/lib/router.js +651 -0
- package/lib/utils.d.ts +11 -16
- package/lib/utils.js +47 -130
- package/package.json +1 -1
- package/lib/constants/abis/abis-ethereum.d.ts +0 -4
- package/lib/constants/abis/abis-polygon.d.ts +0 -4
- package/lib/constants/abis/json/aRewards.json +0 -1
- package/lib/constants/abis/json/compound/migration.json +0 -57
- package/lib/constants/abis/json/compound/oldSwap.json +0 -688
- package/lib/constants/abis/json/ren/adapter.json +0 -1
- package/lib/constants/abis/json/sbtc/adapter.json +0 -1
- package/lib/pools.d.ts +0 -267
- package/lib/pools.js +0 -4742
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{ "inputs": [{ "internalType": "contract ICurveExchange", "name": "_exchange", "type": "address" }, { "internalType": "contract IGatewayRegistry", "name": "_registry", "type": "address" }, { "internalType": "contract IERC20", "name": "_wbtc", "type": "address" }], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "burnAmount", "type": "uint256" }], "name": "Burn", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "mintedAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "curveAmount", "type": "uint256" }], "name": "DepositMintedCurve", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "address", "name": "userAddress", "type": "address" }, { "indexed": false, "internalType": "address payable", "name": "relayerAddress", "type": "address" }, { "indexed": false, "internalType": "bytes", "name": "functionSignature", "type": "bytes" }], "name": "MetaTransactionExecuted", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "renAmount", "type": "uint256" }], "name": "ReceiveRen", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "mintedAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "wbtcAmount", "type": "uint256" }], "name": "SwapReceived", "type": "event" }, { "stateMutability": "payable", "type": "fallback" }, { "inputs": [], "name": "chi", "outputs": [{ "internalType": "contract IFreeFromUpTo", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "exchange", "outputs": [{ "internalType": "contract ICurveExchange", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "userAddress", "type": "address" }, { "internalType": "bytes", "name": "functionSignature", "type": "bytes" }, { "internalType": "string", "name": "message", "type": "string" }, { "internalType": "string", "name": "length", "type": "string" }, { "internalType": "bytes32", "name": "sigR", "type": "bytes32" }, { "internalType": "bytes32", "name": "sigS", "type": "bytes32" }, { "internalType": "uint8", "name": "sigV", "type": "uint8" }], "name": "executeMetaTransaction", "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "getChainID", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], "name": "getNonce", "outputs": [{ "internalType": "uint256", "name": "nonce", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address payable", "name": "_wbtcDestination", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "uint256[2]", "name": "_amounts", "type": "uint256[2]" }, { "internalType": "uint256", "name": "_min_mint_amount", "type": "uint256" }, { "internalType": "uint256", "name": "_new_min_mint_amount", "type": "uint256" }, { "internalType": "bytes32", "name": "_nHash", "type": "bytes32" }, { "internalType": "bytes", "name": "_sig", "type": "bytes" }], "name": "mintNoDeposit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_minExchangeRate", "type": "uint256" }, { "internalType": "uint256", "name": "_newMinExchangeRate", "type": "uint256" }, { "internalType": "uint256", "name": "_slippage", "type": "uint256" }, { "internalType": "address payable", "name": "_wbtcDestination", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "bytes32", "name": "_nHash", "type": "bytes32" }, { "internalType": "bytes", "name": "_sig", "type": "bytes" }], "name": "mintNoSwap", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address payable", "name": "_wbtcDestination", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "uint256[2]", "name": "_amounts", "type": "uint256[2]" }, { "internalType": "uint256", "name": "_min_mint_amount", "type": "uint256" }, { "internalType": "uint256", "name": "_new_min_mint_amount", "type": "uint256" }, { "internalType": "bytes32", "name": "_nHash", "type": "bytes32" }, { "internalType": "bytes", "name": "_sig", "type": "bytes" }], "name": "mintThenDeposit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_minExchangeRate", "type": "uint256" }, { "internalType": "uint256", "name": "_newMinExchangeRate", "type": "uint256" }, { "internalType": "uint256", "name": "_slippage", "type": "uint256" }, { "internalType": "address payable", "name": "_wbtcDestination", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "bytes32", "name": "_nHash", "type": "bytes32" }, { "internalType": "bytes", "name": "_sig", "type": "bytes" }], "name": "mintThenSwap", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes", "name": "encoded", "type": "bytes" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "bytes32", "name": "_nHash", "type": "bytes32" }, { "internalType": "bytes", "name": "_sig", "type": "bytes" }], "name": "recoverStuck", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "registry", "outputs": [{ "internalType": "contract IGatewayRegistry", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes", "name": "_btcDestination", "type": "bytes" }, { "internalType": "uint256[2]", "name": "amounts", "type": "uint256[2]" }, { "internalType": "uint256", "name": "max_burn_amount", "type": "uint256" }], "name": "removeLiquidityImbalanceThenBurn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes", "name": "_btcDestination", "type": "bytes" }, { "internalType": "uint256", "name": "_token_amounts", "type": "uint256" }, { "internalType": "uint256", "name": "min_amount", "type": "uint256" }], "name": "removeLiquidityOneCoinThenBurn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes", "name": "_btcDestination", "type": "bytes" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256[2]", "name": "min_amounts", "type": "uint256[2]" }], "name": "removeLiquidityThenBurn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes", "name": "_btcDestination", "type": "bytes" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "uint256", "name": "_minRenbtcAmount", "type": "uint256" }], "name": "swapThenBurn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "string", "name": "message", "type": "string" }, { "internalType": "string", "name": "length", "type": "string" }, { "internalType": "uint256", "name": "nonce", "type": "uint256" }, { "internalType": "uint256", "name": "chainID", "type": "uint256" }, { "internalType": "bytes32", "name": "sigR", "type": "bytes32" }, { "internalType": "bytes32", "name": "sigS", "type": "bytes32" }, { "internalType": "uint8", "name": "sigV", "type": "uint8" }], "name": "verify", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "pure", "type": "function" }, { "stateMutability": "payable", "type": "receive" }]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{ "inputs": [{ "internalType": "contract ICurveExchange", "name": "_exchange", "type": "address" }, { "internalType": "address", "name": "_curveTokenAddress", "type": "address" }, { "internalType": "contract IGatewayRegistry", "name": "_registry", "type": "address" }, { "internalType": "contract IERC20[3]", "name": "_coins", "type": "address[3]" }], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "burnAmount", "type": "uint256" }], "name": "Burn", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "mintedAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "curveAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256[3]", "name": "amounts", "type": "uint256[3]" }], "name": "DepositMintedCurve", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "address", "name": "userAddress", "type": "address" }, { "indexed": false, "internalType": "address payable", "name": "relayerAddress", "type": "address" }, { "indexed": false, "internalType": "bytes", "name": "functionSignature", "type": "bytes" }], "name": "MetaTransactionExecuted", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "renAmount", "type": "uint256" }], "name": "ReceiveRen", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "mintedAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "erc20BTCAmount", "type": "uint256" }, { "indexed": false, "internalType": "int128", "name": "j", "type": "int128" }], "name": "SwapReceived", "type": "event" }, { "stateMutability": "payable", "type": "fallback" }, { "inputs": [], "name": "chi", "outputs": [{ "internalType": "contract IFreeFromUpTo", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "exchange", "outputs": [{ "internalType": "contract ICurveExchange", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "userAddress", "type": "address" }, { "internalType": "bytes", "name": "functionSignature", "type": "bytes" }, { "internalType": "string", "name": "message", "type": "string" }, { "internalType": "string", "name": "length", "type": "string" }, { "internalType": "bytes32", "name": "sigR", "type": "bytes32" }, { "internalType": "bytes32", "name": "sigS", "type": "bytes32" }, { "internalType": "uint8", "name": "sigV", "type": "uint8" }], "name": "executeMetaTransaction", "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "getChainID", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], "name": "getNonce", "outputs": [{ "internalType": "uint256", "name": "nonce", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address payable", "name": "_wbtcDestination", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "uint256[3]", "name": "_amounts", "type": "uint256[3]" }, { "internalType": "uint256", "name": "_min_mint_amount", "type": "uint256" }, { "internalType": "uint256", "name": "_new_min_mint_amount", "type": "uint256" }, { "internalType": "bytes32", "name": "_nHash", "type": "bytes32" }, { "internalType": "bytes", "name": "_sig", "type": "bytes" }], "name": "mintThenDeposit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_minExchangeRate", "type": "uint256" }, { "internalType": "uint256", "name": "_newMinExchangeRate", "type": "uint256" }, { "internalType": "uint256", "name": "_slippage", "type": "uint256" }, { "internalType": "int128", "name": "_j", "type": "int128" }, { "internalType": "address payable", "name": "_coinDestination", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "bytes32", "name": "_nHash", "type": "bytes32" }, { "internalType": "bytes", "name": "_sig", "type": "bytes" }], "name": "mintThenSwap", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes", "name": "encoded", "type": "bytes" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "bytes32", "name": "_nHash", "type": "bytes32" }, { "internalType": "bytes", "name": "_sig", "type": "bytes" }], "name": "recoverStuck", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "registry", "outputs": [{ "internalType": "contract IGatewayRegistry", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes", "name": "_btcDestination", "type": "bytes" }, { "internalType": "address", "name": "_coinDestination", "type": "address" }, { "internalType": "uint256[3]", "name": "amounts", "type": "uint256[3]" }, { "internalType": "uint256", "name": "max_burn_amount", "type": "uint256" }], "name": "removeLiquidityImbalanceThenBurn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes", "name": "_btcDestination", "type": "bytes" }, { "internalType": "uint256", "name": "_token_amounts", "type": "uint256" }, { "internalType": "uint256", "name": "min_amount", "type": "uint256" }, { "internalType": "uint8", "name": "_i", "type": "uint8" }], "name": "removeLiquidityOneCoinThenBurn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes", "name": "_btcDestination", "type": "bytes" }, { "internalType": "address", "name": "_coinDestination", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256[3]", "name": "min_amounts", "type": "uint256[3]" }], "name": "removeLiquidityThenBurn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes", "name": "_btcDestination", "type": "bytes" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "uint256", "name": "_minRenbtcAmount", "type": "uint256" }, { "internalType": "uint8", "name": "_i", "type": "uint8" }], "name": "swapThenBurn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "string", "name": "message", "type": "string" }, { "internalType": "string", "name": "length", "type": "string" }, { "internalType": "uint256", "name": "nonce", "type": "uint256" }, { "internalType": "uint256", "name": "chainID", "type": "uint256" }, { "internalType": "bytes32", "name": "sigR", "type": "bytes32" }, { "internalType": "bytes32", "name": "sigS", "type": "bytes32" }, { "internalType": "uint8", "name": "sigV", "type": "uint8" }], "name": "verify", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "pure", "type": "function" }, { "stateMutability": "payable", "type": "receive" }]
|
package/lib/pools.d.ts
DELETED
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
import { ethers } from "ethers";
|
|
2
|
-
import BigNumber from 'bignumber.js';
|
|
3
|
-
import { DictInterface, IRouteStep, RewardsApyInterface } from './interfaces';
|
|
4
|
-
export declare class Pool {
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
fullName: string;
|
|
8
|
-
symbol: string;
|
|
9
|
-
referenceAsset: string;
|
|
10
|
-
swap: string;
|
|
11
|
-
zap: string | null;
|
|
12
|
-
lpToken: string;
|
|
13
|
-
gauge: string;
|
|
14
|
-
rewardContract: string | null;
|
|
15
|
-
underlyingCoins: string[];
|
|
16
|
-
coins: string[];
|
|
17
|
-
underlyingCoinAddresses: string[];
|
|
18
|
-
coinAddresses: string[];
|
|
19
|
-
underlyingDecimals: number[];
|
|
20
|
-
decimals: number[];
|
|
21
|
-
useLending: boolean[];
|
|
22
|
-
isMeta: boolean;
|
|
23
|
-
isFake: boolean;
|
|
24
|
-
isCrypto: boolean;
|
|
25
|
-
basePool: string;
|
|
26
|
-
isFactory: boolean;
|
|
27
|
-
isMetaFactory: boolean;
|
|
28
|
-
isPlainFactory: boolean;
|
|
29
|
-
isCryptoFactory: boolean;
|
|
30
|
-
rewardTokens: string[];
|
|
31
|
-
estimateGas: {
|
|
32
|
-
addLiquidityApprove: (amounts: string[]) => Promise<number>;
|
|
33
|
-
addLiquidity: (amounts: string[]) => Promise<number>;
|
|
34
|
-
depositAndStakeApprove: (amounts: string[]) => Promise<number>;
|
|
35
|
-
depositAndStake: (amounts: string[]) => Promise<number>;
|
|
36
|
-
addLiquidityWrappedApprove: (amounts: string[]) => Promise<number>;
|
|
37
|
-
addLiquidityWrapped: (amounts: string[]) => Promise<number>;
|
|
38
|
-
depositAndStakeWrappedApprove: (amounts: string[]) => Promise<number>;
|
|
39
|
-
depositAndStakeWrapped: (amounts: string[]) => Promise<number>;
|
|
40
|
-
gaugeDepositApprove: (lpTokenAmount: string) => Promise<number>;
|
|
41
|
-
gaugeDeposit: (lpTokenAmount: string) => Promise<number>;
|
|
42
|
-
gaugeWithdraw: (lpTokenAmount: string) => Promise<number>;
|
|
43
|
-
removeLiquidityApprove: (lpTokenAmount: string) => Promise<number>;
|
|
44
|
-
removeLiquidity: (lpTokenAmount: string) => Promise<number>;
|
|
45
|
-
removeLiquidityWrapped: (lpTokenAmount: string) => Promise<number>;
|
|
46
|
-
removeLiquidityImbalanceApprove: (amounts: string[]) => Promise<number>;
|
|
47
|
-
removeLiquidityImbalance: (amounts: string[]) => Promise<number>;
|
|
48
|
-
removeLiquidityImbalanceWrapped: (amounts: string[]) => Promise<number>;
|
|
49
|
-
removeLiquidityOneCoinApprove: (lpTokenAmount: string, coin: string | number) => Promise<number>;
|
|
50
|
-
removeLiquidityOneCoin: (lpTokenAmount: string, coin: string | number) => Promise<number>;
|
|
51
|
-
removeLiquidityOneCoinWrapped: (lpTokenAmount: string, coin: string | number) => Promise<number>;
|
|
52
|
-
exchangeApprove: (inputCoin: string | number, amount: string) => Promise<number>;
|
|
53
|
-
exchange: (inputCoin: string | number, outputCoin: string | number, amount: string, maxSlippage: number) => Promise<number>;
|
|
54
|
-
exchangeWrappedApprove: (inputCoin: string | number, amount: string) => Promise<number>;
|
|
55
|
-
exchangeWrapped: (inputCoin: string | number, outputCoin: string | number, amount: string, maxSlippage: number) => Promise<number>;
|
|
56
|
-
};
|
|
57
|
-
stats: {
|
|
58
|
-
getParameters: () => Promise<{
|
|
59
|
-
virtualPrice: string;
|
|
60
|
-
fee: string;
|
|
61
|
-
adminFee: string;
|
|
62
|
-
A: string;
|
|
63
|
-
gamma?: string;
|
|
64
|
-
}>;
|
|
65
|
-
getPoolBalances: () => Promise<string[]>;
|
|
66
|
-
getPoolWrappedBalances: () => Promise<string[]>;
|
|
67
|
-
getTotalLiquidity: (useApi?: boolean) => Promise<string>;
|
|
68
|
-
getVolume: () => Promise<string>;
|
|
69
|
-
getBaseApy: () => Promise<{
|
|
70
|
-
day: string;
|
|
71
|
-
week: string;
|
|
72
|
-
month: string;
|
|
73
|
-
total: string;
|
|
74
|
-
}>;
|
|
75
|
-
getTokenApy: () => Promise<[baseApy: string, boostedApy: string]>;
|
|
76
|
-
getRewardsApy: () => Promise<RewardsApyInterface[]>;
|
|
77
|
-
};
|
|
78
|
-
constructor(id: string);
|
|
79
|
-
calcLpTokenAmount: (amounts: string[], isDeposit?: boolean) => Promise<string>;
|
|
80
|
-
calcLpTokenAmountWrapped: (amounts: string[], isDeposit?: boolean) => Promise<string>;
|
|
81
|
-
private getParameters;
|
|
82
|
-
private getPoolBalances;
|
|
83
|
-
private getPoolWrappedBalances;
|
|
84
|
-
private getTotalLiquidity;
|
|
85
|
-
private _getPoolStats;
|
|
86
|
-
private getVolume;
|
|
87
|
-
private getBaseApy;
|
|
88
|
-
private getTokenApy;
|
|
89
|
-
private getRewardsApy;
|
|
90
|
-
addLiquidityExpected: (amounts: string[]) => Promise<string>;
|
|
91
|
-
addLiquiditySlippage: (amounts: string[]) => Promise<string>;
|
|
92
|
-
addLiquidityIsApproved: (amounts: string[]) => Promise<boolean>;
|
|
93
|
-
private addLiquidityApproveEstimateGas;
|
|
94
|
-
addLiquidityApprove: (amounts: string[]) => Promise<string[]>;
|
|
95
|
-
private addLiquidityEstimateGas;
|
|
96
|
-
balancedAmounts: () => Promise<string[]>;
|
|
97
|
-
addLiquidity: (amounts: string[]) => Promise<string>;
|
|
98
|
-
depositAndStakeExpected: (amounts: string[]) => Promise<string>;
|
|
99
|
-
depositAndStakeSlippage: (amounts: string[]) => Promise<string>;
|
|
100
|
-
depositAndStakeIsApproved: (amounts: string[]) => Promise<boolean>;
|
|
101
|
-
private depositAndStakeApproveEstimateGas;
|
|
102
|
-
depositAndStakeApprove: (amounts: string[]) => Promise<string[]>;
|
|
103
|
-
private depositAndStakeEstimateGas;
|
|
104
|
-
depositAndStake: (amounts: string[]) => Promise<string>;
|
|
105
|
-
private _depositAndStake;
|
|
106
|
-
balancedWrappedAmounts: () => Promise<string[]>;
|
|
107
|
-
addLiquidityWrappedExpected: (amounts: string[]) => Promise<string>;
|
|
108
|
-
addLiquidityWrappedSlippage: (amounts: string[]) => Promise<string>;
|
|
109
|
-
addLiquidityWrappedIsApproved: (amounts: string[]) => Promise<boolean>;
|
|
110
|
-
private addLiquidityWrappedApproveEstimateGas;
|
|
111
|
-
addLiquidityWrappedApprove: (amounts: string[]) => Promise<string[]>;
|
|
112
|
-
private addLiquidityWrappedEstimateGas;
|
|
113
|
-
addLiquidityWrapped: (amounts: string[]) => Promise<string>;
|
|
114
|
-
depositAndStakeWrappedExpected: (amounts: string[]) => Promise<string>;
|
|
115
|
-
depositAndStakeWrappedSlippage: (amounts: string[]) => Promise<string>;
|
|
116
|
-
depositAndStakeWrappedIsApproved: (amounts: string[]) => Promise<boolean>;
|
|
117
|
-
private depositAndStakeWrappedApproveEstimateGas;
|
|
118
|
-
depositAndStakeWrappedApprove: (amounts: string[]) => Promise<string[]>;
|
|
119
|
-
private depositAndStakeWrappedEstimateGas;
|
|
120
|
-
depositAndStakeWrapped: (amounts: string[]) => Promise<string>;
|
|
121
|
-
removeLiquidityExpected: (lpTokenAmount: string) => Promise<string[]>;
|
|
122
|
-
removeLiquidityIsApproved: (lpTokenAmount: string) => Promise<boolean>;
|
|
123
|
-
private removeLiquidityApproveEstimateGas;
|
|
124
|
-
removeLiquidityApprove: (lpTokenAmount: string) => Promise<string[]>;
|
|
125
|
-
private removeLiquidityEstimateGas;
|
|
126
|
-
removeLiquidity: (lpTokenAmount: string) => Promise<string>;
|
|
127
|
-
removeLiquidityWrappedExpected: (lpTokenAmount: string) => Promise<string[]>;
|
|
128
|
-
private removeLiquidityWrappedEstimateGas;
|
|
129
|
-
removeLiquidityWrapped: (lpTokenAmount: string) => Promise<string>;
|
|
130
|
-
removeLiquidityImbalanceExpected: (amounts: string[]) => Promise<string>;
|
|
131
|
-
removeLiquidityImbalanceSlippage: (amounts: string[]) => Promise<string>;
|
|
132
|
-
removeLiquidityImbalanceIsApproved: (amounts: string[]) => Promise<boolean>;
|
|
133
|
-
private removeLiquidityImbalanceApproveEstimateGas;
|
|
134
|
-
removeLiquidityImbalanceApprove: (amounts: string[]) => Promise<string[]>;
|
|
135
|
-
private removeLiquidityImbalanceEstimateGas;
|
|
136
|
-
removeLiquidityImbalance: (amounts: string[]) => Promise<string>;
|
|
137
|
-
removeLiquidityImbalanceWrappedExpected: (amounts: string[]) => Promise<string>;
|
|
138
|
-
removeLiquidityImbalanceWrappedSlippage: (amounts: string[]) => Promise<string>;
|
|
139
|
-
private removeLiquidityImbalanceWrappedEstimateGas;
|
|
140
|
-
removeLiquidityImbalanceWrapped: (amounts: string[], estimateGas?: boolean) => Promise<string | number>;
|
|
141
|
-
removeLiquidityOneCoinExpected: (lpTokenAmount: string, coin: string | number) => Promise<string>;
|
|
142
|
-
removeLiquidityOneCoinSlippage: (lpTokenAmount: string, coin: string | number) => Promise<string>;
|
|
143
|
-
removeLiquidityOneCoinIsApproved: (lpTokenAmount: string) => Promise<boolean>;
|
|
144
|
-
private removeLiquidityOneCoinApproveEstimateGas;
|
|
145
|
-
removeLiquidityOneCoinApprove: (lpTokenAmount: string) => Promise<string[]>;
|
|
146
|
-
private removeLiquidityOneCoinEstimateGas;
|
|
147
|
-
removeLiquidityOneCoin: (lpTokenAmount: string, coin: string | number) => Promise<string>;
|
|
148
|
-
removeLiquidityOneCoinWrappedExpected: (lpTokenAmount: string, coin: string | number) => Promise<string>;
|
|
149
|
-
removeLiquidityOneCoinWrappedSlippage: (lpTokenAmount: string, coin: string | number) => Promise<string>;
|
|
150
|
-
private removeLiquidityOneCoinWrappedEstimateGas;
|
|
151
|
-
removeLiquidityOneCoinWrapped: (lpTokenAmount: string, coin: string | number) => Promise<string>;
|
|
152
|
-
gaugeDepositIsApproved: (lpTokenAmount: string) => Promise<boolean>;
|
|
153
|
-
private gaugeDepositApproveEstimateGas;
|
|
154
|
-
gaugeDepositApprove: (lpTokenAmount: string) => Promise<string[]>;
|
|
155
|
-
private gaugeDepositEstimateGas;
|
|
156
|
-
gaugeDeposit: (lpTokenAmount: string) => Promise<string>;
|
|
157
|
-
private gaugeWithdrawEstimateGas;
|
|
158
|
-
gaugeWithdraw: (lpTokenAmount: string) => Promise<string>;
|
|
159
|
-
gaugeClaimableTokens: (address?: string) => Promise<string>;
|
|
160
|
-
gaugeClaimTokens: () => Promise<string>;
|
|
161
|
-
gaugeClaimableRewards: (address?: string) => Promise<{
|
|
162
|
-
token: string;
|
|
163
|
-
symbol: string;
|
|
164
|
-
amount: string;
|
|
165
|
-
}[]>;
|
|
166
|
-
gaugeClaimRewards: () => Promise<string>;
|
|
167
|
-
balances: (...addresses: string[] | string[][]) => Promise<DictInterface<DictInterface<string>> | DictInterface<string>>;
|
|
168
|
-
lpTokenBalances: (...addresses: string[] | string[][]) => Promise<DictInterface<DictInterface<string>> | DictInterface<string>>;
|
|
169
|
-
underlyingCoinBalances: (...addresses: string[] | string[][]) => Promise<DictInterface<DictInterface<string>> | DictInterface<string>>;
|
|
170
|
-
coinBalances: (...addresses: string[] | string[][]) => Promise<DictInterface<DictInterface<string>> | DictInterface<string>>;
|
|
171
|
-
allCoinBalances: (...addresses: string[] | string[][]) => Promise<DictInterface<DictInterface<string>> | DictInterface<string>>;
|
|
172
|
-
exchangeExpected: (inputCoin: string | number, outputCoin: string | number, amount: string) => Promise<string>;
|
|
173
|
-
exchangeIsApproved: (inputCoin: string | number, amount: string) => Promise<boolean>;
|
|
174
|
-
private exchangeApproveEstimateGas;
|
|
175
|
-
exchangeApprove: (inputCoin: string | number, amount: string) => Promise<string[]>;
|
|
176
|
-
private exchangeEstimateGas;
|
|
177
|
-
exchange: (inputCoin: string | number, outputCoin: string | number, amount: string, maxSlippage?: number) => Promise<string>;
|
|
178
|
-
exchangeWrappedExpected: (inputCoin: string | number, outputCoin: string | number, amount: string) => Promise<string>;
|
|
179
|
-
exchangeWrappedIsApproved: (inputCoin: string | number, amount: string) => Promise<boolean>;
|
|
180
|
-
private exchangeWrappedApproveEstimateGas;
|
|
181
|
-
exchangeWrappedApprove: (inputCoin: string | number, amount: string) => Promise<string[]>;
|
|
182
|
-
private exchangeWrappedEstimateGas;
|
|
183
|
-
exchangeWrapped: (inputCoin: string | number, outputCoin: string | number, amount: string, maxSlippage?: number) => Promise<string>;
|
|
184
|
-
gaugeMaxBoostedDeposit: (...addresses: string[]) => Promise<DictInterface<string>>;
|
|
185
|
-
gaugeOptimalDeposits: (...accounts: string[]) => Promise<DictInterface<string>>;
|
|
186
|
-
boost: (address: string) => Promise<string>;
|
|
187
|
-
private _getCoinIdx;
|
|
188
|
-
private _getRates;
|
|
189
|
-
private _balances;
|
|
190
|
-
private _underlyingPrices;
|
|
191
|
-
private _wrappedPrices;
|
|
192
|
-
private _addLiquidityCryptoSlippage;
|
|
193
|
-
private _addLiquiditySlippage;
|
|
194
|
-
private _removeLiquidityCryptoSlippage;
|
|
195
|
-
private _removeLiquiditySlippage;
|
|
196
|
-
private _balancedAmounts;
|
|
197
|
-
private _calcLpTokenAmount;
|
|
198
|
-
private _calcLpTokenAmountZap;
|
|
199
|
-
private _calcLpTokenAmountWithUnderlying;
|
|
200
|
-
private _addLiquiditySwap;
|
|
201
|
-
private _addLiquidityZap;
|
|
202
|
-
private _addLiquidityMetaZap;
|
|
203
|
-
private _addLiquidity;
|
|
204
|
-
private _calcExpectedAmounts;
|
|
205
|
-
private _calcMinAmounts;
|
|
206
|
-
private _calcExpectedUnderlyingAmounts;
|
|
207
|
-
private _calcMinUnderlyingAmounts;
|
|
208
|
-
private _calcExpectedUnderlyingAmountsMeta;
|
|
209
|
-
private _calcMinUnderlyingAmountsMeta;
|
|
210
|
-
private _removeLiquiditySwap;
|
|
211
|
-
private _removeLiquidityZap;
|
|
212
|
-
private _removeLiquidityMetaZap;
|
|
213
|
-
private _removeLiquidity;
|
|
214
|
-
private _removeLiquidityImbalanceSwap;
|
|
215
|
-
private _removeLiquidityImbalanceZap;
|
|
216
|
-
private _removeLiquidityImbalanceMetaZap;
|
|
217
|
-
private _removeLiquidityImbalance;
|
|
218
|
-
private _calcWithdrawOneCoinSwap;
|
|
219
|
-
private _calcWithdrawOneCoinZap;
|
|
220
|
-
private _calcWithdrawOneCoin;
|
|
221
|
-
private _removeLiquidityOneCoinSwap;
|
|
222
|
-
private _removeLiquidityOneCoinZap;
|
|
223
|
-
private _removeLiquidityOneCoin;
|
|
224
|
-
private _getExchangeOutput;
|
|
225
|
-
private _getExchangeOutputWrapped;
|
|
226
|
-
}
|
|
227
|
-
export declare const getBestPoolAndOutput: (inputCoin: string, outputCoin: string, amount: string) => Promise<{
|
|
228
|
-
poolName: string;
|
|
229
|
-
poolAddress: string;
|
|
230
|
-
output: string;
|
|
231
|
-
}>;
|
|
232
|
-
export declare const exchangeExpected: (inputCoin: string, outputCoin: string, amount: string) => Promise<string>;
|
|
233
|
-
export declare const exchangeIsApproved: (inputCoin: string, outputCoin: string, amount: string) => Promise<boolean>;
|
|
234
|
-
export declare const exchangeApproveEstimateGas: (inputCoin: string, outputCoin: string, amount: string) => Promise<number>;
|
|
235
|
-
export declare const exchangeApprove: (inputCoin: string, outputCoin: string, amount: string) => Promise<string[]>;
|
|
236
|
-
export declare const exchangeEstimateGas: (inputCoin: string, outputCoin: string, amount: string, maxSlippage?: number) => Promise<number>;
|
|
237
|
-
export declare const exchange: (inputCoin: string, outputCoin: string, amount: string, maxSlippage?: number) => Promise<string>;
|
|
238
|
-
export declare const crossAssetExchangeAvailable: (inputCoin: string, outputCoin: string) => Promise<boolean>;
|
|
239
|
-
export declare const _getSmallAmountForCoin: (coinAddress: string) => string;
|
|
240
|
-
export declare const _crossAssetExchangeInfo: (inputCoinAddress: string, outputCoinAddress: string, inputCoinDecimals: number, outputCoinDecimals: number, amount: string) => Promise<{
|
|
241
|
-
route: string[];
|
|
242
|
-
indices: ethers.BigNumber[];
|
|
243
|
-
_expected: ethers.BigNumber;
|
|
244
|
-
slippage: number;
|
|
245
|
-
}>;
|
|
246
|
-
export declare const crossAssetExchangeOutputAndSlippage: (inputCoin: string, outputCoin: string, amount: string) => Promise<{
|
|
247
|
-
slippage: number;
|
|
248
|
-
output: string;
|
|
249
|
-
}>;
|
|
250
|
-
export declare const crossAssetExchangeExpected: (inputCoin: string, outputCoin: string, amount: string) => Promise<string>;
|
|
251
|
-
export declare const crossAssetExchangeIsApproved: (inputCoin: string, amount: string) => Promise<boolean>;
|
|
252
|
-
export declare const crossAssetExchangeApproveEstimateGas: (inputCoin: string, amount: string) => Promise<number>;
|
|
253
|
-
export declare const crossAssetExchangeApprove: (inputCoin: string, amount: string) => Promise<string[]>;
|
|
254
|
-
export declare const crossAssetExchangeEstimateGas: (inputCoin: string, outputCoin: string, amount: string, maxSlippage?: number) => Promise<number>;
|
|
255
|
-
export declare const crossAssetExchange: (inputCoin: string, outputCoin: string, amount: string, maxSlippage?: number) => Promise<string>;
|
|
256
|
-
export declare const getUserPoolList: (address?: string | undefined) => Promise<string[]>;
|
|
257
|
-
export declare const _findAllRoutes: (inputCoinAddress: string, outputCoinAddress: string) => Promise<IRouteStep[][]>;
|
|
258
|
-
export declare const getBestRouteAndOutput: (inputCoin: string, outputCoin: string, amount: string) => Promise<{
|
|
259
|
-
route: IRouteStep[];
|
|
260
|
-
output: string;
|
|
261
|
-
}>;
|
|
262
|
-
export declare const routerExchangeExpected: (inputCoin: string, outputCoin: string, amount: string) => Promise<string>;
|
|
263
|
-
export declare const routerExchangeIsApproved: (inputCoin: string, amount: string) => Promise<boolean>;
|
|
264
|
-
export declare const routerExchangeApproveEstimateGas: (inputCoin: string, amount: string) => Promise<number>;
|
|
265
|
-
export declare const routerExchangeApprove: (inputCoin: string, amount: string) => Promise<string[]>;
|
|
266
|
-
export declare const routerExchangeEstimateGas: (inputCoin: string, outputCoin: string, amount: string) => Promise<number>;
|
|
267
|
-
export declare const routerExchange: (inputCoin: string, outputCoin: string, amount: string, maxSlippage?: number) => Promise<string>;
|