@pythnetwork/price-pusher 9.2.0 → 9.3.0
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.
- package/lib/index.js +0 -0
- package/lib/injective/injective.d.ts +25 -11
- package/lib/injective/injective.d.ts.map +1 -1
- package/lib/injective/injective.js +111 -84
- package/package.json +26 -28
package/lib/index.js
CHANGED
|
File without changes
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { HexString, HermesClient } from "@pythnetwork/hermes-client";
|
|
2
|
-
import {
|
|
2
|
+
import { PriceItem, PriceInfo, IPricePusher, ChainPriceListener } from "../interface";
|
|
3
3
|
import { DurationInSeconds } from "../utils";
|
|
4
4
|
import { Logger } from "pino";
|
|
5
|
+
type InjectiveConfig = {
|
|
6
|
+
chainId: string;
|
|
7
|
+
gasMultiplier: number;
|
|
8
|
+
gasPrice: number;
|
|
9
|
+
priceIdsProcessChunkSize: number;
|
|
10
|
+
};
|
|
5
11
|
export declare class InjectivePriceListener extends ChainPriceListener {
|
|
6
12
|
private pythContractAddress;
|
|
7
13
|
private grpcEndpoint;
|
|
@@ -11,26 +17,34 @@ export declare class InjectivePriceListener extends ChainPriceListener {
|
|
|
11
17
|
});
|
|
12
18
|
getOnChainPriceInfo(priceId: HexString): Promise<PriceInfo | undefined>;
|
|
13
19
|
}
|
|
14
|
-
type InjectiveConfig = {
|
|
15
|
-
chainId: string;
|
|
16
|
-
gasMultiplier: number;
|
|
17
|
-
gasPrice: number;
|
|
18
|
-
priceIdsProcessChunkSize: number;
|
|
19
|
-
};
|
|
20
20
|
export declare class InjectivePricePusher implements IPricePusher {
|
|
21
21
|
private hermesClient;
|
|
22
22
|
private pythContractAddress;
|
|
23
23
|
private grpcEndpoint;
|
|
24
24
|
private logger;
|
|
25
|
-
private
|
|
25
|
+
private mnemonic;
|
|
26
26
|
private chainConfig;
|
|
27
|
-
private
|
|
27
|
+
private accounts; /** { address: Account } */
|
|
28
28
|
constructor(hermesClient: HermesClient, pythContractAddress: string, grpcEndpoint: string, logger: Logger, mnemonic: string, chainConfig?: Partial<InjectiveConfig>);
|
|
29
|
-
private
|
|
29
|
+
private getWallet;
|
|
30
30
|
private signAndBroadcastMsg;
|
|
31
|
-
getPriceFeedUpdateObject(priceIds: string[]): Promise<any>;
|
|
32
31
|
updatePriceFeed(priceIds: string[], pubTimesToPush: number[]): Promise<void>;
|
|
33
32
|
private updatePriceFeedChunk;
|
|
33
|
+
/**
|
|
34
|
+
* Get the fee for the transaction (using simulation).
|
|
35
|
+
*
|
|
36
|
+
* We also apply a multiplier to the gas used to apply a small
|
|
37
|
+
* buffer to the gas that'll be used.
|
|
38
|
+
*/
|
|
39
|
+
private getStdFee;
|
|
40
|
+
/**
|
|
41
|
+
* Get the latest VAAs for updatePriceFeed and then push them
|
|
42
|
+
*/
|
|
43
|
+
private getPriceFeedUpdateObject;
|
|
44
|
+
/**
|
|
45
|
+
* Get the update fee for the given VAAs (i.e the fee that is paid to the pyth contract)
|
|
46
|
+
*/
|
|
47
|
+
private getUpdateFee;
|
|
34
48
|
}
|
|
35
49
|
export {};
|
|
36
50
|
//# sourceMappingURL=injective.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"injective.d.ts","sourceRoot":"","sources":["../../src/injective/injective.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"injective.d.ts","sourceRoot":"","sources":["../../src/injective/injective.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EACL,SAAS,EACT,SAAS,EACT,YAAY,EACZ,kBAAkB,EACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAa7C,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAmB9B,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,wBAAwB,EAAE,MAAM,CAAC;CAClC,CAAC;AAGF,qBAAa,sBAAuB,SAAQ,kBAAkB;IAE1D,OAAO,CAAC,mBAAmB;IAC3B,OAAO,CAAC,YAAY;IAEpB,OAAO,CAAC,MAAM;gBAHN,mBAAmB,EAAE,MAAM,EAC3B,YAAY,EAAE,MAAM,EAC5B,UAAU,EAAE,SAAS,EAAE,EACf,MAAM,EAAE,MAAM,EACtB,MAAM,EAAE;QACN,gBAAgB,EAAE,iBAAiB,CAAC;KACrC;IAKG,mBAAmB,CACvB,OAAO,EAAE,SAAS,GACjB,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;CA4BlC;AAED,qBAAa,oBAAqB,YAAW,YAAY;IAOrD,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,mBAAmB;IAC3B,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,MAAM;IAThB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,QAAQ,CACX,CAAC,2BAA2B;gBAGvB,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE,MAAM,EAC3B,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,EACtB,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC;IAaxC,OAAO,CAAC,SAAS;YAWH,mBAAmB;IA+C3B,eAAe,CACnB,QAAQ,EAAE,MAAM,EAAE,EAClB,cAAc,EAAE,MAAM,EAAE,GACvB,OAAO,CAAC,IAAI,CAAC;YAuBF,oBAAoB;IA+ClC;;;;;OAKG;YACW,SAAS;IA0CvB;;OAEG;YACW,wBAAwB;IAsBtC;;OAEG;YACW,YAAY;CAwB3B"}
|
|
@@ -45,15 +45,15 @@ class InjectivePricePusher {
|
|
|
45
45
|
pythContractAddress;
|
|
46
46
|
grpcEndpoint;
|
|
47
47
|
logger;
|
|
48
|
-
|
|
48
|
+
mnemonic;
|
|
49
49
|
chainConfig;
|
|
50
|
-
|
|
50
|
+
accounts = {}; /** { address: Account } */
|
|
51
51
|
constructor(hermesClient, pythContractAddress, grpcEndpoint, logger, mnemonic, chainConfig) {
|
|
52
52
|
this.hermesClient = hermesClient;
|
|
53
53
|
this.pythContractAddress = pythContractAddress;
|
|
54
54
|
this.grpcEndpoint = grpcEndpoint;
|
|
55
55
|
this.logger = logger;
|
|
56
|
-
this.
|
|
56
|
+
this.mnemonic = mnemonic;
|
|
57
57
|
this.chainConfig = {
|
|
58
58
|
chainId: chainConfig?.chainId ?? INJECTIVE_TESTNET_CHAIN_ID,
|
|
59
59
|
gasMultiplier: chainConfig?.gasMultiplier ?? DEFAULT_GAS_MULTIPLIER,
|
|
@@ -62,74 +62,46 @@ class InjectivePricePusher {
|
|
|
62
62
|
DEFAULT_PRICE_IDS_PROCESS_CHUNK_SIZE,
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
getWallet(index) {
|
|
66
|
+
if (this.chainConfig.priceIdsProcessChunkSize === -1 ||
|
|
67
|
+
this.chainConfig.priceIdsProcessChunkSize === undefined) {
|
|
68
|
+
return sdk_ts_1.PrivateKey.fromMnemonic(this.mnemonic);
|
|
69
|
+
}
|
|
70
|
+
return sdk_ts_1.PrivateKey.fromMnemonic(this.mnemonic, `m/44'/60'/0'/0/${index}`);
|
|
67
71
|
}
|
|
68
|
-
async signAndBroadcastMsg(msg) {
|
|
72
|
+
async signAndBroadcastMsg(msg, index) {
|
|
69
73
|
const chainGrpcAuthApi = new sdk_ts_1.ChainGrpcAuthApi(this.grpcEndpoint);
|
|
74
|
+
const wallet = this.getWallet(index);
|
|
75
|
+
const injectiveAddress = wallet.toAddress().toBech32();
|
|
70
76
|
// Fetch the latest account details only if it's not stored.
|
|
71
|
-
this.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
accountNumber: this.account.baseAccount.accountNumber,
|
|
75
|
-
message: msg,
|
|
76
|
-
chainId: this.chainConfig.chainId,
|
|
77
|
-
pubKey: this.wallet.toPublicKey().toBase64(),
|
|
78
|
-
});
|
|
79
|
-
const txService = new sdk_ts_1.TxGrpcApi(this.grpcEndpoint);
|
|
80
|
-
// simulation
|
|
77
|
+
this.accounts[injectiveAddress] ??=
|
|
78
|
+
await chainGrpcAuthApi.fetchAccount(injectiveAddress);
|
|
79
|
+
const account = this.accounts[injectiveAddress];
|
|
81
80
|
try {
|
|
82
|
-
const { gasInfo: { gasUsed }, } = await txService.simulate(simulateTxRaw);
|
|
83
|
-
// simulation returns us the approximate gas used
|
|
84
|
-
// gas passed with the transaction should be more than that
|
|
85
|
-
// in order for it to be successfully executed
|
|
86
|
-
// this multiplier takes care of that
|
|
87
|
-
const gas = (gasUsed * this.chainConfig.gasMultiplier).toFixed();
|
|
88
|
-
const fee = {
|
|
89
|
-
amount: [
|
|
90
|
-
{
|
|
91
|
-
denom: "inj",
|
|
92
|
-
amount: (Number(gas) * this.chainConfig.gasPrice).toFixed(),
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
gas,
|
|
96
|
-
};
|
|
97
81
|
const { signBytes, txRaw } = (0, sdk_ts_1.createTransactionFromMsg)({
|
|
98
|
-
sequence:
|
|
99
|
-
accountNumber:
|
|
82
|
+
sequence: account.baseAccount.sequence,
|
|
83
|
+
accountNumber: account.baseAccount.accountNumber,
|
|
100
84
|
message: msg,
|
|
101
85
|
chainId: this.chainConfig.chainId,
|
|
102
|
-
fee,
|
|
103
|
-
pubKey:
|
|
86
|
+
fee: await this.getStdFee(msg, index),
|
|
87
|
+
pubKey: wallet.toPublicKey().toBase64(),
|
|
104
88
|
});
|
|
105
|
-
const sig = await
|
|
106
|
-
this.account.baseAccount.sequence++;
|
|
89
|
+
const sig = await wallet.sign(Buffer.from(signBytes));
|
|
107
90
|
/** Append Signatures */
|
|
108
91
|
txRaw.signatures = [sig];
|
|
109
92
|
// this takes approx 5 seconds
|
|
110
|
-
const txResponse = await
|
|
93
|
+
const txResponse = await new sdk_ts_1.TxGrpcApi(this.grpcEndpoint).broadcast(txRaw);
|
|
94
|
+
account.baseAccount.sequence++;
|
|
111
95
|
return txResponse;
|
|
112
96
|
}
|
|
113
97
|
catch (e) {
|
|
114
|
-
// The sequence number was invalid and hence we will have to fetch it again
|
|
98
|
+
// The sequence number was invalid and hence we will have to fetch it again
|
|
115
99
|
if (JSON.stringify(e).match(/account sequence mismatch/) !== null) {
|
|
116
|
-
|
|
117
|
-
this.account = null;
|
|
100
|
+
this.accounts[injectiveAddress] = undefined;
|
|
118
101
|
}
|
|
119
102
|
throw e;
|
|
120
103
|
}
|
|
121
104
|
}
|
|
122
|
-
async getPriceFeedUpdateObject(priceIds) {
|
|
123
|
-
const response = await this.hermesClient.getLatestPriceUpdates(priceIds, {
|
|
124
|
-
encoding: "base64",
|
|
125
|
-
});
|
|
126
|
-
const vaas = response.binary.data;
|
|
127
|
-
return {
|
|
128
|
-
update_price_feeds: {
|
|
129
|
-
data: vaas,
|
|
130
|
-
},
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
105
|
async updatePriceFeed(priceIds, pubTimesToPush) {
|
|
134
106
|
if (priceIds.length === 0) {
|
|
135
107
|
return;
|
|
@@ -140,46 +112,22 @@ class InjectivePricePusher {
|
|
|
140
112
|
? [priceIds]
|
|
141
113
|
: (0, utils_1.splitArrayToChunks)({
|
|
142
114
|
array: priceIds,
|
|
143
|
-
chunkSize: this.chainConfig.priceIdsProcessChunkSize,
|
|
115
|
+
chunkSize: Number(this.chainConfig.priceIdsProcessChunkSize),
|
|
144
116
|
});
|
|
145
|
-
|
|
146
|
-
await this.updatePriceFeedChunk(priceIdChunk, chunkIndex);
|
|
147
|
-
}
|
|
117
|
+
await Promise.all(priceIdChunks.map((priceIdChunk, chunkIndex) => this.updatePriceFeedChunk(priceIdChunk, chunkIndex)));
|
|
148
118
|
}
|
|
149
119
|
async updatePriceFeedChunk(priceIds, chunkIndex) {
|
|
150
|
-
let priceFeedUpdateObject;
|
|
151
120
|
try {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
let updateFeeQueryResponse;
|
|
160
|
-
try {
|
|
161
|
-
const api = new sdk_ts_1.ChainGrpcWasmApi(this.grpcEndpoint);
|
|
162
|
-
const { data } = await api.fetchSmartContractState(this.pythContractAddress, Buffer.from(JSON.stringify({
|
|
163
|
-
get_update_fee: {
|
|
164
|
-
vaas: priceFeedUpdateObject.update_price_feeds.data,
|
|
165
|
-
},
|
|
166
|
-
})).toString("base64"));
|
|
167
|
-
const json = Buffer.from(data).toString();
|
|
168
|
-
updateFeeQueryResponse = JSON.parse(json);
|
|
169
|
-
}
|
|
170
|
-
catch (err) {
|
|
171
|
-
this.logger.error(err, `Error fetching update fee for chunk ${chunkIndex}`);
|
|
172
|
-
// Throwing an error because it is likely an RPC issue
|
|
173
|
-
throw err;
|
|
174
|
-
}
|
|
175
|
-
try {
|
|
176
|
-
const executeMsg = sdk_ts_1.MsgExecuteContract.fromJSON({
|
|
177
|
-
sender: this.injectiveAddress(),
|
|
121
|
+
const priceFeedUpdateObject = await this.getPriceFeedUpdateObject(priceIds);
|
|
122
|
+
const updateFeeQueryResponse = await this.getUpdateFee(priceFeedUpdateObject.update_price_feeds.data);
|
|
123
|
+
const wallet = this.getWallet(chunkIndex);
|
|
124
|
+
const msg = sdk_ts_1.MsgExecuteContract.fromJSON({
|
|
125
|
+
sender: wallet.toAddress().toBech32(),
|
|
178
126
|
contractAddress: this.pythContractAddress,
|
|
179
127
|
msg: priceFeedUpdateObject,
|
|
180
128
|
funds: [updateFeeQueryResponse],
|
|
181
129
|
});
|
|
182
|
-
const rs = await this.signAndBroadcastMsg(
|
|
130
|
+
const rs = await this.signAndBroadcastMsg(msg, chunkIndex);
|
|
183
131
|
this.logger.info({ hash: rs.txHash }, `Successfully broadcasted txHash for chunk ${chunkIndex}`);
|
|
184
132
|
}
|
|
185
133
|
catch (err) {
|
|
@@ -195,5 +143,84 @@ class InjectivePricePusher {
|
|
|
195
143
|
this.logger.error(err, `Error executing messages for chunk ${chunkIndex}`);
|
|
196
144
|
}
|
|
197
145
|
}
|
|
146
|
+
/**
|
|
147
|
+
* Get the fee for the transaction (using simulation).
|
|
148
|
+
*
|
|
149
|
+
* We also apply a multiplier to the gas used to apply a small
|
|
150
|
+
* buffer to the gas that'll be used.
|
|
151
|
+
*/
|
|
152
|
+
async getStdFee(msg, index) {
|
|
153
|
+
const wallet = this.getWallet(index);
|
|
154
|
+
const injectiveAddress = wallet.toAddress().toBech32();
|
|
155
|
+
const account = this.accounts[injectiveAddress];
|
|
156
|
+
if (!account) {
|
|
157
|
+
throw new Error("Account not found");
|
|
158
|
+
}
|
|
159
|
+
const { txRaw: simulateTxRaw } = (0, sdk_ts_1.createTransactionFromMsg)({
|
|
160
|
+
sequence: account.baseAccount.sequence,
|
|
161
|
+
accountNumber: account.baseAccount.accountNumber,
|
|
162
|
+
message: msg,
|
|
163
|
+
chainId: this.chainConfig.chainId,
|
|
164
|
+
pubKey: wallet.toPublicKey().toBase64(),
|
|
165
|
+
});
|
|
166
|
+
try {
|
|
167
|
+
const result = await new sdk_ts_1.TxGrpcApi(this.grpcEndpoint).simulate(simulateTxRaw);
|
|
168
|
+
const gas = (result.gasInfo.gasUsed * this.chainConfig.gasMultiplier).toFixed();
|
|
169
|
+
const fee = {
|
|
170
|
+
amount: [
|
|
171
|
+
{
|
|
172
|
+
denom: "inj",
|
|
173
|
+
amount: (Number(gas) * this.chainConfig.gasPrice).toFixed(),
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
gas,
|
|
177
|
+
};
|
|
178
|
+
return fee;
|
|
179
|
+
}
|
|
180
|
+
catch (err) {
|
|
181
|
+
this.logger.error(err, `Error getting std fee`);
|
|
182
|
+
throw err;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Get the latest VAAs for updatePriceFeed and then push them
|
|
187
|
+
*/
|
|
188
|
+
async getPriceFeedUpdateObject(priceIds) {
|
|
189
|
+
try {
|
|
190
|
+
const response = await this.hermesClient.getLatestPriceUpdates(priceIds, {
|
|
191
|
+
encoding: "base64",
|
|
192
|
+
});
|
|
193
|
+
const vaas = response.binary.data;
|
|
194
|
+
return {
|
|
195
|
+
update_price_feeds: {
|
|
196
|
+
data: vaas,
|
|
197
|
+
},
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
catch (err) {
|
|
201
|
+
this.logger.error(err, `Error fetching the latest vaas to push`);
|
|
202
|
+
throw err;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Get the update fee for the given VAAs (i.e the fee that is paid to the pyth contract)
|
|
207
|
+
*/
|
|
208
|
+
async getUpdateFee(vaas) {
|
|
209
|
+
try {
|
|
210
|
+
const api = new sdk_ts_1.ChainGrpcWasmApi(this.grpcEndpoint);
|
|
211
|
+
const { data } = await api.fetchSmartContractState(this.pythContractAddress, Buffer.from(JSON.stringify({
|
|
212
|
+
get_update_fee: {
|
|
213
|
+
vaas,
|
|
214
|
+
},
|
|
215
|
+
})).toString("base64"));
|
|
216
|
+
const json = Buffer.from(data).toString();
|
|
217
|
+
return JSON.parse(json);
|
|
218
|
+
}
|
|
219
|
+
catch (err) {
|
|
220
|
+
this.logger.error(err, `Error fetching update fee.`);
|
|
221
|
+
// Throwing an error because it is likely an RPC issue
|
|
222
|
+
throw err;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
198
225
|
}
|
|
199
226
|
exports.InjectivePricePusher = InjectivePricePusher;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pythnetwork/price-pusher",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.0",
|
|
4
4
|
"description": "Pyth Price Pusher",
|
|
5
5
|
"homepage": "https://pyth.network",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -19,18 +19,6 @@
|
|
|
19
19
|
"publishConfig": {
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
|
-
"scripts": {
|
|
23
|
-
"build": "tsc",
|
|
24
|
-
"fix:format": "prettier --write \"src/**/*.ts\"",
|
|
25
|
-
"fix:lint": "eslint src/ --fix --max-warnings 0",
|
|
26
|
-
"test:format": "prettier --check \"src/**/*.ts\"",
|
|
27
|
-
"test:lint": "eslint src/ --max-warnings 0",
|
|
28
|
-
"start": "node lib/index.js",
|
|
29
|
-
"dev": "ts-node src/index.ts",
|
|
30
|
-
"prepublishOnly": "pnpm run build && pnpm run test:lint",
|
|
31
|
-
"preversion": "pnpm run test:lint",
|
|
32
|
-
"version": "pnpm run test:format && pnpm run test:lint && git add -A src"
|
|
33
|
-
},
|
|
34
22
|
"keywords": [
|
|
35
23
|
"pyth",
|
|
36
24
|
"oracle",
|
|
@@ -53,25 +41,18 @@
|
|
|
53
41
|
"eslint": "^8.13.0",
|
|
54
42
|
"jest": "^29.7.0",
|
|
55
43
|
"pino-pretty": "^11.2.1",
|
|
56
|
-
"prettier": "
|
|
44
|
+
"prettier": "^3.5.3",
|
|
57
45
|
"ts-jest": "^29.1.1",
|
|
58
|
-
"ts-node": "
|
|
59
|
-
"typescript": "
|
|
46
|
+
"ts-node": "^10.9.2",
|
|
47
|
+
"typescript": "^5.8.2"
|
|
60
48
|
},
|
|
61
49
|
"dependencies": {
|
|
62
50
|
"@coral-xyz/anchor": "^0.30.0",
|
|
63
51
|
"@injectivelabs/networks": "1.14.47",
|
|
64
|
-
"@injectivelabs/
|
|
65
|
-
"@injectivelabs/
|
|
52
|
+
"@injectivelabs/utils": "^1.14.48",
|
|
53
|
+
"@injectivelabs/sdk-ts": "1.14.50",
|
|
66
54
|
"@mysten/sui": "^1.3.0",
|
|
67
55
|
"@pythnetwork/hermes-client": "^1.3.1",
|
|
68
|
-
"@pythnetwork/price-service-sdk": "^1.8.0",
|
|
69
|
-
"@pythnetwork/pyth-fuel-js": "1.0.7",
|
|
70
|
-
"@pythnetwork/pyth-sdk-solidity": "4.0.0",
|
|
71
|
-
"@pythnetwork/pyth-solana-receiver": "0.10.0",
|
|
72
|
-
"@pythnetwork/pyth-sui-js": "2.1.0",
|
|
73
|
-
"@pythnetwork/pyth-ton-js": "0.1.2",
|
|
74
|
-
"@pythnetwork/solana-utils": "0.4.4",
|
|
75
56
|
"@solana/web3.js": "^1.93.0",
|
|
76
57
|
"@ton/core": "^0.59.0",
|
|
77
58
|
"@ton/crypto": "^3.3.0",
|
|
@@ -87,7 +68,24 @@
|
|
|
87
68
|
"prom-client": "^15.1.0",
|
|
88
69
|
"viem": "^2.19.4",
|
|
89
70
|
"yaml": "^2.1.1",
|
|
90
|
-
"yargs": "^17.5.1"
|
|
71
|
+
"yargs": "^17.5.1",
|
|
72
|
+
"@pythnetwork/pyth-fuel-js": "1.0.7",
|
|
73
|
+
"@pythnetwork/price-service-sdk": "^1.8.0",
|
|
74
|
+
"@pythnetwork/pyth-sdk-solidity": "4.0.0",
|
|
75
|
+
"@pythnetwork/pyth-ton-js": "0.1.2",
|
|
76
|
+
"@pythnetwork/pyth-solana-receiver": "0.10.0",
|
|
77
|
+
"@pythnetwork/solana-utils": "0.4.4",
|
|
78
|
+
"@pythnetwork/pyth-sui-js": "2.1.0"
|
|
91
79
|
},
|
|
92
|
-
"
|
|
93
|
-
|
|
80
|
+
"scripts": {
|
|
81
|
+
"build": "tsc",
|
|
82
|
+
"fix:format": "prettier --write \"src/**/*.ts\"",
|
|
83
|
+
"fix:lint": "eslint src/ --fix --max-warnings 0",
|
|
84
|
+
"test:format": "prettier --check \"src/**/*.ts\"",
|
|
85
|
+
"test:lint": "eslint src/ --max-warnings 0",
|
|
86
|
+
"start": "node lib/index.js",
|
|
87
|
+
"dev": "ts-node src/index.ts",
|
|
88
|
+
"preversion": "pnpm run test:lint",
|
|
89
|
+
"version": "pnpm run test:format && pnpm run test:lint && git add -A src"
|
|
90
|
+
}
|
|
91
|
+
}
|