clanker-sdk 4.2.3 → 4.2.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/dist/index.d.ts +17 -2
- package/dist/index.js +50 -1
- package/dist/v4/extensions/index.js +42 -0
- package/dist/v4/index.js +42 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,8 @@ declare const WETH_ADDRESSES: Record<Chain, `0x${string}`>;
|
|
|
17
17
|
declare const DEFAULT_SUPPLY = 100000000000000000000000000000n;
|
|
18
18
|
declare enum PoolPositions {
|
|
19
19
|
Standard = "Standard",
|
|
20
|
-
Project = "Project"
|
|
20
|
+
Project = "Project",
|
|
21
|
+
TwentyETH = "TwentyETH"
|
|
21
22
|
}
|
|
22
23
|
type PoolPosition = {
|
|
23
24
|
tickLower: number;
|
|
@@ -54,6 +55,20 @@ declare const getTickFromMarketCap: (marketCap: number) => {
|
|
|
54
55
|
tickIfToken0IsClanker: number;
|
|
55
56
|
tickSpacing: number;
|
|
56
57
|
};
|
|
58
|
+
/**
|
|
59
|
+
* Calculate the tick for a desired market cap in USDC
|
|
60
|
+
*
|
|
61
|
+
* @param marketCapUSDC - Desired market cap in USDC (e.g., 10 for $10)
|
|
62
|
+
* @param tickSpacing - Tick spacing (must be multiple of this, default 200)
|
|
63
|
+
* @returns The tick value rounded to the nearest tickSpacing
|
|
64
|
+
*
|
|
65
|
+
* Formula:
|
|
66
|
+
* - Total supply: 100B tokens (10^11 * 10^18 with decimals = 10^29)
|
|
67
|
+
* - USDC: 6 decimals (10^6)
|
|
68
|
+
* - Price per token = (marketCap * 10^6) / 10^29 = marketCap / 10^23
|
|
69
|
+
* - tick = log(price) / log(1.0001)
|
|
70
|
+
*/
|
|
71
|
+
declare function getTickFromMarketCapUSDC(marketCapUSDC: number, tickSpacing?: number): number;
|
|
57
72
|
|
|
58
73
|
interface AirdropEntry {
|
|
59
74
|
account: `0x${string}`;
|
|
@@ -67,4 +82,4 @@ declare function createMerkleTree(entries: AirdropEntry[]): {
|
|
|
67
82
|
declare function getMerkleProof(tree: StandardMerkleTree<[string, string]>, entries: [string, string][], account: `0x${string}`, amount: number): `0x${string}`[];
|
|
68
83
|
declare function encodeAirdropData(merkleRoot: `0x${string}`, lockupDuration: number, vestingDuration: number): `0x${string}`;
|
|
69
84
|
|
|
70
|
-
export { A0X_ADDRESS, ANON_ADDRESS, type AirdropEntry, CB_BTC_ADDRESS, CLANKER_ADDRESS, Chain, ClankerDeployment, ClankerTokenV4, DEFAULT_SUPPLY, DEGEN_ADDRESS, FEE_CONFIGS, FeeConfigs, HIGHER_ADDRESS, NATIVE_ADDRESS, POOL_POSITIONS, PoolPositions, WETH_ADDRESSES, createMerkleTree, encodeAirdropData, findVanityAddress, findVanityAddressV4, getMerkleProof, getTickFromMarketCap };
|
|
85
|
+
export { A0X_ADDRESS, ANON_ADDRESS, type AirdropEntry, CB_BTC_ADDRESS, CLANKER_ADDRESS, Chain, ClankerDeployment, ClankerTokenV4, DEFAULT_SUPPLY, DEGEN_ADDRESS, FEE_CONFIGS, FeeConfigs, HIGHER_ADDRESS, NATIVE_ADDRESS, POOL_POSITIONS, PoolPositions, WETH_ADDRESSES, createMerkleTree, encodeAirdropData, findVanityAddress, findVanityAddressV4, getMerkleProof, getTickFromMarketCap, getTickFromMarketCapUSDC };
|
package/dist/index.js
CHANGED
|
@@ -58,6 +58,7 @@ var DEFAULT_SUPPLY = 100000000000000000000000000000n;
|
|
|
58
58
|
var PoolPositions = /* @__PURE__ */ ((PoolPositions2) => {
|
|
59
59
|
PoolPositions2["Standard"] = "Standard";
|
|
60
60
|
PoolPositions2["Project"] = "Project";
|
|
61
|
+
PoolPositions2["TwentyETH"] = "TwentyETH";
|
|
61
62
|
return PoolPositions2;
|
|
62
63
|
})(PoolPositions || {});
|
|
63
64
|
var POOL_POSITIONS = {
|
|
@@ -112,6 +113,48 @@ var POOL_POSITIONS = {
|
|
|
112
113
|
positionBps: 500
|
|
113
114
|
// 5% of LP
|
|
114
115
|
}
|
|
116
|
+
],
|
|
117
|
+
TwentyETH: [
|
|
118
|
+
{
|
|
119
|
+
tickLower: -223400,
|
|
120
|
+
// 20 ETH (starting tick)
|
|
121
|
+
tickUpper: -212e3,
|
|
122
|
+
// ~$180K
|
|
123
|
+
positionBps: 1e3
|
|
124
|
+
// 10% of LP
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
tickLower: -212e3,
|
|
128
|
+
// ~$180K
|
|
129
|
+
tickUpper: -155e3,
|
|
130
|
+
// ~$50M
|
|
131
|
+
positionBps: 5e3
|
|
132
|
+
// 50% of LP
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
tickLower: -201e3,
|
|
136
|
+
// ~$500K
|
|
137
|
+
tickUpper: -155e3,
|
|
138
|
+
// ~$50M
|
|
139
|
+
positionBps: 1500
|
|
140
|
+
// 15% of LP
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
tickLower: -155e3,
|
|
144
|
+
// ~$50M
|
|
145
|
+
tickUpper: -12e4,
|
|
146
|
+
// ~$1.5B
|
|
147
|
+
positionBps: 2e3
|
|
148
|
+
// 20% of LP
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
tickLower: -141e3,
|
|
152
|
+
// ~$200M
|
|
153
|
+
tickUpper: -12e4,
|
|
154
|
+
// ~$1.5B
|
|
155
|
+
positionBps: 500
|
|
156
|
+
// 5% of LP
|
|
157
|
+
}
|
|
115
158
|
]
|
|
116
159
|
};
|
|
117
160
|
var FeeConfigs = /* @__PURE__ */ ((FeeConfigs2) => {
|
|
@@ -5730,6 +5773,11 @@ var getTickFromMarketCap = (marketCap) => {
|
|
|
5730
5773
|
tickSpacing
|
|
5731
5774
|
};
|
|
5732
5775
|
};
|
|
5776
|
+
function getTickFromMarketCapUSDC(marketCapUSDC, tickSpacing = 200) {
|
|
5777
|
+
const price = marketCapUSDC / 1e23;
|
|
5778
|
+
const rawTick = Math.log(price) / Math.log(1.0001);
|
|
5779
|
+
return Math.floor(rawTick / tickSpacing) * tickSpacing;
|
|
5780
|
+
}
|
|
5733
5781
|
|
|
5734
5782
|
// src/utils/merkleTree.ts
|
|
5735
5783
|
import { StandardMerkleTree } from "@openzeppelin/merkle-tree";
|
|
@@ -5786,5 +5834,6 @@ export {
|
|
|
5786
5834
|
findVanityAddress,
|
|
5787
5835
|
findVanityAddressV4,
|
|
5788
5836
|
getMerkleProof,
|
|
5789
|
-
getTickFromMarketCap
|
|
5837
|
+
getTickFromMarketCap,
|
|
5838
|
+
getTickFromMarketCapUSDC
|
|
5790
5839
|
};
|
|
@@ -7023,6 +7023,48 @@ var POOL_POSITIONS = {
|
|
|
7023
7023
|
positionBps: 500
|
|
7024
7024
|
// 5% of LP
|
|
7025
7025
|
}
|
|
7026
|
+
],
|
|
7027
|
+
TwentyETH: [
|
|
7028
|
+
{
|
|
7029
|
+
tickLower: -223400,
|
|
7030
|
+
// 20 ETH (starting tick)
|
|
7031
|
+
tickUpper: -212e3,
|
|
7032
|
+
// ~$180K
|
|
7033
|
+
positionBps: 1e3
|
|
7034
|
+
// 10% of LP
|
|
7035
|
+
},
|
|
7036
|
+
{
|
|
7037
|
+
tickLower: -212e3,
|
|
7038
|
+
// ~$180K
|
|
7039
|
+
tickUpper: -155e3,
|
|
7040
|
+
// ~$50M
|
|
7041
|
+
positionBps: 5e3
|
|
7042
|
+
// 50% of LP
|
|
7043
|
+
},
|
|
7044
|
+
{
|
|
7045
|
+
tickLower: -201e3,
|
|
7046
|
+
// ~$500K
|
|
7047
|
+
tickUpper: -155e3,
|
|
7048
|
+
// ~$50M
|
|
7049
|
+
positionBps: 1500
|
|
7050
|
+
// 15% of LP
|
|
7051
|
+
},
|
|
7052
|
+
{
|
|
7053
|
+
tickLower: -155e3,
|
|
7054
|
+
// ~$50M
|
|
7055
|
+
tickUpper: -12e4,
|
|
7056
|
+
// ~$1.5B
|
|
7057
|
+
positionBps: 2e3
|
|
7058
|
+
// 20% of LP
|
|
7059
|
+
},
|
|
7060
|
+
{
|
|
7061
|
+
tickLower: -141e3,
|
|
7062
|
+
// ~$200M
|
|
7063
|
+
tickUpper: -12e4,
|
|
7064
|
+
// ~$1.5B
|
|
7065
|
+
positionBps: 500
|
|
7066
|
+
// 5% of LP
|
|
7067
|
+
}
|
|
7026
7068
|
]
|
|
7027
7069
|
};
|
|
7028
7070
|
|
package/dist/v4/index.js
CHANGED
|
@@ -2014,6 +2014,48 @@ var POOL_POSITIONS = {
|
|
|
2014
2014
|
positionBps: 500
|
|
2015
2015
|
// 5% of LP
|
|
2016
2016
|
}
|
|
2017
|
+
],
|
|
2018
|
+
TwentyETH: [
|
|
2019
|
+
{
|
|
2020
|
+
tickLower: -223400,
|
|
2021
|
+
// 20 ETH (starting tick)
|
|
2022
|
+
tickUpper: -212e3,
|
|
2023
|
+
// ~$180K
|
|
2024
|
+
positionBps: 1e3
|
|
2025
|
+
// 10% of LP
|
|
2026
|
+
},
|
|
2027
|
+
{
|
|
2028
|
+
tickLower: -212e3,
|
|
2029
|
+
// ~$180K
|
|
2030
|
+
tickUpper: -155e3,
|
|
2031
|
+
// ~$50M
|
|
2032
|
+
positionBps: 5e3
|
|
2033
|
+
// 50% of LP
|
|
2034
|
+
},
|
|
2035
|
+
{
|
|
2036
|
+
tickLower: -201e3,
|
|
2037
|
+
// ~$500K
|
|
2038
|
+
tickUpper: -155e3,
|
|
2039
|
+
// ~$50M
|
|
2040
|
+
positionBps: 1500
|
|
2041
|
+
// 15% of LP
|
|
2042
|
+
},
|
|
2043
|
+
{
|
|
2044
|
+
tickLower: -155e3,
|
|
2045
|
+
// ~$50M
|
|
2046
|
+
tickUpper: -12e4,
|
|
2047
|
+
// ~$1.5B
|
|
2048
|
+
positionBps: 2e3
|
|
2049
|
+
// 20% of LP
|
|
2050
|
+
},
|
|
2051
|
+
{
|
|
2052
|
+
tickLower: -141e3,
|
|
2053
|
+
// ~$200M
|
|
2054
|
+
tickUpper: -12e4,
|
|
2055
|
+
// ~$1.5B
|
|
2056
|
+
positionBps: 500
|
|
2057
|
+
// 5% of LP
|
|
2058
|
+
}
|
|
2017
2059
|
]
|
|
2018
2060
|
};
|
|
2019
2061
|
|