impermax-sdk 2.1.460 → 2.1.461

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,7 +1,7 @@
1
1
  import OnchainAccountNftlpGenericCL from "./onchainAccountNftlpGenericCL";
2
- import { AeroCLPositionData } from "../../../onchainTypes";
2
+ import { AeroCLPositionData, Contract } from "../../../onchainTypes";
3
3
  export default class OnchainAccountNftlpAeroCL extends OnchainAccountNftlpGenericCL {
4
- getNftpm: () => Promise<any>;
4
+ getNfpm(): Promise<Contract>;
5
5
  protected initializePositionData(tokenId: number): Promise<AeroCLPositionData>;
6
6
  protected getPositionData(tokenId: number): Promise<AeroCLPositionData>;
7
7
  getTickSpacing(tokenId: number): Promise<number>;
@@ -5,12 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const onchainAccountNftlpGenericCL_1 = __importDefault(require("./onchainAccountNftlpGenericCL"));
7
7
  class OnchainAccountNftlpAeroCL extends onchainAccountNftlpGenericCL_1.default {
8
- constructor() {
9
- super(...arguments);
10
- this.getNftpm = () => this.nftlp.getNfpm();
8
+ async getNfpm() {
9
+ return this.nftlp.getNfpm();
11
10
  }
12
11
  async initializePositionData(tokenId) {
13
- const nfpm = await this.getNftpm();
12
+ const nfpm = await this.getNfpm();
14
13
  return await nfpm.methods.positions(tokenId).call();
15
14
  }
16
15
  async getPositionData(tokenId) {
@@ -35,6 +35,7 @@ class OnchainNftlpAeroCL extends onchainNftlpGenericCL_1.default {
35
35
  }
36
36
  async initializeNfpm() {
37
37
  const address = this.getRouter().methods.nfpManager().call();
38
+ console.log("nfpm address", address);
38
39
  return this.getContractHelper().newAeroNfpm(address);
39
40
  }
40
41
  async getNfpm() {
@@ -31,7 +31,7 @@ class OnchainInteractionsNftlpGenericCL extends onchainInteractionsNftlp_1.defau
31
31
  priceA = await this.getNftlp().nearestUsableTickPrice(priceA, tickSpacing);
32
32
  priceB = await this.getNftlp().nearestUsableTickPrice(priceB, tickSpacing);
33
33
  const result = await this._getUpdatePositionActions(-1, await (await this.getAccountNftlp()).createNewPositionObject(tickSpacing, priceA, priceB), depositADelta, depositBDelta, borrowADelta, borrowBDelta);
34
- result.actions.unshift(await this.getMintEmptyAction(tickSpacing, (await this.getNftlp().priceToTick(priceA, tickSpacing)).toString(), (await this.getNftlp().priceToTick(priceB, tickSpacing)).toString()).call());
34
+ result.actions.unshift(await this.getMintEmptyAction(tickSpacing, (await this.getNftlp().priceToTick(priceA, tickSpacing)).toString(), (await this.getNftlp().priceToTick(priceB, tickSpacing)).toString()));
35
35
  return result;
36
36
  }
37
37
  async getModifyExistingPositionActions(tokenId, depositADelta, depositBDelta, borrowADelta, borrowBDelta) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impermax-sdk",
3
- "version": "2.1.460",
3
+ "version": "2.1.461",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",