flipmeme-sdk 1.3.82 → 1.3.84
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.js
CHANGED
|
@@ -34910,76 +34910,6 @@ var EthereumConnector = class {
|
|
|
34910
34910
|
return totalPrice.toString();
|
|
34911
34911
|
});
|
|
34912
34912
|
}
|
|
34913
|
-
// public async getPriceOfIndex(
|
|
34914
|
-
// type: PurcahseType,
|
|
34915
|
-
// collectionAddr: string,
|
|
34916
|
-
// index: number
|
|
34917
|
-
// ): Promise<string> {
|
|
34918
|
-
// const collection = Collection__factory.connect(
|
|
34919
|
-
// collectionAddr,
|
|
34920
|
-
// this.config.provider
|
|
34921
|
-
// );
|
|
34922
|
-
// const [
|
|
34923
|
-
// currPrice,
|
|
34924
|
-
// startPrice,
|
|
34925
|
-
// endPrice,
|
|
34926
|
-
// nftCount,
|
|
34927
|
-
// steepness,
|
|
34928
|
-
// midPoint,
|
|
34929
|
-
// isMoved,
|
|
34930
|
-
// ] = await collection.getLiquidityPool();
|
|
34931
|
-
// const info = await collection.getCollectionInfo();
|
|
34932
|
-
// const mintCount = info[4];
|
|
34933
|
-
// const totalSupply = info[3];
|
|
34934
|
-
// const startPriceStr = startPrice.toString();
|
|
34935
|
-
// const endPriceStr = endPrice.toString();
|
|
34936
|
-
// // Initialize
|
|
34937
|
-
// let expectedMintCount = mintCount;
|
|
34938
|
-
// let expectedNftCount = nftCount;
|
|
34939
|
-
// if (type === PurcahseType.BUY) {
|
|
34940
|
-
// let mintingCount = 0;
|
|
34941
|
-
// let buyingCount = 0;
|
|
34942
|
-
// if (nftCount.toNumber() < index) {
|
|
34943
|
-
// mintingCount = index - nftCount.toNumber();
|
|
34944
|
-
// buyingCount = nftCount.toNumber();
|
|
34945
|
-
// if (mintingCount > totalSupply.sub(mintCount).toNumber()) {
|
|
34946
|
-
// mintingCount = totalSupply.sub(mintCount).toNumber();
|
|
34947
|
-
// }
|
|
34948
|
-
// } else {
|
|
34949
|
-
// buyingCount = Math.min(index, totalSupply.toNumber());
|
|
34950
|
-
// }
|
|
34951
|
-
// expectedNftCount = expectedNftCount.sub(buyingCount).gt(0)
|
|
34952
|
-
// ? expectedNftCount.sub(buyingCount)
|
|
34953
|
-
// : BigNumber.from(0);
|
|
34954
|
-
// expectedMintCount = expectedMintCount.add(mintingCount).lt(totalSupply)
|
|
34955
|
-
// ? expectedMintCount.add(mintingCount)
|
|
34956
|
-
// : totalSupply;
|
|
34957
|
-
// const currentPrice = getPrice(
|
|
34958
|
-
// expectedMintCount.toString(),
|
|
34959
|
-
// expectedNftCount.toString(),
|
|
34960
|
-
// steepness.toString(),
|
|
34961
|
-
// midPoint.toString(),
|
|
34962
|
-
// startPriceStr,
|
|
34963
|
-
// endPriceStr
|
|
34964
|
-
// );
|
|
34965
|
-
// return currentPrice.toString();
|
|
34966
|
-
// } else if (type === PurcahseType.SELL) {
|
|
34967
|
-
// // Contract side calculates the price after adding 1
|
|
34968
|
-
// expectedNftCount = expectedNftCount.add(index).lt(totalSupply)
|
|
34969
|
-
// ? expectedNftCount.add(index)
|
|
34970
|
-
// : totalSupply;
|
|
34971
|
-
// const currentPrice = getPrice(
|
|
34972
|
-
// expectedMintCount.toString(),
|
|
34973
|
-
// expectedNftCount.toString(),
|
|
34974
|
-
// steepness.toString(),
|
|
34975
|
-
// midPoint.toString(),
|
|
34976
|
-
// startPriceStr,
|
|
34977
|
-
// endPriceStr
|
|
34978
|
-
// );
|
|
34979
|
-
// return currentPrice.toString();
|
|
34980
|
-
// }
|
|
34981
|
-
// return "0";
|
|
34982
|
-
// }
|
|
34983
34913
|
moveLiquidity(collectionAddress) {
|
|
34984
34914
|
return __async(this, null, function* () {
|
|
34985
34915
|
const collection = new Collection__factory(this.config.signer).attach(
|