@sonarwatch/portfolio-plugins 0.12.179 → 0.12.180

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/loopscale/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,6CAA4C;AAE5C,2CAAyC;AAEzC,iDAAsD;AACtD,+CAA8D;AAC9D,uCAA4C;AAC5C,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IACrC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,UAAU,EACV,yBAAe,EACf,IAAI,mBAAS,CAAC,KAAK,CAAC,EACpB;QACE;YACE,QAAQ,EAAE,yBAAe,CAAC,QAAQ;SACnC;QACD;YACE,MAAM,EAAE;gBACN,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,EAAE;aACX;SACF;KACF,CACF,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,aAAa,GAAG,MAAM,KAAK,CAAC,aAAa,CAC7C,oCAAmB,EACnB,0BAAS,CAAC,MAAM,CACjB,CAAC;IACF,MAAM,MAAM,GAA0B,EAAE,CAAC;IACzC,QAAQ,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACvB,IAAI,GAAG,CAAC,eAAe,CAAC,MAAM,EAAE;YAAE,OAAO;QACzC,MAAM,MAAM,GAAG,GAAG,CAAC,eAAe;aAC/B,GAAG,CAAC,SAAA,EAAE,EAAI,qCAAoB,CAAA,CAAC;aAC/B,QAAQ,EAAE,CAAC;QACd,MAAM,KAAK,GAAG,IAAA,gCAAsB,EAClC,oCAAmB,EACnB,MAAM,EACN,0BAAS,CAAC,MAAM,EAChB,aAAa,CACd,CAAC;QACF,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC,CAAC,CAAC;IACH,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,MAAM,OAAO,GAA6B;QACxC,SAAS,EAAE,0BAAS,CAAC,MAAM;QAC3B,KAAK,EAAE,SAAS;QAChB,UAAU,EAAV,sBAAU;QACV,IAAI,EAAE,qCAAoB,CAAC,QAAQ;QACnC,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACjD,IAAI,EAAE;YACJ,MAAM;SACP;KACF,CAAC;IACF,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/loopscale/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAA6E;AAE7E,2CAAyC;AAEzC,iDAAsD;AACtD,uCASmB;AACnB,gFAA6E;AAC7E,kFAA0D;AAE1D,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,SAAS,GAAG,MAAM,IAAA,sBAAY,EAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAExD,IAAI,CAAC,SAAS,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IAEjC,MAAM,cAAc,GAAG,MAAM,IAAA,oBAAU,EAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAE/D,IAAI,CAAC,cAAc,CAA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AC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACnD,OAAO,CAAC,gBAAgB,CAAC;gBACvB,OAAO;gBACP,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;aACrC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACrD,OAAO,CAAC,gBAAgB,CAAC;gBACvB,OAAO;gBACP,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;aACvC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC3D,OAAO,CAAC,gBAAgB,CAAC;gBACvB,OAAO;gBACP,MAAM,EAAE,wBAAwB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;aAC7C,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -1,19 +1,100 @@
1
1
  /// <reference types="node" />
2
- import { BeetStruct } from '@metaplex-foundation/beet';
3
2
  import { PublicKey } from '@solana/web3.js';
4
3
  import BigNumber from 'bignumber.js';
