@clawnch/clawncher-sdk 0.1.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/README.md +603 -0
- package/dist/abis.d.ts +935 -0
- package/dist/abis.d.ts.map +1 -0
- package/dist/abis.js +486 -0
- package/dist/abis.js.map +1 -0
- package/dist/addresses.d.ts +51 -0
- package/dist/addresses.d.ts.map +1 -0
- package/dist/addresses.js +80 -0
- package/dist/addresses.js.map +1 -0
- package/dist/api-deployer-types.d.ts +165 -0
- package/dist/api-deployer-types.d.ts.map +1 -0
- package/dist/api-deployer-types.js +9 -0
- package/dist/api-deployer-types.js.map +1 -0
- package/dist/api-deployer.d.ts +114 -0
- package/dist/api-deployer.d.ts.map +1 -0
- package/dist/api-deployer.js +309 -0
- package/dist/api-deployer.js.map +1 -0
- package/dist/claimer.d.ts +197 -0
- package/dist/claimer.d.ts.map +1 -0
- package/dist/claimer.js +311 -0
- package/dist/claimer.js.map +1 -0
- package/dist/deployer.d.ts +229 -0
- package/dist/deployer.d.ts.map +1 -0
- package/dist/deployer.js +305 -0
- package/dist/deployer.js.map +1 -0
- package/dist/erc8004-types.d.ts +94 -0
- package/dist/erc8004-types.d.ts.map +1 -0
- package/dist/erc8004-types.js +8 -0
- package/dist/erc8004-types.js.map +1 -0
- package/dist/errors.d.ts +62 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +75 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +204 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +358 -0
- package/dist/index.js.map +1 -0
- package/dist/liquidity-types.d.ts +198 -0
- package/dist/liquidity-types.d.ts.map +1 -0
- package/dist/liquidity-types.js +8 -0
- package/dist/liquidity-types.js.map +1 -0
- package/dist/liquidity.d.ts +111 -0
- package/dist/liquidity.d.ts.map +1 -0
- package/dist/liquidity.js +608 -0
- package/dist/liquidity.js.map +1 -0
- package/dist/molten-types.d.ts +282 -0
- package/dist/molten-types.d.ts.map +1 -0
- package/dist/molten-types.js +8 -0
- package/dist/molten-types.js.map +1 -0
- package/dist/molten.d.ts +336 -0
- package/dist/molten.d.ts.map +1 -0
- package/dist/molten.js +560 -0
- package/dist/molten.js.map +1 -0
- package/dist/portfolio.d.ts +129 -0
- package/dist/portfolio.d.ts.map +1 -0
- package/dist/portfolio.js +218 -0
- package/dist/portfolio.js.map +1 -0
- package/dist/reader.d.ts +249 -0
- package/dist/reader.d.ts.map +1 -0
- package/dist/reader.js +488 -0
- package/dist/reader.js.map +1 -0
- package/dist/swap-types.d.ts +159 -0
- package/dist/swap-types.d.ts.map +1 -0
- package/dist/swap-types.js +22 -0
- package/dist/swap-types.js.map +1 -0
- package/dist/swap.d.ts +762 -0
- package/dist/swap.d.ts.map +1 -0
- package/dist/swap.js +345 -0
- package/dist/swap.js.map +1 -0
- package/dist/token-verification-data.d.ts +4 -0
- package/dist/token-verification-data.d.ts.map +1 -0
- package/dist/token-verification-data.js +6 -0
- package/dist/token-verification-data.js.map +1 -0
- package/dist/types.d.ts +244 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/dist/uniswap-abis.d.ts +470 -0
- package/dist/uniswap-abis.d.ts.map +1 -0
- package/dist/uniswap-abis.js +322 -0
- package/dist/uniswap-abis.js.map +1 -0
- package/dist/uniswap-addresses.d.ts +38 -0
- package/dist/uniswap-addresses.d.ts.map +1 -0
- package/dist/uniswap-addresses.js +67 -0
- package/dist/uniswap-addresses.js.map +1 -0
- package/dist/vanity.d.ts +115 -0
- package/dist/vanity.d.ts.map +1 -0
- package/dist/vanity.js +166 -0
- package/dist/vanity.js.map +1 -0
- package/dist/verify.d.ts +88 -0
- package/dist/verify.d.ts.map +1 -0
- package/dist/verify.js +181 -0
- package/dist/verify.js.map +1 -0
- package/dist/watcher.d.ts +112 -0
- package/dist/watcher.d.ts.map +1 -0
- package/dist/watcher.js +132 -0
- package/dist/watcher.js.map +1 -0
- package/package.json +59 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ClawncherClaimer - On-chain fee and allocation claiming for Clawncher tokens
|
|
3
|
+
*
|
|
4
|
+
* v3: Claims from Clanker's approved infrastructure.
|
|
5
|
+
* All claim functions are permissionless (anyone can trigger them),
|
|
6
|
+
* but tokens always go to the designated recipient on-chain.
|
|
7
|
+
*
|
|
8
|
+
* Flow:
|
|
9
|
+
* 1. collectRewards(token) - triggers LP locker to distribute fees to FeeLocker
|
|
10
|
+
* 2. claimFees(feeOwner, token) - claims accumulated fees from FeeLocker
|
|
11
|
+
* 3. claimVault(token) - claims vested vault allocation
|
|
12
|
+
* 4. claimAll(token, feeOwner) - collects rewards + claims fees (WETH and token)
|
|
13
|
+
*
|
|
14
|
+
* Note: claimVestedDevBuy() is not available in v3 (Clanker does not support it).
|
|
15
|
+
*/
|
|
16
|
+
import { type WalletClient, type PublicClient, type Chain, type Account, type Transport, type Hash, type Address } from 'viem';
|
|
17
|
+
import { type NetworkName } from './addresses.js';
|
|
18
|
+
/**
|
|
19
|
+
* Result of a claim transaction
|
|
20
|
+
*/
|
|
21
|
+
export interface ClaimTxResult {
|
|
22
|
+
/** Transaction hash */
|
|
23
|
+
txHash: Hash;
|
|
24
|
+
/** Wait for confirmation and return receipt */
|
|
25
|
+
wait: () => Promise<{
|
|
26
|
+
success: boolean;
|
|
27
|
+
}>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Result of claimAll - multiple transactions
|
|
31
|
+
*/
|
|
32
|
+
export interface ClaimAllResult {
|
|
33
|
+
/** collectRewards transaction (distributes LP fees to FeeLocker) */
|
|
34
|
+
collectRewards: ClaimTxResult;
|
|
35
|
+
/** claimFees for WETH (protocol fee currency) */
|
|
36
|
+
claimFeesWeth: ClaimTxResult | null;
|
|
37
|
+
/** claimFees for the token itself */
|
|
38
|
+
claimFeesToken: ClaimTxResult | null;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Result of a single token's batch claim
|
|
42
|
+
*/
|
|
43
|
+
export interface BatchClaimTokenResult {
|
|
44
|
+
/** Token address */
|
|
45
|
+
token: Address;
|
|
46
|
+
/** Whether the overall claim for this token succeeded */
|
|
47
|
+
success: boolean;
|
|
48
|
+
/** Collect rewards transaction */
|
|
49
|
+
collectRewards: ClaimTxResult | null;
|
|
50
|
+
/** WETH fee claim */
|
|
51
|
+
claimFeesWeth: ClaimTxResult | null;
|
|
52
|
+
/** Token fee claim */
|
|
53
|
+
claimFeesToken: ClaimTxResult | null;
|
|
54
|
+
/** Error if this token's claim failed */
|
|
55
|
+
error?: Error;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Result of batch claiming across multiple tokens
|
|
59
|
+
*/
|
|
60
|
+
export interface BatchClaimResult {
|
|
61
|
+
/** Results for each token */
|
|
62
|
+
results: BatchClaimTokenResult[];
|
|
63
|
+
/** Number of tokens that succeeded */
|
|
64
|
+
successCount: number;
|
|
65
|
+
/** Number of tokens that failed */
|
|
66
|
+
failureCount: number;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Claimer configuration
|
|
70
|
+
*/
|
|
71
|
+
export interface ClaimerConfig {
|
|
72
|
+
/** Wallet client for signing transactions */
|
|
73
|
+
wallet: WalletClient<Transport, Chain, Account>;
|
|
74
|
+
/** Public client for reading chain data */
|
|
75
|
+
publicClient: PublicClient;
|
|
76
|
+
/** Network */
|
|
77
|
+
network: NetworkName;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* ClawncherClaimer - Claim fees and allocations from Clawncher contracts
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```typescript
|
|
84
|
+
* import { ClawncherClaimer } from '@clawnch/clawncher-sdk';
|
|
85
|
+
* import { createWalletClient, createPublicClient, http } from 'viem';
|
|
86
|
+
* import { privateKeyToAccount } from 'viem/accounts';
|
|
87
|
+
* import { base } from 'viem/chains';
|
|
88
|
+
*
|
|
89
|
+
* const account = privateKeyToAccount('0x...');
|
|
90
|
+
* const wallet = createWalletClient({ account, chain: base, transport: http() });
|
|
91
|
+
* const publicClient = createPublicClient({ chain: base, transport: http() });
|
|
92
|
+
*
|
|
93
|
+
* const claimer = new ClawncherClaimer({
|
|
94
|
+
* wallet,
|
|
95
|
+
* publicClient,
|
|
96
|
+
* network: 'mainnet',
|
|
97
|
+
* });
|
|
98
|
+
*
|
|
99
|
+
* // Collect LP rewards and claim all fees for a token
|
|
100
|
+
* const result = await claimer.claimAll(tokenAddress, feeOwnerAddress);
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
export declare class ClawncherClaimer {
|
|
104
|
+
readonly wallet: WalletClient<Transport, Chain, Account>;
|
|
105
|
+
readonly publicClient: PublicClient;
|
|
106
|
+
readonly network: NetworkName;
|
|
107
|
+
constructor(config: ClaimerConfig);
|
|
108
|
+
/**
|
|
109
|
+
* Get contract addresses for configured network
|
|
110
|
+
*/
|
|
111
|
+
private getAddresses;
|
|
112
|
+
/**
|
|
113
|
+
* Get the chain for the configured network
|
|
114
|
+
*/
|
|
115
|
+
private getChain;
|
|
116
|
+
/**
|
|
117
|
+
* Helper to write a contract and return a ClaimTxResult
|
|
118
|
+
*/
|
|
119
|
+
private writeContract;
|
|
120
|
+
/**
|
|
121
|
+
* Collect LP rewards for a token
|
|
122
|
+
*
|
|
123
|
+
* This triggers the LP locker to collect trading fees from the Uniswap V4 pool
|
|
124
|
+
* and distribute them to the FeeLocker contract. Must be called before claimFees.
|
|
125
|
+
*
|
|
126
|
+
* Permissionless - anyone can call this.
|
|
127
|
+
*/
|
|
128
|
+
collectRewards(token: Address): Promise<ClaimTxResult>;
|
|
129
|
+
/**
|
|
130
|
+
* Claim accumulated fees from the FeeLocker
|
|
131
|
+
*
|
|
132
|
+
* Claims fees for a specific feeOwner + token pair.
|
|
133
|
+
* Tokens are sent to the feeOwner's designated recipient.
|
|
134
|
+
*
|
|
135
|
+
* Permissionless - anyone can call this.
|
|
136
|
+
*
|
|
137
|
+
* @param feeOwner - The fee recipient address (as configured in token rewards)
|
|
138
|
+
* @param token - The token address to claim fees for (WETH or the launched token)
|
|
139
|
+
*/
|
|
140
|
+
claimFees(feeOwner: Address, token: Address): Promise<ClaimTxResult>;
|
|
141
|
+
/**
|
|
142
|
+
* Claim vested vault allocation for a token
|
|
143
|
+
*
|
|
144
|
+
* Claims the available portion of the vault allocation (based on lockup/vesting schedule).
|
|
145
|
+
* Tokens are sent to the vault admin.
|
|
146
|
+
*
|
|
147
|
+
* Permissionless - anyone can call this.
|
|
148
|
+
*/
|
|
149
|
+
claimVault(token: Address): Promise<ClaimTxResult>;
|
|
150
|
+
/**
|
|
151
|
+
* Claim vested dev buy allocation for a token
|
|
152
|
+
*
|
|
153
|
+
* @throws Error - Not available in v3 (Clanker does not support vested dev buy)
|
|
154
|
+
* @deprecated Use packages/sdk-direct for vested dev buy support
|
|
155
|
+
*/
|
|
156
|
+
claimVestedDevBuy(_token: Address): Promise<ClaimTxResult>;
|
|
157
|
+
/**
|
|
158
|
+
* Collect rewards and claim all fees for a token
|
|
159
|
+
*
|
|
160
|
+
* Steps:
|
|
161
|
+
* 1. collectRewards(token) - distributes LP fees to FeeLocker
|
|
162
|
+
* 2. claimFees(feeOwner, WETH) - claims WETH fees (if available)
|
|
163
|
+
* 3. claimFees(feeOwner, token) - claims token fees (if available)
|
|
164
|
+
*
|
|
165
|
+
* @param token - The Clawncher token address
|
|
166
|
+
* @param feeOwner - The fee owner to claim for
|
|
167
|
+
*/
|
|
168
|
+
claimAll(token: Address, feeOwner: Address): Promise<ClaimAllResult>;
|
|
169
|
+
/**
|
|
170
|
+
* Claim fees for multiple tokens in sequence.
|
|
171
|
+
*
|
|
172
|
+
* For each token: collects LP rewards, then claims WETH and token fees.
|
|
173
|
+
* Continues to the next token even if one fails.
|
|
174
|
+
*
|
|
175
|
+
* @param tokens - Array of token addresses to claim for
|
|
176
|
+
* @param feeOwner - The fee owner to claim for
|
|
177
|
+
* @param options - Optional progress callback
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* ```typescript
|
|
181
|
+
* const result = await claimer.claimBatch(
|
|
182
|
+
* ['0xToken1...', '0xToken2...'],
|
|
183
|
+
* feeOwnerAddress,
|
|
184
|
+
* {
|
|
185
|
+
* onProgress: (token, step) => {
|
|
186
|
+
* console.log(`${token}: ${step}`);
|
|
187
|
+
* },
|
|
188
|
+
* },
|
|
189
|
+
* );
|
|
190
|
+
* console.log(`Claimed ${result.successCount}/${result.results.length} tokens`);
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
claimBatch(tokens: Address[], feeOwner: Address, options?: {
|
|
194
|
+
onProgress?: (token: Address, step: string) => void;
|
|
195
|
+
}): Promise<BatchClaimResult>;
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=claimer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claimer.d.ts","sourceRoot":"","sources":["../src/claimer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,IAAI,EACT,KAAK,OAAO,EACb,MAAM,MAAM,CAAC;AAOd,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGhE;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,uBAAuB;IACvB,MAAM,EAAE,IAAI,CAAC;IACb,+CAA+C;IAC/C,IAAI,EAAE,MAAM,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAC3C;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,oEAAoE;IACpE,cAAc,EAAE,aAAa,CAAC;IAC9B,iDAAiD;IACjD,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,qCAAqC;IACrC,cAA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,CAAC;IAU5D;;;;;;;;;;OAUG;IACG,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC;IAU1E;;;;;;;OAOG;IACG,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC;IAUxD;;;;;OAKG;IACG,iBAAiB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC;IAWhE;;;;;;;;;;OAUG;IACG,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC;IAuD1E;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACG,UAAU,CACd,MAAM,EAAE,OAAO,EAAE,EACjB,QAAQ,EAAE,OAAO,EACjB,OAAO,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,GAChE,OAAO,CAAC,gBAAgB,CAAC;CAgF7B"}
|
package/dist/claimer.js
ADDED
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ClawncherClaimer - On-chain fee and allocation claiming for Clawncher tokens
|
|
3
|
+
*
|
|
4
|
+
* v3: Claims from Clanker's approved infrastructure.
|
|
5
|
+
* All claim functions are permissionless (anyone can trigger them),
|
|
6
|
+
* but tokens always go to the designated recipient on-chain.
|
|
7
|
+
*
|
|
8
|
+
* Flow:
|
|
9
|
+
* 1. collectRewards(token) - triggers LP locker to distribute fees to FeeLocker
|
|
10
|
+
* 2. claimFees(feeOwner, token) - claims accumulated fees from FeeLocker
|
|
11
|
+
* 3. claimVault(token) - claims vested vault allocation
|
|
12
|
+
* 4. claimAll(token, feeOwner) - collects rewards + claims fees (WETH and token)
|
|
13
|
+
*
|
|
14
|
+
* Note: claimVestedDevBuy() is not available in v3 (Clanker does not support it).
|
|
15
|
+
*/
|
|
16
|
+
import { base, baseSepolia } from 'viem/chains';
|
|
17
|
+
import { ClawnchFeeLockerABI, ClawnchLpLockerABI, ClawnchVaultABI, } from './abis.js';
|
|
18
|
+
import { getAddresses } from './addresses.js';
|
|
19
|
+
import { ClawnchErrorCode, ClawnchDeployError } from './errors.js';
|
|
20
|
+
/**
|
|
21
|
+
* ClawncherClaimer - Claim fees and allocations from Clawncher contracts
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* import { ClawncherClaimer } from '@clawnch/clawncher-sdk';
|
|
26
|
+
* import { createWalletClient, createPublicClient, http } from 'viem';
|
|
27
|
+
* import { privateKeyToAccount } from 'viem/accounts';
|
|
28
|
+
* import { base } from 'viem/chains';
|
|
29
|
+
*
|
|
30
|
+
* const account = privateKeyToAccount('0x...');
|
|
31
|
+
* const wallet = createWalletClient({ account, chain: base, transport: http() });
|
|
32
|
+
* const publicClient = createPublicClient({ chain: base, transport: http() });
|
|
33
|
+
*
|
|
34
|
+
* const claimer = new ClawncherClaimer({
|
|
35
|
+
* wallet,
|
|
36
|
+
* publicClient,
|
|
37
|
+
* network: 'mainnet',
|
|
38
|
+
* });
|
|
39
|
+
*
|
|
40
|
+
* // Collect LP rewards and claim all fees for a token
|
|
41
|
+
* const result = await claimer.claimAll(tokenAddress, feeOwnerAddress);
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export class ClawncherClaimer {
|
|
45
|
+
wallet;
|
|
46
|
+
publicClient;
|
|
47
|
+
network;
|
|
48
|
+
constructor(config) {
|
|
49
|
+
this.wallet = config.wallet;
|
|
50
|
+
this.publicClient = config.publicClient;
|
|
51
|
+
this.network = config.network;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Get contract addresses for configured network
|
|
55
|
+
*/
|
|
56
|
+
getAddresses() {
|
|
57
|
+
return getAddresses(this.network);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get the chain for the configured network
|
|
61
|
+
*/
|
|
62
|
+
getChain() {
|
|
63
|
+
return this.network === 'mainnet' ? base : baseSepolia;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Helper to write a contract and return a ClaimTxResult
|
|
67
|
+
*/
|
|
68
|
+
async writeContract(params) {
|
|
69
|
+
const txHash = await this.wallet.writeContract({
|
|
70
|
+
address: params.address,
|
|
71
|
+
abi: params.abi,
|
|
72
|
+
functionName: params.functionName,
|
|
73
|
+
args: params.args,
|
|
74
|
+
chain: this.getChain(),
|
|
75
|
+
});
|
|
76
|
+
return {
|
|
77
|
+
txHash,
|
|
78
|
+
wait: async () => {
|
|
79
|
+
const receipt = await this.publicClient.waitForTransactionReceipt({ hash: txHash });
|
|
80
|
+
return { success: receipt.status === 'success' };
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
// =========================================================================
|
|
85
|
+
// Individual Claim Methods
|
|
86
|
+
// =========================================================================
|
|
87
|
+
/**
|
|
88
|
+
* Collect LP rewards for a token
|
|
89
|
+
*
|
|
90
|
+
* This triggers the LP locker to collect trading fees from the Uniswap V4 pool
|
|
91
|
+
* and distribute them to the FeeLocker contract. Must be called before claimFees.
|
|
92
|
+
*
|
|
93
|
+
* Permissionless - anyone can call this.
|
|
94
|
+
*/
|
|
95
|
+
async collectRewards(token) {
|
|
96
|
+
const addresses = this.getAddresses();
|
|
97
|
+
return this.writeContract({
|
|
98
|
+
address: addresses.clawnch.locker,
|
|
99
|
+
abi: ClawnchLpLockerABI,
|
|
100
|
+
functionName: 'collectRewards',
|
|
101
|
+
args: [token],
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Claim accumulated fees from the FeeLocker
|
|
106
|
+
*
|
|
107
|
+
* Claims fees for a specific feeOwner + token pair.
|
|
108
|
+
* Tokens are sent to the feeOwner's designated recipient.
|
|
109
|
+
*
|
|
110
|
+
* Permissionless - anyone can call this.
|
|
111
|
+
*
|
|
112
|
+
* @param feeOwner - The fee recipient address (as configured in token rewards)
|
|
113
|
+
* @param token - The token address to claim fees for (WETH or the launched token)
|
|
114
|
+
*/
|
|
115
|
+
async claimFees(feeOwner, token) {
|
|
116
|
+
const addresses = this.getAddresses();
|
|
117
|
+
return this.writeContract({
|
|
118
|
+
address: addresses.clawnch.feeLocker,
|
|
119
|
+
abi: ClawnchFeeLockerABI,
|
|
120
|
+
functionName: 'claim',
|
|
121
|
+
args: [feeOwner, token],
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Claim vested vault allocation for a token
|
|
126
|
+
*
|
|
127
|
+
* Claims the available portion of the vault allocation (based on lockup/vesting schedule).
|
|
128
|
+
* Tokens are sent to the vault admin.
|
|
129
|
+
*
|
|
130
|
+
* Permissionless - anyone can call this.
|
|
131
|
+
*/
|
|
132
|
+
async claimVault(token) {
|
|
133
|
+
const addresses = this.getAddresses();
|
|
134
|
+
return this.writeContract({
|
|
135
|
+
address: addresses.clawnch.vault,
|
|
136
|
+
abi: ClawnchVaultABI,
|
|
137
|
+
functionName: 'claim',
|
|
138
|
+
args: [token],
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Claim vested dev buy allocation for a token
|
|
143
|
+
*
|
|
144
|
+
* @throws Error - Not available in v3 (Clanker does not support vested dev buy)
|
|
145
|
+
* @deprecated Use packages/sdk-direct for vested dev buy support
|
|
146
|
+
*/
|
|
147
|
+
async claimVestedDevBuy(_token) {
|
|
148
|
+
throw new ClawnchDeployError(ClawnchErrorCode.FEATURE_NOT_AVAILABLE, 'Vested dev buy is not available in v3. Clanker does not support this extension.');
|
|
149
|
+
}
|
|
150
|
+
// =========================================================================
|
|
151
|
+
// Combined Claims
|
|
152
|
+
// =========================================================================
|
|
153
|
+
/**
|
|
154
|
+
* Collect rewards and claim all fees for a token
|
|
155
|
+
*
|
|
156
|
+
* Steps:
|
|
157
|
+
* 1. collectRewards(token) - distributes LP fees to FeeLocker
|
|
158
|
+
* 2. claimFees(feeOwner, WETH) - claims WETH fees (if available)
|
|
159
|
+
* 3. claimFees(feeOwner, token) - claims token fees (if available)
|
|
160
|
+
*
|
|
161
|
+
* @param token - The Clawncher token address
|
|
162
|
+
* @param feeOwner - The fee owner to claim for
|
|
163
|
+
*/
|
|
164
|
+
async claimAll(token, feeOwner) {
|
|
165
|
+
const addresses = this.getAddresses();
|
|
166
|
+
// Step 1: Collect rewards from LP locker -> FeeLocker
|
|
167
|
+
const collectResult = await this.collectRewards(token);
|
|
168
|
+
await collectResult.wait();
|
|
169
|
+
// Step 2: Claim WETH fees (protocol always pays in WETH)
|
|
170
|
+
let claimWeth = null;
|
|
171
|
+
try {
|
|
172
|
+
const wethAvailable = await this.publicClient.readContract({
|
|
173
|
+
address: addresses.clawnch.feeLocker,
|
|
174
|
+
abi: ClawnchFeeLockerABI,
|
|
175
|
+
functionName: 'availableFees',
|
|
176
|
+
args: [feeOwner, addresses.infrastructure.weth],
|
|
177
|
+
});
|
|
178
|
+
if (wethAvailable > 0n) {
|
|
179
|
+
claimWeth = await this.claimFees(feeOwner, addresses.infrastructure.weth);
|
|
180
|
+
await claimWeth.wait();
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
catch (err) {
|
|
184
|
+
// Log but continue — WETH fees may not be available for this feeOwner
|
|
185
|
+
// The caller can inspect claimFeesWeth === null to detect this
|
|
186
|
+
}
|
|
187
|
+
// Step 3: Claim token fees (if fee preference is Clawnch)
|
|
188
|
+
let claimToken = null;
|
|
189
|
+
try {
|
|
190
|
+
const tokenAvailable = await this.publicClient.readContract({
|
|
191
|
+
address: addresses.clawnch.feeLocker,
|
|
192
|
+
abi: ClawnchFeeLockerABI,
|
|
193
|
+
functionName: 'availableFees',
|
|
194
|
+
args: [feeOwner, token],
|
|
195
|
+
});
|
|
196
|
+
if (tokenAvailable > 0n) {
|
|
197
|
+
claimToken = await this.claimFees(feeOwner, token);
|
|
198
|
+
await claimToken.wait();
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
catch (err) {
|
|
202
|
+
// Log but continue — token fees may not be available
|
|
203
|
+
}
|
|
204
|
+
return {
|
|
205
|
+
collectRewards: collectResult,
|
|
206
|
+
claimFeesWeth: claimWeth,
|
|
207
|
+
claimFeesToken: claimToken,
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
// =========================================================================
|
|
211
|
+
// Batch Claiming
|
|
212
|
+
// =========================================================================
|
|
213
|
+
/**
|
|
214
|
+
* Claim fees for multiple tokens in sequence.
|
|
215
|
+
*
|
|
216
|
+
* For each token: collects LP rewards, then claims WETH and token fees.
|
|
217
|
+
* Continues to the next token even if one fails.
|
|
218
|
+
*
|
|
219
|
+
* @param tokens - Array of token addresses to claim for
|
|
220
|
+
* @param feeOwner - The fee owner to claim for
|
|
221
|
+
* @param options - Optional progress callback
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* ```typescript
|
|
225
|
+
* const result = await claimer.claimBatch(
|
|
226
|
+
* ['0xToken1...', '0xToken2...'],
|
|
227
|
+
* feeOwnerAddress,
|
|
228
|
+
* {
|
|
229
|
+
* onProgress: (token, step) => {
|
|
230
|
+
* console.log(`${token}: ${step}`);
|
|
231
|
+
* },
|
|
232
|
+
* },
|
|
233
|
+
* );
|
|
234
|
+
* console.log(`Claimed ${result.successCount}/${result.results.length} tokens`);
|
|
235
|
+
* ```
|
|
236
|
+
*/
|
|
237
|
+
async claimBatch(tokens, feeOwner, options) {
|
|
238
|
+
if (tokens.length === 0) {
|
|
239
|
+
return { results: [], successCount: 0, failureCount: 0 };
|
|
240
|
+
}
|
|
241
|
+
const results = [];
|
|
242
|
+
const addresses = this.getAddresses();
|
|
243
|
+
for (const token of tokens) {
|
|
244
|
+
const tokenResult = {
|
|
245
|
+
token,
|
|
246
|
+
success: false,
|
|
247
|
+
collectRewards: null,
|
|
248
|
+
claimFeesWeth: null,
|
|
249
|
+
claimFeesToken: null,
|
|
250
|
+
};
|
|
251
|
+
try {
|
|
252
|
+
// Step 1: Collect rewards
|
|
253
|
+
options?.onProgress?.(token, 'collecting rewards');
|
|
254
|
+
const collectResult = await this.collectRewards(token);
|
|
255
|
+
await collectResult.wait();
|
|
256
|
+
tokenResult.collectRewards = collectResult;
|
|
257
|
+
// Step 2: Claim WETH fees
|
|
258
|
+
options?.onProgress?.(token, 'claiming WETH fees');
|
|
259
|
+
try {
|
|
260
|
+
const wethAvailable = await this.publicClient.readContract({
|
|
261
|
+
address: addresses.clawnch.feeLocker,
|
|
262
|
+
abi: ClawnchFeeLockerABI,
|
|
263
|
+
functionName: 'availableFees',
|
|
264
|
+
args: [feeOwner, addresses.infrastructure.weth],
|
|
265
|
+
});
|
|
266
|
+
if (wethAvailable > 0n) {
|
|
267
|
+
const claimWeth = await this.claimFees(feeOwner, addresses.infrastructure.weth);
|
|
268
|
+
await claimWeth.wait();
|
|
269
|
+
tokenResult.claimFeesWeth = claimWeth;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
catch {
|
|
273
|
+
// WETH fees not available for this token/feeOwner pair
|
|
274
|
+
}
|
|
275
|
+
// Step 3: Claim token fees
|
|
276
|
+
options?.onProgress?.(token, 'claiming token fees');
|
|
277
|
+
try {
|
|
278
|
+
const tokenAvailable = await this.publicClient.readContract({
|
|
279
|
+
address: addresses.clawnch.feeLocker,
|
|
280
|
+
abi: ClawnchFeeLockerABI,
|
|
281
|
+
functionName: 'availableFees',
|
|
282
|
+
args: [feeOwner, token],
|
|
283
|
+
});
|
|
284
|
+
if (tokenAvailable > 0n) {
|
|
285
|
+
const claimToken = await this.claimFees(feeOwner, token);
|
|
286
|
+
await claimToken.wait();
|
|
287
|
+
tokenResult.claimFeesToken = claimToken;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
catch {
|
|
291
|
+
// Token fees not available
|
|
292
|
+
}
|
|
293
|
+
tokenResult.success = true;
|
|
294
|
+
options?.onProgress?.(token, 'done');
|
|
295
|
+
}
|
|
296
|
+
catch (err) {
|
|
297
|
+
tokenResult.error = err instanceof Error
|
|
298
|
+
? new ClawnchDeployError(ClawnchErrorCode.CLAIM_FAILED, `Claim failed for ${token}: ${err.message}`, err)
|
|
299
|
+
: new ClawnchDeployError(ClawnchErrorCode.CLAIM_FAILED, `Claim failed for ${token}: ${String(err)}`);
|
|
300
|
+
options?.onProgress?.(token, 'failed');
|
|
301
|
+
}
|
|
302
|
+
results.push(tokenResult);
|
|
303
|
+
}
|
|
304
|
+
return {
|
|
305
|
+
results,
|
|
306
|
+
successCount: results.filter(r => r.success).length,
|
|
307
|
+
failureCount: results.filter(r => !r.success).length,
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
//# sourceMappingURL=claimer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claimer.js","sourceRoot":"","sources":["../src/claimer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAWH,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,GAChB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,YAAY,EAAoB,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAkEnE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,OAAO,gBAAgB;IAClB,MAAM,CAA0C;IAChD,YAAY,CAAe;IAC3B,OAAO,CAAc;IAE9B,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;QACxC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAChC,CAAC;IAED;;OAEG;IACK,YAAY;QAClB,OAAO,YAAY,CAAC,IAAI,CAA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