@sonarwatch/portfolio-plugins 0.14.98 → 0.14.100

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. package/CHANGELOG.md +1992 -1984
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/src/index.js +9 -0
  5. package/src/index.js.map +1 -1
  6. package/src/orphanPlatforms.js +6 -0
  7. package/src/orphanPlatforms.js.map +1 -1
  8. package/src/plugins/balancer/helpers/pools.js +21 -21
  9. package/src/plugins/drift-market-maker-vault/constants.d.ts +6 -0
  10. package/src/plugins/drift-market-maker-vault/constants.js +28 -1
  11. package/src/plugins/drift-market-maker-vault/constants.js.map +1 -1
  12. package/src/plugins/flash/constants.js +2 -0
  13. package/src/plugins/flash/constants.js.map +1 -1
  14. package/src/plugins/fragmetric/constants.d.ts +13 -3
  15. package/src/plugins/fragmetric/constants.js +16 -4
  16. package/src/plugins/fragmetric/constants.js.map +1 -1
  17. package/src/plugins/fragmetric/pricingJob.js +49 -62
  18. package/src/plugins/fragmetric/pricingJob.js.map +1 -1
  19. package/src/plugins/iloop/constants.d.ts +8 -0
  20. package/src/plugins/iloop/constants.js +16 -0
  21. package/src/plugins/iloop/constants.js.map +1 -0
  22. package/src/plugins/iloop/depositsFetcher.d.ts +3 -0
  23. package/src/plugins/iloop/depositsFetcher.js +75 -0
  24. package/src/plugins/iloop/depositsFetcher.js.map +1 -0
  25. package/src/plugins/iloop/index.d.ts +6 -0
  26. package/src/plugins/iloop/index.js +13 -0
  27. package/src/plugins/iloop/index.js.map +1 -0
  28. package/src/plugins/iloop/marketsJob.d.ts +3 -0
  29. package/src/plugins/{jupiter/governance/jupuary2025AirdropFetcher.js → iloop/marketsJob.js} +21 -20
  30. package/src/plugins/iloop/marketsJob.js.map +1 -0
  31. package/src/plugins/iloop/structs.d.ts +36 -0
  32. package/src/plugins/iloop/structs.js +33 -0
  33. package/src/plugins/iloop/structs.js.map +1 -0
  34. package/src/plugins/jupiter/exchange/lockFetcher.js +2 -0
  35. package/src/plugins/jupiter/exchange/lockFetcher.js.map +1 -1
  36. package/src/plugins/jupiter/exchange/structs.d.ts +4 -0
  37. package/src/plugins/jupiter/exchange/structs.js +6 -2
  38. package/src/plugins/jupiter/exchange/structs.js.map +1 -1
  39. package/src/plugins/jupiter/index.js +0 -2
  40. package/src/plugins/jupiter/index.js.map +1 -1
  41. package/src/plugins/jupiter/launchpad/constants.js +18 -0
  42. package/src/plugins/jupiter/launchpad/constants.js.map +1 -1
  43. package/src/plugins/sonic/airdropFetcher.d.ts +3 -0
  44. package/src/plugins/sonic/airdropFetcher.js +58 -0
  45. package/src/plugins/sonic/airdropFetcher.js.map +1 -0
  46. package/src/plugins/sonic/constants.d.ts +11 -0
  47. package/src/plugins/sonic/constants.js +25 -0
  48. package/src/plugins/sonic/constants.js.map +1 -0
  49. package/src/plugins/sonic/index.d.ts +8 -0
  50. package/src/plugins/sonic/index.js +14 -0
  51. package/src/plugins/sonic/index.js.map +1 -0
  52. package/src/plugins/sonic/stakingFetcher.d.ts +3 -0
  53. package/src/plugins/sonic/stakingFetcher.js +55 -0
  54. package/src/plugins/sonic/stakingFetcher.js.map +1 -0
  55. package/src/plugins/sonic/structs.d.ts +26 -0
  56. package/src/plugins/sonic/structs.js +27 -0
  57. package/src/plugins/sonic/structs.js.map +1 -0
  58. package/src/plugins/sonic/types.d.ts +20 -0
  59. package/src/plugins/sonic/types.js +3 -0
  60. package/src/plugins/sonic/types.js.map +1 -0
  61. package/src/plugins/sushiswap/helpers.js +24 -24
  62. package/src/plugins/tensor/constants.js +1 -1
  63. package/src/plugins/tensor/constants.js.map +1 -1
  64. package/src/plugins/tensor/season4AirdropFetcher.js +8 -2
  65. package/src/plugins/tensor/season4AirdropFetcher.js.map +1 -1
  66. package/src/plugins/uniswap-v2/helpers.js +22 -22
  67. package/src/plugins/zeta/airdropFetcher.js +14 -14
  68. package/src/utils/sei/constants.js +8 -8
  69. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  70. package/src/plugins/jupiter/governance/jupuary2025AirdropFetcher.d.ts +0 -2
  71. package/src/plugins/jupiter/governance/jupuary2025AirdropFetcher.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/sonic/types.ts"],"names":[],"mappings":""}