5
- export declare enum State {
6
- Uninitialized = 0,
7
- StakePool = 1,
8
- InactiveStakePool = 2,
9
- StakeAccount = 3
10
- }
11
- export type Liquidity = {
4
+ import { BeetStruct, FixableBeetStruct } from '@metaplex-foundation/beet';
5
+ export type RoleAccount = {
12
6
  buffer: Buffer;
13
- state: State;
14
- mint: PublicKey;
15
- owner: PublicKey;
16
- amountDeposited: BigNumber;
17
- space: number[];
7
+ user: PublicKey;
8
+ organization: PublicKey;
9
+ type: number;
18
10
  };
19
- export declare const liquidityStruct: BeetStruct<Liquidity, Partial<Liquidity>>;
11
+ export declare const roleAccountStruct: BeetStruct<RoleAccount, Partial<RoleAccount>>;
12
+ export type LoanVault = {
13
+ buffer: Buffer;
14
+ order: PublicKey;
15
+ lender: PublicKey;
16
+ borrower: PublicKey;
17
+ collateral: PublicKey;
18
+ debt_note: PublicKey;
19
+ credit_note: PublicKey;
20
+ credit_claimed: boolean;
21
+ debt_claimed: boolean;
22
+ loan_start_time: BigNumber;
23
+ num_fees_outstanding: BigNumber;
24
+ fees_received: BigNumber;
25
+ };
26
+ export declare const loanVaultStruct: BeetStruct<LoanVault, Partial<LoanVault>>;
27
+ export type EscrowAccount = {
28
+ buffer: Buffer;
29
+ organization_identifier: PublicKey;
30
+ num_escrowed: BigNumber;
31
+ nonce: PublicKey;
32
+ origination_cap: BigNumber;
33
+ cumulative_amount_originated: BigNumber;
34
+ external_yield_source: number;
35
+ };
36
+ export declare const escrowAccountStruct: BeetStruct<EscrowAccount, Partial<EscrowAccount>>;
37
+ export type Order = {
38
+ buffer: Buffer;
39
+ version: number;
40
+ nonce: PublicKey;
41
+ maker: PublicKey;
42
+ designated_taker: PublicKey;
43
+ principal_mint: PublicKey;
44
+ principal_amount: BigNumber;
45
+ collateral_mint: PublicKey;
46
+ collateral_amount: BigNumber;
47
+ maker_role: number;
48
+ last_updated_slot: BigNumber;
49
+ max_outstanding_payments: BigNumber;
50
+ last_payment_id: BigNumber;
51
+ final_payment_id: BigNumber;
52
+ final_payment_time_offset: BigNumber;
53
+ status: number;
54
+ default_type: number;
55
+ created_at: BigNumber;
56
+ funding_type: number;
57
+ allow_early_repayments: boolean;
58
+ origination_fee: BigNumber;
59
+ liquidation_manager: PublicKey;
60
+ market_manager: PublicKey;
61
+ liquidation_threshold: BigNumber;
62
+ refinance_enabled: boolean;
63
+ max_refinance_apy: BigNumber;
64
+ refinance_duration: BigNumber;
65
+ refinance_duration_type: number;
66
+ };
67
+ export declare const orderStruct: BeetStruct<Order, Partial<Order>>;
68
+ export type Ledger = {
69
+ ledger_id: BigNumber;
70
+ principal_due: BigNumber;
71
+ principal_repaid: BigNumber;
72
+ interest_due: BigNumber;
73
+ interest_repaid: BigNumber;
74
+ due_time_offset: BigNumber;
75
+ paid_time: BigNumber;
76
+ payment_type: number;
77
+ is_filled: boolean;
78
+ grace_period: BigNumber;
79
+ late_payment_fee: BigNumber;
80
+ early_payment_fee: BigNumber;
81
+ payment_window: BigNumber;
82
+ reserve: number[];
83
+ };
84
+ export declare const ledgerStruct: BeetStruct<Ledger, Partial<Ledger>>;
85
+ export type OrderLedger = {
86
+ buffer: Buffer;
87
+ version: number;
88
+ order: PublicKey;
89
+ ledgers: Ledger[];
90
+ };
91
+ export declare const orderLedgerStruct: FixableBeetStruct<OrderLedger, Partial<OrderLedger>>;
92
+ export type Lockbox = {
93
+ buffer: Buffer;
94
+ nonce: PublicKey;
95
+ name: Buffer;
96
+ initialization_time: BigNumber;
97
+ nft_mint: PublicKey;
98
+ state: number;
99
+ };
100
+ export declare const lockboxStruct: FixableBeetStruct<Lockbox, Partial<Lockbox>>;
@@ -1,22 +1,96 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.liquidityStruct = exports.State = void 0;
3
+ exports.lockboxStruct = exports.orderLedgerStruct = exports.ledgerStruct = exports.orderStruct = exports.escrowAccountStruct = exports.loanVaultStruct = exports.roleAccountStruct = void 0;
4
4
  const beet_1 = require("@metaplex-foundation/beet");
5
5
  const beet_solana_1 = require("@metaplex-foundation/beet-solana");
6
6
  const solana_1 = require("../../utils/solana");
7
- var State;
8
- (function (State) {
9
- State[State["Uninitialized"] = 0] = "Uninitialized";
10
- State[State["StakePool"] = 1] = "StakePool";
11
- State[State["InactiveStakePool"] = 2] = "InactiveStakePool";
12
- State[State["StakeAccount"] = 3] = "StakeAccount";
13
- })(State || (exports.State = State = {}));
14
- exports.liquidityStruct = new beet_1.BeetStruct([
7
+ exports.roleAccountStruct = new beet_1.BeetStruct([
15
8
  ['buffer', (0, solana_1.blob)(8)],
9
+ ['user', beet_solana_1.publicKey],
10
+ ['organization', beet_solana_1.publicKey],
11
+ ['type', beet_1.u32],
12
+ ], (args) => args);
13
+ exports.loanVaultStruct = new beet_1.BeetStruct([
14
+ ['buffer', (0, solana_1.blob)(8)],
15
+ ['order', beet_solana_1.publicKey],
16
+ ['lender', beet_solana_1.publicKey],
17
+ ['borrower', beet_solana_1.publicKey],
18
+ ['collateral', beet_solana_1.publicKey],
19
+ ['debt_note', beet_solana_1.publicKey],
20
+ ['credit_note', beet_solana_1.publicKey],
21
+ ['credit_claimed', beet_1.bool],
22
+ ['debt_claimed', beet_1.bool],
23
+ ['loan_start_time', solana_1.i64],
24
+ ['num_fees_outstanding', solana_1.u64],
25
+ ['fees_received', solana_1.u64],
26
+ ], (args) => args);
27
+ exports.escrowAccountStruct = new beet_1.BeetStruct([
28
+ ['buffer', (0, solana_1.blob)(8)],
29
+ ['organization_identifier', beet_solana_1.publicKey],
30
+ ['num_escrowed', solana_1.u64],
31
+ ['nonce', beet_solana_1.publicKey],
32
+ ['origination_cap', solana_1.u64],
33
+ ['cumulative_amount_originated', solana_1.u64],
34
+ ['external_yield_source', beet_1.u8],
35
+ ], (args) => args);
36
+ exports.orderStruct = new beet_1.BeetStruct([
37
+ ['buffer', (0, solana_1.blob)(8)],
38
+ ['version', beet_1.u8],
39
+ ['nonce', beet_solana_1.publicKey],
40
+ ['maker', beet_solana_1.publicKey],
41
+ ['designated_taker', beet_solana_1.publicKey],
42
+ ['principal_mint', beet_solana_1.publicKey],
43
+ ['principal_amount', solana_1.u64],
44
+ ['collateral_mint', beet_solana_1.publicKey],
45
+ ['collateral_amount', solana_1.u64],
46
+ ['maker_role', beet_1.u8],
47
+ ['last_updated_slot', solana_1.u64],
48
+ ['max_outstanding_payments', solana_1.u64],
49
+ ['last_payment_id', solana_1.u64],
50
+ ['final_payment_id', solana_1.u64],
51
+ ['final_payment_time_offset', solana_1.i64],
52
+ ['status', beet_1.u8],
53
+ ['default_type', beet_1.u8],
54
+ ['created_at', solana_1.i64],
55
+ ['funding_type', beet_1.u8],
56
+ ['allow_early_repayments', beet_1.bool],
57
+ ['origination_fee', solana_1.u64],
58
+ ['liquidation_manager', beet_solana_1.publicKey],
59
+ ['market_manager', beet_solana_1.publicKey],
60
+ ['liquidation_threshold', solana_1.u64],
61
+ ['refinance_enabled', beet_1.bool],
62
+ ['max_refinance_apy', solana_1.u64],
63
+ ['refinance_duration', solana_1.i64],
64
+ ['refinance_duration_type', beet_1.u8],
65
+ ], (args) => args);
66
+ exports.ledgerStruct = new beet_1.BeetStruct([
67
+ ['ledger_id', solana_1.u64],
68
+ ['principal_due', solana_1.u64],
69
+ ['principal_repaid', solana_1.u64],
70
+ ['interest_due', solana_1.u64],
71
+ ['interest_repaid', solana_1.u64],
72
+ ['due_time_offset', solana_1.i64],
73
+ ['paid_time', solana_1.i64],
74
+ ['payment_type', beet_1.u8],
75
+ ['is_filled', beet_1.bool],
76
+ ['grace_period', solana_1.i64],
77
+ ['late_payment_fee', solana_1.u64],
78
+ ['early_payment_fee', solana_1.u64],
79
+ ['payment_window', solana_1.i64],
80
+ ['reserve', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 32)],
81
+ ], (args) => args);
82
+ exports.orderLedgerStruct = new beet_1.FixableBeetStruct([
83
+ ['buffer', (0, solana_1.blob)(8)],
84
+ ['version', beet_1.u8],
85
+ ['order', beet_solana_1.publicKey],
86
+ ['ledgers', (0, beet_1.array)(exports.ledgerStruct)],
87
+ ], (args) => args);
88
+ exports.lockboxStruct = new beet_1.FixableBeetStruct([
89
+ ['buffer', (0, solana_1.blob)(8)],
90
+ ['nonce', beet_solana_1.publicKey],
91
+ ['name', (0, solana_1.blob)(24)],
92
+ ['initialization_time', solana_1.i64],
93
+ ['nft_mint', beet_solana_1.publicKey],
16
94
  ['state', beet_1.u8],
17
- ['mint', beet_solana_1.publicKey],
18
- ['owner', beet_solana_1.publicKey],
19
- ['amountDeposited', solana_1.u64],
20
- ['space', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 128)],
21
95
  ], (args) => args);
22
96
  //# sourceMappingURL=structs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/loopscale/structs.ts"],"names":[],"mappings":";;;AAAA,oDAImC;AACnC,kEAA6D;AAG7D,+CAA+C;AAE/C,IAAY,KAKX;AALD,WAAY,KAAK;IACf,mDAAa,CAAA;IACb,2CAAS,CAAA;IACT,2DAAiB,CAAA;IACjB,iDAAY,CAAA;AACd,CAAC,EALW,KAAK,qBAAL,KAAK,QAKhB;AAWY,QAAA,eAAe,GAAG,IAAI,iBAAU,CAC3C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,OAAO,EAAE,SAAE,CAAC;IACb,CAAC,MAAM,EAAE,uBAAS,CAAC;IACnB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,iBAAiB,EAAE,YAAG,CAAC;IACxB,CAAC,OAAO,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,GAAG,CAAC,CAAC;CAC1C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAiB,CAC5B,CAAC"}
1
+ {"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/loopscale/structs.ts"],"names":[],"mappings":";;;AAEA,oDAQmC;AACnC,kEAA6D;AAC7D,+CAAoD;AASvC,QAAA,iBAAiB,GAAG,IAAI,iBAAU,CAC7C;IACE,CAAC,QAAQ,EAAE,IAAA,a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CAAC,IAAe,CAC1B,CAAC"}
@@ -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;
@@ -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;
@@ -42,20 +42,20 @@ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/token
42
42
  const clients_1 = require("../../utils/clients");
