impermax-sdk 2.1.19 → 2.1.20

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.
@@ -18,7 +18,7 @@ exports.POOL_TOKEN_ROUTER = {
18
18
  [types_1.Networks.Harmony]: '',
19
19
  [types_1.Networks.Moonbeam]: '',
20
20
  [types_1.Networks.Sxnetwork]: '',
21
- [types_1.Networks.Base]: '0x1EBC3b5911B99aDdE07944c75D9E03958abdB49f',
21
+ [types_1.Networks.Base]: '0x9367B2E2C30166Ad0dAD7F2077E12D6eb8c4564b',
22
22
  [types_1.Networks.Scroll]: '0xFF8D0CDC9C857c7fA265121394558B26e1eAAffE',
23
23
  [types_1.Networks.Real]: '0x3784D354863fe8862d60E446E3f29A08c21D1Ea9',
24
24
  [types_1.Networks.Mantle]: '0xF4A9dda025e65945E7A3F873D6146A12c8110A19',
@@ -25,6 +25,7 @@ export default class OnchainInteractions {
25
25
  getLendingVault(vaultAddress: Address): OnchainInteractionsLendingVault;
26
26
  send(method: any, onTransactionHash: Function, value?: BigNumber): Promise<any>;
27
27
  getDefaultRouterContract(): any;
28
+ getPoolTokenRouter(): any;
28
29
  claimAirdrop(airdropData: AirdropData, merkleDistributor: Contract, onTransactionHash: Function): Promise<any>;
29
30
  claims(pairAddresses: FactoryIndex<Address[]>, onTransactionHash: Function): Promise<any>;
30
31
  claimDistributor(claimableAddress: Address, onTransactionHash: Function): Promise<any>;
@@ -86,6 +86,18 @@ class OnchainInteractions {
86
86
  }
87
87
  return this.cache.defaultRouterContract;
88
88
  }
89
+ // NOTE: Keeping this function to be used exclusively by `OnchainIntereactionsLendingVault`, not sure if should use above function
90
+ getPoolTokenRouter() {
91
+ if (!this.cache.poolTokenRouterContract) {
92
+ const address = routers_1.POOL_TOKEN_ROUTER[this.onchain.network];
93
+ if (!address) {
94
+ console.error("PoolTokenRouter address not found");
95
+ return null;
96
+ }
97
+ this.cache.poolTokenRouterContract = this.onchain.getContractHelper().newPoolTokenRouter(address);
98
+ }
99
+ return this.cache.poolTokenRouterContract;
100
+ }
89
101
  claimAirdrop(airdropData, merkleDistributor, onTransactionHash) {
90
102
  return __awaiter(this, void 0, void 0, function* () {
91
103
  return this.send(merkleDistributor.methods.claim(airdropData.index, this.accountAddress, airdropData.amount, airdropData.proof), onTransactionHash);
@@ -10,7 +10,7 @@ class OnchainInteractionsLendingVault extends onchainInteractionsPoolToken_1.def
10
10
  this.getInteractions = () => this.interactions;
11
11
  this.getVaultAddress = () => this.poolToken.getVaultAddress();
12
12
  this.getAccountLendingVault = this.getAccountPoolToken;
13
- this.getPoolTokenRouter = () => this.interactions.getDefaultRouterContract();
13
+ this.getPoolTokenRouter = () => this.interactions.getPoolTokenRouter();
14
14
  this.interactions = interactions;
15
15
  this.poolToken = lendingVault;
16
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impermax-sdk",
3
- "version": "2.1.19",
3
+ "version": "2.1.20",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",