impermax-sdk 1.2.99 → 1.2.100
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { Address, Factory, NetworkFactoryIndex, Networks } from '../types';
|
|
2
2
|
export declare const IMPERMAX_FACTORY: NetworkFactoryIndex<Address>;
|
|
3
3
|
export declare function getFactoryByAddress(network: Networks, address: Address): Factory | null;
|
|
4
|
+
export declare function getNetworkFactories(network: Networks): Address[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getFactoryByAddress = exports.IMPERMAX_FACTORY = void 0;
|
|
3
|
+
exports.getNetworkFactories = exports.getFactoryByAddress = exports.IMPERMAX_FACTORY = void 0;
|
|
4
4
|
const types_1 = require("../types");
|
|
5
5
|
exports.IMPERMAX_FACTORY = {
|
|
6
6
|
[types_1.Networks.Ropsten]: {},
|
|
@@ -74,3 +74,10 @@ function getFactoryByAddress(network, address) {
|
|
|
74
74
|
return null;
|
|
75
75
|
}
|
|
76
76
|
exports.getFactoryByAddress = getFactoryByAddress;
|
|
77
|
+
function getNetworkFactories(network) {
|
|
78
|
+
const networkConfig = exports.IMPERMAX_FACTORY[network];
|
|
79
|
+
if (!networkConfig)
|
|
80
|
+
return [];
|
|
81
|
+
return Object.values(networkConfig).map(factory => factory.toLowerCase());
|
|
82
|
+
}
|
|
83
|
+
exports.getNetworkFactories = getNetworkFactories;
|
package/lib/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import * as onchain from './onchain';
|
|
|
5
5
|
import { CLAIM_AGGREGATOR } from './config/contracts/claim-aggregators';
|
|
6
6
|
import { IMPERMAX_CHEF } from './config/contracts/impermax-chef';
|
|
7
7
|
import { IMX } from './config/contracts/imxes';
|
|
8
|
+
import { IMPERMAX_FACTORY, getNetworkFactories } from './config/contracts/impermax-factories';
|
|
8
9
|
import { MERKLE_DISTRIBUTOR_ETH, MERKLE_DISTRIBUTOR_IBEX, MERKLE_DISTRIBUTOR_IBEX_2 } from './config/contracts/merkle-distributors';
|
|
9
10
|
import { MERKLE_URL_ETH, MERKLE_URL_IBEX, MERKLE_URL_IBEX_2 } from './config/endpoints/merkle-distributors';
|
|
10
11
|
import { ROUTER } from './config/contracts/routers';
|
|
@@ -31,4 +32,4 @@ import { OnchainAccountBorrowable, OnchainAccountCollateral } from './onchain/ac
|
|
|
31
32
|
import { OnchainInteractionsLendingPool, OnchainInteractionsLendingVault, OnchainInteractionsPoolToken, OnchainInteractionsConfigManager } from './onchain/interactions';
|
|
32
33
|
import { OnchainInteractionsBorrowable, OnchainInteractionsCollateral } from './onchain/interactions/lendingPool';
|
|
33
34
|
import { LENDING_VAULT_WATCHER } from './config/contracts/lending-vault-watcher';
|
|
34
|
-
export { offchain, Offchain, OffchainLendingPool, OffchainPoolToken, OffchainCollateral, OffchainBorrowable, OffchainLendingVault, OffchainConfigManager, OffchainPairConfig, OffchainProposal, OffchainAccount, OffchainAccountLendingPool, OffchainAccountPoolToken, OffchainAccountCollateral, OffchainAccountBorrowable, OffchainAccountLendingVault, OffchainPriceHelper, OffchainSolidexHelper, PoolTokenData, BorrowableData, CollateralData, BorrowablePastData, TokenData, RewardData, PairData, FarmingPoolData, LendingPoolPastData, LendingPoolData, CollateralPosition, SupplyPosition, BorrowPosition, UserData, TvlData, XimxData, LendingVaultData, LendingVaultPosition, PairConfigData, ProposalData, ProposalMetadata, onchain, Onchain, OnchainLendingPool, OnchainPoolToken, OnchainBorrowable, OnchainCollateral, OnchainLendingVault, OnchainConfigManager, OnchainProposal, OnchainPairConfig, OnchainAccount, OnchainAccountLendingPool, OnchainAccountPoolToken, OnchainAccountBorrowable, OnchainAccountCollateral, OnchainAccountLendingVault, OnchainContractsHelper, OnchainImpermaxFactory, OnchainInteractions, OnchainInteractionsLendingPool, OnchainInteractionsPoolToken, OnchainInteractionsCollateral, OnchainInteractionsBorrowable, OnchainInteractionsLendingVault, OnchainInteractionsConfigManager, Contract, ApprovalType, PermitData, OnchainConfig, Changes, NO_CHANGES, Values, AirdropData, PendingRewardUI, CollateralConfig, BorrowableConfig, PairConfig, CLAIM_AGGREGATOR, IMPERMAX_CHEF, IMX, LENDING_VAULT_WATCHER, MERKLE_DISTRIBUTOR_IBEX, MERKLE_DISTRIBUTOR_IBEX_2, MERKLE_DISTRIBUTOR_ETH, ROUTER, SIMPLE_UNISWAP_ORACLE, WETH, MERKLE_URL_ETH, MERKLE_URL_IBEX, MERKLE_URL_IBEX_2, hrAmms, AMM_FACTORY, getAmmByFactory, AMM_SUBGRAPH_URLS, ADD_LIQUIDITY_URLS, AMM_LP_FEE, DEBANK_IDS, ETH_SYMBOL, ETH_NAME, SOLIDEX_FACTORIES, BORROW_FEE_FACTORIES, OLD_KINK_MULTIPLIER_FACTORIES, LIQUIDATION_FEE_FACTORIES, V2_FACTORIES, Farms, hrFarms, FarmIndex, STAKED_LP_FACTORY, getFarmByStakedLPFactory, NOT_SYNCED, DEADLINE, ZERO, APPROVE_AMOUNT, IMPERMAX_SUBGRAPH_URL, IMPERMAX_CHEF_SUBGRAPH_URL, BLOCKS_SUBGRAPH_URL, XIMX_SUBGRAPH_URL, Networks, Factory, PoolTokenType, Amms, Address, NetworkIndex, FactoryIndex, AddressIndex, NetworkFactoryIndex, LendingPoolIndex, AmmIndex, DistributorDetails, ProposalState, WhitelistState, };
|
|
35
|
+
export { offchain, Offchain, OffchainLendingPool, OffchainPoolToken, OffchainCollateral, OffchainBorrowable, OffchainLendingVault, OffchainConfigManager, OffchainPairConfig, OffchainProposal, OffchainAccount, OffchainAccountLendingPool, OffchainAccountPoolToken, OffchainAccountCollateral, OffchainAccountBorrowable, OffchainAccountLendingVault, OffchainPriceHelper, OffchainSolidexHelper, PoolTokenData, BorrowableData, CollateralData, BorrowablePastData, TokenData, RewardData, PairData, FarmingPoolData, LendingPoolPastData, LendingPoolData, CollateralPosition, SupplyPosition, BorrowPosition, UserData, TvlData, XimxData, LendingVaultData, LendingVaultPosition, PairConfigData, ProposalData, ProposalMetadata, onchain, Onchain, OnchainLendingPool, OnchainPoolToken, OnchainBorrowable, OnchainCollateral, OnchainLendingVault, OnchainConfigManager, OnchainProposal, OnchainPairConfig, OnchainAccount, OnchainAccountLendingPool, OnchainAccountPoolToken, OnchainAccountBorrowable, OnchainAccountCollateral, OnchainAccountLendingVault, OnchainContractsHelper, OnchainImpermaxFactory, OnchainInteractions, OnchainInteractionsLendingPool, OnchainInteractionsPoolToken, OnchainInteractionsCollateral, OnchainInteractionsBorrowable, OnchainInteractionsLendingVault, OnchainInteractionsConfigManager, Contract, ApprovalType, PermitData, OnchainConfig, Changes, NO_CHANGES, Values, AirdropData, PendingRewardUI, CollateralConfig, BorrowableConfig, PairConfig, CLAIM_AGGREGATOR, IMPERMAX_CHEF, IMX, IMPERMAX_FACTORY, getNetworkFactories, LENDING_VAULT_WATCHER, MERKLE_DISTRIBUTOR_IBEX, MERKLE_DISTRIBUTOR_IBEX_2, MERKLE_DISTRIBUTOR_ETH, ROUTER, SIMPLE_UNISWAP_ORACLE, WETH, MERKLE_URL_ETH, MERKLE_URL_IBEX, MERKLE_URL_IBEX_2, hrAmms, AMM_FACTORY, getAmmByFactory, AMM_SUBGRAPH_URLS, ADD_LIQUIDITY_URLS, AMM_LP_FEE, DEBANK_IDS, ETH_SYMBOL, ETH_NAME, SOLIDEX_FACTORIES, BORROW_FEE_FACTORIES, OLD_KINK_MULTIPLIER_FACTORIES, LIQUIDATION_FEE_FACTORIES, V2_FACTORIES, Farms, hrFarms, FarmIndex, STAKED_LP_FACTORY, getFarmByStakedLPFactory, NOT_SYNCED, DEADLINE, ZERO, APPROVE_AMOUNT, IMPERMAX_SUBGRAPH_URL, IMPERMAX_CHEF_SUBGRAPH_URL, BLOCKS_SUBGRAPH_URL, XIMX_SUBGRAPH_URL, Networks, Factory, PoolTokenType, Amms, Address, NetworkIndex, FactoryIndex, AddressIndex, NetworkFactoryIndex, LendingPoolIndex, AmmIndex, DistributorDetails, ProposalState, WhitelistState, };
|
package/lib/index.js
CHANGED
|
@@ -23,8 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
27
|
-
exports.WhitelistState = exports.ProposalState = exports.Amms = exports.PoolTokenType = exports.Factory = exports.Networks = exports.XIMX_SUBGRAPH_URL = exports.BLOCKS_SUBGRAPH_URL = exports.IMPERMAX_CHEF_SUBGRAPH_URL = exports.IMPERMAX_SUBGRAPH_URL = exports.APPROVE_AMOUNT = exports.ZERO = exports.DEADLINE = exports.NOT_SYNCED = exports.getFarmByStakedLPFactory = exports.STAKED_LP_FACTORY = exports.hrFarms = exports.Farms = exports.V2_FACTORIES = exports.LIQUIDATION_FEE_FACTORIES = exports.OLD_KINK_MULTIPLIER_FACTORIES = exports.BORROW_FEE_FACTORIES = exports.SOLIDEX_FACTORIES = exports.ETH_NAME = exports.ETH_SYMBOL = exports.DEBANK_IDS = exports.AMM_LP_FEE = exports.ADD_LIQUIDITY_URLS = exports.AMM_SUBGRAPH_URLS = exports.getAmmByFactory = exports.AMM_FACTORY = exports.hrAmms = exports.MERKLE_URL_IBEX_2 = exports.MERKLE_URL_IBEX = exports.MERKLE_URL_ETH = exports.WETH = exports.SIMPLE_UNISWAP_ORACLE = exports.ROUTER = exports.MERKLE_DISTRIBUTOR_ETH = exports.MERKLE_DISTRIBUTOR_IBEX_2 = void 0;
|
|
26
|
+
exports.getNetworkFactories = exports.IMPERMAX_FACTORY = exports.IMX = exports.IMPERMAX_CHEF = exports.CLAIM_AGGREGATOR = exports.NO_CHANGES = exports.ApprovalType = exports.OnchainInteractionsConfigManager = exports.OnchainInteractionsLendingVault = exports.OnchainInteractionsBorrowable = exports.OnchainInteractionsCollateral = exports.OnchainInteractionsPoolToken = exports.OnchainInteractionsLendingPool = exports.OnchainInteractions = exports.OnchainImpermaxFactory = exports.OnchainContractsHelper = exports.OnchainAccountLendingVault = exports.OnchainAccountCollateral = exports.OnchainAccountBorrowable = exports.OnchainAccountPoolToken = exports.OnchainAccountLendingPool = exports.OnchainAccount = exports.OnchainPairConfig = exports.OnchainProposal = exports.OnchainConfigManager = exports.OnchainLendingVault = exports.OnchainCollateral = exports.OnchainBorrowable = exports.OnchainPoolToken = exports.OnchainLendingPool = exports.Onchain = exports.onchain = exports.OffchainSolidexHelper = exports.OffchainPriceHelper = exports.OffchainAccountLendingVault = exports.OffchainAccountBorrowable = exports.OffchainAccountCollateral = exports.OffchainAccountPoolToken = exports.OffchainAccountLendingPool = exports.OffchainAccount = exports.OffchainProposal = exports.OffchainPairConfig = exports.OffchainConfigManager = exports.OffchainLendingVault = exports.OffchainBorrowable = exports.OffchainCollateral = exports.OffchainPoolToken = exports.OffchainLendingPool = exports.Offchain = exports.offchain = void 0;
|
|
27
|
+
exports.WhitelistState = exports.ProposalState = exports.Amms = exports.PoolTokenType = exports.Factory = exports.Networks = exports.XIMX_SUBGRAPH_URL = exports.BLOCKS_SUBGRAPH_URL = exports.IMPERMAX_CHEF_SUBGRAPH_URL = exports.IMPERMAX_SUBGRAPH_URL = exports.APPROVE_AMOUNT = exports.ZERO = exports.DEADLINE = exports.NOT_SYNCED = exports.getFarmByStakedLPFactory = exports.STAKED_LP_FACTORY = exports.hrFarms = exports.Farms = exports.V2_FACTORIES = exports.LIQUIDATION_FEE_FACTORIES = exports.OLD_KINK_MULTIPLIER_FACTORIES = exports.BORROW_FEE_FACTORIES = exports.SOLIDEX_FACTORIES = exports.ETH_NAME = exports.ETH_SYMBOL = exports.DEBANK_IDS = exports.AMM_LP_FEE = exports.ADD_LIQUIDITY_URLS = exports.AMM_SUBGRAPH_URLS = exports.getAmmByFactory = exports.AMM_FACTORY = exports.hrAmms = exports.MERKLE_URL_IBEX_2 = exports.MERKLE_URL_IBEX = exports.MERKLE_URL_ETH = exports.WETH = exports.SIMPLE_UNISWAP_ORACLE = exports.ROUTER = exports.MERKLE_DISTRIBUTOR_ETH = exports.MERKLE_DISTRIBUTOR_IBEX_2 = exports.MERKLE_DISTRIBUTOR_IBEX = exports.LENDING_VAULT_WATCHER = void 0;
|
|
28
28
|
const offchain_1 = __importStar(require("./offchain"));
|
|
29
29
|
exports.Offchain = offchain_1.default;
|
|
30
30
|
Object.defineProperty(exports, "OffchainAccount", { enumerable: true, get: function () { return offchain_1.OffchainAccount; } });
|
|
@@ -51,6 +51,9 @@ const impermax_chef_1 = require("./config/contracts/impermax-chef");
|
|
|
51
51
|
Object.defineProperty(exports, "IMPERMAX_CHEF", { enumerable: true, get: function () { return impermax_chef_1.IMPERMAX_CHEF; } });
|
|
52
52
|
const imxes_1 = require("./config/contracts/imxes");
|
|
53
53
|
Object.defineProperty(exports, "IMX", { enumerable: true, get: function () { return imxes_1.IMX; } });
|
|
54
|
+
const impermax_factories_1 = require("./config/contracts/impermax-factories");
|
|
55
|
+
Object.defineProperty(exports, "IMPERMAX_FACTORY", { enumerable: true, get: function () { return impermax_factories_1.IMPERMAX_FACTORY; } });
|
|
56
|
+
Object.defineProperty(exports, "getNetworkFactories", { enumerable: true, get: function () { return impermax_factories_1.getNetworkFactories; } });
|
|
54
57
|
const merkle_distributors_1 = require("./config/contracts/merkle-distributors");
|
|
55
58
|
Object.defineProperty(exports, "MERKLE_DISTRIBUTOR_ETH", { enumerable: true, get: function () { return merkle_distributors_1.MERKLE_DISTRIBUTOR_ETH; } });
|
|
56
59
|
Object.defineProperty(exports, "MERKLE_DISTRIBUTOR_IBEX", { enumerable: true, get: function () { return merkle_distributors_1.MERKLE_DISTRIBUTOR_IBEX; } });
|