@0dotxyz/p0-ts-sdk 1.2.7-alpha.2 → 1.2.7-alpha.2.2

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/index.js CHANGED
@@ -44860,26 +44860,6 @@ async function makeUpdateSwbFeedIx(props) {
44860
44860
  );
44861
44861
  const pullFeedInstances = uniqueOracles.map((oracle) => {
44862
44862
  const pullFeed = new PullFeed(swbProgram, oracle.key);
44863
- if (oracle.price?.switchboardData) {
44864
- const swbData = oracle.price?.switchboardData;
44865
- console.log(`[makeUpdateSwbFeedIx] Setting configs for ${oracle.key.toBase58()}:`, {
44866
- queue: swbData.queue,
44867
- feedHash: swbData.feedHash,
44868
- maxVariance: swbData.maxVariance,
44869
- minResponses: swbData.minResponses
44870
- });
44871
- pullFeed.configs = {
44872
- queue: new PublicKey(swbData.queue),
44873
- feedHash: Buffer.from(swbData.feedHash, "hex"),
44874
- maxVariance: Number(swbData.maxVariance),
44875
- minResponses: swbData.minResponses,
44876
- minSampleSize: swbData.minResponses
44877
- };
44878
- } else {
44879
- console.log(
44880
- `[makeUpdateSwbFeedIx] No switchboardData for ${oracle.key.toBase58()} - feed will need on-chain fetch`
44881
- );
44882
- }
44883
44863
  return pullFeed;
44884
44864
  });
44885
44865
  if (pullFeedInstances.length === 0) {
@@ -44927,6 +44907,29 @@ async function makeUpdateSwbFeedIx(props) {
44927
44907
  crossbarClient
44928
44908
  });
44929
44909
  console.log(`[makeUpdateSwbFeedIx] Got ${pullIx.length} instructions, ${luts.length} LUTs`);
44910
+ const DEFAULT_KEY = "11111111111111111111111111111111";
44911
+ for (let ixIdx = 0; ixIdx < pullIx.length; ixIdx++) {
44912
+ const ix = pullIx[ixIdx];
44913
+ console.log(
44914
+ `[makeUpdateSwbFeedIx] Instruction ${ixIdx}: programId=${ix.programId.toBase58()}, keys=${ix.keys.length}, dataLen=${ix.data.length}`
44915
+ );
44916
+ if (ixIdx === 1) {
44917
+ console.log(
44918
+ `[makeUpdateSwbFeedIx] === pullFeedSubmitResponseConsensus account inspection ===`
44919
+ );
44920
+ const hasDefault = ix.keys.some((k) => k.pubkey.toBase58() === DEFAULT_KEY);
44921
+ console.log(
44922
+ `[makeUpdateSwbFeedIx] Contains PublicKey.default (System Program)? ${hasDefault}`
44923
+ );
44924
+ ix.keys.forEach((k, keyIdx) => {
44925
+ const addr = k.pubkey.toBase58();
44926
+ const flag = addr === DEFAULT_KEY ? " \u26A0\uFE0F DEFAULT KEY" : "";
44927
+ console.log(
44928
+ `[makeUpdateSwbFeedIx] key[${keyIdx}]: ${addr} (signer=${k.isSigner}, writable=${k.isWritable})${flag}`
44929
+ );
44930
+ });
44931
+ }
44932
+ }
44930
44933
  return { instructions: pullIx, luts };
44931
44934
  } catch (err) {
44932
44935
  console.error(`[makeUpdateSwbFeedIx] fetchUpdateManyIx FAILED:`, err?.message || err);