43
43
  const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
44
44
  const helpers_1 = require("./helpers");
45
- const query = (0, graphql_request_1.gql) `
46
- query GetAirdropFinalFrontend($authority: String!) {
47
- getAirdropFinalFrontend(authority: $authority) {
48
- authority
49
- community_allocation
50
- eligibility
51
- main_allocation
52
- og_allocation
53
- s1_allocation
54
- s2_allocation
55
- total_allocation
56
- __typename
57
- }
58
- }
45
+ const query = (0, graphql_request_1.gql) `
46
+ query GetAirdropFinalFrontend($authority: String!) {
47
+ getAirdropFinalFrontend(authority: $authority) {
48
+ authority
49
+ community_allocation
50
+ eligibility
51
+ main_allocation
52
+ og_allocation
53
+ s1_allocation
54
+ s2_allocation
55
+ total_allocation
56
+ __typename
57
+ }
58
+ }
59
59
  `;
60
60
  const networkId = portfolio_core_1.NetworkId.solana;
61
61
  const executor = (owner, cache) => __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,3 +0,0 @@
1
- import { Job } from '../../Job';
2
- declare const job: Job;
3
- export default job;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const portfolio_core_1 = require("@sonarwatch/portfolio-core");
13
- const constants_1 = require("./constants");
14
- const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
15
- yield cache.setItem('market_id', 'market_object', {
16
- prefix: constants_1.marketsCachePrefix,
17
- networkId: portfolio_core_1.NetworkId.ethereum,
18
- });
19
- });
20
- const job = {
21
- id: `${constants_1.platformId}-markets`,
22
- executor,
23
- label: 'normal',
24
- };
25
- exports.default = job;
26
- //# sourceMappingURL=marketsJob.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"marketsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/loopscale/marketsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAA6D;AAE7D,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,eAAe,EAAE;QAChD,MAAM,EAAE,8BAAkB;QAC1B,SAAS,EAAE,0BAAS,CAAC,QAAQ;KAC9B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}