flipmeme-sdk 1.3.3 → 1.3.5

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
@@ -2972,12 +2972,12 @@ var SolanaConnector = class {
2972
2972
  try {
2973
2973
  for (const chunk of tokenChunks) {
2974
2974
  let transaction = yield this.setUpInstructions(14e5);
2975
- index += chunk.length - 1;
2975
+ index += chunk.length;
2976
2976
  let slippagePrice = this.getPriceOfIndex(
2977
2977
  "buy" /* BUY */,
2978
2978
  collectionInfo,
2979
2979
  index
2980
- ).mul(slippage).toFixed(0);
2980
+ ).mul(slippage).div(100).toFixed(0);
2981
2981
  for (const nft of chunk) {
2982
2982
  const nftPda2 = nftPda(
2983
2983
  this.configAddresses,
@@ -3035,12 +3035,12 @@ var SolanaConnector = class {
3035
3035
  try {
3036
3036
  for (const chunk of tokenChunks) {
3037
3037
  let transaction = yield this.setUpInstructions(14e5);
3038
- index += chunk.length - 1;
3038
+ index += chunk.length;
3039
3039
  let slippagePrice = this.getPriceOfIndex(
3040
3040
  "buy" /* BUY */,
3041
3041
  collectionInfo,
3042
3042
  index
3043
- ).mul(slippage).toFixed(0);
3043
+ ).mul(slippage).div(100).toFixed(0);
3044
3044
  for (const nft of chunk) {
3045
3045
  const nftPda2 = nftPda(
3046
3046
  this.configAddresses,
@@ -3102,12 +3102,12 @@ var SolanaConnector = class {
3102
3102
  try {
3103
3103
  for (const chunks of tokenChunks) {
3104
3104
  let transaction = yield this.setUpInstructions(14e5);
3105
- index += chunks.length - 1;
3105
+ index += chunks.length;
3106
3106
  let slippagePrice = this.getPriceOfIndex(
3107
3107
  "buy" /* BUY */,
3108
3108
  collectionInfo,
3109
3109
  index
3110
- ).mul(slippage).toFixed(0);
3110
+ ).mul(slippage).div(100).toFixed(0);
3111
3111
  for (const nftName of chunks) {
3112
3112
  const nftSeedKeypair = import_web34.Keypair.generate();
3113
3113
  const nftPda2 = nftPda(
@@ -3117,7 +3117,12 @@ var SolanaConnector = class {
3117
3117
  this.program.programId
3118
3118
  );
3119
3119
  console.log("=======nft seed==========", nftSeedKeypair.publicKey);
3120
- const instruction = yield this.program.methods.mintAndBuy(nftSeedKeypair.publicKey, nftName, baseUri, new import_bn.default(slippagePrice)).accountsStrict({
3120
+ const instruction = yield this.program.methods.mintAndBuy(
3121
+ nftSeedKeypair.publicKey,
3122
+ nftName,
3123
+ baseUri,
3124
+ new import_bn.default(slippagePrice)
3125
+ ).accountsStrict({
3121
3126
  state: this.configAddresses.STATE_ID,
3122
3127
  collection: collectionPda2,
3123
3128
  collectionNft: collectionNftPda2,
@@ -3200,7 +3205,11 @@ var SolanaConnector = class {
3200
3205
  }
3201
3206
  let coder = new import_anchor2.BorshInstructionCoder((_a = this.program) == null ? void 0 : _a.rawIdl);
3202
3207
  let args = coder.decode(instruction, "base58");
3203
- console.log("args========", args);
3208
+ console.log("============", args);
3209
+ if (args) {
3210
+ const temp = args.data;
3211
+ console.log("args========", temp.max_price.toString());
3212
+ }
3204
3213
  });
3205
3214
  }
3206
3215
  };