@@ -54,30 +54,30 @@ function sushiV3PairToUniV2(pair) {
54
54
  }
55
55
  function getV3PairsAddresses(url, length = 300) {
56
56
  return __awaiter(this, void 0, void 0, function* () {
57
- const query = (0, graphql_request_1.gql) `
58
- {
59
- pools(
60
- orderBy: totalValueLockedUSD
61
- first: ${length}
62
- orderDirection: desc
63
- where: { volumeUSD_not: "0", liquidity_not: "0" }
64
- ) {
65
- id
66
- token0Price
67
- token1Price
68
- liquidity
69
- token0 {
70
- id
71
- totalSupply
72
- decimals
73
- }
74
- token1 {
75
- id
76
- totalSupply
77
- decimals
78
- }
79
- }
80
- }
57
+ const query = (0, graphql_request_1.gql) `
58
+ {
59
+ pools(
60
+ orderBy: totalValueLockedUSD
61
+ first: ${length}
62
+ orderDirection: desc
63
+ where: { volumeUSD_not: "0", liquidity_not: "0" }
64
+ ) {
65
+ id
66
+ token0Price
67
+ token1Price
68
+ liquidity
69
+ token0 {
70
+ id
71
+ totalSupply
72
+ decimals
73
+ }
74
+ token1 {
75
+ id
76
+ totalSupply
77
+ decimals
78
+ }
79
+ }
80
+ }
81
81
  `;
82
82
  const res = yield (0, graphql_request_1.default)(url, query);
83
83
  const pools = res.pools;
@@ -15,7 +15,7 @@ exports.tnsrMint = 'TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6';
15
15
  exports.magmaProgramId = '3zK38YBP6u3BpLUpaa6QhRHh4VXdv3J8cmD24fFpuyqy';
16
16
  exports.s4Statics = {
17
17
  claimStart: 1738281600000,
18
- claimEnd: undefined,
18
+ claimEnd: 1753963200000,
19
19
  id: 'tensor-s4',
20
20
  emitterName: 'Tensor',
21
21
  emitterLink: 'https://www.tensor.trade/',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAI/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,+CAA+C;IACtD,OAAO,EAAE,+BAA+B;IACxC,OAAO,EAAE,2BAA2B;CACrC,CAAC;AAEW,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,QAAQ,GAAG,6CAA6C,CAAC;AAEzD,QAAA,cAAc,GAAG,8CAA8C,CAAC;AAEhE,QAAA,SAAS,GAAmB;IACvC,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,SAAS;IACnB,EAAE,EAAE,WAAW;IACf,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,2BAA2B;IACxC,SAAS,EAAE,mCAAmC;IAC9C,KAAK,EAAE,+CAA+C;CACvD,CAAC;AAEW,QAAA,iBAAiB,GAAmB;IAC/C,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,aAAa;IACvB,EAAE,EAAE,mBAAmB;IACvB,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,2BAA2B;IACxC,SAAS,EAAE,0CAA0C;IACrD,KAAK,EAAE,+CAA+C;CACvD,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAI/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,+CAA+C;IACtD,OAAO,EAAE,+BAA+B;IACxC,OAAO,EAAE,2BAA2B;CACrC,CAAC;AAEW,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,QAAQ,GAAG,6CAA6C,CAAC;AAEzD,QAAA,cAAc,GAAG,8CAA8C,CAAC;AAEhE,QAAA,SAAS,GAAmB;IACvC,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,aAAa;IACvB,EAAE,EAAE,WAAW;IACf,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,2BAA2B;IACxC,SAAS,EAAE,mCAAmC;IAC9C,KAAK,EAAE,+CAA+C;CACvD,CAAC;AAEW,QAAA,iBAAiB,GAAmB;IAC/C,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,aAAa;IACvB,EAAE,EAAE,mBAAmB;IACvB,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,2BAA2B;IACxC,SAAS,EAAE,0CAA0C;IACrD,KAAK,EAAE,+CAA+C;CACvD,CAAC"}
@@ -14,21 +14,27 @@ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
14
14
  const constants_1 = require("./constants");
15
15
  const season4Alloc_1 = require("./season4Alloc");
16
16
  const AirdropFetcher_1 = require("../../AirdropFetcher");
17
+ const deriveClaimStatus_1 = require("../../utils/solana/jupiter/deriveClaimStatus");
18
+ const clients_1 = require("../../utils/clients");
17
19
  const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
18
20
  const baseAlloc = season4Alloc_1.season4Allocations[owner];
19
21
  const vectorAlloc = season4Alloc_1.vectorBonusAllocations[owner];
22
+ const claimPda = (0, deriveClaimStatus_1.deriveClaimStatus)(owner, '5qJtp1rTEnW3qUi7SaQpsscqNnvCSo91WFYYbfNJBPDv', 'Td1ST8yc9Vt7vsBY7rZzrCjkXeGnr4ECMtso9ueLhyQ');
23
+ const client = (0, clients_1.getClientSolana)();
24
+ const claimAccount = yield client.getAccountInfo(claimPda);
25
+ const isClaimed = !!claimAccount;
20
26
  return (0, AirdropFetcher_1.getAirdropRaw)({
21
27
  statics: constants_1.s4Statics,
22
28
  items: [
23
29
  {
24
30
  amount: baseAlloc !== null && baseAlloc !== void 0 ? baseAlloc : 0,
25
- isClaimed: false,
31
+ isClaimed,
26
32
  label: 'TNSR',
27
33
  address: constants_1.tnsrMint,
28
34
  },
29
35
  {
30
36
  amount: vectorAlloc !== null && vectorAlloc !== void 0 ? vectorAlloc : 0,
31
- isClaimed: false,
37
+ isClaimed,
32
38
  label: 'TNSR',
33
39
  address: constants_1.tnsrMint,
34
40
  },
@@ -1 +1 @@
1
- {"version":3,"file":"season4AirdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/season4AirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAAuD;AACvD,2CAA4D;AAC5D,iDAA4E;AAC5E,yDAK8B;AAE9B,MAAM,QAAQ,GAA2B,CAAO,KAAa,EAAE,EAAE;IAC/D,MAAM,SAAS,GAAG,iCAAkB,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,WAAW,GAAG,qCAAsB,CAAC,KAAK,CAAC,CAAC;IAElD,OAAO,IAAA,8BAAa,EAAC;QACnB,OAAO,EAAE,qBAAS;QAClB,KAAK,EAAE;YACL;gBACE,MAAM,EAAE,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,CAAC;gBACtB,SAAS,EAAE,KAAK;gBAChB,KAAK,EAAE,MAAM;gBACb,OAAO,EAAE,oBAAQ;aAClB;YACD;gBACE,MAAM,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,CAAC;gBACxB,SAAS,EAAE,KAAK;gBAChB,KAAK,EAAE,MAAM;gBACb,OAAO,EAAE,oBAAQ;aAClB;SACF;KACF,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEW,QAAA,gBAAgB,GAAmB;IAC9C,EAAE,EAAE,qBAAS,CAAC,EAAE;IAChB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEW,QAAA,SAAS,GAAG,IAAA,wCAAuB,EAC9C,wBAAgB,EAChB,oBAAQ,CAAC,EAAE,EACX,WAAW,EACX,qBAAS,CAAC,QAAQ,CACnB,CAAC"}
1
+ {"version":3,"file":"season4AirdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/season4AirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAAuD;AACvD,2CAA4D;AAC5D,iDAA4E;AAC5E,yDAK8B;AAC9B,oFAAiF;AACjF,iDAAsD;AAEtD,MAAM,QAAQ,GAA2B,CAAO,KAAa,EAAE,EAAE;IAC/D,MAAM,SAAS,GAAG,iCAAkB,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,WAAW,GAAG,qCAAsB,CAAC,KAAK,CAAC,CAAC;IAElD,MAAM,QAAQ,GAAG,IAAA,qCAAiB,EAChC,KAAK,EACL,8CAA8C,EAC9C,6CAA6C,CAC9C,CAAC;IAEF,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAE3D,MAAM,SAAS,GAAG,CAAC,CAAC,YAAY,CAAC;IAEjC,OAAO,IAAA,8BAAa,EAAC;QACnB,OAAO,EAAE,qBAAS;QAClB,KAAK,EAAE;YACL;gBACE,MAAM,EAAE,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,CAAC;gBACtB,SAAS;gBACT,KAAK,EAAE,MAAM;gBACb,OAAO,EAAE,oBAAQ;aAClB;YACD;gBACE,MAAM,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,CAAC;gBACxB,SAAS;gBACT,KAAK,EAAE,MAAM;gBACb,OAAO,EAAE,oBAAQ;aAClB;SACF;KACF,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEW,QAAA,gBAAgB,GAAmB;IAC9C,EAAE,EAAE,qBAAS,CAAC,EAAE;IAChB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEW,QAAA,SAAS,GAAG,IAAA,wCAAuB,EAC9C,wBAAgB,EAChB,oBAAQ,CAAC,EAAE,EACX,WAAW,EACX,qBAAS,CAAC,QAAQ,CACnB,CAAC"}
@@ -40,28 +40,28 @@ function getPairKey(version) {
40
40
  exports.getPairKey = getPairKey;
41
41
  function getPairsV2FromTheGraph(url, length = 300) {
42
42
  return __awaiter(this, void 0, void 0, function* () {
43
- const query = (0, graphql_request_1.gql) `
44
- {
45
- pairs(
46
- orderBy: reserveUSD
47
- first: ${length}
48
- orderDirection: desc
49
- where: { trackedReserveETH_not: "0" }
50
- ) {
51
- id
52
- reserve0
53
- reserve1
54
- totalSupply
55
- token0 {
56
- id
57
- decimals
58
- }
59
- token1 {
60
- id
61
- decimals
62
- }
63
- }
64
- }
43
+ const query = (0, graphql_request_1.gql) `
44
+ {
45
+ pairs(
46
+ orderBy: reserveUSD
47
+ first: ${length}
48
+ orderDirection: desc
49
+ where: { trackedReserveETH_not: "0" }
50
+ ) {
51
+ id
52
+ reserve0
53
+ reserve1
54
+ totalSupply
55
+ token0 {
56
+ id
57
+ decimals
58
+ }
59
+ token1 {
60
+ id
61
+ decimals
62
+ }
63
+ }
64
+ }
65
65
  `;
66
66
  const res = yield (0, graphql_request_1.default)(url, query);
67
67
  const pairs = res.pairs;
@@ -40,20 +40,20 @@ const clients_1 = require("../../utils/clients");
40
40
  const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
41
41
  const helpers_1 = require("./helpers");
42
42
  const AirdropFetcher_1 = require("../../AirdropFetcher");
43
- const query = (0, graphql_request_1.gql) `
44
- query GetAirdropFinalFrontend($authority: String!) {
45
- getAirdropFinalFrontend(authority: $authority) {
46
- authority
47
- community_allocation
48
- eligibility
49
- main_allocation
50
- og_allocation
51
- s1_allocation
52
- s2_allocation
53
- total_allocation
54
- __typename
55
- }
56
- }
43
+ const query = (0, graphql_request_1.gql) `
44
+ query GetAirdropFinalFrontend($authority: String!) {
45
+ getAirdropFinalFrontend(authority: $authority) {
46
+ authority
47
+ community_allocation
48
+ eligibility
49
+ main_allocation
50
+ og_allocation
51
+ s1_allocation
52
+ s2_allocation
53
+ total_allocation
54
+ __typename
55
+ }
56
+ }
57
57
  `;
58
58
  const networkId = portfolio_core_1.NetworkId.solana;
59
59
  const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.poolQueryMsg = exports.minterQueryMsg = exports.tokenInfoQueryMsg = exports.infoQueryMsg = void 0;
4
- exports.infoQueryMsg = JSON.parse(`{
5
- "info": {}
4
+ exports.infoQueryMsg = JSON.parse(`{
5
+ "info": {}
6
6
  }`);
7
- exports.tokenInfoQueryMsg = JSON.parse(`{
8
- "token_info": {}
7
+ exports.tokenInfoQueryMsg = JSON.parse(`{
8
+ "token_info": {}
9
9
  }`);
10
- exports.minterQueryMsg = JSON.parse(`{
11
- "minter": {}
10
+ exports.minterQueryMsg = JSON.parse(`{
11
+ "minter": {}
12
12
  }`);
13
- exports.poolQueryMsg = JSON.parse(`{
14
- "pool": {}
13
+ exports.poolQueryMsg = JSON.parse(`{
14
+ "pool": {}
15
15
  }`);
16
16
  //# sourceMappingURL=constants.js.map
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  function getQueryBalanceByOwner(owner) {
4
- return JSON.parse(`{
5
- "balance": {
6
- "address": "${owner}"
7
- }
4
+ return JSON.parse(`{
5
+ "balance": {
6
+ "address": "${owner}"
7
+ }
8
8
  }`);
9
9
  }
10
10
  exports.default = getQueryBalanceByOwner;
@@ -1,2 +0,0 @@
1
- import { AirdropFetcher } from '../../../AirdropFetcher';
2
- export declare const airdropFetcher: AirdropFetcher;
@@ -1 +0,0 @@
1
- {"version":3,"file":"jupuary2025AirdropFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/governance/jupuary2025AirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAAuD;AACvD,4DAIiC;AAEjC,sDAAiD;AACjD,2CAA6C;AAE7C,MAAM,QAAQ,GAA2B,CAAO,KAAa,EAAE,EAAE;IAC/D,MAAM,GAAG,GAAG,MAAM,KAAK,CACrB,gDAAgD,KAAK,EAAE,CACxD,CAAC;IACF,MAAM,QAAQ,GAA0C,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;IAEzE,OAAO,IAAA,8BAAa,EAAC;QACnB,OAAO,EAAE,0BAAc;QACvB,KAAK,EAAE;YACL;gBACE,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,eAAe;gBACrC,SAAS,EAAE,KAAK;gBAChB,KAAK,EAAE,SAAS;gBAChB,OAAO,EAAE,mBAAO;aACjB;SACF;KACF,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEW,QAAA,cAAc,GAAmB;IAC5C,EAAE,EAAE,0BAAc,CAAC,EAAE;IACrB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC"}