flipmeme-sdk 1.3.81 → 1.3.83

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
@@ -219,7 +219,7 @@ var ETH_COMMON = {
219
219
  // ADMIN_FOR_CREDIT_BUY: "0x860Fc09EACd32b3cBE00d56163D540Ed65557cCC",
220
220
  ADMIN_FOR_CREDIT_BUY: "0xAB726237d912909C1b99A31D7194A30BE84286CE",
221
221
  REFERRAL_CLAIM: "0xaE1f8271458285b71b465e4aC00E23a21cD8aF42",
222
- PROTOCOL_FEE_BPS: 250
222
+ PROTOCOL_FEE_BPS: 125
223
223
  };
224
224
  var BASE_DEV = __spreadValues({
225
225
  FACTORY: "0x6408E492260E5d8C8231dbB550563CC035f747C5"
@@ -34737,10 +34737,6 @@ var EthereumConnector = class {
34737
34737
  return __async(this, null, function* () {
34738
34738
  var _a;
34739
34739
  let endPrice = collection.endPrice;
34740
- let [isAvailable, errorMsg] = this.isPriceAvailable(endPrice);
34741
- if (!isAvailable) {
34742
- throw new Error(`Price ${endPrice} Error: ${errorMsg}`);
34743
- }
34744
34740
  const startPrice = new import_decimal2.default(endPrice).div(17).toFixed(0);
34745
34741
  console.log(`Creating collection with startPrice: ${startPrice} and endPrice: ${endPrice}`);
34746
34742
  let tx = yield this.factory.createCollection(
@@ -34914,76 +34910,6 @@ var EthereumConnector = class {
34914
34910
  return totalPrice.toString();
34915
34911
  });
34916
34912
  }
34917
- // public async getPriceOfIndex(
34918
- // type: PurcahseType,
34919
- // collectionAddr: string,
34920
- // index: number
34921
- // ): Promise<string> {
34922
- // const collection = Collection__factory.connect(
34923
- // collectionAddr,
34924
- // this.config.provider
34925
- // );
34926
- // const [
34927
- // currPrice,
34928
- // startPrice,
34929
- // endPrice,
34930
- // nftCount,
34931
- // steepness,
34932
- // midPoint,
34933
- // isMoved,
34934
- // ] = await collection.getLiquidityPool();
34935
- // const info = await collection.getCollectionInfo();
34936
- // const mintCount = info[4];
34937
- // const totalSupply = info[3];
34938
- // const startPriceStr = startPrice.toString();
34939
- // const endPriceStr = endPrice.toString();
34940
- // // Initialize
34941
- // let expectedMintCount = mintCount;
34942
- // let expectedNftCount = nftCount;
34943
- // if (type === PurcahseType.BUY) {
34944
- // let mintingCount = 0;
34945
- // let buyingCount = 0;
34946
- // if (nftCount.toNumber() < index) {
34947
- // mintingCount = index - nftCount.toNumber();
34948
- // buyingCount = nftCount.toNumber();
34949
- // if (mintingCount > totalSupply.sub(mintCount).toNumber()) {
34950
- // mintingCount = totalSupply.sub(mintCount).toNumber();
34951
- // }
34952
- // } else {
34953
- // buyingCount = Math.min(index, totalSupply.toNumber());
34954
- // }
34955
- // expectedNftCount = expectedNftCount.sub(buyingCount).gt(0)
34956
- // ? expectedNftCount.sub(buyingCount)
34957
- // : BigNumber.from(0);
34958
- // expectedMintCount = expectedMintCount.add(mintingCount).lt(totalSupply)
34959
- // ? expectedMintCount.add(mintingCount)
34960
- // : totalSupply;
34961
- // const currentPrice = getPrice(
34962
- // expectedMintCount.toString(),
34963
- // expectedNftCount.toString(),
34964
- // steepness.toString(),
34965
- // midPoint.toString(),
34966
- // startPriceStr,
34967
- // endPriceStr
34968
- // );
34969
- // return currentPrice.toString();
34970
- // } else if (type === PurcahseType.SELL) {
34971
- // // Contract side calculates the price after adding 1
34972
- // expectedNftCount = expectedNftCount.add(index).lt(totalSupply)
34973
- // ? expectedNftCount.add(index)
34974
- // : totalSupply;
34975
- // const currentPrice = getPrice(
34976
- // expectedMintCount.toString(),
34977
- // expectedNftCount.toString(),
34978
- // steepness.toString(),
34979
- // midPoint.toString(),
34980
- // startPriceStr,
34981
- // endPriceStr
34982
- // );
34983
- // return currentPrice.toString();
34984
- // }
34985
- // return "0";
34986
- // }
34987
34913
  moveLiquidity(collectionAddress) {
34988
34914
  return __async(this, null, function* () {
34989
34915
  const collection = new Collection__factory(this.config.signer).attach(