@sonarwatch/portfolio-plugins 0.12.138 → 0.12.140

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. package/CHANGELOG.md +2281 -2273
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/src/index.js +1 -1
  5. package/src/index.js.map +1 -1
  6. package/src/plugins/balancer/helpers/pools.js +21 -21
  7. package/src/plugins/debridge/airdropFetcher.d.ts +2 -1
  8. package/src/plugins/debridge/airdropFetcher.js +34 -19
  9. package/src/plugins/debridge/airdropFetcher.js.map +1 -1
  10. package/src/plugins/debridge/constants.d.ts +9 -1
  11. package/src/plugins/debridge/constants.js +8 -5
  12. package/src/plugins/debridge/constants.js.map +1 -1
  13. package/src/plugins/debridge/index.d.ts +2 -2
  14. package/src/plugins/debridge/index.js +5 -2
  15. package/src/plugins/debridge/index.js.map +1 -1
  16. package/src/plugins/flash/perpetualFetcher.js +1 -12
  17. package/src/plugins/flash/perpetualFetcher.js.map +1 -1
  18. package/src/plugins/futarchy/constants.d.ts +6 -1
  19. package/src/plugins/futarchy/constants.js +16 -5
  20. package/src/plugins/futarchy/constants.js.map +1 -1
  21. package/src/plugins/futarchy/daosJob.js +7 -10
  22. package/src/plugins/futarchy/daosJob.js.map +1 -1
  23. package/src/plugins/sanctum/s1AirdropFetcher.js +63 -10
  24. package/src/plugins/sanctum/s1AirdropFetcher.js.map +1 -1
  25. package/src/plugins/sushiswap/helpers.js +24 -24
  26. package/src/plugins/uniswap-v2/helpers.js +22 -22
  27. package/src/plugins/zeta/airdropFetcher.js +14 -14
  28. package/src/utils/misc/getDecimalsForToken.js +0 -7
  29. package/src/utils/misc/getDecimalsForToken.js.map +1 -1
  30. package/src/utils/sei/constants.js +8 -8
  31. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # @sonarwatch/portfolio-plugins
2
-
3
- This library is @sonarwatch/portfolio-plugins
1
+ # @sonarwatch/portfolio-plugins
2
+
3
+ This library is @sonarwatch/portfolio-plugins
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.12.138",
3
+ "version": "0.12.140",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
package/src/index.js CHANGED
@@ -501,7 +501,7 @@ exports.airdropFetchers = [
501
501
  parcl_1.airdropFetcher,
502
502
  deepbook_1.airdropFetcher,
503
503
  suins_1.airdropFetcher,
504
- debridge_1.airdropFetcher,
504
+ ...debridge_1.airdropFetchers,
505
505
  ];
506
506
  exports.airdropFetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.airdropFetchers);
507
507
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAKyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAI6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAK0B;AAC1B,6CAG0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,6CAI0B;AAC1B,+CAI2B;AAC3B,qDAG8B;AAC9B,iDAI4B;AA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B,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,uBAAoB;IACvB,GAAG,mBAAgB;IACnB,GAAG,iBAAc;IACjB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,iBAAc;IACjB,GAAG,iBAAc;IACjB,GAAG,kBAAe;IAClB,GAAG,oBAAiB;IACpB,GAAG,8BAA2B;IAC9B,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,iBAAc;IACjB,GAAG,mBAAgB;IACnB,GAAG,mBAAgB;IACnB,GAAG,gBAAa;IAChB,GAAG,mBAAgB;IACnB,GAAG,gBAAa;CACjB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC;AAE/D,QAAA,eAAe,GAAqB;IAC/C,GAAG,yBAAsB;IACzB,GAAG,wBAAqB;IACxB,GAAG,yBAAsB;IACzB,sBAAmB;IACnB,sBAAmB;IACnB,yBAAsB;IACtB,sBAAmB;IACnB,yBAAsB;CACvB,CAAC;AACW,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAKyB;AACzB,2CAIyB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IACd,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,kBAAe;IAClB,GAAG,cAAW;IACd,GAAG,mBAAgB;IACnB,GAAG,eAAY;IACf,GAAG,iBAAc;IACjB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,iBAAc;IACjB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,uBAAoB;IACvB,GAAG,mBAAgB;IACnB,GAAG,iBAAc;IACjB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,iBAAc;IACjB,GAAG,iBAAc;IACjB,GAAG,kBAAe;IAClB,GAAG,oBAAiB;IACpB,GAAG,8BAA2B;IAC9B,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,iBAAc;IACjB,GAAG,mBAAgB;IACnB,GAAG,mBAAgB;IACnB,GAAG,gBAAa;IAChB,GAAG,mBAAgB;IACnB,GAAG,gBAAa;CACjB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC;AAE/D,QAAA,eAAe,GAAqB;IAC/C,GAAG,yBAAsB;IACzB,GAAG,wBAAqB;IACxB,GAAG,yBAAsB;IACzB,sBAAmB;IACnB,sBAAmB;IACnB,yBAAsB;IACtB,sBAAmB;IACnB,GAAG,0BAAuB;CAC3B,CAAC;AACW,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
@@ -36,27 +36,27 @@ exports.getBalancerPoolsV2 = void 0;
36
36
  const graphql_request_1 = __importStar(require("graphql-request"));
