@medialane/sdk 0.91.0 → 0.92.0
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/starknet/index.cjs
CHANGED
|
@@ -10333,13 +10333,13 @@ function priceToEkuboParams(quoteDecimals, price = LAUNCH_PRICE_QUOTE_PER_COIN)
|
|
|
10333
10333
|
};
|
|
10334
10334
|
}
|
|
10335
10335
|
var COIN_DECIMALS2 = 18;
|
|
10336
|
-
async function
|
|
10336
|
+
async function getCreatorCoinMarket(coinAddress, provider) {
|
|
10337
10337
|
const r = await provider.callContract({
|
|
10338
10338
|
contractAddress: coinAddress,
|
|
10339
10339
|
entrypoint: "launched_with_liquidity_parameters",
|
|
10340
10340
|
calldata: []
|
|
10341
10341
|
});
|
|
10342
|
-
if (BigInt(r[0]) !== 0n || BigInt(r[1]) !== 0n) return
|
|
10342
|
+
if (BigInt(r[0]) !== 0n || BigInt(r[1]) !== 0n) return { status: "pre-launch" };
|
|
10343
10343
|
const fee = r[2];
|
|
10344
10344
|
const tickSpacing = r[3];
|
|
10345
10345
|
const quoteToken = normalizeAddress("STARKNET", "0x" + BigInt(r[7]).toString(16));
|
|
@@ -10358,7 +10358,10 @@ async function getCreatorCoinPrice(coinAddress, provider) {
|
|
|
10358
10358
|
const priceT1perT0 = (Number(sqrt) / 2 ** 128) ** 2;
|
|
10359
10359
|
const decAdj = 10 ** (COIN_DECIMALS2 - quoteDecimals);
|
|
10360
10360
|
const quotePerCoin = (quoteIsToken0 ? 1 / priceT1perT0 : priceT1perT0) * decAdj;
|
|
10361
|
-
return {
|
|
10361
|
+
return {
|
|
10362
|
+
status: "live",
|
|
10363
|
+
price: { quotePerCoin, quoteToken, quoteSymbol: token?.symbol ?? null, quoteDecimals }
|
|
10364
|
+
};
|
|
10362
10365
|
}
|
|
10363
10366
|
var _factoryContract = null;
|
|
10364
10367
|
function factoryContract() {
|
|
@@ -10447,8 +10450,8 @@ var CreatorCoinService = class {
|
|
|
10447
10450
|
const r = await this._factory(account).is_creator_coin(address);
|
|
10448
10451
|
return BigInt(r) === 1n;
|
|
10449
10452
|
}
|
|
10450
|
-
async
|
|
10451
|
-
return
|
|
10453
|
+
async getMarket(coinAddress) {
|
|
10454
|
+
return getCreatorCoinMarket(coinAddress, new starknet.RpcProvider({ nodeUrl: this.config.rpcUrl }));
|
|
10452
10455
|
}
|
|
10453
10456
|
};
|
|
10454
10457
|
var TicketService = class {
|
|
@@ -11767,7 +11770,7 @@ exports.fdvHuman = fdvHuman;
|
|
|
11767
11770
|
exports.generateStarkKeyPair = generateStarkKeyPair;
|
|
11768
11771
|
exports.getCounter = getCounter;
|
|
11769
11772
|
exports.getCounter1155 = getCounter1155;
|
|
11770
|
-
exports.
|
|
11773
|
+
exports.getCreatorCoinMarket = getCreatorCoinMarket;
|
|
11771
11774
|
exports.getEscape = getEscape;
|
|
11772
11775
|
exports.getEscapeSecurityPeriod = getEscapeSecurityPeriod;
|
|
11773
11776
|
exports.getGuardians = getGuardians;
|