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 +1 -75
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -75
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
|
@@ -154,7 +154,7 @@ var ETH_COMMON = {
|
|
|
154
154
|
// ADMIN_FOR_CREDIT_BUY: "0x860Fc09EACd32b3cBE00d56163D540Ed65557cCC",
|
|
155
155
|
ADMIN_FOR_CREDIT_BUY: "0xAB726237d912909C1b99A31D7194A30BE84286CE",
|
|
156
156
|
REFERRAL_CLAIM: "0xaE1f8271458285b71b465e4aC00E23a21cD8aF42",
|
|
157
|
-
PROTOCOL_FEE_BPS:
|
|
157
|
+
PROTOCOL_FEE_BPS: 125
|
|
158
158
|
};
|
|
159
159
|
var BASE_DEV = __spreadValues({
|
|
160
160
|
FACTORY: "0x6408E492260E5d8C8231dbB550563CC035f747C5"
|
|
@@ -34684,10 +34684,6 @@ var EthereumConnector = class {
|
|
|
34684
34684
|
return __async(this, null, function* () {
|
|
34685
34685
|
var _a;
|
|
34686
34686
|
let endPrice = collection.endPrice;
|
|
34687
|
-
let [isAvailable, errorMsg] = this.isPriceAvailable(endPrice);
|
|
34688
|
-
if (!isAvailable) {
|
|
34689
|
-
throw new Error(`Price ${endPrice} Error: ${errorMsg}`);
|
|
34690
|
-
}
|
|
34691
34687
|
const startPrice = new Decimal2(endPrice).div(17).toFixed(0);
|
|
34692
34688
|
console.log(`Creating collection with startPrice: ${startPrice} and endPrice: ${endPrice}`);
|
|
34693
34689
|
let tx = yield this.factory.createCollection(
|
|
@@ -34861,76 +34857,6 @@ var EthereumConnector = class {
|
|
|
34861
34857
|
return totalPrice.toString();
|
|
34862
34858
|
});
|
|
34863
34859
|
}
|
|
34864
|
-
// public async getPriceOfIndex(
|
|
34865
|
-
// type: PurcahseType,
|
|
34866
|
-
// collectionAddr: string,
|
|
34867
|
-
// index: number
|
|
34868
|
-
// ): Promise<string> {
|
|
34869
|
-
// const collection = Collection__factory.connect(
|
|
34870
|
-
// collectionAddr,
|
|
34871
|
-
// this.config.provider
|
|
34872
|
-
// );
|
|
34873
|
-
// const [
|
|
34874
|
-
// currPrice,
|
|
34875
|
-
// startPrice,
|
|
34876
|
-
// endPrice,
|
|
34877
|
-
// nftCount,
|
|
34878
|
-
// steepness,
|
|
34879
|
-
// midPoint,
|
|
34880
|
-
// isMoved,
|
|
34881
|
-
// ] = await collection.getLiquidityPool();
|
|
34882
|
-
// const info = await collection.getCollectionInfo();
|
|
34883
|
-
// const mintCount = info[4];
|
|
34884
|
-
// const totalSupply = info[3];
|
|
34885
|
-
// const startPriceStr = startPrice.toString();
|
|
34886
|
-
// const endPriceStr = endPrice.toString();
|
|
34887
|
-
// // Initialize
|
|
34888
|
-
// let expectedMintCount = mintCount;
|
|
34889
|
-
// let expectedNftCount = nftCount;
|
|
34890
|
-
// if (type === PurcahseType.BUY) {
|
|
34891
|
-
// let mintingCount = 0;
|
|
34892
|
-
// let buyingCount = 0;
|
|
34893
|
-
// if (nftCount.toNumber() < index) {
|
|
34894
|
-
// mintingCount = index - nftCount.toNumber();
|
|
34895
|
-
// buyingCount = nftCount.toNumber();
|
|
34896
|
-
// if (mintingCount > totalSupply.sub(mintCount).toNumber()) {
|
|
34897
|
-
// mintingCount = totalSupply.sub(mintCount).toNumber();
|
|
34898
|
-
// }
|
|
34899
|
-
// } else {
|
|
34900
|
-
// buyingCount = Math.min(index, totalSupply.toNumber());
|
|
34901
|
-
// }
|
|
34902
|
-
// expectedNftCount = expectedNftCount.sub(buyingCount).gt(0)
|
|
34903
|
-
// ? expectedNftCount.sub(buyingCount)
|
|
34904
|
-
// : BigNumber.from(0);
|
|
34905
|
-
// expectedMintCount = expectedMintCount.add(mintingCount).lt(totalSupply)
|
|
34906
|
-
// ? expectedMintCount.add(mintingCount)
|
|
34907
|
-
// : totalSupply;
|
|
34908
|
-
// const currentPrice = getPrice(
|
|
34909
|
-
// expectedMintCount.toString(),
|
|
34910
|
-
// expectedNftCount.toString(),
|
|
34911
|
-
// steepness.toString(),
|
|
34912
|
-
// midPoint.toString(),
|
|
34913
|
-
// startPriceStr,
|
|
34914
|
-
// endPriceStr
|
|
34915
|
-
// );
|
|
34916
|
-
// return currentPrice.toString();
|
|
34917
|
-
// } else if (type === PurcahseType.SELL) {
|
|
34918
|
-
// // Contract side calculates the price after adding 1
|
|
34919
|
-
// expectedNftCount = expectedNftCount.add(index).lt(totalSupply)
|
|
34920
|
-
// ? expectedNftCount.add(index)
|
|
34921
|
-
// : totalSupply;
|
|
34922
|
-
// const currentPrice = getPrice(
|
|
34923
|
-
// expectedMintCount.toString(),
|
|
34924
|
-
// expectedNftCount.toString(),
|
|
34925
|
-
// steepness.toString(),
|
|
34926
|
-
// midPoint.toString(),
|
|
34927
|
-
// startPriceStr,
|
|
34928
|
-
// endPriceStr
|
|
34929
|
-
// );
|
|
34930
|
-
// return currentPrice.toString();
|
|
34931
|
-
// }
|
|
34932
|
-
// return "0";
|
|
34933
|
-
// }
|
|
34934
34860
|
moveLiquidity(collectionAddress) {
|
|
34935
34861
|
return __async(this, null, function* () {
|
|
34936
34862
|
const collection = new Collection__factory(this.config.signer).attach(
|