@triadxyz/triad-protocol 0.5.2-beta → 0.5.2-beta.devnet

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/dist/ticker.js CHANGED
@@ -9,9 +9,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const web3_js_1 = require("@solana/web3.js");
13
- const helpers_1 = require("./utils/helpers");
14
- const bn_js_1 = require("bn.js");
15
12
  class Ticker {
16
13
  constructor(program, provider) {
17
14
  this.provider = provider;
@@ -28,14 +25,13 @@ class Ticker {
28
25
  /**
29
26
  * Create a new ticker
30
27
  * @param name - The ticker's name
31
- * @param protocolProgramId - The program ID of the protocol
32
28
  * @param token mint - Token mint for the ticker (e.g. USDC)
33
29
  *
34
30
  */
35
- createTicker({ name, protocolProgramId, tokenMint }) {
31
+ createTicker({ name, tokenMint }) {
36
32
  return __awaiter(this, void 0, void 0, function* () {
37
33
  return this.program.methods
38
- .createTicker({ name, protocolProgramId })
34
+ .createTicker({ name })
39
35
  .accounts({
40
36
  signer: this.provider.wallet.publicKey,
41
37
  payerTokenMint: tokenMint
@@ -43,35 +39,5 @@ class Ticker {
43
39
  .rpc();
44
40
  });
45
41
  }
46
- /**
47
- * Update a ticker's price
48
- * @param name - The ticker's name
49
- * @param price - The ticker's price
50
- *
51
- */
52
- updateTickerPrice({ name, price }) {
53
- return __awaiter(this, void 0, void 0, function* () {
54
- const TickerPDA = (0, helpers_1.getTickerAddressSync)(this.program.programId, name);
55
- const instructions = [
56
- web3_js_1.ComputeBudgetProgram.setComputeUnitPrice({
57
- microLamports: 12000
58
- })
59
- ];
60
- instructions.push(yield this.program.methods
61
- .updateTickerPrice({ price: new bn_js_1.BN(price) })
62
- .accounts({
63
- signer: this.provider.wallet.publicKey,
64
- ticker: TickerPDA
65
- })
66
- .instruction());
67
- const { blockhash } = yield this.provider.connection.getLatestBlockhash();
68
- const message = new web3_js_1.TransactionMessage({
69
- payerKey: this.provider.wallet.publicKey,
70
- recentBlockhash: blockhash,
71
- instructions
72
- }).compileToV0Message();
73
- return this.provider.sendAndConfirm(new web3_js_1.VersionedTransaction(message));
74
- });
75
- }
76
42
  }
77
43
  exports.default = Ticker;