@pufferfinance/puffer-sdk 1.30.1 → 1.31.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.
@@ -15,6 +15,18 @@ export type DepositWithPermitParams = PermitData & {
15
15
  depositAsset: Address;
16
16
  minimumMint: bigint;
17
17
  };
18
+ export type BulkDepositParams = {
19
+ account: Address;
20
+ depositAsset: Address;
21
+ depositAmount: bigint;
22
+ minimumMint: bigint;
23
+ };
24
+ export type BulkWithdrawParams = {
25
+ account: Address;
26
+ withdrawAsset: Address;
27
+ shareAmount: bigint;
28
+ minimumAssets: bigint;
29
+ };
18
30
  /**
19
31
  * Handler for the `Teller` contract from nucleus.
20
32
  */
@@ -59,49 +71,87 @@ export declare class NucleusTellerHandler {
59
71
  }];
60
72
  readonly stateMutability: "view";
61
73
  readonly type: "function";
74
+ }, {
75
+ readonly inputs: readonly [{
76
+ readonly internalType: "contract ERC20";
77
+ readonly name: "asset";
78
+ readonly type: "address";
79
+ }];
80
+ readonly name: "addAsset";
81
+ readonly outputs: readonly [];
82
+ readonly stateMutability: "nonpayable";
83
+ readonly type: "function";
62
84
  }, {
63
85
  readonly inputs: readonly [];
64
- readonly name: "vault";
86
+ readonly name: "authority";
65
87
  readonly outputs: readonly [{
66
- readonly internalType: "contract BoringVault";
88
+ readonly internalType: "contract Authority";
67
89
  readonly name: "";
68
90
  readonly type: "address";
69
91
  }];
70
92
  readonly stateMutability: "view";
71
93
  readonly type: "function";
72
94
  }, {
73
- readonly inputs: readonly [];
74
- readonly name: "shareLockPeriod";
75
- readonly outputs: readonly [{
76
- readonly internalType: "uint64";
77
- readonly name: "";
78
- readonly type: "uint64";
95
+ readonly inputs: readonly [{
96
+ readonly internalType: "address";
97
+ readonly name: "from";
98
+ readonly type: "address";
79
99
  }];
100
+ readonly name: "beforeTransfer";
101
+ readonly outputs: readonly [];
80
102
  readonly stateMutability: "view";
81
103
  readonly type: "function";
82
104
  }, {
83
105
  readonly inputs: readonly [{
106
+ readonly internalType: "contract ERC20";
107
+ readonly name: "depositAsset";
108
+ readonly type: "address";
109
+ }, {
110
+ readonly internalType: "uint256";
111
+ readonly name: "depositAmount";
112
+ readonly type: "uint256";
113
+ }, {
114
+ readonly internalType: "uint256";
115
+ readonly name: "minimumMint";
116
+ readonly type: "uint256";
117
+ }, {
84
118
  readonly internalType: "address";
85
- readonly name: "";
119
+ readonly name: "to";
86
120
  readonly type: "address";
87
121
  }];
88
- readonly name: "shareUnlockTime";
122
+ readonly name: "bulkDeposit";
89
123
  readonly outputs: readonly [{
90
124
  readonly internalType: "uint256";
91
- readonly name: "";
125
+ readonly name: "shares";
92
126
  readonly type: "uint256";
93
127
  }];
94
- readonly stateMutability: "view";
128
+ readonly stateMutability: "nonpayable";
95
129
  readonly type: "function";
96
130
  }, {
97
- readonly inputs: readonly [];
98
- readonly name: "isPaused";
131
+ readonly inputs: readonly [{
132
+ readonly internalType: "contract ERC20";
133
+ readonly name: "withdrawAsset";
134
+ readonly type: "address";
135
+ }, {
136
+ readonly internalType: "uint256";
137
+ readonly name: "shareAmount";
138
+ readonly type: "uint256";
139
+ }, {
140
+ readonly internalType: "uint256";
141
+ readonly name: "minimumAssets";
142
+ readonly type: "uint256";
143
+ }, {
144
+ readonly internalType: "address";
145
+ readonly name: "to";
146
+ readonly type: "address";
147
+ }];
148
+ readonly name: "bulkWithdraw";
99
149
  readonly outputs: readonly [{
100
- readonly internalType: "bool";
101
- readonly name: "";
102
- readonly type: "bool";
150
+ readonly internalType: "uint256";
151
+ readonly name: "assetsOut";
152
+ readonly type: "uint256";
103
153
  }];
104
- readonly stateMutability: "view";
154
+ readonly stateMutability: "nonpayable";
105
155
  readonly type: "function";
106
156
  }, {
107
157
  readonly inputs: readonly [{
@@ -125,6 +175,16 @@ export declare class NucleusTellerHandler {
125
175
  }];
126
176
  readonly stateMutability: "nonpayable";
127
177
  readonly type: "function";
178
+ }, {
179
+ readonly inputs: readonly [];
180
+ readonly name: "depositNonce";
181
+ readonly outputs: readonly [{
182
+ readonly internalType: "uint96";
183
+ readonly name: "";
184
+ readonly type: "uint96";
185
+ }];
186
+ readonly stateMutability: "view";
187
+ readonly type: "function";
128
188
  }, {
129
189
  readonly inputs: readonly [{
130
190
  readonly internalType: "contract ERC20";
@@ -163,6 +223,174 @@ export declare class NucleusTellerHandler {
163
223
  }];
164
224
  readonly stateMutability: "nonpayable";
165
225
  readonly type: "function";
226
+ }, {
227
+ readonly inputs: readonly [];
228
+ readonly name: "isPaused";
229
+ readonly outputs: readonly [{
230
+ readonly internalType: "bool";
231
+ readonly name: "";
232
+ readonly type: "bool";
233
+ }];
234
+ readonly stateMutability: "view";
235
+ readonly type: "function";
236
+ }, {
237
+ readonly inputs: readonly [{
238
+ readonly internalType: "contract ERC20";
239
+ readonly name: "";
240
+ readonly type: "address";
241
+ }];
242
+ readonly name: "isSupported";
243
+ readonly outputs: readonly [{
244
+ readonly internalType: "bool";
245
+ readonly name: "";
246
+ readonly type: "bool";
247
+ }];
248
+ readonly stateMutability: "view";
249
+ readonly type: "function";
250
+ }, {
251
+ readonly inputs: readonly [];
252
+ readonly name: "owner";
253
+ readonly outputs: readonly [{
254
+ readonly internalType: "address";
255
+ readonly name: "";
256
+ readonly type: "address";
257
+ }];
258
+ readonly stateMutability: "view";
259
+ readonly type: "function";
260
+ }, {
261
+ readonly inputs: readonly [];
262
+ readonly name: "pause";
263
+ readonly outputs: readonly [];
264
+ readonly stateMutability: "nonpayable";
265
+ readonly type: "function";
266
+ }, {
267
+ readonly inputs: readonly [{
268
+ readonly internalType: "uint256";
269
+ readonly name: "";
270
+ readonly type: "uint256";
271
+ }];
272
+ readonly name: "publicDepositHistory";
273
+ readonly outputs: readonly [{
274
+ readonly internalType: "bytes32";
275
+ readonly name: "";
276
+ readonly type: "bytes32";
277
+ }];
278
+ readonly stateMutability: "view";
279
+ readonly type: "function";
280
+ }, {
281
+ readonly inputs: readonly [{
282
+ readonly internalType: "uint256";
283
+ readonly name: "nonce";
284
+ readonly type: "uint256";
285
+ }, {
286
+ readonly internalType: "address";
287
+ readonly name: "receiver";
288
+ readonly type: "address";
289
+ }, {
290
+ readonly internalType: "address";
291
+ readonly name: "depositAsset";
292
+ readonly type: "address";
293
+ }, {
294
+ readonly internalType: "uint256";
295
+ readonly name: "depositAmount";
296
+ readonly type: "uint256";
297
+ }, {
298
+ readonly internalType: "uint256";
299
+ readonly name: "shareAmount";
300
+ readonly type: "uint256";
301
+ }, {
302
+ readonly internalType: "uint256";
303
+ readonly name: "depositTimestamp";
304
+ readonly type: "uint256";
305
+ }, {
306
+ readonly internalType: "uint256";
307
+ readonly name: "shareLockUpPeriodAtTimeOfDeposit";
308
+ readonly type: "uint256";
309
+ }];
310
+ readonly name: "refundDeposit";
311
+ readonly outputs: readonly [];
312
+ readonly stateMutability: "nonpayable";
313
+ readonly type: "function";
314
+ }, {
315
+ readonly inputs: readonly [{
316
+ readonly internalType: "contract ERC20";
317
+ readonly name: "asset";
318
+ readonly type: "address";
319
+ }];
320
+ readonly name: "removeAsset";
321
+ readonly outputs: readonly [];
322
+ readonly stateMutability: "nonpayable";
323
+ readonly type: "function";
324
+ }, {
325
+ readonly inputs: readonly [{
326
+ readonly internalType: "contract Authority";
327
+ readonly name: "newAuthority";
328
+ readonly type: "address";
329
+ }];
330
+ readonly name: "setAuthority";
331
+ readonly outputs: readonly [];
332
+ readonly stateMutability: "nonpayable";
333
+ readonly type: "function";
334
+ }, {
335
+ readonly inputs: readonly [{
336
+ readonly internalType: "uint64";
337
+ readonly name: "_shareLockPeriod";
338
+ readonly type: "uint64";
339
+ }];
340
+ readonly name: "setShareLockPeriod";
341
+ readonly outputs: readonly [];
342
+ readonly stateMutability: "nonpayable";
343
+ readonly type: "function";
344
+ }, {
345
+ readonly inputs: readonly [];
346
+ readonly name: "shareLockPeriod";
347
+ readonly outputs: readonly [{
348
+ readonly internalType: "uint64";
349
+ readonly name: "";
350
+ readonly type: "uint64";
351
+ }];
352
+ readonly stateMutability: "view";
353
+ readonly type: "function";
354
+ }, {
355
+ readonly inputs: readonly [{
356
+ readonly internalType: "address";
357
+ readonly name: "";
358
+ readonly type: "address";
359
+ }];
360
+ readonly name: "shareUnlockTime";
361
+ readonly outputs: readonly [{
362
+ readonly internalType: "uint256";
363
+ readonly name: "";
364
+ readonly type: "uint256";
365
+ }];
366
+ readonly stateMutability: "view";
367
+ readonly type: "function";
368
+ }, {
369
+ readonly inputs: readonly [{
370
+ readonly internalType: "address";
371
+ readonly name: "newOwner";
372
+ readonly type: "address";
373
+ }];
374
+ readonly name: "transferOwnership";
375
+ readonly outputs: readonly [];
376
+ readonly stateMutability: "nonpayable";
377
+ readonly type: "function";
378
+ }, {
379
+ readonly inputs: readonly [];
380
+ readonly name: "unpause";
381
+ readonly outputs: readonly [];
382
+ readonly stateMutability: "nonpayable";
383
+ readonly type: "function";
384
+ }, {
385
+ readonly inputs: readonly [];
386
+ readonly name: "vault";
387
+ readonly outputs: readonly [{
388
+ readonly internalType: "contract BoringVault";
389
+ readonly name: "";
390
+ readonly type: "address";
391
+ }];
392
+ readonly stateMutability: "view";
393
+ readonly type: "function";
166
394
  }], {
167
395
  public: {
168
396
  account: undefined;
@@ -8312,4 +8540,12 @@ export declare class NucleusTellerHandler {
8312
8540
  transact: () => Promise<`0x${string}`>;
8313
8541
  estimate: () => Promise<bigint>;
8314
8542
  };
8543
+ bulkWithdraw(params: BulkWithdrawParams): Promise<{
8544
+ transact: () => Promise<`0x${string}`>;
8545
+ estimate: () => Promise<bigint>;
8546
+ }>;
8547
+ bulkDeposit(params: BulkDepositParams): Promise<{
8548
+ transact: () => Promise<`0x${string}`>;
8549
+ estimate: () => Promise<bigint>;
8550
+ }>;
8315
8551
  }
@@ -1,10 +1,10 @@
1
1
  import { V as C } from "../../constants-CUYeD71n.js";
2
2
  import { VAULTS_ADDRESSES as p } from "../vaults-addresses.js";
3
- import { UnifiToken as g, TOKENS_ADDRESSES as u } from "../tokens.js";
4
- import { ERC20PermitHandler as P } from "./erc20-permit-handler.js";
5
- import { Teller as k } from "../abis/mainnet/Teller.js";
6
- import { g as T } from "../../getContract-Dxh0At3n.js";
7
- class N {
3
+ import { UnifiToken as g, TOKENS_ADDRESSES as d } from "../tokens.js";
4
+ import { ERC20PermitHandler as k } from "./erc20-permit-handler.js";
5
+ import { Teller as w } from "../abis/mainnet/Teller.js";
6
+ import { g as P } from "../../getContract-Dxh0At3n.js";
7
+ class H {
8
8
  /**
9
9
  * Create the handler for processing tokens.
10
10
  *
@@ -14,10 +14,10 @@ class N {
14
14
  * @param publicClient The public client to use for public
15
15
  * interactions.
16
16
  */
17
- constructor(t, e, i) {
18
- this.chain = t, this.walletClient = e, this.publicClient = i, this.viemChain = C[t], this.erc20PermitHandler = new P(
19
- t,
17
+ constructor(e, t, i) {
18
+ this.chain = e, this.walletClient = t, this.publicClient = i, this.viemChain = C[e], this.erc20PermitHandler = new k(
20
19
  e,
20
+ t,
21
21
  i
22
22
  ), this.token = g.unifiETH;
23
23
  }
@@ -31,8 +31,8 @@ class N {
31
31
  * @param token UniFi token to use for the handler.
32
32
  * @returns The handler.
33
33
  */
34
- withToken(t) {
35
- return this.token = t, this;
34
+ withToken(e) {
35
+ return this.token = e, this;
36
36
  }
37
37
  /**
38
38
  * Get the contract. This is a method because the typings are complex
@@ -41,8 +41,8 @@ class N {
41
41
  * @returns The viem contract.
42
42
  */
43
43
  getContract() {
44
- const t = p[this.token][this.chain].NucleusTeller, e = k, i = { public: this.publicClient, wallet: this.walletClient };
45
- return T({ address: t, abi: e, client: i });
44
+ const e = p[this.token][this.chain].NucleusTeller, t = w, i = { public: this.publicClient, wallet: this.walletClient };
45
+ return P({ address: e, abi: t, client: i });
46
46
  }
47
47
  /**
48
48
  * Get the address of the `Accountant` contract.
@@ -74,8 +74,8 @@ class N {
74
74
  * @param walletAddress Address of the wallet.
75
75
  * @returns The share unlock time.
76
76
  */
77
- shareUnlockTime(t) {
78
- return this.getContract().read.shareUnlockTime([t]);
77
+ shareUnlockTime(e) {
78
+ return this.getContract().read.shareUnlockTime([e]);
79
79
  }
80
80
  /**
81
81
  * Get the paused state of the contract.
@@ -103,48 +103,48 @@ class N {
103
103
  * `estimate: () => Promise<bigint>` - Gas estimate of the
104
104
  * transaction.
105
105
  */
106
- async deposit(t) {
106
+ async deposit(e) {
107
107
  const {
108
- token: e,
108
+ token: t,
109
109
  unifiToken: i,
110
- account: r,
111
- amount: s,
110
+ account: s,
111
+ amount: a,
112
112
  minimumMint: n,
113
- isPreapproved: o = !1
114
- } = t, a = u[e][this.chain];
115
- if (o)
113
+ isPreapproved: r = !1
114
+ } = e, o = d[t][this.chain];
115
+ if (r)
116
116
  return {
117
117
  transact: () => this.getContract().write.deposit(
118
- [a, s, n],
118
+ [o, a, n],
119
119
  {
120
- account: r,
120
+ account: s,
121
121
  chain: this.viemChain
122
122
  }
123
123
  ),
124
124
  estimate: () => this.getContract().estimateGas.deposit(
125
- [a, s, n],
126
- { account: r }
125
+ [o, a, n],
126
+ { account: s }
127
127
  )
128
128
  };
129
- const { r: c, s: h, v: m, deadline: l } = await this.erc20PermitHandler.withToken(e).getPermitData(
130
- r,
129
+ const { r: c, s: h, v: m, deadline: l } = await this.erc20PermitHandler.withToken(t).getPermitData(
130
+ s,
131
131
  // The UniFi token contract is the spender.
132
- u[i][this.chain],
133
- s
134
- ), d = [
132
+ d[i][this.chain],
133
+ a
134
+ ), u = [
135
+ o,
135
136
  a,
136
- s,
137
137
  n,
138
138
  l,
139
139
  m,
140
140
  c,
141
141
  h
142
142
  ];
143
- return { transact: () => this.getContract().write.depositWithPermit(d, {
144
- account: r,
143
+ return { transact: () => this.getContract().write.depositWithPermit(u, {
144
+ account: s,
145
145
  chain: this.viemChain
146
- }), estimate: () => this.getContract().estimateGas.depositWithPermit(d, {
147
- account: r
146
+ }), estimate: () => this.getContract().estimateGas.depositWithPermit(u, {
147
+ account: s
148
148
  }) };
149
149
  }
150
150
  /**
@@ -165,23 +165,38 @@ class N {
165
165
  * `estimate: () => Promise<bigint>` - Gas estimate of the
166
166
  * transaction.
167
167
  */
168
- depositWithPermit(t) {
169
- const { account: e, depositAsset: i, amount: r, minimumMint: s, deadline: n, v: o, r: a, s: c } = t;
168
+ depositWithPermit(e) {
169
+ const { account: t, depositAsset: i, amount: s, minimumMint: a, deadline: n, v: r, r: o, s: c } = e;
170
170
  return { transact: () => this.getContract().write.depositWithPermit(
171
- [i, r, s, n, o, a, c],
172
- {
173
- account: e,
174
- chain: this.viemChain
175
- }
171
+ [i, s, a, n, r, o, c],
172
+ { account: t, chain: this.viemChain }
176
173
  ), estimate: () => this.getContract().estimateGas.depositWithPermit(
177
- [i, r, s, n, o, a, c],
178
- {
179
- account: e
180
- }
174
+ [i, s, a, n, r, o, c],
175
+ { account: t }
176
+ ) };
177
+ }
178
+ async bulkWithdraw(e) {
179
+ const { account: t, withdrawAsset: i, shareAmount: s, minimumAssets: a } = e;
180
+ return { transact: () => this.getContract().write.bulkWithdraw(
181
+ [i, s, a, t],
182
+ { account: t, chain: this.viemChain }
183
+ ), estimate: () => this.getContract().estimateGas.bulkWithdraw(
184
+ [i, s, a, t],
185
+ { account: t }
186
+ ) };
187
+ }
188
+ async bulkDeposit(e) {
189
+ const { account: t, depositAsset: i, depositAmount: s, minimumMint: a } = e;
190
+ return { transact: () => this.getContract().write.bulkDeposit(
191
+ [i, s, a, t],
192
+ { account: t, chain: this.viemChain }
193
+ ), estimate: () => this.getContract().estimateGas.bulkDeposit(
194
+ [i, s, a, t],
195
+ { account: t }
181
196
  ) };
182
197
  }
183
198
  }
184
199
  export {
185
- N as NucleusTellerHandler
200
+ H as NucleusTellerHandler
186
201
  };
187
202
  //# sourceMappingURL=nucleus-teller-handler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nucleus-teller-handler.js","sources":["../../../lib/contracts/handlers/nucleus-teller-handler.ts"],"sourcesContent":["import {\n WalletClient,\n PublicClient,\n getContract,\n Address,\n GetContractReturnType,\n} from 'viem';\nimport { Chain, VIEM_CHAINS, ViemChain } from '../../chains/constants';\nimport { VAULTS_ADDRESSES } from '../vaults-addresses';\nimport { Token, TOKENS_ADDRESSES, UnifiToken } from '../tokens';\nimport { ERC20PermitHandler } from './erc20-permit-handler';\nimport { Teller } from '../abis/mainnet/Teller';\nimport { PermitData } from '../common/lib/types';\n\nexport type DepositParams = {\n account: Address;\n token: Token;\n unifiToken: UnifiToken;\n amount: bigint;\n minimumMint: bigint;\n isPreapproved?: boolean;\n};\n\nexport type DepositWithPermitParams = PermitData & {\n account: Address;\n depositAsset: Address;\n minimumMint: bigint;\n};\n\n/**\n * Handler for the `Teller` contract from nucleus.\n */\nexport class NucleusTellerHandler {\n private viemChain: ViemChain;\n private erc20PermitHandler: ERC20PermitHandler;\n private token: UnifiToken;\n\n /**\n * Create the handler for processing tokens.\n *\n * @param chain Chain to use for the client.\n * @param walletClient The wallet client to use for wallet\n * interactions.\n * @param publicClient The public client to use for public\n * interactions.\n */\n constructor(\n private chain: Chain,\n private walletClient: WalletClient,\n private publicClient: PublicClient,\n ) {\n this.viemChain = VIEM_CHAINS[chain];\n this.erc20PermitHandler = new ERC20PermitHandler(\n chain,\n walletClient,\n publicClient,\n );\n this.token = UnifiToken.unifiETH;\n }\n\n /**\n * Set the UniFi token to use for executing transactions on the\n * contract.\n *\n * @param token UniFi token to use for the handler.\n * @returns The handler.\n */\n public withToken(token: UnifiToken) {\n this.token = token;\n return this;\n }\n\n /**\n * Get the contract. This is a method because the typings are complex\n * and lost when trying to make it a member.\n *\n * @returns The viem contract.\n */\n public getContract() {\n const address = VAULTS_ADDRESSES[this.token][this.chain]\n .NucleusTeller as Address;\n const abi = Teller;\n const client = { public: this.publicClient, wallet: this.walletClient };\n\n return getContract({ address, abi, client }) as GetContractReturnType<\n typeof abi,\n typeof client,\n Address\n >;\n }\n\n /**\n * Get the address of the `Accountant` contract.\n *\n * @returns The address of the `Accountant` contract.\n */\n public accountant() {\n return this.getContract().read.accountant();\n }\n\n /**\n * Get the address of the `BoringVault` contract.\n *\n * @returns The address of the `BoringVault` contract.\n */\n public vault() {\n return this.getContract().read.vault();\n }\n\n /**\n * Get the share lock period.\n *\n * @returns The share lock period.\n */\n public shareLockPeriod() {\n return this.getContract().read.shareLockPeriod();\n }\n\n /**\n * Get the share unlock time for the given wallet address.\n *\n * @param walletAddress Address of the wallet.\n * @returns The share unlock time.\n */\n public shareUnlockTime(walletAddress: Address) {\n return this.getContract().read.shareUnlockTime([walletAddress]);\n }\n\n /**\n * Get the paused state of the contract.\n *\n * @returns The paused state of the contract.\n */\n public isPaused() {\n return this.getContract().read.isPaused();\n }\n\n /**\n * Deposit the given token for staking. This doesn't make the\n * transaction but returns two methods namely `transact` and\n * `estimate`.\n *\n * @param params Deposit parameters.\n * @param params.account Address of the caller of the transaction.\n * @param params.token Token to deposit.\n * @param params.unifiToken UniFi token to get in return of the deposit.\n * @param params.amount Amount of the token to deposit.\n * @param params.minimumMint Minimum amount of shares to mint.\n * @param params.isPreapproved Whether the token is preapproved.\n * @returns `transact: () => Promise<Address>` - Used to make the\n * transaction with the given value.\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public async deposit(params: DepositParams) {\n const {\n token,\n unifiToken,\n account,\n amount,\n minimumMint,\n isPreapproved = false,\n } = params;\n const tokenAddress = TOKENS_ADDRESSES[token][this.chain];\n\n if (isPreapproved) {\n return {\n transact: () =>\n this.getContract().write.deposit(\n [tokenAddress, amount, minimumMint],\n {\n account,\n chain: this.viemChain,\n },\n ),\n estimate: () =>\n this.getContract().estimateGas.deposit(\n [tokenAddress, amount, minimumMint],\n { account },\n ),\n };\n }\n\n const { r, s, v, deadline } = await this.erc20PermitHandler\n .withToken(token)\n .getPermitData(\n account,\n // The UniFi token contract is the spender.\n TOKENS_ADDRESSES[unifiToken][this.chain],\n amount,\n );\n\n const depositArgs = <const>[\n tokenAddress,\n amount,\n minimumMint,\n deadline,\n v,\n r,\n s,\n ];\n\n const transact = () =>\n this.getContract().write.depositWithPermit(depositArgs, {\n account,\n chain: this.viemChain,\n });\n const estimate = () =>\n this.getContract().estimateGas.depositWithPermit(depositArgs, {\n account,\n });\n\n return { transact, estimate };\n }\n\n /**\n * Deposit an asset/token for staking with a permit.\n *\n * @param params Permit parameters.\n * @param params.account Address of the caller of the transaction.\n * @param params.depositAsset Address of the asset/token to deposit.\n * @param params.depositAmount Amount of the asset/token to deposit.\n * @param params.minimumMint Minimum amount of shares to mint.\n * @param params.deadline Deadline for the permit.\n * @param params.v v value of the permit.\n * @param params.r r value of the permit.\n * @param params.s s value of the permit.\n * @returns `transact: () => Promise<Address>` - Used to make the\n * transaction with the given value.\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public depositWithPermit(params: DepositWithPermitParams) {\n const { account, depositAsset, amount, minimumMint, deadline, v, r, s } =\n params;\n\n const transact = () =>\n this.getContract().write.depositWithPermit(\n [depositAsset, amount, minimumMint, deadline, v, r, s],\n {\n account,\n chain: this.viemChain,\n },\n );\n const estimate = () =>\n this.getContract().estimateGas.depositWithPermit(\n [depositAsset, amount, minimumMint, deadline, v, r, s],\n {\n account,\n },\n );\n\n return { transact, estimate };\n }\n}\n"],"names":["NucleusTellerHandler","chain","walletClient","publicClient","VIEM_CHAINS","ERC20PermitHandler","UnifiToken","token","address","VAULTS_ADDRESSES","abi","Teller","client","getContract","walletAddress","params","unifiToken","account","amount","minimumMint","isPreapproved","tokenAddress","TOKENS_ADDRESSES","r","s","v","deadline","depositArgs","depositAsset"],"mappings":";;;;;;AAgCO,MAAMA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAchC,YACUC,GACAC,GACAC,GACR;AAHQ,SAAA,QAAAF,GACA,KAAA,eAAAC,GACA,KAAA,eAAAC,GAER,KAAK,YAAYC,EAAYH,CAAK,GAClC,KAAK,qBAAqB,IAAII;AAAA,MAC5BJ;AAAA,MACAC;AAAA,MACAC;AAAA,IAAA,GAEF,KAAK,QAAQG,EAAW;A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KAAK,YAAA,EAAc,MAAM;AAAA,MACvB,CAACa,GAAcV,GAAQC,GAAaO,GAAUD,GAAGF,GAAGC,CAAC;AAAA,MACrD;AAAA,QACE,SAAAP;AAAA,QACA,OAAO,KAAK;AAAA,MAAA;AAAA,IACd,GAUe,UARF,MACf,KAAK,YAAA,EAAc,YAAY;AAAA,MAC7B,CAACW,GAAcV,GAAQC,GAAaO,GAAUD,GAAGF,GAAGC,CAAC;AAAA,MACrD;AAAA,QACE,SAAAP;AAAA,MAAA;AAAA,IACF,EAGe;AAAA,EACrB;AACF;"}
1
+ {"version":3,"file":"nucleus-teller-handler.js","sources":["../../../lib/contracts/handlers/nucleus-teller-handler.ts"],"sourcesContent":["import {\n WalletClient,\n PublicClient,\n getContract,\n Address,\n GetContractReturnType,\n} from 'viem';\nimport { Chain, VIEM_CHAINS, ViemChain } from '../../chains/constants';\nimport { VAULTS_ADDRESSES } from '../vaults-addresses';\nimport { Token, TOKENS_ADDRESSES, UnifiToken } from '../tokens';\nimport { ERC20PermitHandler } from './erc20-permit-handler';\nimport { Teller } from '../abis/mainnet/Teller';\nimport { PermitData } from '../common/lib/types';\n\nexport type DepositParams = {\n account: Address;\n token: Token;\n unifiToken: UnifiToken;\n amount: bigint;\n minimumMint: bigint;\n isPreapproved?: boolean;\n};\n\nexport type DepositWithPermitParams = PermitData & {\n account: Address;\n depositAsset: Address;\n minimumMint: bigint;\n};\n\nexport type BulkDepositParams = {\n account: Address;\n depositAsset: Address;\n depositAmount: bigint;\n minimumMint: bigint;\n};\n\nexport type BulkWithdrawParams = {\n account: Address;\n withdrawAsset: Address;\n shareAmount: bigint;\n minimumAssets: bigint;\n};\n\n/**\n * Handler for the `Teller` contract from nucleus.\n */\nexport class NucleusTellerHandler {\n private viemChain: ViemChain;\n private erc20PermitHandler: ERC20PermitHandler;\n private token: UnifiToken;\n\n /**\n * Create the handler for processing tokens.\n *\n * @param chain Chain to use for the client.\n * @param walletClient The wallet client to use for wallet\n * interactions.\n * @param publicClient The public client to use for public\n * interactions.\n */\n constructor(\n private chain: Chain,\n private walletClient: WalletClient,\n private publicClient: PublicClient,\n ) {\n this.viemChain = VIEM_CHAINS[chain];\n this.erc20PermitHandler = new ERC20PermitHandler(\n chain,\n walletClient,\n publicClient,\n );\n this.token = UnifiToken.unifiETH;\n }\n\n /**\n * Set the UniFi token to use for executing transactions on the\n * contract.\n *\n * @param token UniFi token to use for the handler.\n * @returns The handler.\n */\n public withToken(token: UnifiToken) {\n this.token = token;\n return this;\n }\n\n /**\n * Get the contract. This is a method because the typings are complex\n * and lost when trying to make it a member.\n *\n * @returns The viem contract.\n */\n public getContract() {\n const address = VAULTS_ADDRESSES[this.token][this.chain]\n .NucleusTeller as Address;\n const abi = Teller;\n const client = { public: this.publicClient, wallet: this.walletClient };\n\n return getContract({ address, abi, client }) as GetContractReturnType<\n typeof abi,\n typeof client,\n Address\n >;\n }\n\n /**\n * Get the address of the `Accountant` contract.\n *\n * @returns The address of the `Accountant` contract.\n */\n public accountant() {\n return this.getContract().read.accountant();\n }\n\n /**\n * Get the address of the `BoringVault` contract.\n *\n * @returns The address of the `BoringVault` contract.\n */\n public vault() {\n return this.getContract().read.vault();\n }\n\n /**\n * Get the share lock period.\n *\n * @returns The share lock period.\n */\n public shareLockPeriod() {\n return this.getContract().read.shareLockPeriod();\n }\n\n /**\n * Get the share unlock time for the given wallet address.\n *\n * @param walletAddress Address of the wallet.\n * @returns The share unlock time.\n */\n public shareUnlockTime(walletAddress: Address) {\n return this.getContract().read.shareUnlockTime([walletAddress]);\n }\n\n /**\n * Get the paused state of the contract.\n *\n * @returns The paused state of the contract.\n */\n public isPaused() {\n return this.getContract().read.isPaused();\n }\n\n /**\n * Deposit the given token for staking. This doesn't make the\n * transaction but returns two methods namely `transact` and\n * `estimate`.\n *\n * @param params Deposit parameters.\n * @param params.account Address of the caller of the transaction.\n * @param params.token Token to deposit.\n * @param params.unifiToken UniFi token to get in return of the deposit.\n * @param params.amount Amount of the token to deposit.\n * @param params.minimumMint Minimum amount of shares to mint.\n * @param params.isPreapproved Whether the token is preapproved.\n * @returns `transact: () => Promise<Address>` - Used to make the\n * transaction with the given value.\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public async deposit(params: DepositParams) {\n const {\n token,\n unifiToken,\n account,\n amount,\n minimumMint,\n isPreapproved = false,\n } = params;\n const tokenAddress = TOKENS_ADDRESSES[token][this.chain];\n\n if (isPreapproved) {\n return {\n transact: () =>\n this.getContract().write.deposit(\n [tokenAddress, amount, minimumMint],\n {\n account,\n chain: this.viemChain,\n },\n ),\n estimate: () =>\n this.getContract().estimateGas.deposit(\n [tokenAddress, amount, minimumMint],\n { account },\n ),\n };\n }\n\n const { r, s, v, deadline } = await this.erc20PermitHandler\n .withToken(token)\n .getPermitData(\n account,\n // The UniFi token contract is the spender.\n TOKENS_ADDRESSES[unifiToken][this.chain],\n amount,\n );\n\n const depositArgs = <const>[\n tokenAddress,\n amount,\n minimumMint,\n deadline,\n v,\n r,\n s,\n ];\n\n const transact = () =>\n this.getContract().write.depositWithPermit(depositArgs, {\n account,\n chain: this.viemChain,\n });\n const estimate = () =>\n this.getContract().estimateGas.depositWithPermit(depositArgs, {\n account,\n });\n\n return { transact, estimate };\n }\n\n /**\n * Deposit an asset/token for staking with a permit.\n *\n * @param params Permit parameters.\n * @param params.account Address of the caller of the transaction.\n * @param params.depositAsset Address of the asset/token to deposit.\n * @param params.depositAmount Amount of the asset/token to deposit.\n * @param params.minimumMint Minimum amount of shares to mint.\n * @param params.deadline Deadline for the permit.\n * @param params.v v value of the permit.\n * @param params.r r value of the permit.\n * @param params.s s value of the permit.\n * @returns `transact: () => Promise<Address>` - Used to make the\n * transaction with the given value.\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public depositWithPermit(params: DepositWithPermitParams) {\n const { account, depositAsset, amount, minimumMint, deadline, v, r, s } =\n params;\n\n const transact = () =>\n this.getContract().write.depositWithPermit(\n [depositAsset, amount, minimumMint, deadline, v, r, s],\n { account, chain: this.viemChain },\n );\n const estimate = () =>\n this.getContract().estimateGas.depositWithPermit(\n [depositAsset, amount, minimumMint, deadline, v, r, s],\n { account },\n );\n\n return { transact, estimate };\n }\n\n public async bulkWithdraw(params: BulkWithdrawParams) {\n const { account, withdrawAsset, shareAmount, minimumAssets } = params;\n\n const transact = () =>\n this.getContract().write.bulkWithdraw(\n [withdrawAsset, shareAmount, minimumAssets, account],\n { account, chain: this.viemChain },\n );\n const estimate = () =>\n this.getContract().estimateGas.bulkWithdraw(\n [withdrawAsset, shareAmount, minimumAssets, account],\n { account },\n );\n\n return { transact, estimate };\n }\n\n public async bulkDeposit(params: BulkDepositParams) {\n const { account, depositAsset, depositAmount, minimumMint } = params;\n\n const transact = () =>\n this.getContract().write.bulkDeposit(\n [depositAsset, depositAmount, minimumMint, account],\n { account, chain: this.viemChain },\n );\n const estimate = () =>\n this.getContract().estimateGas.bulkDeposit(\n [depositAsset, depositAmount, minimumMint, account],\n { account },\n );\n\n return { transact, estimate };\n }\n}\n"],"names":["NucleusTellerHandler","chain","walletClient","publicClient","VIEM_CHAINS","ERC20PermitHandler","UnifiToken","token","address","VAULTS_ADDRESSES","abi","Teller","client","getContract","walletAddress","params","unifiToken","account","amount","minimumMint","isPreapproved","tokenAddress","TOKENS_ADDRESSES","r","s","v","deadline","depositArgs","depositAsset","withdrawAsset","shareAmount","minimumAssets","depositAmount"],"mappings":";;;;;;AA8CO,MAAMA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAchC,YACUC,GACAC,GACAC,GACR;AAHQ,SAAA,QAAAF,GACA,KAAA,eAAAC,GACA,KAAA,eAAAC,GAER,KAAK,YAAYC,EAAYH,CAAK,GAClC,KAAK,qBAAqB,IAAII;AAAA,MAC5BJ;AAAA,MACAC;AAAA,MACAC;AAAA,IAAA,GAEF,KAAK,QAAQG,EAAW;AAAA,EAC1B;AAAA,EAzBQ;AAAA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(e=>(e.USDT="USDT",e.USDC="USDC",e.DAI="DAI",e.WETH="WETH",e.stETH="stETH",e.wstETH="wstETH",e.eETH="eETH",e.cbETH="cbETH",e.ALT="ALT",e.pufETHwstE="pufETHwstE",e.pufETH="pufETH",e.xPufETH="xPufETH",e.ctTACpufETH="ctTACpufETH",e.tacpufETH="tacpufETH",e.WBTC="WBTC",e.LBTC="LBTC",e.tBTC="tBTC",e.cbBTC="cbBTC",e.pumpBTC="pumpBTC",e.SolvBTC="SolvBTC",e.FBTC="FBTC",e.PUFFER="PUFFER",e.vePUFFER="vePUFFER",e.CARROT="CARROT",e.lvlUSD="lvlUSD",e.slvlUSD="slvlUSD",e.mtwCARROT="mtwCARROT",e.sCARROT="sCARROT",e.LINK="LINK",e.TEST="TEST",e.VT="VT",e.EIGEN="EIGEN",e.ARPA="ARPA",e.vlPUFFER="vlPUFFER",e))(C||{}),i=(e=>(e.unifiETH="unifiETH",e.unifiUSD="unifiUSD",e.unifiBTC="unifiBTC",e.pufETHs="pufETHs",e))(i||{});const n={VT:{[a.Chain.Mainnet]:"0x7D26AD6F6BA9D6bA1de0218Ae5e20CD3a273a55A",[a.Chain.Holesky]:"0xB028194785178a94Fe608994A4d5AD84c285A640"},TEST:{[a.Chain.Sepolia]:"0xd26e3540a0a368845b234736a0700e0a5a821bba",[a.Chain.OptimismSepolia]:"0x7Fa13D6CB44164ea09dF8BCc673A8849092D435b"},LINK:{[a.Chain.BaseSepolia]:"0xe4ab69c077896252fafbd49efd26b5d171a32410",[a.Chain.OptimismSepolia]:"0xE4aB69C077896252FAFBD49EFD26B5D171A32410"},USDT:{[a.Chain.Mainnet]:"0xdac17f958d2ee523a2206206994597c13d831ec7",[a.Chain.Holesky]:"0xd5bef2c64f418fd460319521d37862327122e3bc",[a.Chain.Sepolia]:"0xaa8e23fb1079ea71e0a56f48a2aa51851d8433d0"},USDC:{[a.Chain.Mainnet]:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",[a.Chain.Holesky]:"0x64Cc0de0429bcb87e875905a0c313ec88f6d1d3E"},DAI:{[a.Chain.Mainnet]:"0x6b175474e89094c44da98b954eedeac495271d0f",[a.Chain.Holesky]:"0x4478905505ddfb7eA1c8A9f46eAEC3695cE542ac"},WETH:{[a.Chain.Mainnet]:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",[a.Chain.Holesky]:"0x1d181cBd1825e9eBC6AD966878D555A7215FF4F0",[a.Chain.Hoodi]:"0x251609d3e04165CA5CfaBa5DEE70A4e47863D060"},stETH:{[a.Chain.Mainnet]:"0xae7ab96520de3a18e5e111b5eaab095312d7fe84",[a.Chain.Holesky]:"0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034"},wstETH:{[a.Chain.Mainnet]:"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",[a.Chain.Holesky]:"0x8d09a4502Cc8Cf1547aD300E066060D043f6982D"},eETH:{[a.Chain.Mainnet]:"0x35fa164735182de50811e8e2e824cfb9b6118ac2",[a.Chain.Holesky]:"0x7ba2ee123b5977e3da040e1eacb3a61c82c17876"},cbETH:{[a.Chain.Mainnet]:"0xbe9895146f7af43049ca1c1ae358b0541ea49704",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},ALT:{[a.Chain.Mainnet]:"0x8457ca5040ad67fdebbcc8edce889a335bc0fbfb",[a.Chain.Holesky]:"0xaf5588a571b42c7e50bd440d80f9bf94a4db94ee"},pufETHwstE:{[a.Chain.Mainnet]:"0xeeda34a377dd0ca676b9511ee1324974fa8d980d",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},pufETH:{[a.Chain.Mainnet]:"0xd9a442856c234a39a81a089c06451ebaa4306a72",[a.Chain.Holesky]:"0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9",[a.Chain.Soneium]:"0x6c460b2c6D6719562D5dA43E5152B375e79B9A8B",[a.Chain.Arbitrum]:"0x37D6382B6889cCeF8d6871A8b60E667115eDDBcF",[a.Chain.Berachain]:"0x417b0Ff8358Eb72867Da92225CaB99BCD5e6F205",[a.Chain.TAC]:"0x37D6382B6889cCeF8d6871A8b60E667115eDDBcF"},xPufETH:{[a.Chain.Mainnet]:"0xD7D2802f6b19843ac4DfE25022771FD83b5A7464",[a.Chain.Base]:"0x23dA5F2d509cb43A59d43C108a43eDf34510eff1",[a.Chain.Bsc]:"0x64274835D88F5c0215da8AADd9A5f2D2A2569381",[a.Chain.ApeChain]:"0x6234E5ef39B12EFdFcbd99dd7F452F27F3fEAE3b",[a.Chain.Zircuit]:"0x9346A5043C590133FE900aec643D9622EDddBA57"},ctTACpufETH:{[a.Chain.Mainnet]:"0x78f314241df1ac151bfd0413eeb51979515f6abd",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},tacpufETH:{[a.Chain.Mainnet]:"0xf2e97704a567e003ed97f2d0976c45b2dda766a0",[a.Chain.TAC]:"0x85AF3C2755f17bA26D7326E8069Bf10719441068",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},WBTC:{[a.Chain.Mainnet]:"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},LBTC:{[a.Chain.Mainnet]:"0x8236a87084f8b84306f72007f36f2618a5634494",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},tBTC:{[a.Chain.Mainnet]:"0x18084fbA666a33d37592fA2633fD49a74DD93a88",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},cbBTC:{[a.Chain.Mainnet]:"0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},pumpBTC:{[a.Chain.Mainnet]:"0xf469fbd2abcd6b9de8e169d128226c0fc90a012e",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},SolvBTC:{[a.Chain.Mainnet]:"0x7a56e1c57c7475ccf742a1832b028f0456652f97",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},FBTC:{[a.Chain.Mainnet]:"0xC96dE26018A54D51c097160568752c4E3BD6C364",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},PUFFER:{[a.Chain.Mainnet]:"0x4d1c297d39c5c1277964d0e3f8aa901493664530",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},vePUFFER:{[a.Chain.Mainnet]:"0xA55eD5808aeCDF23AE3782C1443185f5D2363ce7"},CARROT:{[a.Chain.Mainnet]:"0x282a69142bac47855c3fbe1693fcc4ba3b4d5ed6",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},lvlUSD:{[a.Chain.Mainnet]:"0x7C1156E515aA1A2E851674120074968C905aAF37",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},slvlUSD:{[a.Chain.Mainnet]:"0x4737d9b4592b40d51e110b94c9c043c6654067ae",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},mtwCARROT:{[a.Chain.Mainnet]:"0x8A5A5DE9db5770123Ff2145F59e9F20047f0A8EC",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},sCARROT:{[a.Chain.Mainnet]:"0x99c599227c65132822f0290d9e5b4b0430d6c0d6",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},EIGEN:{[a.Chain.Mainnet]:"0xec53bF9167f50cDEB3Ae105f56099aaaB9061F83"},ARPA:{[a.Chain.Mainnet]:"0xBA50933C268F567BDC86E1aC131BE072C6B0b71a"},unifiETH:{[a.Chain.Mainnet]:"0x196ead472583bc1e9af7a05f860d9857e1bd3dcc",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},unifiUSD:{[a.Chain.Mainnet]:"0x82c40e07277eBb92935f79cE92268F80dDc7caB4",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},unifiBTC:{[a.Chain.Mainnet]:"0x170d847a8320f3b6a77ee15b0cae430e3ec933a0",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},pufETHs:{[a.Chain.Mainnet]:"0x62a4ce0722ee65635c0f8339dd814d549b6f6735",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},vlPUFFER:{[a.Chain.Mainnet]:"0x1e168460ea0cf3f126ddd3183dc2e376515a5e91"}},c={USDT:"",USDC:"",DAI:"",WETH:"",stETH:"2",wstETH:"1",eETH:"1",cbETH:"2",ALT:"1",pufETHwstE:"v7.0.0",pufETH:"1",xPufETH:"1",ctTACpufETH:"",tacpufETH:"v0.5.0",WBTC:"",LBTC:"",tBTC:"",cbBTC:"",pumpBTC:"",SolvBTC:"",FBTC:"",PUFFER:"1",vePUFFER:"1",CARROT:"1",lvlUSD:"1",slvlUSD:"",mtwCARROT:"",sCARROT:"",LINK:"",TEST:"",VT:"1",EIGEN:"1",ARPA:"1",unifiETH:"1",unifiUSD:"1",unifiBTC:"1",pufETHs:"1",vlPUFFER:"1"},f={pufETHwstE:{[a.Chain.Mainnet]:"0x0e986ed5610121905f03fd3850cebcc00f66166fc3ab760acb4e087d735d9457",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000000000000000000000000000"}};exports.TOKENS_ADDRESSES=n;exports.TOKENS_PERMIT_VERSION=c;exports.TOKENS_SALT=f;exports.Token=C;exports.UnifiToken=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../constants-Dhpa19or.cjs");var C=(e=>(e.USDT="USDT",e.USDC="USDC",e.DAI="DAI",e.WETH="WETH",e.stETH="stETH",e.wstETH="wstETH",e.eETH="eETH",e.cbETH="cbETH",e.ALT="ALT",e.pufETHwstE="pufETHwstE",e.pufETH="pufETH",e.xPufETH="xPufETH",e.ctTACpufETH="ctTACpufETH",e.tacpufETH="tacpufETH",e.WBTC="WBTC",e.LBTC="LBTC",e.tBTC="tBTC",e.cbBTC="cbBTC",e.pumpBTC="pumpBTC",e.SolvBTC="SolvBTC",e.FBTC="FBTC",e.PUFFER="PUFFER",e.vePUFFER="vePUFFER",e.CARROT="CARROT",e.lvlUSD="lvlUSD",e.slvlUSD="slvlUSD",e.mtwCARROT="mtwCARROT",e.sCARROT="sCARROT",e.LINK="LINK",e.TEST="TEST",e.VT="VT",e.EIGEN="EIGEN",e.ARPA="ARPA",e.vlPUFFER="vlPUFFER",e))(C||{}),i=(e=>(e.unifiETH="unifiETH",e.unifiUSD="unifiUSD",e.unifiBTC="unifiBTC",e.pufETHs="pufETHs",e))(i||{});const n={VT:{[a.Chain.Mainnet]:"0x7D26AD6F6BA9D6bA1de0218Ae5e20CD3a273a55A",[a.Chain.Holesky]:"0xB028194785178a94Fe608994A4d5AD84c285A640"},TEST:{[a.Chain.Sepolia]:"0xd26e3540a0a368845b234736a0700e0a5a821bba",[a.Chain.OptimismSepolia]:"0x7Fa13D6CB44164ea09dF8BCc673A8849092D435b"},LINK:{[a.Chain.BaseSepolia]:"0xe4ab69c077896252fafbd49efd26b5d171a32410",[a.Chain.OptimismSepolia]:"0xE4aB69C077896252FAFBD49EFD26B5D171A32410"},USDT:{[a.Chain.Mainnet]:"0xdac17f958d2ee523a2206206994597c13d831ec7",[a.Chain.Holesky]:"0xd5bef2c64f418fd460319521d37862327122e3bc",[a.Chain.Sepolia]:"0xaa8e23fb1079ea71e0a56f48a2aa51851d8433d0"},USDC:{[a.Chain.Mainnet]:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",[a.Chain.Holesky]:"0x64Cc0de0429bcb87e875905a0c313ec88f6d1d3E"},DAI:{[a.Chain.Mainnet]:"0x6b175474e89094c44da98b954eedeac495271d0f",[a.Chain.Holesky]:"0x4478905505ddfb7eA1c8A9f46eAEC3695cE542ac"},WETH:{[a.Chain.Mainnet]:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",[a.Chain.Holesky]:"0x1d181cBd1825e9eBC6AD966878D555A7215FF4F0",[a.Chain.Hoodi]:"0x251609d3e04165CA5CfaBa5DEE70A4e47863D060"},stETH:{[a.Chain.Mainnet]:"0xae7ab96520de3a18e5e111b5eaab095312d7fe84",[a.Chain.Holesky]:"0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034"},wstETH:{[a.Chain.Mainnet]:"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",[a.Chain.Holesky]:"0x8d09a4502Cc8Cf1547aD300E066060D043f6982D"},eETH:{[a.Chain.Mainnet]:"0x35fa164735182de50811e8e2e824cfb9b6118ac2",[a.Chain.Holesky]:"0x7ba2ee123b5977e3da040e1eacb3a61c82c17876"},cbETH:{[a.Chain.Mainnet]:"0xbe9895146f7af43049ca1c1ae358b0541ea49704",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},ALT:{[a.Chain.Mainnet]:"0x8457ca5040ad67fdebbcc8edce889a335bc0fbfb",[a.Chain.Holesky]:"0xaf5588a571b42c7e50bd440d80f9bf94a4db94ee"},pufETHwstE:{[a.Chain.Mainnet]:"0xeeda34a377dd0ca676b9511ee1324974fa8d980d",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},pufETH:{[a.Chain.Mainnet]:"0xd9a442856c234a39a81a089c06451ebaa4306a72",[a.Chain.Holesky]:"0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9",[a.Chain.Soneium]:"0x6c460b2c6D6719562D5dA43E5152B375e79B9A8B",[a.Chain.Arbitrum]:"0x37D6382B6889cCeF8d6871A8b60E667115eDDBcF",[a.Chain.Berachain]:"0x417b0Ff8358Eb72867Da92225CaB99BCD5e6F205",[a.Chain.TAC]:"0x37D6382B6889cCeF8d6871A8b60E667115eDDBcF",[a.Chain.Base]:"0x30D91DF53cCCf07e3a5BF6862Db8CFBe1fCB21d3",[a.Chain.Monad]:"0x37D6382B6889cCeF8d6871A8b60E667115eDDBcF",[a.Chain.HyperEVM]:"0x87d00066cf131ff54B72B134a217D5401E5392b6"},xPufETH:{[a.Chain.Mainnet]:"0xD7D2802f6b19843ac4DfE25022771FD83b5A7464",[a.Chain.Base]:"0x23dA5F2d509cb43A59d43C108a43eDf34510eff1",[a.Chain.Bsc]:"0x64274835D88F5c0215da8AADd9A5f2D2A2569381",[a.Chain.ApeChain]:"0x6234E5ef39B12EFdFcbd99dd7F452F27F3fEAE3b",[a.Chain.Zircuit]:"0x9346A5043C590133FE900aec643D9622EDddBA57"},ctTACpufETH:{[a.Chain.Mainnet]:"0x78f314241df1ac151bfd0413eeb51979515f6abd",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},tacpufETH:{[a.Chain.Mainnet]:"0xf2e97704a567e003ed97f2d0976c45b2dda766a0",[a.Chain.TAC]:"0x85AF3C2755f17bA26D7326E8069Bf10719441068",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},WBTC:{[a.Chain.Mainnet]:"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},LBTC:{[a.Chain.Mainnet]:"0x8236a87084f8b84306f72007f36f2618a5634494",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},tBTC:{[a.Chain.Mainnet]:"0x18084fbA666a33d37592fA2633fD49a74DD93a88",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},cbBTC:{[a.Chain.Mainnet]:"0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},pumpBTC:{[a.Chain.Mainnet]:"0xf469fbd2abcd6b9de8e169d128226c0fc90a012e",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},SolvBTC:{[a.Chain.Mainnet]:"0x7a56e1c57c7475ccf742a1832b028f0456652f97",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},FBTC:{[a.Chain.Mainnet]:"0xC96dE26018A54D51c097160568752c4E3BD6C364",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},PUFFER:{[a.Chain.Mainnet]:"0x4d1c297d39c5c1277964d0e3f8aa901493664530",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000",[a.Chain.Base]:"0x8dA0baE597aC15fB0924713b1e3c1F624474F3E4",[a.Chain.Bsc]:"0x87d00066cf131ff54B72B134a217D5401E5392b6"},vePUFFER:{[a.Chain.Mainnet]:"0xA55eD5808aeCDF23AE3782C1443185f5D2363ce7"},CARROT:{[a.Chain.Mainnet]:"0x282a69142bac47855c3fbe1693fcc4ba3b4d5ed6",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},lvlUSD:{[a.Chain.Mainnet]:"0x7C1156E515aA1A2E851674120074968C905aAF37",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},slvlUSD:{[a.Chain.Mainnet]:"0x4737d9b4592b40d51e110b94c9c043c6654067ae",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},mtwCARROT:{[a.Chain.Mainnet]:"0x8A5A5DE9db5770123Ff2145F59e9F20047f0A8EC",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},sCARROT:{[a.Chain.Mainnet]:"0x99c599227c65132822f0290d9e5b4b0430d6c0d6",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},EIGEN:{[a.Chain.Mainnet]:"0xec53bF9167f50cDEB3Ae105f56099aaaB9061F83"},ARPA:{[a.Chain.Mainnet]:"0xBA50933C268F567BDC86E1aC131BE072C6B0b71a"},unifiETH:{[a.Chain.Mainnet]:"0x196ead472583bc1e9af7a05f860d9857e1bd3dcc",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},unifiUSD:{[a.Chain.Mainnet]:"0x82c40e07277eBb92935f79cE92268F80dDc7caB4",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},unifiBTC:{[a.Chain.Mainnet]:"0x170d847a8320f3b6a77ee15b0cae430e3ec933a0",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},pufETHs:{[a.Chain.Mainnet]:"0x62a4ce0722ee65635c0f8339dd814d549b6f6735",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},vlPUFFER:{[a.Chain.Mainnet]:"0x1e168460ea0cf3f126ddd3183dc2e376515a5e91"}},c={USDT:"",USDC:"",DAI:"",WETH:"",stETH:"2",wstETH:"1",eETH:"1",cbETH:"2",ALT:"1",pufETHwstE:"v7.0.0",pufETH:"1",xPufETH:"1",ctTACpufETH:"",tacpufETH:"v0.5.0",WBTC:"",LBTC:"",tBTC:"",cbBTC:"",pumpBTC:"",SolvBTC:"",FBTC:"",PUFFER:"1",vePUFFER:"1",CARROT:"1",lvlUSD:"1",slvlUSD:"",mtwCARROT:"",sCARROT:"",LINK:"",TEST:"",VT:"1",EIGEN:"1",ARPA:"1",unifiETH:"1",unifiUSD:"1",unifiBTC:"1",pufETHs:"1",vlPUFFER:"1"},f={pufETHwstE:{[a.Chain.Mainnet]:"0x0e986ed5610121905f03fd3850cebcc00f66166fc3ab760acb4e087d735d9457",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000000000000000000000000000"}};exports.TOKENS_ADDRESSES=n;exports.TOKENS_PERMIT_VERSION=c;exports.TOKENS_SALT=f;exports.Token=C;exports.UnifiToken=i;
2
2
  //# sourceMappingURL=tokens.cjs.map