flipmeme-sdk 1.3.82 → 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 +0 -70
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +0 -70
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
|
@@ -34857,76 +34857,6 @@ var EthereumConnector = class {
|
|
|
34857
34857
|
return totalPrice.toString();
|
|
34858
34858
|
});
|
|
34859
34859
|
}
|
|
34860
|
-
// public async getPriceOfIndex(
|
|
34861
|
-
// type: PurcahseType,
|
|
34862
|
-
// collectionAddr: string,
|
|
34863
|
-
// index: number
|
|
34864
|
-
// ): Promise<string> {
|
|
34865
|
-
// const collection = Collection__factory.connect(
|
|
34866
|
-
// collectionAddr,
|
|
34867
|
-
// this.config.provider
|
|
34868
|
-
// );
|
|
34869
|
-
// const [
|
|
34870
|
-
// currPrice,
|
|
34871
|
-
// startPrice,
|
|
34872
|
-
// endPrice,
|
|
34873
|
-
// nftCount,
|
|
34874
|
-
// steepness,
|
|
34875
|
-
// midPoint,
|
|
34876
|
-
// isMoved,
|
|
34877
|
-
// ] = await collection.getLiquidityPool();
|
|
34878
|
-
// const info = await collection.getCollectionInfo();
|
|
34879
|
-
// const mintCount = info[4];
|
|
34880
|
-
// const totalSupply = info[3];
|
|
34881
|
-
// const startPriceStr = startPrice.toString();
|
|
34882
|
-
// const endPriceStr = endPrice.toString();
|
|
34883
|
-
// // Initialize
|
|
34884
|
-
// let expectedMintCount = mintCount;
|
|
34885
|
-
// let expectedNftCount = nftCount;
|
|
34886
|
-
// if (type === PurcahseType.BUY) {
|
|
34887
|
-
// let mintingCount = 0;
|
|
34888
|
-
// let buyingCount = 0;
|
|
34889
|
-
// if (nftCount.toNumber() < index) {
|
|
34890
|
-
// mintingCount = index - nftCount.toNumber();
|
|
34891
|
-
// buyingCount = nftCount.toNumber();
|
|
34892
|
-
// if (mintingCount > totalSupply.sub(mintCount).toNumber()) {
|
|
34893
|
-
// mintingCount = totalSupply.sub(mintCount).toNumber();
|
|
34894
|
-
// }
|
|
34895
|
-
// } else {
|
|
34896
|
-
// buyingCount = Math.min(index, totalSupply.toNumber());
|
|
34897
|
-
// }
|
|
34898
|
-
// expectedNftCount = expectedNftCount.sub(buyingCount).gt(0)
|
|
34899
|
-
// ? expectedNftCount.sub(buyingCount)
|
|
34900
|
-
// : BigNumber.from(0);
|
|
34901
|
-
// expectedMintCount = expectedMintCount.add(mintingCount).lt(totalSupply)
|
|
34902
|
-
// ? expectedMintCount.add(mintingCount)
|
|
34903
|
-
// : totalSupply;
|
|
34904
|
-
// const currentPrice = getPrice(
|
|
34905
|
-
// expectedMintCount.toString(),
|
|
34906
|
-
// expectedNftCount.toString(),
|
|
34907
|
-
// steepness.toString(),
|
|
34908
|
-
// midPoint.toString(),
|
|
34909
|
-
// startPriceStr,
|
|
34910
|
-
// endPriceStr
|
|
34911
|
-
// );
|
|
34912
|
-
// return currentPrice.toString();
|
|
34913
|
-
// } else if (type === PurcahseType.SELL) {
|
|
34914
|
-
// // Contract side calculates the price after adding 1
|
|
34915
|
-
// expectedNftCount = expectedNftCount.add(index).lt(totalSupply)
|
|
34916
|
-
// ? expectedNftCount.add(index)
|
|
34917
|
-
// : totalSupply;
|
|
34918
|
-
// const currentPrice = getPrice(
|
|
34919
|
-
// expectedMintCount.toString(),
|
|
34920
|
-
// expectedNftCount.toString(),
|
|
34921
|
-
// steepness.toString(),
|
|
34922
|
-
// midPoint.toString(),
|
|
34923
|
-
// startPriceStr,
|
|
34924
|
-
// endPriceStr
|
|
34925
|
-
// );
|
|
34926
|
-
// return currentPrice.toString();
|
|
34927
|
-
// }
|
|
34928
|
-
// return "0";
|
|
34929
|
-
// }
|
|
34930
34860
|
moveLiquidity(collectionAddress) {
|
|
34931
34861
|
return __async(this, null, function* () {
|
|
34932
34862
|
const collection = new Collection__factory(this.config.signer).attach(
|