@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.cjs CHANGED
@@ -44885,26 +44885,6 @@ async function makeUpdateSwbFeedIx(props) {
44885
44885
  );
44886
44886
  const pullFeedInstances = uniqueOracles.map((oracle) => {
44887
44887
  const pullFeed = new onDemand.PullFeed(swbProgram, oracle.key);
44888
- if (oracle.price?.switchboardData) {
44889
- const swbData = oracle.price?.switchboardData;
44890
- console.log(`[makeUpdateSwbFeedIx] Setting configs for ${oracle.key.toBase58()}:`, {
44891
- queue: swbData.queue,
44892
- feedHash: swbData.feedHash,
44893
- maxVariance: swbData.maxVariance,
44894
- minResponses: swbData.minResponses
44895
- });
44896
- pullFeed.configs = {
44897
- queue: new web3_js.PublicKey(swbData.queue),
44898
- feedHash: Buffer.from(swbData.feedHash, "hex"),
44899
- maxVariance: Number(swbData.maxVariance),
44900
- minResponses: swbData.minResponses,
44901
- minSampleSize: swbData.minResponses
44902
- };
44903
- } else {
44904
- console.log(
44905
- `[makeUpdateSwbFeedIx] No switchboardData for ${oracle.key.toBase58()} - feed will need on-chain fetch`
44906
- );
44907
- }
44908
44888
  return pullFeed;
44909
44889
  });
44910
44890
  if (pullFeedInstances.length === 0) {
@@ -44952,6 +44932,29 @@ async function makeUpdateSwbFeedIx(props) {
44952
44932
  crossbarClient
44953
44933
  });
44954
44934
  console.log(`[makeUpdateSwbFeedIx] Got ${pullIx.length} instructions, ${luts.length} LUTs`);
44935
+ const DEFAULT_KEY = "11111111111111111111111111111111";
44936
+ for (let ixIdx = 0; ixIdx < pullIx.length; ixIdx++) {
44937
+ const ix = pullIx[ixIdx];
44938
+ console.log(
44939
+ `[makeUpdateSwbFeedIx] Instruction ${ixIdx}: programId=${ix.programId.toBase58()}, keys=${ix.keys.length}, dataLen=${ix.data.length}`
44940
+ );
44941
+ if (ixIdx === 1) {
44942
+ console.log(
44943
+ `[makeUpdateSwbFeedIx] === pullFeedSubmitResponseConsensus account inspection ===`
44944
+ );
44945
+ const hasDefault = ix.keys.some((k) => k.pubkey.toBase58() === DEFAULT_KEY);
44946
+ console.log(
44947
+ `[makeUpdateSwbFeedIx] Contains PublicKey.default (System Program)? ${hasDefault}`
44948
+ );
44949
+ ix.keys.forEach((k, keyIdx) => {
44950
+ const addr = k.pubkey.toBase58();
44951
+ const flag = addr === DEFAULT_KEY ? " \u26A0\uFE0F DEFAULT KEY" : "";
44952
+ console.log(
44953
+ `[makeUpdateSwbFeedIx] key[${keyIdx}]: ${addr} (signer=${k.isSigner}, writable=${k.isWritable})${flag}`
44954
+ );
44955
+ });
44956
+ }
44957
+ }
44955
44958
  return { instructions: pullIx, luts };
44956
44959
  } catch (err) {
44957
44960
  console.error(`[makeUpdateSwbFeedIx] fetchUpdateManyIx FAILED:`, err?.message || err);