37
37
  function getBalancerPoolsV2(url) {
38
38
  return __awaiter(this, void 0, void 0, function* () {
39
- const query = (0, graphql_request_1.gql) `
40
- query pools {
41
- pools(
42
- first: 1000
43
- orderBy: totalLiquidity
44
- orderDirection: desc
45
- where: { totalLiquidity_gt: "500" }
46
- ) {
47
- id
48
- address
49
- symbol
50
- totalLiquidity
51
- totalShares
52
- tokens {
53
- balance
54
- decimals
55
- symbol
56
- address
57
- }
58
- }
59
- }
39
+ const query = (0, graphql_request_1.gql) `
40
+ query pools {
41
+ pools(
42
+ first: 1000
43
+ orderBy: totalLiquidity
44
+ orderDirection: desc
45
+ where: { totalLiquidity_gt: "500" }
46
+ ) {
47
+ id
48
+ address
49
+ symbol
50
+ totalLiquidity
51
+ totalShares
52
+ tokens {
53
+ balance
54
+ decimals
55
+ symbol
56
+ address
57
+ }
58
+ }
59
+ }
60
60
  `;
61
61
  const res = yield (0, graphql_request_1.default)(url, query);
62
62
  const pools = res.pools;
@@ -1,2 +1,3 @@
1
1
  import { AirdropFetcher } from '../../AirdropFetcher';
2
- export declare const airdropFetcher: AirdropFetcher;
2
+ export declare const airdropFetcherEvm: AirdropFetcher;
3
+ export declare const airdropFetcherSolana: AirdropFetcher;
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.airdropFetcher = void 0;
15
+ exports.airdropFetcherSolana = exports.airdropFetcherEvm = void 0;
16
16
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
17
17
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
18
18
  const axios_1 = __importDefault(require("axios"));
@@ -23,31 +23,46 @@ const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
23
23
  const apiRes = yield axios_1.default.get(constants_1.apiUrl + owner, {
24
24
  timeout: 1000,
25
25
  });
26
- let amount = 0;
27
- if (apiRes.data.distributions) {
28
- const tokens = apiRes.data.distributions.map((dis) => new bignumber_js_1.default(dis.tokens).div(dbrFactor));
29
- amount += tokens
30
- .reduce((prev, curr) => prev.plus(curr), new bignumber_js_1.default(0))
31
- .toNumber();
26
+ if (!apiRes.data.distributions || apiRes.data.distributions.length === 0) {
27
+ return (0, AirdropFetcher_1.getAirdropRaw)({
28
+ statics: constants_1.firstDistribStatics,
29
+ items: [
30
+ {
31
+ amount: 0,
32
+ isClaimed: false,
33
+ label: 'DBR',
34
+ address: constants_1.dbrMint,
35
+ imageUri: constants_1.dbrMint ? undefined : constants_1.platform.image,
36
+ },
37
+ ],
38
+ });
39
+ }
40
+ const items = [];
41
+ for (const distribution of apiRes.data.distributions) {
42
+ const tokens = new bignumber_js_1.default(distribution.tokens).div(dbrFactor);
43
+ items.push({
44
+ amount: tokens.toNumber(),
45
+ isClaimed: false,
46
+ label: 'DBR',
47
+ address: constants_1.dbrMint,
48
+ imageUri: constants_1.dbrMint ? undefined : constants_1.platform.image,
49
+ });
32
50
  }
33
51
  return (0, AirdropFetcher_1.getAirdropRaw)({
34
- statics: constants_1.airdropStatics,
35
- items: [
36
- {
37
- amount,
38
- isClaimed: false,
39
- label: 'DBR',
40
- address: constants_1.dbrMint,
41
- imageUri: constants_1.dbrMint ? undefined : constants_1.platform.image,
42
- },
43
- ],
52
+ statics: constants_1.firstDistribStatics,
53
+ items,
44
54
  });
45
55
  });
46
- exports.airdropFetcher = {
47
- id: constants_1.airdropStatics.id,
56
+ exports.airdropFetcherEvm = {
57
+ id: `${constants_1.firstDistribStatics.id}-evm`,
48
58
  networkId: portfolio_core_1.NetworkId.ethereum,
49
59
  executor,
50
60
  };
61
+ exports.airdropFetcherSolana = {
62
+ id: `${constants_1.firstDistribStatics.id}-solana`,
63
+ networkId: portfolio_core_1.NetworkId.solana,
64
+ executor,
65
+ };
51
66
  // export const fetcher = airdropFetcherToFetcher(
52
67
  // airdropFetcher,
53
68
  // platform.id,
@@ -1 +1 @@
1
- {"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../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AAc,CAAC,EAAE;IACrB,SAAS,EAAE,0BAAS,CAAC,QAAQ;IAC7B,QAAQ;CACT,CAAC;AACF,kDAAkD;AAClD,oBAAoB;AACpB,iBAAiB;AACjB,wBAAwB;AACxB,4BAA4B;AAC5B,KAAK"}
1
+ {"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AACrC,kDAA6C;AAC7C,yDAI8B;AAC9B,2CAMqB;AAGrB,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,uBAAW,CAAA,CAAC,CAAC;AAEnD,MAAM,QAAQ,GAA2B,CAAO,KAAa,EAAE,EAAE;IAC/D,MAAM,MAAM,GAA+B,MAAM,eAAK,CAAC,GAAG,CAAC,kBAAM,GAAG,KAAK,EAAE;QACzE,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzE,OAAO,IAAA,8BAAa,EAAC;YACnB,OAAO,EAAE,+BAAmB;YAC5B,KAAK,EAAE;gBACL;oBACE,MAAM,EAAE,CAAC;oBACT,SAAS,EAAE,KAAK;oBAChB,KAAK,EAAE,KAAK;oBACZ,OAAO,EAAE,mBAAO;oBAChB,QAAQ,EAAE,mBAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAW,CAAC,KAAK;iBAClD;aACF;SACF,CAAC,CAAC;IACL,CAAC;IAED,MAAM,KAAK,GAAG,EAAE,CAAC;IACjB,KAAK,MAAM,YAAY,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;QACrD,MAAM,MAAM,GAAG,IAAI,sBAAS,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAEjE,KAAK,CAAC,IAAI,CAAC;YACT,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE;YACzB,SAAS,EAAE,KAAK;YAChB,KAAK,EAAE,KAAK;YACZ,OAAO,EAAE,mBAAO;YAChB,QAAQ,EAAE,mBAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAW,CAAC,KAAK;SAClD,CAAC,CAAC;IACL,CAAC;IAED,OAAO,IAAA,8BAAa,EAAC;QACnB,OAAO,EAAE,+BAAmB;QAC5B,KAAK;KACN,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEW,QAAA,iBAAiB,GAAmB;IAC/C,EAAE,EAAE,GAAG,+BAAmB,CAAC,EAAE,MAAM;IACnC,SAAS,EAAE,0BAAS,CAAC,QAAQ;IAC7B,QAAQ;CACT,CAAC;AAEW,QAAA,oBAAoB,GAAmB;IAClD,EAAE,EAAE,GAAG,+BAAmB,CAAC,EAAE,SAAS;IACtC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AACF,kDAAkD;AAClD,oBAAoB;AACpB,iBAAiB;AACjB,wBAAwB;AACxB,4BAA4B;AAC5B,KAAK"}
@@ -2,7 +2,15 @@ import { Platform } from '@sonarwatch/portfolio-core';
2
2
  import { AirdropStatics } from '../../AirdropFetcher';
3
3
  export declare const platformId = "debridge";
4
4
  export declare const platform: Platform;
5
- export declare const airdropStatics: AirdropStatics;
5
+ export declare const commonStatics: {
6
+ claimLink: string;
7
+ emitterLink: string;
8
+ emitterName: string;
9
+ image: string;
10
+ };
11
+ export declare const firstDistribStatics: AirdropStatics;
12
+ export declare const secondDistribStatics: AirdropStatics;
13
+ export declare const staticsByTitle: Map<string, AirdropStatics>;
6
14
  export declare const dbrMint: undefined;
7
15
  export declare const dbrDecimals = 6;
8
16
  export declare const apiUrl = "https://points-api.debridge.foundation/api/TokenDistribution/";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.apiUrl = exports.dbrDecimals = exports.dbrMint = exports.airdropStatics = exports.platform = exports.platformId = void 0;
3
+ exports.apiUrl = exports.dbrDecimals = exports.dbrMint = exports.staticsByTitle = exports.secondDistribStatics = exports.firstDistribStatics = exports.commonStatics = exports.platform = exports.platformId = void 0;
4
4
  exports.platformId = 'debridge';
5
5
  exports.platform = {
6
6
  id: exports.platformId,
@@ -10,15 +10,18 @@ exports.platform = {
10
10
  twitter: 'https://x.com/deBridgeFinance',
11
11
  defiLlamaId: 'debridge', // from https://defillama.com/docs/api
12
12
  };
13
- exports.airdropStatics = {
13
+ exports.commonStatics = {
14
14
  claimLink: 'https://debridge.foundation/',
15
15
  emitterLink: 'https://debridge.finance/',
16
16
  emitterName: 'deBridge',
17
- id: `${exports.platformId}-token-launch`,
18
17
  image: 'https://sonar.watch/img/platforms/debridge.webp',
19
- claimEnd: undefined,
20
- claimStart: undefined,
21
18
  };
19
+ exports.firstDistribStatics = Object.assign(Object.assign({}, exports.commonStatics), { id: `${exports.platformId}-dis1`, claimEnd: undefined, claimStart: 1724940000000 });
20
+ exports.secondDistribStatics = Object.assign(Object.assign({}, exports.commonStatics), { id: `${exports.platformId}-dis2`, claimEnd: undefined, claimStart: 1740751200000 });
21
+ exports.staticsByTitle = new Map([
22
+ ['First Distribution', exports.firstDistribStatics],
23
+ ['Second Distribution', exports.secondDistribStatics],
24
+ ]);
22
25
  exports.dbrMint = undefined;
23
26
  exports.dbrDecimals = 6;
24
27
  exports.apiUrl = 'https://points-api.debridge.foundation/api/TokenDistribution/';
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/constants.ts"],"names":[],"mappings":";;;AAGa,QAAA,UAAU,GAAG,UAAU,CAAC;AACxB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,+BAA+B;IACxC,WAAW,EAAE,UAAU,EAAE,sCAAsC;CAChE,CAAC;AACW,QAAA,cAAc,GAAmB;IAC5C,SAAS,EAAE,8BAA8B;IACzC,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,UAAU;IACvB,EAAE,EAAE,GAAG,kBAAU,eAAe;IAChC,KAAK,EAAE,iDAAiD;IACxD,QAAQ,EAAE,SAAS;IACnB,UAAU,EAAE,SAAS;CACtB,CAAC;AAEW,QAAA,OAAO,GAAG,SAAS,CAAC;AACpB,QAAA,WAAW,GAAG,CAAC,CAAC;AAChB,QAAA,MAAM,GACjB,+DAA+D,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/constants.ts"],"names":[],"mappings":";;;AAGa,QAAA,UAAU,GAAG,UAAU,CAAC;AACxB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,+BAA+B;IACxC,WAAW,EAAE,UAAU,EAAE,sCAAsC;CAChE,CAAC;AAEW,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE,8BAA8B;IACzC,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,UAAU;IACvB,KAAK,EAAE,iDAAiD;CACzD,CAAC;AAEW,QAAA,mBAAmB,mCAC3B,qBAAa,KAChB,EAAE,EAAE,GAAG,kBAAU,OAAO,EACxB,QAAQ,EAAE,SAAS,EACnB,UAAU,EAAE,aAAa,IACzB;AAEW,QAAA,oBAAoB,mCAC5B,qBAAa,KAChB,EAAE,EAAE,GAAG,kBAAU,OAAO,EACxB,QAAQ,EAAE,SAAS,EACnB,UAAU,EAAE,aAAa,IACzB;AAEW,QAAA,cAAc,GAAgC,IAAI,GAAG,CAAC;IACjE,CAAC,oBAAoB,EAAE,2BAAmB,CAAC;IAC3C,CAAC,qBAAqB,EAAE,4BAAoB,CAAC;CAC9C,CAAC,CAAC;AAEU,QAAA,OAAO,GAAG,SAAS,CAAC;AACpB,QAAA,WAAW,GAAG,CAAC,CAAC;AAChB,QAAA,MAAM,GACjB,+DAA+D,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { Platform } from '@sonarwatch/portfolio-core';
2
2
  import { Fetcher } from '../../Fetcher';
3
3
  import { Job } from '../../Job';
4
- import { airdropFetcher } from './airdropFetcher';
4
+ import { AirdropFetcher } from '../../AirdropFetcher';
5
5
  export declare const platforms: Platform[];
6
6
  export declare const jobs: Job[];
7
7
  export declare const fetchers: Fetcher[];
8
- export { airdropFetcher };
8
+ export declare const airdropFetchers: AirdropFetcher[];
@@ -1,10 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.airdropFetcher = exports.fetchers = exports.jobs = exports.platforms = void 0;
3
+ exports.airdropFetchers = exports.fetchers = exports.jobs = exports.platforms = void 0;
4
4
  const constants_1 = require("./constants");
5
5
  const airdropFetcher_1 = require("./airdropFetcher");
6
- Object.defineProperty(exports, "airdropFetcher", { enumerable: true, get: function () { return airdropFetcher_1.airdropFetcher; } });
7
6
  exports.platforms = [constants_1.platform];
8
7
  exports.jobs = [];
9
8
  exports.fetchers = [];
9
+ exports.airdropFetchers = [
10
+ airdropFetcher_1.airdropFetcherEvm,
11
+ airdropFetcher_1.airdropFetcherSolana,
12
+ ];
10
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/index.ts"],"names":[],"mappings":";;;AAGA,2CAAuC;AACvC,qDAAkD;AAKzC,+FALA,+BAAc,OAKA;AAHV,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/index.ts"],"names":[],"mappings":";;;AAGA,2CAAuC;AACvC,qDAA2E;AAG9D,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,EAAE,CAAC;AACzB,QAAA,eAAe,GAAqB;IAC/C,kCAAiB;IACjB,qCAAoB;CACrB,CAAC"}
@@ -19,7 +19,6 @@ const constants_1 = require("./constants");
19
19
  const clients_1 = require("../../utils/clients");
20
20
  const solana_1 = require("../../utils/solana");
21
21
  const helpers_1 = require("../../utils/solana/pyth/helpers");
22
- const constants_2 = require("../tokens/constants");
23
22
  const filters_1 = require("./filters");
24
23
  const structs_1 = require("./structs");
25
24
  const structs_2 = require("../jupiter/exchange/structs");
@@ -44,14 +43,6 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
44
43
  MarketById.set(market.pubkey, market);
45
44
  });
46
45
  const pythPricesByAccount = yield (0, helpers_1.getPythPricesAsMap)(client, oraclesPubkeys);
47
- const tokensDetailsById = new Map();
48
- const tokensDetails = yield cache.getItems(marketsInfos
49
- .map((acc) => [
50
- acc.targetCustodyAccount.mint,
51
- acc.collateralCustodyAccount.mint,
52
- ])
53
- .flat(), { prefix: constants_2.tokenListsDetailsPrefix, networkId: portfolio_core_1.NetworkId.solana });
54
- tokensDetails.forEach((tD) => tD ? tokensDetailsById.set(tD.address, tD) : undefined);
55
46
  const elements = [];
56
47
  for (const position of perpetualsPositions) {
57
48
  if (position.sizeUsd.isLessThanOrEqualTo(0))
@@ -79,8 +70,6 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
79
70
  continue;
80
71
  const currentPrice = new bignumber_js_1.default(targetPrice);
81
72
  const leverage = sizeUsd.dividedBy(collateralUsd);
82
- const targetDetails = tokensDetailsById.get(targetCustody.mint);
83
- const targetName = targetDetails ? targetDetails.symbol : '';
84
73
  const collatAmount = collateralUsd
85
74
  .dividedBy(collateralCustodyPrice)
86
75
  .dividedBy(usdFactor);
@@ -139,7 +128,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
139
128
  platformId: constants_1.platformId,
140
129
  label: 'Leverage',
141
130
  value,
142
- name: `${targetName} ${side} ${leverage.decimalPlaces(2)}x`,
131
+ name: `${side} ${leverage.decimalPlaces(2)}x`,
143
132
  data: {
144
133
  borrowedAssets,
145
134
  borrowedValue,
@@ -1 +1 @@
1
- {"version":3,"file":"perpetualFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/perpetualFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AACrC,6CAA4C;AAG5C,2CAA+D;AAC/D,iDAAsD;AACtD,+CAA8D;AAC9D,6DAAqE;AACrE,mDAA8D;AAC9D,uCAAsD;AACtD,uCAA2C;AAE3C,yDAAmD;AAEnD,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC,CAAC;AACzC,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,mBAAmB,GAAG,MAAM,IAAA,iCAAwB,EACxD,MAAM,EACN,wBAAc,EACd,oBAAQ,EACR,IAAA,mCAAyB,EAAC,KAAK,CAAC,CACjC,CAAC;IACF,IACE,mBAAmB,CAAC,MAAM,KAAK,CAAC;QAChC,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QAElE,OAAO,EAAE,CAAC;IAEZ,MAAM,YAAY,GAAG,MAAM,KAAK,CAAC,OAAO,CAAe,sBAA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,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,UAAU;YACjB,KAAK;YACL,IAAI,EAAE,GAAG,UAAU,IAAI,IAAI,IAAI,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG;YAC3D,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,YAAY;gBACZ,WAAW;gBACX,WAAW;gBACX,KAAK;aACN;SACF,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,aAAa;IAC9B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"perpetualFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/perpetualFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AACrC,6CAA4C;AAG5C,2CAA+D;AAC/D,iDAAsD;AACtD,+CAA8D;AAC9D,6DAAqE;AACrE,uCAAsD;AACtD,uCAA2C;AAE3C,yDAAmD;AAEnD,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC,CAAC;AACzC,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,mBAAmB,GAAG,MAAM,IAAA,iCAAwB,EACxD,MAAM,EACN,wBAAc,EACd,oBAAQ,EACR,IAAA,mCAAyB,EAAC,KAAK,CAAC,CACjC,CAAC;IACF,IACE,mBAAmB,CAAC,MAAM,KAAK,CAAC;QAChC,CAAC,mBAAmB,CAAC,IAAI,CAAC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3,4 +3,9 @@ import { Platform } from '@sonarwatch/portfolio-core';
3
3
  export declare const platformId = "futarchy";
4
4
  export declare const platform: Platform;
5
5
  export declare const daoPid: PublicKey;
6
- export declare const daoNameById: Map<string, string>;
6
+ type DaoInfo = {
7
+ name: string;
8
+ tokenName: string;
9
+ };
10
+ export declare const daoNameById: Map<string, DaoInfo>;
11
+ export {};
@@ -13,10 +13,21 @@ exports.platform = {
13
13
  };
14
14
  exports.daoPid = new web3_js_1.PublicKey('autoQP9RmUNkzzKRXsMkWicDVZ3h29vvyMDcAYjCxxg');
15
15
  exports.daoNameById = new Map([
16
- ['CNMZgxYsQpygk8CLN9Su1igwXX2kHtcawaNAGuBPv3G9', 'MetaDAO '],
17
- ['5vVCYQHPd8o3pGejYWzKZtnUSdLjXzDZcjZQxiFumXXx', 'Drift '],
18
- ['ofvb3CPvEyRfD5az8PAqW6ATpPqVBeiB5zBnpPR5cgm', 'Future '],
19
- ['9TKh2yav4WpSNkFV2cLybrWZETBWZBkQ6WB6qV9Nt9dJ', "Dean's List "],
20
- ['EqgPmuKVugfsjjUpxNtqeTkM34oh2H3BVvEfFJTo2Uj5', 'Manifesto '],
16
+ [
17
+ 'CNMZgxYsQpygk8CLN9Su1igwXX2kHtcawaNAGuBPv3G9',
18
+ { name: 'MetaDAO ', tokenName: 'META' },
19
+ ],
20
+ [
21
+ '5vVCYQHPd8o3pGejYWzKZtnUSdLjXzDZcjZQxiFumXXx',
22
+ { name: 'Drift ', tokenName: 'DRIFT' },
23
+ ],
24
+ [
25
+ 'ofvb3CPvEyRfD5az8PAqW6ATpPqVBeiB5zBnpPR5cgm',
26
+ { name: 'Future ', tokenName: 'FUTURE' },
27
+ ],
28
+ [
29
+ '9TKh2yav4WpSNkFV2cLybrWZETBWZBkQ6WB6qV9Nt9dJ',
30
+ { name: "Dean's List ", tokenName: 'DEAN' },
31
+ ],
21
32
  ]);
22
33
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/futarchy/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,UAAU,CAAC;AACxB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,gDAAgD;IACvD,qEAAqE;IACrE,OAAO,EAAE,8BAA8B;IACvC,OAAO,EAAE,8BAA8B;CACxC,CAAC;AAEW,QAAA,MAAM,GAAG,IAAI,mBAAS,CACjC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,WAAW,GAAwB,IAAI,GAAG,CAAC;IACtD,CAAC,8CAA8C,EAAE,UAAU,CAAC;IAC5D,CAAC,8CAA8C,EAAE,QAAQ,CAAC;IAC1D,CAAC,6CAA6C,EAAE,SAAS,CAAC;IAC1D,CAAC,8CAA8C,EAAE,cAAc,CAAC;IAChE,CAAC,8CAA8C,EAAE,YAAY,CAAC;CAC/D,CAAC,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/futarchy/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,UAAU,CAAC;AACxB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,gDAAgD;IACvD,qEAAqE;IACrE,OAAO,EAAE,8BAA8B;IACvC,OAAO,EAAE,8BAA8B;CACxC,CAAC;AAEW,QAAA,MAAM,GAAG,IAAI,mBAAS,CACjC,6CAA6C,CAC9C,CAAC;AAOW,QAAA,WAAW,GAAyB,IAAI,GAAG,CAAC;IACvD;QACE,8CAA8C;QAC9C,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE;KACxC;IACD;QACE,8CAA8C;QAC9C,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE;KACvC;IACD;QACE,6CAA6C;QAC7C,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE;KACzC;IACD;QACE,8CAA8C;QAC9C,EAAE,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE;KAC5C;CACF,CAAC,CAAC"}
@@ -17,7 +17,6 @@ const constants_1 = require("./constants");
17
17
  const structs_1 = require("./structs");
18
18
  const helpers_1 = require("../scallop/helpers");
19
19
  const getLpTokenSource_1 = require("../../utils/misc/getLpTokenSource");
20
- const constants_2 = require("../tokens/constants");
21
20
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
22
21
  var _a, _b, _c;
23
22
  const client = (0, clients_1.getClientSolana)();
@@ -54,14 +53,10 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
54
53
  underlyingMints.add(acc.underlyingTokenMint.toString());
55
54
  }
56
55
  });
57
- const [tokensAccounts, mintsAccounts, underlyingTokenPriceById, tokenList] = yield Promise.all([
56
+ const [tokensAccounts, mintsAccounts, underlyingTokenPriceById] = yield Promise.all([
58
57
  (0, solana_1.getParsedMultipleAccountsInfo)(client, solana_1.tokenAccountStruct, tokensPubkeys),
59
58
  (0, solana_1.getParsedMultipleAccountsInfo)(client, solana_1.mintAccountStruct, mintsPubkeys),
60
59
  yield cache.getTokenPricesAsMap(Array.from(underlyingMints), portfolio_core_1.NetworkId.solana),
61
- cache.getItems(Array.from(underlyingMints), {
62
- prefix: constants_2.tokenListsDetailsPrefix,
63
- networkId: portfolio_core_1.NetworkId.solana,
64
- }),
65
60
  ]);
66
61
  const tokenAccountById = new Map();
67
62
  const mintAccountById = new Map();
@@ -74,7 +69,6 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
74
69
  if (acc)
75
70
  mintAccountById.set(acc.pubkey.toString(), acc);
76
71
  });
77
- tokenList.forEach((tD) => tD ? tokensDetailsById.set(tD.address, tD) : undefined);
78
72
  const tokenPriceSources = [];
79
73
  const usdSourceById = new Map();
80
74
  for (const proposal of proposals) {
@@ -89,7 +83,10 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
89
83
  const dao = daoById.get(proposal.dao.toString());
90
84
  if (!passAmm || !failAmm || !quoteVault || !baseVault || !dao)
91
85
  continue;
92
- const daoName = constants_1.daoNameById.get(dao.pubkey.toString());
86
+ const daoInfo = constants_1.daoNameById.get(dao.pubkey.toString());
87
+ if (!daoInfo)
88
+ continue;
89
+ const { name: daoName, tokenName: daoTokenName } = daoInfo;
93
90
  const elementName = `${daoName} Proposal : ${(0, helpers_1.shortenAddress)(proposal.pubkey.toString())} (${structs_1.ProposalState[proposal.state]})`;
94
91
  const usdReserveAccount = tokenAccountById.get(quoteVault.underlyingTokenAccount.toString());
95
92
  const [usdTokenPrice, baseUnderlyingTokenPrice, usdUnderlyingTokenDetail, baseUnderlyingTokenDetail,] = [
@@ -199,8 +196,8 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
199
196
  const isPassAmm = amm.pubkey.toString() === proposal.passAmm.toString();
200
197
  const liquidityName = isPassAmm ? 'Pass LP' : 'Fail LP';
201
198
  const baseLiquidityName = isPassAmm
202
- ? `p${baseUnderlyingTokenDetail.symbol}`
203
- : `f${baseUnderlyingTokenDetail.symbol}`;
199
+ ? `p${daoTokenName}`
200
+ : `f${daoTokenName}`;
204
201
  const basePrice = amm.quoteAmount
205
202
  .dividedBy(Math.pow(10, amm.quoteMintDecimals))
206
203
  .dividedBy(amm.baseAmount.dividedBy(Math.pow(10, amm.baseMintDecimals)))
@@ -1 +1 @@
1
- {"version":3,"file":"daosJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/futarchy/daosJob.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,+DAKoC;AAGpC,iDAAsD;AACtD,+CAQ4B;AAC5B,wDAA4D;AAC5D,2CAA8D;AAC9D,uCASmB;AACnB,gDAAoD;AACpD,wEAAqE;AACrE,mDAA8D;AAE9D,MAAM,QAAQ,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CAAC;IACH,CAAC;IACD,MAAM,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AACtD,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,OAAO;IACxB,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -21,6 +21,11 @@ const deriveClaimStatus_1 = require("../../utils/solana/jupiter/deriveClaimStatu
21
21
  const clients_1 = require("../../utils/clients");
22
22
  const constants_1 = require("../jupiter/launchpad/constants");
23
23
  const constants_2 = require("./constants");
24
+ const claimStart = new bignumber_js_1.default(1721314800000);
25
+ const earnestClaimDuration = 180 * 24 * 60 * 60 * 1000;
26
+ const earnestClaimEnd = claimStart.plus(earnestClaimDuration);
27
+ const capitalClaimDuration = 14 * 24 * 60 * 60 * 1000;
28
+ const capitalClaimEnd = claimStart.plus(capitalClaimDuration);
24
29
  const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
25
30
  const claimProofBase = yield axios_1.default
26
31
  .get(`${constants_1.lfgApiBaseUrl}/CLoUDKc4Ane7HeQcPpE3YHnznRxhMimJ4MyaUqyHFzAu/${owner}`, {
@@ -46,13 +51,37 @@ const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
46
51
  });
47
52
  const client = (0, clients_1.getClientSolana)();
48
53
  const claimStatusAddress = (0, deriveClaimStatus_1.deriveClaimStatus)(owner, claimProofBase.data.merkle_tree, constants_1.lfgDisProgram);
49
- const claimStatusAaccount = yield client.getAccountInfo(claimStatusAddress);
54
+ const claimStatusAccount = yield client.getAccountInfo(claimStatusAddress);
55
+ let capitalAmount = new bignumber_js_1.default(0);
56
+ if (claimStatusAccount) {
57
+ const txs = yield client.getSignaturesForAddress(claimStatusAddress);
58
+ const accountCreationTx = txs[0];
59
+ const claimedTs = accountCreationTx.blockTime;
60
+ if (claimedTs) {
61
+ const ratio = new bignumber_js_1.default(claimedTs * 1000)
62
+ .minus(claimStart)
63
+ .dividedBy(capitalClaimDuration)
64
+ .plus(1);
65
+ capitalAmount = new bignumber_js_1.default(claimProofBase.data.amount).times(ratio);
66
+ }
67
+ else {
68
+ capitalAmount = new bignumber_js_1.default(claimProofBase.data.amount);
69
+ }
70
+ }
71
+ else if (capitalClaimEnd.isLessThan(Date.now())) {
72
+ capitalAmount = new bignumber_js_1.default(claimProofBase.data.amount).times(2);
73
+ }
74
+ else {
75
+ const ratio = new bignumber_js_1.default(Date.now())
76
+ .minus(claimStart)
77
+ .dividedBy(earnestClaimDuration)
78
+ .plus(1);
79
+ capitalAmount = new bignumber_js_1.default(claimProofBase.data.amount).times(ratio);
80
+ }
50
81
  const items = [
51
82
  {
52
- amount: new bignumber_js_1.default(claimProofBase.data.amount)
53
- .div(Math.pow(10, constants_2.cloudDecimals))
54
- .toNumber(),
55
- isClaimed: claimStatusAaccount !== null,
83
+ amount: capitalAmount.div(Math.pow(10, constants_2.cloudDecimals)).toNumber(),
84
+ isClaimed: claimStatusAccount !== null,
56
85
  label: 'CLOUD',
57
86
  address: constants_2.cloudMint,
58
87
  },
@@ -71,12 +100,36 @@ const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
71
100
  // If Earnestness elligible
72
101
  if (claimProofEarn && typeof claimProofEarn.data !== 'string') {
73
102
  const earnClaimStatusAddress = (0, deriveClaimStatus_1.deriveClaimStatus)(owner, claimProofEarn.data.merkle_tree, constants_1.lfgDisProgram);
74
- const earnClaimStatusAaccount = yield client.getAccountInfo(earnClaimStatusAddress);
103
+ const earnClaimStatusAccount = yield client.getAccountInfo(earnClaimStatusAddress);
104
+ let earnestAmount = new bignumber_js_1.default(0);
105
+ if (earnClaimStatusAccount) {
106
+ const txs = yield client.getSignaturesForAddress(earnClaimStatusAddress);
107
+ const accountCreationTx = txs[0];
108
+ const time = accountCreationTx.blockTime;
109
+ if (time) {
110
+ const ratio = new bignumber_js_1.default(time * 1000)
111
+ .minus(claimStart)
112
+ .dividedBy(earnestClaimDuration)
113
+ .plus(1);
114
+ earnestAmount = new bignumber_js_1.default(claimProofEarn.data.amount).times(ratio);
115
+ }
116
+ else {
117
+ earnestAmount = new bignumber_js_1.default(claimProofEarn.data.amount);
118
+ }
119
+ }
120
+ else if (earnestClaimEnd.isLessThan(Date.now())) {
121
+ earnestAmount = new bignumber_js_1.default(claimProofEarn.data.amount).times(2);
122
+ }
123
+ else {
124
+ const ratio = new bignumber_js_1.default(Date.now())
125
+ .minus(claimStart)
126
+ .dividedBy(earnestClaimDuration)
127
+ .plus(1);
128
+ earnestAmount = new bignumber_js_1.default(claimProofEarn.data.amount).times(ratio);
129
+ }
75
130
  items.push({
76
- amount: new bignumber_js_1.default(claimProofEarn.data.amount)
77
- .div(Math.pow(10, constants_2.cloudDecimals))
78
- .toNumber(),
79
- isClaimed: earnClaimStatusAaccount !== null,
131
+ amount: earnestAmount.div(Math.pow(10, constants_2.cloudDecimals)).toNumber(),
132
+ isClaimed: earnClaimStatusAccount !== null,
80
133
  label: 'CLOUD',
81
134
  address: constants_2.cloudMint,
82
135
  });