@kasarlabs/unruggable-mcp 0.1.2 → 0.1.4
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/build/lib/constants/index.d.ts +16 -0
- package/build/lib/constants/index.js +30 -0
- package/build/lib/constants/index.js.map +1 -1
- package/build/lib/utils/events.d.ts +2 -0
- package/build/lib/utils/events.js +24 -0
- package/build/lib/utils/events.js.map +1 -0
- package/build/lib/utils/helper.d.ts +3 -1
- package/build/lib/utils/helper.js +31 -1
- package/build/lib/utils/helper.js.map +1 -1
- package/build/lib/utils/price.d.ts +7 -0
- package/build/lib/utils/price.js +18 -0
- package/build/lib/utils/price.js.map +1 -0
- package/build/schemas/index.d.ts +45 -104
- package/build/schemas/index.js +24 -41
- package/build/schemas/index.js.map +1 -1
- package/build/tools/createMemecoin.d.ts +2 -10
- package/build/tools/createMemecoin.js +24 -7
- package/build/tools/createMemecoin.js.map +1 -1
- package/build/tools/getLockedLiquidity.d.ts +2 -26
- package/build/tools/getLockedLiquidity.js +7 -4
- package/build/tools/getLockedLiquidity.js.map +1 -1
- package/build/tools/isMemecoin.d.ts +2 -10
- package/build/tools/isMemecoin.js +8 -5
- package/build/tools/isMemecoin.js.map +1 -1
- package/build/tools/launchOnEkubo.d.ts +2 -10
- package/build/tools/launchOnEkubo.js +84 -26
- package/build/tools/launchOnEkubo.js.map +1 -1
- package/package.json +13 -6
|
@@ -1 +1,17 @@
|
|
|
1
1
|
export declare const FACTORY_ADDRESS = "0x01a46467a9246f45c8c340f1f155266a26a71c07bd55d36e8d1c7d0d438a2dbc";
|
|
2
|
+
export declare const EKUBO_TICK_SIZE = 1.000001;
|
|
3
|
+
export declare const EKUBO_TICK_SPACING = 5982;
|
|
4
|
+
export declare const EKUBO_TICK_SIZE_LOG: number;
|
|
5
|
+
export declare const EKUBO_FEES_MULTIPLICATOR = "0x100000000000000000000000000000000";
|
|
6
|
+
export declare const EKUBO_BOUND: number;
|
|
7
|
+
export declare const MEMECOIN_DECIMALS = 18;
|
|
8
|
+
export type TokenInfo = {
|
|
9
|
+
address: string;
|
|
10
|
+
decimals: number;
|
|
11
|
+
symbol: string;
|
|
12
|
+
router_address?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const STRK_TOKEN: TokenInfo;
|
|
15
|
+
export declare const USDC_TOKEN: TokenInfo;
|
|
16
|
+
export declare const ETH_TOKEN: TokenInfo;
|
|
17
|
+
export declare const QUOTE_TOKEN_INFO: Record<'STRK' | 'ETH' | 'USDC', TokenInfo>;
|
|
@@ -1,2 +1,32 @@
|
|
|
1
|
+
import { getStartingTick } from '../utils/helper.js';
|
|
1
2
|
export const FACTORY_ADDRESS = '0x01a46467a9246f45c8c340f1f155266a26a71c07bd55d36e8d1c7d0d438a2dbc';
|
|
3
|
+
export const EKUBO_TICK_SIZE = 1.000001;
|
|
4
|
+
const EKUBO_MAX_PRICE = '0x100000000000000000000000000000000';
|
|
5
|
+
export const EKUBO_TICK_SPACING = 5982;
|
|
6
|
+
export const EKUBO_TICK_SIZE_LOG = Math.log(EKUBO_TICK_SIZE);
|
|
7
|
+
export const EKUBO_FEES_MULTIPLICATOR = EKUBO_MAX_PRICE;
|
|
8
|
+
export const EKUBO_BOUND = getStartingTick(+EKUBO_MAX_PRICE);
|
|
9
|
+
export const MEMECOIN_DECIMALS = 18;
|
|
10
|
+
export const STRK_TOKEN = {
|
|
11
|
+
address: '0x04718f5a0Fc34cC1AF16A1cdee98fFB20C31f5cD61D6Ab07201858f4287c938D',
|
|
12
|
+
decimals: 18,
|
|
13
|
+
symbol: 'STRK',
|
|
14
|
+
router_address: '0x5726725e9507c3586cc0516449e2c74d9b201ab2747752bb0251aaa263c9a26',
|
|
15
|
+
};
|
|
16
|
+
export const USDC_TOKEN = {
|
|
17
|
+
address: '0x053C91253BC9682c04929cA02ED00b3E423f6710D2ee7e0D5EBB06F3eCF368A8',
|
|
18
|
+
decimals: 6,
|
|
19
|
+
symbol: 'USDC',
|
|
20
|
+
};
|
|
21
|
+
export const ETH_TOKEN = {
|
|
22
|
+
address: '0x049D36570D4e46f48e99674bd3fcc84644DdD6b96F7C741B1562B82f9e004dC7',
|
|
23
|
+
decimals: 18,
|
|
24
|
+
symbol: 'ETH',
|
|
25
|
+
router_address: '0x04d0390b777b424e43839cd1e744799f3de6c176c7e32c1812a41dbd9c19db6a',
|
|
26
|
+
};
|
|
27
|
+
export const QUOTE_TOKEN_INFO = {
|
|
28
|
+
STRK: STRK_TOKEN,
|
|
29
|
+
ETH: ETH_TOKEN,
|
|
30
|
+
USDC: USDC_TOKEN,
|
|
31
|
+
};
|
|
2
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/constants/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAC1B,oEAAoE,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,CAAC,MAAM,eAAe,GAC1B,oEAAoE,CAAC;AAEvE,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC;AACxC,MAAM,eAAe,GAAG,qCAAqC,CAAC;AAE9D,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC;AACvC,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AAC7D,MAAM,CAAC,MAAM,wBAAwB,GAAG,eAAe,CAAC;AACxD,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC,CAAC,eAAe,CAAC,CAAC;AAC7D,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AASpC,MAAM,CAAC,MAAM,UAAU,GAAc;IACnC,OAAO,EAAE,oEAAoE;IAC7E,QAAQ,EAAE,EAAE;IACZ,MAAM,EAAE,MAAM;IACd,cAAc,EACZ,mEAAmE;CACtE,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAc;IACnC,OAAO,EAAE,oEAAoE;IAC7E,QAAQ,EAAE,CAAC;IACX,MAAM,EAAE,MAAM;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAc;IAClC,OAAO,EAAE,oEAAoE;IAC7E,QAAQ,EAAE,EAAE;IACZ,MAAM,EAAE,KAAK;IACb,cAAc,EACZ,oEAAoE;CACvE,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAA+C;IAC1E,IAAI,EAAE,UAAU;IAChB,GAAG,EAAE,SAAS;IACd,IAAI,EAAE,UAAU;CACjB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FACTORY_ADDRESS } from '../constants/index.js';
|
|
2
|
+
const normalizeAddress = (addr) => addr?.toLowerCase().replace(/^0x0*/, '0x') ?? undefined;
|
|
3
|
+
export function extractMemecoinAddressFromReceipt(receipt, factoryAddress = FACTORY_ADDRESS) {
|
|
4
|
+
if (!Array.isArray(receipt.events)) {
|
|
5
|
+
return undefined;
|
|
6
|
+
}
|
|
7
|
+
const events = receipt.events;
|
|
8
|
+
const normalizedFactoryAddress = normalizeAddress(factoryAddress);
|
|
9
|
+
const factoryEvents = events.filter((ev) => {
|
|
10
|
+
const from = normalizeAddress(ev.from_address);
|
|
11
|
+
return from === normalizedFactoryAddress;
|
|
12
|
+
});
|
|
13
|
+
if (factoryEvents.length === 0) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
const lastFactoryEvent = factoryEvents[factoryEvents.length - 1];
|
|
17
|
+
const data = lastFactoryEvent.data ?? [];
|
|
18
|
+
if (!Array.isArray(data) || data.length === 0) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
const memecoinAddress = data[data.length - 1];
|
|
22
|
+
return memecoinAddress || undefined;
|
|
23
|
+
}
|
|
24
|
+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,GAAG,CAAC,CAAC,CAAC;IAE9C,OAAO,eAAe,IAAI,SAAS,CAAC;AACtC,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { Uint256 } from 'starknet';
|
|
1
|
+
import { ProviderInterface, Uint256 } from 'starknet';
|
|
2
2
|
import { onchainWrite } from '@kasarlabs/ask-starknet-core';
|
|
3
3
|
export declare const execute: (method: string, env: onchainWrite, calldata: (string | Uint256)[]) => Promise<{
|
|
4
4
|
transaction_hash: string;
|
|
5
5
|
}>;
|
|
6
6
|
export declare const decimalsScale: (decimals: number) => string;
|
|
7
|
+
export declare const getStartingTick: (initialPrice: number) => number;
|
|
8
|
+
export declare const getMemecoinTotalSupply: (provider: ProviderInterface, address: string) => Promise<bigint>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CallData } from 'starknet';
|
|
2
|
-
import { FACTORY_ADDRESS } from '../constants/index.js';
|
|
2
|
+
import { EKUBO_TICK_SIZE_LOG, EKUBO_TICK_SPACING, FACTORY_ADDRESS, } from '../constants/index.js';
|
|
3
3
|
export const execute = async (method, env, calldata) => {
|
|
4
4
|
const account = env.account;
|
|
5
5
|
return await account.execute({
|
|
@@ -9,4 +9,34 @@ export const execute = async (method, env, calldata) => {
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
export const decimalsScale = (decimals) => `1${Array(decimals).fill('0').join('')}`;
|
|
12
|
+
export const getStartingTick = (initialPrice) => Math.floor(Math.log(initialPrice) / EKUBO_TICK_SIZE_LOG / EKUBO_TICK_SPACING) * EKUBO_TICK_SPACING;
|
|
13
|
+
const uint256HexToBigInt = (lowHex, highHex) => {
|
|
14
|
+
try {
|
|
15
|
+
const low = BigInt(lowHex);
|
|
16
|
+
const high = BigInt(highHex);
|
|
17
|
+
return (high << 128n) + low;
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
throw new Error(`Failed to convert Uint256 to bigint. Invalid hex values: low="${lowHex}", high="${highHex}"`);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
export const getMemecoinTotalSupply = async (provider, address) => {
|
|
24
|
+
const res = await provider.callContract({
|
|
25
|
+
contractAddress: address,
|
|
26
|
+
entrypoint: 'totalSupply',
|
|
27
|
+
calldata: [],
|
|
28
|
+
});
|
|
29
|
+
const out = Array.isArray(res)
|
|
30
|
+
? res
|
|
31
|
+
: Array.isArray(res?.result)
|
|
32
|
+
? res.result
|
|
33
|
+
: [];
|
|
34
|
+
if (out.length === 2) {
|
|
35
|
+
return uint256HexToBigInt(out[0], out[1]);
|
|
36
|
+
}
|
|
37
|
+
if (out.length === 1) {
|
|
38
|
+
return BigInt(out[0]);
|
|
39
|
+
}
|
|
40
|
+
throw new Error(`Invalid totalSupply response: expected Uint256 (2 values) or felt252 (1 value), got ${out.length} values`);
|
|
41
|
+
};
|
|
12
42
|
//# sourceMappingURL=helper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/lib/utils/helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,QAAQ,
|
|
1
|
+
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/lib/utils/helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,QAAQ,EAA8B,MAAM,UAAU,CAAC;AACzE,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,GAKhB,MAAM,uBAAuB,CAAC;AA2B/B,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAC1B,MAAc,EACd,GAAiB,EACjB,QAA8B,EAC9B,EAAE;IACF,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;IAC5B,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC;QAC3B,eAAe,EAAE,eAAe;QAChC,UAAU,EAAE,MAAM;QAClB,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC;KACrC,CAAC,CAAC;AACL,CAAC,CAAC;AAOF,M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E,CAAC;QACrB,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACxB,CAAC;IAED,MAAM,IAAI,KAAK,CACb,uFAAuF,GAAG,CAAC,MAAM,SAAS,CAC3G,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Fraction } from '@uniswap/sdk-core';
|
|
2
|
+
import { BlockNumber, ProviderInterface } from 'starknet';
|
|
3
|
+
export type USDCPair = {
|
|
4
|
+
address: string;
|
|
5
|
+
reversed: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare function getPairPrice(provider: ProviderInterface, pair?: USDCPair, blockNumber?: BlockNumber): Promise<Fraction>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Fraction } from '@uniswap/sdk-core';
|
|
2
|
+
import { BlockTag, uint256 } from 'starknet';
|
|
3
|
+
import { decimalsScale } from './helper.js';
|
|
4
|
+
export async function getPairPrice(provider, pair, blockNumber = BlockTag.LATEST) {
|
|
5
|
+
if (!pair)
|
|
6
|
+
return new Fraction(1, 1);
|
|
7
|
+
const result = await provider.callContract({
|
|
8
|
+
contractAddress: pair.address,
|
|
9
|
+
entrypoint: 'get_reserves',
|
|
10
|
+
}, blockNumber);
|
|
11
|
+
const [reserve0Low, reserve0High, reserve1Low, reserve1High] = result;
|
|
12
|
+
if (!reserve0Low && !reserve0High) {
|
|
13
|
+
throw new Error('Invalid reserves: reserve0 is zero');
|
|
14
|
+
}
|
|
15
|
+
const pairPrice = new Fraction(uint256.uint256ToBN({ low: reserve1Low, high: reserve1High }).toString(), uint256.uint256ToBN({ low: reserve0Low, high: reserve0High }).toString());
|
|
16
|
+
return (pair.reversed ? pairPrice.invert() : pairPrice).multiply(decimalsScale(12));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=price.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"price.js","sourceRoot":"","sources":["../../../src/lib/utils/price.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAe,QAAQ,EAAqB,OAAO,EAAE,MAAM,UAAU,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAO5C,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,QAA2B,EAC3B,IAAe,EACf,cAA2B,QAAQ,CAAC,MAAM;IAE1C,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAErC,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,YAAY,CACxC;QACE,eAAe,EAAE,IAAI,CAAC,OAAO;QAC7B,UAAU,EAAE,cAAc;KAC3B,EACD,WAAW,CACZ,CAAC;IAEF,MAAM,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,CAAC,GAAG,MAAM,CAAC;IAEtE,IAAI,CAAC,WAAW,IAAI,CAAC,YAAY,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IACxD,CAAC;IACD,MAAM,SAAS,GAAG,IAAI,QAAQ,CAC5B,OAAO,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC,QAAQ,EAAE,EACxE,OAAO,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC,QAAQ,EAAE,CACzE,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAC9D,aAAa,CAAC,EAAE,CAAC,CAClB,CAAC;AACJ,CAAC"}
|
package/build/schemas/index.d.ts
CHANGED
|
@@ -14,121 +14,62 @@ export declare const createMemecoinSchema: z.ZodObject<{
|
|
|
14
14
|
salt: z.ZodOptional<z.ZodString>;
|
|
15
15
|
}, "strip", z.ZodTypeAny, {
|
|
16
16
|
symbol: string;
|
|
17
|
-
name: string;
|
|
18
17
|
owner: string;
|
|
18
|
+
name: string;
|
|
19
19
|
initialSupply: string;
|
|
20
20
|
salt?: string | undefined;
|
|
21
21
|
}, {
|
|
22
22
|
symbol: string;
|
|
23
|
-
name: string;
|
|
24
23
|
owner: string;
|
|
24
|
+
name: string;
|
|
25
25
|
initialSupply: string;
|
|
26
26
|
salt?: string | undefined;
|
|
27
27
|
}>;
|
|
28
|
-
export declare const launchOnEkuboSchema: z.ZodObject<{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
memecoinAddress: string;
|
|
38
|
-
transferRestrictionDelay: number;
|
|
39
|
-
maxPercentageBuyLaunch: number;
|
|
40
|
-
quoteAddress: string;
|
|
41
|
-
initialHolders: string[];
|
|
42
|
-
initialHoldersAmounts: string[];
|
|
43
|
-
}, {
|
|
44
|
-
memecoinAddress: string;
|
|
45
|
-
transferRestrictionDelay: number;
|
|
46
|
-
maxPercentageBuyLaunch: number;
|
|
47
|
-
quoteAddress: string;
|
|
48
|
-
initialHolders: string[];
|
|
49
|
-
initialHoldersAmounts: string[];
|
|
50
|
-
}>, {
|
|
51
|
-
memecoinAddress: string;
|
|
52
|
-
transferRestrictionDelay: number;
|
|
53
|
-
maxPercentageBuyLaunch: number;
|
|
54
|
-
quoteAddress: string;
|
|
55
|
-
initialHolders: string[];
|
|
56
|
-
initialHoldersAmounts: string[];
|
|
57
|
-
}, {
|
|
58
|
-
memecoinAddress: string;
|
|
59
|
-
transferRestrictionDelay: number;
|
|
60
|
-
maxPercentageBuyLaunch: number;
|
|
61
|
-
quoteAddress: string;
|
|
62
|
-
initialHolders: string[];
|
|
63
|
-
initialHoldersAmounts: string[];
|
|
64
|
-
}>;
|
|
65
|
-
ekuboParams: z.ZodObject<{
|
|
66
|
-
fee: z.ZodEffects<z.ZodString, string, string>;
|
|
67
|
-
tickSpacing: z.ZodString;
|
|
68
|
-
startingPrice: z.ZodObject<{
|
|
69
|
-
mag: z.ZodString;
|
|
70
|
-
sign: z.ZodBoolean;
|
|
71
|
-
}, "strip", z.ZodTypeAny, {
|
|
72
|
-
mag: string;
|
|
73
|
-
sign: boolean;
|
|
74
|
-
}, {
|
|
75
|
-
mag: string;
|
|
76
|
-
sign: boolean;
|
|
77
|
-
}>;
|
|
78
|
-
bound: z.ZodString;
|
|
79
|
-
}, "strip", z.ZodTypeAny, {
|
|
80
|
-
fee: string;
|
|
81
|
-
bound: string;
|
|
82
|
-
tickSpacing: string;
|
|
83
|
-
startingPrice: {
|
|
84
|
-
mag: string;
|
|
85
|
-
sign: boolean;
|
|
86
|
-
};
|
|
87
|
-
}, {
|
|
88
|
-
fee: string;
|
|
89
|
-
bound: string;
|
|
90
|
-
tickSpacing: string;
|
|
91
|
-
startingPrice: {
|
|
92
|
-
mag: string;
|
|
93
|
-
sign: boolean;
|
|
94
|
-
};
|
|
95
|
-
}>;
|
|
28
|
+
export declare const launchOnEkuboSchema: z.ZodEffects<z.ZodObject<{
|
|
29
|
+
memecoinAddress: z.ZodString;
|
|
30
|
+
transferRestrictionDelay: z.ZodNumber;
|
|
31
|
+
maxPercentageBuyLaunch: z.ZodNumber;
|
|
32
|
+
quoteToken: z.ZodEnum<["STRK", "ETH", "USDC"]>;
|
|
33
|
+
initialHolders: z.ZodArray<z.ZodString, "many">;
|
|
34
|
+
initialHoldersAmounts: z.ZodArray<z.ZodString, "many">;
|
|
35
|
+
fee: z.ZodEffects<z.ZodString, string, string>;
|
|
36
|
+
startingMarketCap: z.ZodString;
|
|
96
37
|
}, "strip", z.ZodTypeAny, {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
38
|
+
memecoinAddress: string;
|
|
39
|
+
transferRestrictionDelay: number;
|
|
40
|
+
maxPercentageBuyLaunch: number;
|
|
41
|
+
quoteToken: "STRK" | "ETH" | "USDC";
|
|
42
|
+
initialHolders: string[];
|
|
43
|
+
initialHoldersAmounts: string[];
|
|
44
|
+
fee: string;
|
|
45
|
+
startingMarketCap: string;
|
|
46
|
+
}, {
|
|
47
|
+
memecoinAddress: string;
|
|
48
|
+
transferRestrictionDelay: number;
|
|
49
|
+
maxPercentageBuyLaunch: number;
|
|
50
|
+
quoteToken: "STRK" | "ETH" | "USDC";
|
|
51
|
+
initialHolders: string[];
|
|
52
|
+
initialHoldersAmounts: string[];
|
|
53
|
+
fee: string;
|
|
54
|
+
startingMarketCap: string;
|
|
55
|
+
}>, {
|
|
56
|
+
memecoinAddress: string;
|
|
57
|
+
transferRestrictionDelay: number;
|
|
58
|
+
maxPercentageBuyLaunch: number;
|
|
59
|
+
quoteToken: "STRK" | "ETH" | "USDC";
|
|
60
|
+
initialHolders: string[];
|
|
61
|
+
initialHoldersAmounts: string[];
|
|
62
|
+
fee: string;
|
|
63
|
+
startingMarketCap: string;
|
|
114
64
|
}, {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
ekuboParams: {
|
|
124
|
-
fee: string;
|
|
125
|
-
bound: string;
|
|
126
|
-
tickSpacing: string;
|
|
127
|
-
startingPrice: {
|
|
128
|
-
mag: string;
|
|
129
|
-
sign: boolean;
|
|
130
|
-
};
|
|
131
|
-
};
|
|
65
|
+
memecoinAddress: string;
|
|
66
|
+
transferRestrictionDelay: number;
|
|
67
|
+
maxPercentageBuyLaunch: number;
|
|
68
|
+
quoteToken: "STRK" | "ETH" | "USDC";
|
|
69
|
+
initialHolders: string[];
|
|
70
|
+
initialHoldersAmounts: string[];
|
|
71
|
+
fee: string;
|
|
72
|
+
startingMarketCap: string;
|
|
132
73
|
}>;
|
|
133
74
|
export type LaunchOnEkuboParams = z.infer<typeof launchOnEkuboSchema>;
|
|
134
75
|
export type CreateMemecoinParams = z.infer<typeof createMemecoinSchema>;
|
package/build/schemas/index.js
CHANGED
|
@@ -3,71 +3,54 @@ export const contractAddressSchema = z.object({
|
|
|
3
3
|
contractAddress: z.string().describe('The address of the contract'),
|
|
4
4
|
});
|
|
5
5
|
export const createMemecoinSchema = z.object({
|
|
6
|
-
owner: z
|
|
6
|
+
owner: z
|
|
7
|
+
.string()
|
|
8
|
+
.regex(/^0x[0-9a-fA-F]{1,64}$/)
|
|
9
|
+
.describe('Owner address of the memecoin (must be a valid Starknet address, can be simplified)'),
|
|
7
10
|
name: z.string().describe('Name of the memecoin'),
|
|
8
11
|
symbol: z.string().describe('Symbol/ticker of the memecoin'),
|
|
9
|
-
initialSupply: z.string().describe('Initial supply of tokens
|
|
12
|
+
initialSupply: z.string().describe('Initial supply of tokens'),
|
|
10
13
|
salt: z
|
|
11
14
|
.string()
|
|
12
15
|
.optional()
|
|
13
16
|
.describe('Optional salt for contract address generation'),
|
|
14
17
|
});
|
|
15
|
-
const
|
|
18
|
+
export const launchOnEkuboSchema = z
|
|
16
19
|
.object({
|
|
17
20
|
memecoinAddress: z
|
|
18
21
|
.string()
|
|
19
|
-
.regex(/^0x[0-9a-fA-F]{
|
|
20
|
-
.describe('Address of the memecoin contract to be launched'),
|
|
22
|
+
.regex(/^0x[0-9a-fA-F]{1,64}$/)
|
|
23
|
+
.describe('Address of the memecoin contract to be launched (can be simplified)'),
|
|
21
24
|
transferRestrictionDelay: z
|
|
22
25
|
.number()
|
|
23
26
|
.min(0)
|
|
24
27
|
.describe('Time period in seconds during which transfers are restricted after launch. Example: 86400 for 24 hours'),
|
|
25
28
|
maxPercentageBuyLaunch: z
|
|
26
29
|
.number()
|
|
27
|
-
.min(
|
|
30
|
+
.min(0)
|
|
28
31
|
.max(100)
|
|
29
|
-
.describe('Maximum percentage of total supply that can be bought by a single address at launch. Range:
|
|
30
|
-
|
|
31
|
-
.
|
|
32
|
-
.
|
|
33
|
-
.describe('Address of the quote token (e.g., ETH) used for the trading pair'),
|
|
32
|
+
.describe('Maximum percentage of total supply that can be bought by a single address at launch. Range: 0-100'),
|
|
33
|
+
quoteToken: z
|
|
34
|
+
.enum(['STRK', 'ETH', 'USDC'])
|
|
35
|
+
.describe('Quote token used for the trading pair. Must be one of: STRK, ETH, or USDC'),
|
|
34
36
|
initialHolders: z
|
|
35
|
-
.array(z.string().regex(/^0x[0-9a-fA-F]{
|
|
36
|
-
.
|
|
37
|
-
.describe('Array of addresses that will receive initial token distribution'),
|
|
37
|
+
.array(z.string().regex(/^0x[0-9a-fA-F]{1,64}$/))
|
|
38
|
+
.describe('Array of addresses that will receive initial token distribution (can be simplified)'),
|
|
38
39
|
initialHoldersAmounts: z
|
|
39
40
|
.array(z.string())
|
|
40
|
-
.
|
|
41
|
-
.describe('Array of token amounts (in wei) to be distributed to initial holders'),
|
|
42
|
-
})
|
|
43
|
-
.refine((data) => data.initialHolders.length === data.initialHoldersAmounts.length, {
|
|
44
|
-
message: 'Initial holders and amounts arrays must have the same length',
|
|
45
|
-
});
|
|
46
|
-
const ekuboPoolParametersSchema = z.object({
|
|
41
|
+
.describe('Array of token amounts in human-readable format (e.g., "1" for 1 token) to be distributed to initial holders'),
|
|
47
42
|
fee: z
|
|
48
43
|
.string()
|
|
49
44
|
.refine((value) => {
|
|
50
|
-
const fee =
|
|
51
|
-
return fee >=
|
|
45
|
+
const fee = parseFloat(value);
|
|
46
|
+
return fee >= 0 && fee <= 100;
|
|
52
47
|
}, {
|
|
53
|
-
message: 'Fee must be between
|
|
48
|
+
message: 'Fee must be between 0 and 100 (0% to 100%)',
|
|
54
49
|
})
|
|
55
|
-
.describe('Pool fee
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
mag: z
|
|
61
|
-
.string()
|
|
62
|
-
.describe('Magnitude of the starting price in wei. Example: "1000000000000000000" for 1.0'),
|
|
63
|
-
sign: z.boolean().describe('true for positive price, false for negative'),
|
|
64
|
-
}),
|
|
65
|
-
bound: z
|
|
66
|
-
.string()
|
|
67
|
-
.describe('Defines the price range limit for the concentrated liquidity pool'),
|
|
68
|
-
});
|
|
69
|
-
export const launchOnEkuboSchema = z.object({
|
|
70
|
-
launchParams: launchParametersSchema,
|
|
71
|
-
ekuboParams: ekuboPoolParametersSchema,
|
|
50
|
+
.describe('Pool fee as a decimal percentage. Example: "0.3" for 0.3%'),
|
|
51
|
+
startingMarketCap: z.string().describe('Starting Market Cap in USD'),
|
|
52
|
+
})
|
|
53
|
+
.refine((data) => data.initialHolders.length === data.initialHoldersAmounts.length, {
|
|
54
|
+
message: 'Initial holders and amounts arrays must have the same length',
|
|
72
55
|
});
|
|
73
56
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;CACpE,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"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E,CAC5E;IAGH,cAAc,EAAE,CAAC;SACd,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;SAChD,QAAQ,CACP,qFAAqF,CACtF;IAGH,qBAAqB,EAAE,CAAC;SACrB,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SACjB,QAAQ,CACP,8GAA8G,CAC/G;IAGH,GAAG,EAAE,CAAC;SACH,MAAM,EAAE;SACR,MAAM,CACL,CAAC,KAAK,EAAE,EAAE;QACR,MAAM,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;QAC9B,OAAO,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,GAAG,CAAC;IAChC,CAAC,EACD;QACE,OAAO,EAAE,4CAA4C;KACtD,CACF;SACA,QAAQ,CAAC,2DAA2D,CAAC;IAGxE,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;CACrE,CAAC;KACD,MAAM,CACL,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,KAAK,IAAI,CAAC,qBAAqB,CAAC,MAAM,EAC1E;IACE,OAAO,EAAE,8DAA8D;CACxE,CACF,CAAC"}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
import { CreateMemecoinParams } from '../schemas/index.js';
|
|
2
|
-
import { onchainWrite } from '@kasarlabs/ask-starknet-core';
|
|
3
|
-
export declare const createMemecoin: (env: onchainWrite, params: CreateMemecoinParams) => Promise<
|
|
4
|
-
status: string;
|
|
5
|
-
transactionHash: string;
|
|
6
|
-
error?: undefined;
|
|
7
|
-
} | {
|
|
8
|
-
status: string;
|
|
9
|
-
error: string;
|
|
10
|
-
transactionHash?: undefined;
|
|
11
|
-
}>;
|
|
2
|
+
import { onchainWrite, toolResult } from '@kasarlabs/ask-starknet-core';
|
|
3
|
+
export declare const createMemecoin: (env: onchainWrite, params: CreateMemecoinParams) => Promise<toolResult>;
|
|
@@ -1,24 +1,41 @@
|
|
|
1
|
-
import { stark, uint256 } from 'starknet';
|
|
2
|
-
import {
|
|
1
|
+
import { stark, uint256, validateAndParseAddress, Contract } from 'starknet';
|
|
2
|
+
import { decimalsScale } from '../lib/utils/helper.js';
|
|
3
|
+
import { FACTORY_ABI } from '../lib/abis/unruggableFactory.js';
|
|
4
|
+
import { FACTORY_ADDRESS, MEMECOIN_DECIMALS } from '../lib/constants/index.js';
|
|
5
|
+
import { extractMemecoinAddressFromReceipt } from '../lib/utils/events.js';
|
|
3
6
|
export const createMemecoin = async (env, params) => {
|
|
4
7
|
try {
|
|
5
|
-
|
|
8
|
+
validateAndParseAddress(params.owner);
|
|
9
|
+
const { account, provider } = env;
|
|
6
10
|
const salt = stark.randomAddress();
|
|
7
|
-
const
|
|
11
|
+
const contract = new Contract({
|
|
12
|
+
abi: FACTORY_ABI,
|
|
13
|
+
address: FACTORY_ADDRESS,
|
|
14
|
+
providerOrAccount: account,
|
|
15
|
+
});
|
|
16
|
+
const initialSupplyUint256 = uint256.bnToUint256(BigInt(params.initialSupply) * BigInt(decimalsScale(MEMECOIN_DECIMALS)));
|
|
17
|
+
const { transaction_hash } = await contract.invoke('create_memecoin', [
|
|
8
18
|
params.owner,
|
|
9
19
|
params.name,
|
|
10
20
|
params.symbol,
|
|
11
|
-
|
|
21
|
+
initialSupplyUint256,
|
|
12
22
|
salt,
|
|
13
23
|
]);
|
|
14
24
|
await provider.waitForTransaction(transaction_hash);
|
|
25
|
+
const receipt = await provider.getTransactionReceipt(transaction_hash);
|
|
26
|
+
const memecoinAddress = extractMemecoinAddressFromReceipt(receipt);
|
|
27
|
+
if (!memecoinAddress) {
|
|
28
|
+
throw new Error('Could not extract memecoin address from transaction');
|
|
29
|
+
}
|
|
15
30
|
return {
|
|
16
31
|
status: 'success',
|
|
17
|
-
|
|
32
|
+
data: {
|
|
33
|
+
transactionHash: transaction_hash,
|
|
34
|
+
memecoinAddress: memecoinAddress,
|
|
35
|
+
},
|
|
18
36
|
};
|
|
19
37
|
}
|
|
20
38
|
catch (error) {
|
|
21
|
-
console.error('Error creating memecoin:', error);
|
|
22
39
|
return {
|
|
23
40
|
status: 'failure',
|
|
24
41
|
error: error instanceof Error ? error.message : 'Unknown error',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createMemecoin.js","sourceRoot":"","sources":["../../src/tools/createMemecoin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"createMemecoin.js","sourceRoot":"","sources":["../../src/tools/createMemecoin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,iCAAiC,EAAE,MAAM,wBAAwB,CAAC;AAG3E,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EACjC,GAAiB,EACjB,MAA4B,EACP,EAAE;IACvB,IAAI,CAAC;QACH,uBAAuB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAEtC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC;QAClC,MAAM,IAAI,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;QAEnC,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC;YAC5B,GAAG,EAAE,WAAW;YAChB,OAAO,EAAE,eAAe;YACxB,iBAAiB,EAAE,OAAO;SAC3B,CAAC,CAAC;QAEH,MAAM,oBAAoB,GAAG,OAAO,CAAC,WAAW,CAC9C,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC,CACxE,CAAC;QAEF,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,iBAAiB,EAAE;YACpE,MAAM,CAAC,KAAK;YACZ,MAAM,CAAC,IAAI;YACX,MAAM,CAAC,MAAM;YACb,oBAAoB;YACpB,IAAI;SACL,CAAC,CAAC;QAEH,MAAM,QAAQ,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;QAEpD,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,qBAAqB,CAAC,gBAAgB,CAAC,CAAC;QACvE,MAAM,eAAe,GAAG,iCAAiC,CAAC,OAAO,CAAC,CAAC;QAEnE,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;QACzE,CAAC;QAED,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE;gBACJ,eAAe,EAAE,gBAAgB;gBACjC,eAAe,EAAE,eAAe;aACjC;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,27 +1,3 @@
|
|
|
1
1
|
import { ContractAddressParams } from '../schemas/index.js';
|
|
2
|
-
import { onchainWrite } from '@kasarlabs/ask-starknet-core';
|
|
3
|
-
|
|
4
|
-
type: 'JediERC20';
|
|
5
|
-
address: string;
|
|
6
|
-
} | {
|
|
7
|
-
type: 'StarkDeFiERC20';
|
|
8
|
-
address: string;
|
|
9
|
-
} | {
|
|
10
|
-
type: 'EkuboNFT';
|
|
11
|
-
tokenId: number;
|
|
12
|
-
};
|
|
13
|
-
interface LockedLiquidityInfo {
|
|
14
|
-
hasLockedLiquidity: boolean;
|
|
15
|
-
liquidityType?: LiquidityType;
|
|
16
|
-
liquidityContractAddress?: string;
|
|
17
|
-
}
|
|
18
|
-
export declare const getLockedLiquidity: (env: onchainWrite, params: ContractAddressParams) => Promise<{
|
|
19
|
-
status: string;
|
|
20
|
-
data: LockedLiquidityInfo;
|
|
21
|
-
error?: undefined;
|
|
22
|
-
} | {
|
|
23
|
-
status: string;
|
|
24
|
-
error: any;
|
|
25
|
-
data?: undefined;
|
|
26
|
-
}>;
|
|
27
|
-
export {};
|
|
2
|
+
import { onchainWrite, toolResult } from '@kasarlabs/ask-starknet-core';
|
|
3
|
+
export declare const getLockedLiquidity: (env: onchainWrite, params: ContractAddressParams) => Promise<toolResult>;
|
|
@@ -3,8 +3,12 @@ import { FACTORY_ABI } from '../lib/abis/unruggableFactory.js';
|
|
|
3
3
|
import { FACTORY_ADDRESS } from '../lib/constants/index.js';
|
|
4
4
|
export const getLockedLiquidity = async (env, params) => {
|
|
5
5
|
try {
|
|
6
|
-
const provider = env
|
|
7
|
-
const contract = new Contract(
|
|
6
|
+
const { provider } = env;
|
|
7
|
+
const contract = new Contract({
|
|
8
|
+
abi: FACTORY_ABI,
|
|
9
|
+
address: FACTORY_ADDRESS,
|
|
10
|
+
providerOrAccount: provider,
|
|
11
|
+
});
|
|
8
12
|
const result = await contract.locked_liquidity(params.contractAddress);
|
|
9
13
|
const liquidityInfo = {
|
|
10
14
|
hasLockedLiquidity: false,
|
|
@@ -38,9 +42,8 @@ export const getLockedLiquidity = async (env, params) => {
|
|
|
38
42
|
};
|
|
39
43
|
}
|
|
40
44
|
catch (error) {
|
|
41
|
-
console.error('Error getting locked liquidity:', error);
|
|
42
45
|
return {
|
|
43
|
-
status: '
|
|
46
|
+
status: 'failure',
|
|
44
47
|
error: error.message,
|
|
45
48
|
};
|
|
46
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLockedLiquidity.js","sourceRoot":"","sources":["../../src/tools/getLockedLiquidity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"getLockedLiquidity.js","sourceRoot":"","sources":["../../src/tools/getLockedLiquidity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAqB5D,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EACrC,GAAiB,EACjB,MAA6B,EACR,EAAE;IACvB,IAAI,CAAC;QACH,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC;QACzB,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC;YAC5B,GAAG,EAAE,WAAW;YAChB,OAAO,EAAE,eAAe;YACxB,iBAAiB,EAAE,QAAQ;SAC5B,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,gBAAgB,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;QACvE,MAAM,aAAa,GAAwB;YACzC,kBAAkB,EAAE,KAAK;SAC1B,CAAC;QAEF,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,CAAC,eAAe,EAAE,aAAa,CAAC,GAAG,MAAM,CAAC;YAChD,aAAa,CAAC,kBAAkB,GAAG,IAAI,CAAC;YACxC,aAAa,CAAC,wBAAwB,GAAG,eAAe,CAAC;YAEzD,IAAI,WAAW,IAAI,aAAa,EAAE,CAAC;gBACjC,aAAa,CAAC,aAAa,GAAG;oBAC5B,IAAI,EAAE,WAAW;oBACjB,OAAO,EAAE,aAAa,CAAC,SAAS;iBACjC,CAAC;YACJ,CAAC;iBAAM,IAAI,gBAAgB,IAAI,aAAa,EAAE,CAAC;gBAC7C,aAAa,CAAC,aAAa,GAAG;oBAC5B,IAAI,EAAE,gBAAgB;oBACtB,OAAO,EAAE,aAAa,CAAC,cAAc;iBACtC,CAAC;YACJ,CAAC;iBAAM,IAAI,UAAU,IAAI,aAAa,EAAE,CAAC;gBACvC,aAAa,CAAC,aAAa,GAAG;oBAC5B,IAAI,EAAE,UAAU;oBAChB,OAAO,EAAE,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC;iBACxC,CAAC;YACJ,CAAC;QACH,CAAC;QAED,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE,aAAa;SACpB,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,CAAC,OAAO;SACrB,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
import { ContractAddressParams } from '../schemas/index.js';
|
|
2
|
-
import { onchainWrite } from '@kasarlabs/ask-starknet-core';
|
|
3
|
-
export declare const isMemecoin: (env: onchainWrite, params: ContractAddressParams) => Promise<
|
|
4
|
-
status: string;
|
|
5
|
-
isMemecoin: any;
|
|
6
|
-
error?: undefined;
|
|
7
|
-
} | {
|
|
8
|
-
status: string;
|
|
9
|
-
error: any;
|
|
10
|
-
isMemecoin?: undefined;
|
|
11
|
-
}>;
|
|
2
|
+
import { onchainWrite, toolResult } from '@kasarlabs/ask-starknet-core';
|
|
3
|
+
export declare const isMemecoin: (env: onchainWrite, params: ContractAddressParams) => Promise<toolResult>;
|
|
@@ -3,18 +3,21 @@ import { FACTORY_ABI } from '../lib/abis/unruggableFactory.js';
|
|
|
3
3
|
import { FACTORY_ADDRESS } from '../lib/constants/index.js';
|
|
4
4
|
export const isMemecoin = async (env, params) => {
|
|
5
5
|
try {
|
|
6
|
-
const provider = env
|
|
7
|
-
const contract = new Contract(
|
|
6
|
+
const { provider } = env;
|
|
7
|
+
const contract = new Contract({
|
|
8
|
+
abi: FACTORY_ABI,
|
|
9
|
+
address: FACTORY_ADDRESS,
|
|
10
|
+
providerOrAccount: provider,
|
|
11
|
+
});
|
|
8
12
|
const result = await contract.is_memecoin(params.contractAddress);
|
|
9
13
|
return {
|
|
10
14
|
status: 'success',
|
|
11
|
-
isMemecoin: result,
|
|
15
|
+
data: { isMemecoin: result },
|
|
12
16
|
};
|
|
13
17
|
}
|
|
14
18
|
catch (error) {
|
|
15
|
-
console.error('Error checking memecoin status:', error);
|
|
16
19
|
return {
|
|
17
|
-
status: '
|
|
20
|
+
status: 'failure',
|
|
18
21
|
error: error.message,
|
|
19
22
|
};
|
|
20
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isMemecoin.js","sourceRoot":"","sources":["../../src/tools/isMemecoin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"isMemecoin.js","sourceRoot":"","sources":["../../src/tools/isMemecoin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAU5D,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAC7B,GAAiB,EACjB,MAA6B,EACR,EAAE;IACvB,IAAI,CAAC;QACH,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC;QACzB,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC;YAC5B,GAAG,EAAE,WAAW;YAChB,OAAO,EAAE,eAAe;YACxB,iBAAiB,EAAE,QAAQ;SAC5B,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;QAElE,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE;SAC7B,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,CAAC,OAAO;SACrB,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
import { LaunchOnEkuboParams } from '../schemas/index.js';
|
|
2
|
-
import { onchainWrite } from '@kasarlabs/ask-starknet-core';
|
|
3
|
-
export declare const launchOnEkubo: (env: onchainWrite, params: LaunchOnEkuboParams) => Promise<
|
|
4
|
-
status: string;
|
|
5
|
-
response: any;
|
|
6
|
-
error?: undefined;
|
|
7
|
-
} | {
|
|
8
|
-
status: string;
|
|
9
|
-
error: any;
|
|
10
|
-
response?: undefined;
|
|
11
|
-
}>;
|
|
2
|
+
import { onchainWrite, toolResult } from '@kasarlabs/ask-starknet-core';
|
|
3
|
+
export declare const launchOnEkubo: (env: onchainWrite, params: LaunchOnEkuboParams) => Promise<toolResult>;
|
|
@@ -1,39 +1,97 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { EKUBO_BOUND, EKUBO_FEES_MULTIPLICATOR, EKUBO_TICK_SPACING, FACTORY_ADDRESS, QUOTE_TOKEN_INFO, } from '../lib/constants/index.js';
|
|
2
|
+
import { CallData, uint256 } from 'starknet';
|
|
3
|
+
import { Fraction, Percent } from '@uniswap/sdk-core';
|
|
4
|
+
import { decimalsScale, getMemecoinTotalSupply, getStartingTick, } from '../lib/utils/helper.js';
|
|
5
|
+
import { getPairPrice } from '../lib/utils/price.js';
|
|
4
6
|
export const launchOnEkubo = async (env, params) => {
|
|
5
7
|
try {
|
|
6
|
-
const provider = env
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
const { account, provider } = env;
|
|
9
|
+
const token_info = QUOTE_TOKEN_INFO[params.quoteToken];
|
|
10
|
+
if (!token_info) {
|
|
11
|
+
throw new Error(`Unsupported quote token: ${params.quoteToken}`);
|
|
12
|
+
}
|
|
13
|
+
if (params.initialHolders.length !== params.initialHoldersAmounts.length) {
|
|
14
|
+
throw new Error('initialHolders and initialHoldersAmounts must have equal lengths');
|
|
15
|
+
}
|
|
16
|
+
const teamAllocations = params.initialHolders.map((address, index) => ({
|
|
17
|
+
address,
|
|
18
|
+
amount: params.initialHoldersAmounts[index],
|
|
19
|
+
}));
|
|
20
|
+
let quoteTokenPrice = new Fraction(1, 1);
|
|
21
|
+
if (params.quoteToken === 'USDC') {
|
|
22
|
+
quoteTokenPrice = await getPairPrice(provider);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
quoteTokenPrice = await getPairPrice(provider, {
|
|
26
|
+
address: token_info.router_address,
|
|
27
|
+
reversed: false,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
const feeBigInt = Math.round(parseFloat(params.fee) * 100);
|
|
31
|
+
const fees_percent = new Percent(feeBigInt, 10000);
|
|
32
|
+
const fees = fees_percent
|
|
33
|
+
.multiply(EKUBO_FEES_MULTIPLICATOR)
|
|
34
|
+
.quotient.toString();
|
|
35
|
+
const max_buyPercent = new Percent(params.maxPercentageBuyLaunch, 100);
|
|
36
|
+
const totalSupply = await getMemecoinTotalSupply(provider, params.memecoinAddress);
|
|
37
|
+
const initialPrice = +new Fraction(params.startingMarketCap)
|
|
38
|
+
.divide(quoteTokenPrice)
|
|
39
|
+
.multiply(decimalsScale(18))
|
|
40
|
+
.divide(new Fraction(totalSupply.toString()))
|
|
41
|
+
.toFixed(18);
|
|
42
|
+
const startingTickMag = getStartingTick(initialPrice);
|
|
43
|
+
const i129StartingTick = {
|
|
44
|
+
mag: Math.abs(startingTickMag),
|
|
45
|
+
sign: startingTickMag < 0,
|
|
17
46
|
};
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
47
|
+
const initialHolders = teamAllocations.map(({ address }) => address);
|
|
48
|
+
const initialHoldersAmounts = teamAllocations.map(({ amount }) => uint256.bnToUint256(BigInt(amount) * BigInt(decimalsScale(18))));
|
|
49
|
+
const launchCalldata = CallData.compile([
|
|
50
|
+
params.memecoinAddress,
|
|
51
|
+
params.transferRestrictionDelay,
|
|
52
|
+
+max_buyPercent.toFixed(1) * 100,
|
|
53
|
+
token_info.address,
|
|
54
|
+
initialHolders,
|
|
55
|
+
initialHoldersAmounts,
|
|
56
|
+
fees,
|
|
57
|
+
EKUBO_TICK_SPACING,
|
|
58
|
+
i129StartingTick,
|
|
59
|
+
EKUBO_BOUND,
|
|
60
|
+
]);
|
|
61
|
+
const teamAllocationFraction = teamAllocations.reduce((acc, { amount }) => acc.add(amount), new Fraction(0));
|
|
62
|
+
const teamAllocationPercentage = new Percent(teamAllocationFraction.quotient.toString(), new Fraction(totalSupply.toString(), decimalsScale(18)).quotient.toString());
|
|
63
|
+
const teamAllocationQuoteAmount = new Fraction(params.startingMarketCap)
|
|
64
|
+
.divide(quoteTokenPrice)
|
|
65
|
+
.multiply(teamAllocationPercentage.multiply(fees_percent.add(1)));
|
|
66
|
+
const uin256TeamAllocationQuoteAmount = uint256.bnToUint256(BigInt(teamAllocationQuoteAmount
|
|
67
|
+
.multiply(decimalsScale(token_info.decimals))
|
|
68
|
+
.quotient.toString()));
|
|
69
|
+
const transferCalldata = CallData.compile([
|
|
70
|
+
FACTORY_ADDRESS,
|
|
71
|
+
uin256TeamAllocationQuoteAmount,
|
|
72
|
+
]);
|
|
73
|
+
const calls = [
|
|
74
|
+
{
|
|
75
|
+
contractAddress: token_info.address,
|
|
76
|
+
entrypoint: 'transfer',
|
|
77
|
+
calldata: transferCalldata,
|
|
24
78
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
79
|
+
{
|
|
80
|
+
contractAddress: FACTORY_ADDRESS,
|
|
81
|
+
entrypoint: 'launch_on_ekubo',
|
|
82
|
+
calldata: launchCalldata,
|
|
83
|
+
},
|
|
84
|
+
];
|
|
85
|
+
const tx = await account.execute(calls);
|
|
86
|
+
await provider.waitForTransaction(tx.transaction_hash);
|
|
28
87
|
return {
|
|
29
88
|
status: 'success',
|
|
30
|
-
|
|
89
|
+
data: { transactionHash: tx.transaction_hash },
|
|
31
90
|
};
|
|
32
91
|
}
|
|
33
92
|
catch (error) {
|
|
34
|
-
console.error('Error launching on Ekubo:', error);
|
|
35
93
|
return {
|
|
36
|
-
status: '
|
|
94
|
+
status: 'failure',
|
|
37
95
|
error: error.message,
|
|
38
96
|
};
|
|
39
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launchOnEkubo.js","sourceRoot":"","sources":["../../src/tools/launchOnEkubo.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"launchOnEkubo.js","sourceRoot":"","sources":["../../src/tools/launchOnEkubo.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,wBAAwB,EACxB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,eAAe,GAChB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAChC,GAAiB,EACjB,MAA2B,EACN,EAAE;IACvB,IAAI,CAAC;QACH,MAAM,EAAE,OAAO,EAAE,QAAQ,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AAO;YACL,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE,EAAE,eAAe,EAAE,EAAE,CAAC,gBAAgB,EAAE;SAC/C,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,CAAC,OAAO;SACrB,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kasarlabs/unruggable-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -10,22 +10,29 @@
|
|
|
10
10
|
"build": "tsc && chmod 755 build/index.js",
|
|
11
11
|
"clean": "rm -rf build",
|
|
12
12
|
"clean:all": "rm -rf build node_modules",
|
|
13
|
-
"start": "node build/index.js"
|
|
13
|
+
"start": "node build/index.js",
|
|
14
|
+
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
|
15
|
+
"test:e2e": "NODE_OPTIONS=--experimental-vm-modules jest __tests__/e2e"
|
|
14
16
|
},
|
|
15
17
|
"files": [
|
|
16
18
|
"build"
|
|
17
19
|
],
|
|
18
20
|
"dependencies": {
|
|
19
|
-
"@kasarlabs/ask-starknet-core": "0.1.
|
|
21
|
+
"@kasarlabs/ask-starknet-core": "0.1.4",
|
|
20
22
|
"@langchain/core": "^0.3.42",
|
|
21
|
-
"@modelcontextprotocol/sdk": "
|
|
23
|
+
"@modelcontextprotocol/sdk": "1.22.0",
|
|
24
|
+
"@uniswap/sdk-core": "^7.9.0",
|
|
22
25
|
"dotenv": "^16.4.7",
|
|
23
|
-
"starknet": "
|
|
26
|
+
"starknet": "~8.9.0",
|
|
24
27
|
"winston": "^3.17.0",
|
|
25
28
|
"zod": "^3.24.2"
|
|
26
29
|
},
|
|
27
30
|
"devDependencies": {
|
|
31
|
+
"@jest/globals": "^29.7.0",
|
|
32
|
+
"@types/jest": "^29.5.12",
|
|
28
33
|
"@types/node": "^22.13.10",
|
|
34
|
+
"jest": "^29.7.0",
|
|
35
|
+
"ts-jest": "^29.1.2",
|
|
29
36
|
"typescript": "^5.8.2"
|
|
30
37
|
},
|
|
31
38
|
"keywords": [
|
|
@@ -39,5 +46,5 @@
|
|
|
39
46
|
"publishConfig": {
|
|
40
47
|
"access": "public"
|
|
41
48
|
},
|
|
42
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "0799e2b085e950e5d102822d71a6b122290e8c38"
|
|
43
50
|
}
|