damm-sdk 1.4.35 → 1.4.37

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.
Files changed (45) hide show
  1. package/dist/index.cjs +17187 -16747
  2. package/dist/index.cjs.map +84 -97
  3. package/dist/index.js +13222 -12265
  4. package/dist/index.js.map +77 -84
  5. package/dist/integrations/index.d.ts +1 -0
  6. package/dist/integrations/index.d.ts.map +1 -1
  7. package/dist/integrations/lagoonV1/delay.proxy.admin.d.ts +208 -0
  8. package/dist/integrations/lagoonV1/delay.proxy.admin.d.ts.map +1 -0
  9. package/dist/integrations/lagoonV1/index.d.ts +1 -0
  10. package/dist/integrations/lagoonV1/index.d.ts.map +1 -1
  11. package/dist/integrations/lagoonV1/lagoon.v1.d.ts +17 -0
  12. package/dist/integrations/lagoonV1/lagoon.v1.d.ts.map +1 -1
  13. package/dist/integrations/lagoonV2/addresses.d.ts +19 -0
  14. package/dist/integrations/lagoonV2/addresses.d.ts.map +1 -0
  15. package/dist/integrations/lagoonV2/factory.abi.d.ts +183 -0
  16. package/dist/integrations/lagoonV2/factory.abi.d.ts.map +1 -0
  17. package/dist/integrations/lagoonV2/index.d.ts +7 -0
  18. package/dist/integrations/lagoonV2/index.d.ts.map +1 -0
  19. package/dist/integrations/lagoonV2/lagoon.v2.d.ts +132 -0
  20. package/dist/integrations/lagoonV2/lagoon.v2.d.ts.map +1 -0
  21. package/dist/integrations/lagoonV2/lagoon.v2.permissions.d.ts +268 -0
  22. package/dist/integrations/lagoonV2/lagoon.v2.permissions.d.ts.map +1 -0
  23. package/dist/integrations/lagoonV2/lagoon.v2.setters.d.ts +293 -0
  24. package/dist/integrations/lagoonV2/lagoon.v2.setters.d.ts.map +1 -0
  25. package/dist/integrations/lagoonV2/vault.abi.d.ts +349 -0
  26. package/dist/integrations/lagoonV2/vault.abi.d.ts.map +1 -0
  27. package/dist/integrations/morphoVault/morpho.vault.d.ts +11 -0
  28. package/dist/integrations/morphoVault/morpho.vault.d.ts.map +1 -1
  29. package/dist/integrations/morphoVault/morpho.vault.v2.abi.d.ts +37 -0
  30. package/dist/integrations/morphoVault/morpho.vault.v2.abi.d.ts.map +1 -0
  31. package/package.json +1 -1
  32. package/src/integrations/index.ts +1 -0
  33. package/src/integrations/lagoonV1/delay.proxy.admin.ts +358 -0
  34. package/src/integrations/lagoonV1/index.ts +1 -0
  35. package/src/integrations/lagoonV1/lagoon.v1.ts +109 -36
  36. package/src/integrations/lagoonV2/addresses.ts +35 -0
  37. package/src/integrations/lagoonV2/factory.abi.ts +110 -0
  38. package/src/integrations/lagoonV2/index.ts +6 -0
  39. package/src/integrations/lagoonV2/lagoon.v2.permissions.ts +578 -0
  40. package/src/integrations/lagoonV2/lagoon.v2.setters.ts +521 -0
  41. package/src/integrations/lagoonV2/lagoon.v2.ts +345 -0
  42. package/src/integrations/lagoonV2/vault.abi.ts +479 -0
  43. package/src/integrations/morphoVault/morpho.vault.ts +45 -0
  44. package/src/integrations/morphoVault/morpho.vault.v2.abi.ts +23 -0
  45. package/src/lib/contractsRegistry.json +4 -2
@@ -0,0 +1,268 @@
1
+ /**
2
+ * Lagoon v0.6 vault permission builders.
3
+ *
4
+ * These functions encode calldata for the role-gated functions on a deployed v0.6
5
+ * LagoonVault proxy. They are the v0.6 counterparts of the v0.5 helpers in
6
+ * `src/integrations/lagoonV1/lagoon.v1.ts` and mirror that module's shape exactly.
7
+ *
8
+ * Naming: all exports are prefixed `LagoonV2` / `lagoonV2` to avoid name conflicts
9
+ * with the v0.5 lagoonV1 exports (e.g. PauseVaultCalldata, pauseVaultTrx) that are
10
+ * already on the top-level SDK namespace.
11
+ *
12
+ * All function signatures have been verified against the deployed v0.6 implementations:
13
+ * Arbitrum: 0x3f5A9e1D82c595d14bA93c97eB8a77928cFdee70
14
+ * Ethereum: 0x6C77c47FB8168E22976C3B0338CB1769c952249f
15
+ *
16
+ * v0.6 differences from v0.5 that affect this module:
17
+ * - updateRates takes a 5-field Rates struct (managementRate, performanceRate,
18
+ * entryRate, exitRate, haircutRate) — selector 0x0190b902. v0.5 had 2 fields.
19
+ * - addToBlacklist / revokeFromBlacklist are NEW (Accessable / Blacklist mode).
20
+ * - updateSecurityCouncil and updateSuperOperator are NEW role setters.
21
+ * - addToWhitelist / revokeFromWhitelist remain for Whitelist mode.
22
+ */
23
+ import type { Address } from "viem";
24
+ import { type Call, type HexString, type Unwrapable } from "../..";
25
+ /**
26
+ * 5-field fee rates struct for Lagoon v0.6.
27
+ *
28
+ * Caps (from FeeLib.sol):
29
+ * managementRate max 1000 bps (10%)
30
+ * performanceRate max 5000 bps (50%)
31
+ * entryRate max 200 bps (2%)
32
+ * exitRate max 200 bps (2%)
33
+ * haircutRate max 2000 bps (20%)
34
+ *
35
+ * Entry and exit rates can only DECREASE after first initialization
36
+ * (RateCanOnlyDecrease). Management, performance, and haircut have no
37
+ * monotonic rule — they can be raised up to their caps at any time.
38
+ */
39
+ export type LagoonV2Rates = Readonly<{
40
+ managementRate: number;
41
+ performanceRate: number;
42
+ entryRate: number;
43
+ exitRate: number;
44
+ haircutRate: number;
45
+ }>;
46
+ /**
47
+ * Encodes a `settleDeposit(uint256 epoch)` call.
48
+ * Selector: 0xd24ca58a
49
+ * Role: Safe (Settler)
50
+ */
51
+ export declare const LagoonV2SettleDepositCalldata: ({ epoch }: {
52
+ epoch: bigint;
53
+ }) => HexString;
54
+ export declare const lagoonV2SettleDepositTrx: ({ vault, epoch }: {
55
+ vault: Address;
56
+ epoch: bigint;
57
+ }) => Unwrapable<Call>;
58
+ /**
59
+ * Encodes a `settleRedeem(uint256 epoch)` call.
60
+ * Selector: 0xa627df66
61
+ * Role: Safe (Settler)
62
+ */
63
+ export declare const LagoonV2SettleRedeemCalldata: ({ epoch }: {
64
+ epoch: bigint;
65
+ }) => HexString;
66
+ export declare const lagoonV2SettleRedeemTrx: ({ vault, epoch }: {
67
+ vault: Address;
68
+ epoch: bigint;
69
+ }) => Unwrapable<Call>;
70
+ /**
71
+ * Encodes an `updateNewTotalAssets(uint256 newTotalAssets)` call.
72
+ * Selector: 0xbcd1bf34
73
+ * Role: Valuation Manager
74
+ *
75
+ * Subject to guardrails when activated. Reverts ValuationUpdateNotAllowed()
76
+ * if a NAV is currently valid (isTotalAssetsValid()). The Safe must call
77
+ * lagoonV2ExpireTotalAssetsTrx first in that case.
78
+ */
79
+ export declare const LagoonV2UpdateNewTotalAssetsCalldata: ({ newTotalAssets }: {
80
+ newTotalAssets: bigint;
81
+ }) => HexString;
82
+ export declare const lagoonV2UpdateNewTotalAssetsTrx: ({ vault, newTotalAssets, }: {
83
+ vault: Address;
84
+ newTotalAssets: bigint;
85
+ }) => Unwrapable<Call>;
86
+ /**
87
+ * Encodes an `expireTotalAssets()` call.
88
+ * Selector: 0x927b15df
89
+ * Role: Safe
90
+ *
91
+ * Immediately invalidates the current NAV. Required before pushing a new NAV
92
+ * when isTotalAssetsValid() is true.
93
+ */
94
+ export declare const LagoonV2ExpireTotalAssetsCalldata: () => HexString;
95
+ export declare const lagoonV2ExpireTotalAssetsTrx: ({ vault }: {
96
+ vault: Address;
97
+ }) => Unwrapable<Call>;
98
+ /**
99
+ * Encodes a `pause()` call.
100
+ * Selector: 0x8456cb59
101
+ * Role: Owner (Guardian in practice — Owner delegates pause authority)
102
+ *
103
+ * Halts all deposit and redeem operations. Emergency use only.
104
+ */
105
+ export declare const LagoonV2PauseVaultCalldata: () => HexString;
106
+ export declare const lagoonV2PauseVaultTrx: ({ vault }: {
107
+ vault: Address;
108
+ }) => Unwrapable<Call>;
109
+ /**
110
+ * Encodes an `unpause()` call.
111
+ * Selector: 0x3f4ba83a
112
+ * Role: Owner (Admin)
113
+ *
114
+ * Resumes normal vault operations after a pause.
115
+ */
116
+ export declare const LagoonV2UnpauseVaultCalldata: () => HexString;
117
+ export declare const lagoonV2UnpauseVaultTrx: ({ vault }: {
118
+ vault: Address;
119
+ }) => Unwrapable<Call>;
120
+ /**
121
+ * Encodes an `addToWhitelist(address[] accounts)` call.
122
+ * Selector: 0x7f649783
123
+ * Role: Whitelist (Access) Manager
124
+ *
125
+ * Grants vault access when the vault is in Whitelist mode (AccessMode.Whitelist).
126
+ * In Blacklist mode this is still callable but has no gate effect.
127
+ */
128
+ export declare const LagoonV2AddToWhitelistCalldata: ({ accounts }: {
129
+ accounts: Address[];
130
+ }) => HexString;
131
+ export declare const lagoonV2AddToWhitelistTrx: ({ vault, accounts, }: {
132
+ vault: Address;
133
+ accounts: Address[];
134
+ }) => Unwrapable<Call>;
135
+ /**
136
+ * Encodes a `revokeFromWhitelist(address[] accounts)` call.
137
+ * Selector: 0x86af6e68
138
+ * Role: Whitelist (Access) Manager
139
+ *
140
+ * Revokes vault access for addresses in Whitelist mode.
141
+ */
142
+ export declare const LagoonV2RevokeFromWhitelistCalldata: ({ accounts }: {
143
+ accounts: Address[];
144
+ }) => HexString;
145
+ export declare const lagoonV2RevokeFromWhitelistTrx: ({ vault, accounts, }: {
146
+ vault: Address;
147
+ accounts: Address[];
148
+ }) => Unwrapable<Call>;
149
+ /**
150
+ * Encodes an `addToBlacklist(address[] accounts)` call.
151
+ * Selector: 0x935eb35f
152
+ * Role: Whitelist (Access) Manager
153
+ *
154
+ * Blocks vault access and transfers for addresses in Blacklist mode.
155
+ * NEW in v0.6 — does not exist in v0.5.
156
+ */
157
+ export declare const LagoonV2AddToBlacklistCalldata: ({ accounts }: {
158
+ accounts: Address[];
159
+ }) => HexString;
160
+ export declare const lagoonV2AddToBlacklistTrx: ({ vault, accounts, }: {
161
+ vault: Address;
162
+ accounts: Address[];
163
+ }) => Unwrapable<Call>;
164
+ /**
165
+ * Encodes a `revokeFromBlacklist(address[] accounts)` call.
166
+ * Selector: 0x4cc724c2
167
+ * Role: Whitelist (Access) Manager
168
+ *
169
+ * Removes addresses from the blacklist.
170
+ * NEW in v0.6 — does not exist in v0.5.
171
+ */
172
+ export declare const LagoonV2RevokeFromBlacklistCalldata: ({ accounts }: {
173
+ accounts: Address[];
174
+ }) => HexString;
175
+ export declare const lagoonV2RevokeFromBlacklistTrx: ({ vault, accounts, }: {
176
+ vault: Address;
177
+ accounts: Address[];
178
+ }) => Unwrapable<Call>;
179
+ /**
180
+ * Encodes an `updateRates((uint16,uint16,uint16,uint16,uint16) rates)` call.
181
+ * Selector: 0x0190b902
182
+ * Role: Owner (Admin)
183
+ *
184
+ * v0.6 CHANGE: v0.5 had `updateRates(uint16 managementRate, uint16 performanceRate)`
185
+ * (2 positional args). v0.6 uses a single Rates struct with 5 fields. The selector
186
+ * is therefore different and not backward-compatible with v0.5 callers.
187
+ *
188
+ * Rate-change rules:
189
+ * - entryRate and exitRate can only DECREASE after first initialization.
190
+ * - managementRate, performanceRate, and haircutRate can be raised or lowered
191
+ * freely up to their respective caps.
192
+ * - No cooldown mechanism (removed in v0.6).
193
+ */
194
+ export declare const LagoonV2UpdateRatesCalldata: ({ rates }: {
195
+ rates: LagoonV2Rates;
196
+ }) => HexString;
197
+ export declare const lagoonV2UpdateRatesTrx: ({ vault, rates, }: {
198
+ vault: Address;
199
+ rates: LagoonV2Rates;
200
+ }) => Unwrapable<Call>;
201
+ /**
202
+ * Encodes an `updateWhitelistManager(address)` call.
203
+ * Selector: 0xf1a76fcc
204
+ * Role: Owner (Admin)
205
+ */
206
+ export declare const LagoonV2UpdateWhitelistManagerCalldata: ({ newWhitelistManager, }: {
207
+ newWhitelistManager: Address;
208
+ }) => HexString;
209
+ export declare const lagoonV2UpdateWhitelistManagerTrx: ({ vault, newWhitelistManager, }: {
210
+ vault: Address;
211
+ newWhitelistManager: Address;
212
+ }) => Unwrapable<Call>;
213
+ /**
214
+ * Encodes an `updateValuationManager(address)` call.
215
+ * Selector: 0x65ccfcef
216
+ * Role: Owner (Admin)
217
+ */
218
+ export declare const LagoonV2UpdateValuationManagerCalldata: ({ newValuationManager, }: {
219
+ newValuationManager: Address;
220
+ }) => HexString;
221
+ export declare const lagoonV2UpdateValuationManagerTrx: ({ vault, newValuationManager, }: {
222
+ vault: Address;
223
+ newValuationManager: Address;
224
+ }) => Unwrapable<Call>;
225
+ /**
226
+ * Encodes an `updateFeeReceiver(address)` call.
227
+ * Selector: 0xc69bebe4
228
+ * Role: Owner (Admin)
229
+ */
230
+ export declare const LagoonV2UpdateFeeReceiverCalldata: ({ newFeeReceiver }: {
231
+ newFeeReceiver: Address;
232
+ }) => HexString;
233
+ export declare const lagoonV2UpdateFeeReceiverTrx: ({ vault, newFeeReceiver, }: {
234
+ vault: Address;
235
+ newFeeReceiver: Address;
236
+ }) => Unwrapable<Call>;
237
+ /**
238
+ * Encodes an `updateSecurityCouncil(address)` call.
239
+ * Selector: 0xdbfe3e96
240
+ * Role: Owner (Admin)
241
+ *
242
+ * NEW in v0.6. The Security Council can bypass guardrails via
243
+ * securityCouncilUpdateTotalAssets() — treat this address as high-trust.
244
+ */
245
+ export declare const LagoonV2UpdateSecurityCouncilCalldata: ({ newSecurityCouncil, }: {
246
+ newSecurityCouncil: Address;
247
+ }) => HexString;
248
+ export declare const lagoonV2UpdateSecurityCouncilTrx: ({ vault, newSecurityCouncil, }: {
249
+ vault: Address;
250
+ newSecurityCouncil: Address;
251
+ }) => Unwrapable<Call>;
252
+ /**
253
+ * Encodes an `updateSuperOperator(address)` call.
254
+ * Selector: 0x3a891d3b
255
+ * Role: Owner (Admin)
256
+ *
257
+ * NEW in v0.6. The Super Operator can act on behalf of any user without
258
+ * per-user approval (except for protocolFeeReceiver). Can be locked
259
+ * permanently via lockSuperOperator().
260
+ */
261
+ export declare const LagoonV2UpdateSuperOperatorCalldata: ({ newSuperOperator }: {
262
+ newSuperOperator: Address;
263
+ }) => HexString;
264
+ export declare const lagoonV2UpdateSuperOperatorTrx: ({ vault, newSuperOperator, }: {
265
+ vault: Address;
266
+ newSuperOperator: Address;
267
+ }) => Unwrapable<Call>;
268
+ //# sourceMappingURL=lagoon.v2.permissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lagoon.v2.permissions.d.ts","sourceRoot":"","sources":["../../../src/integrations/lagoonV2/l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AAO;MAC5B,WAAW,IAAI,CAOlB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iCAAiC;oBAA0C,OAAO;MAAK,SAMnG,CAAC;AAEF,eAAO,MAAM,4BAA4B;WAI9B,OAAO;oBACE,OAAO;MACvB,WAAW,IAAI,CAOlB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,qCAAqC;wBAG1B,OAAO;MAC3B,SAMH,CAAC;AAEF,eAAO,MAAM,gCAAgC;WAIlC,OAAO;wBACM,OAAO;MAC3B,WAAW,IAAI,CAOlB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,mCAAmC;sBAA8C,OAAO;MAAK,SAMzG,CAAC;AAEF,eAAO,MAAM,8BAA8B;WAIhC,OAAO;sBACI,OAAO;MACzB,WAAW,IAAI,CAOlB,CAAC"}
@@ -0,0 +1,293 @@
1
+ /**
2
+ * Lagoon v0.6 vault setter/admin calldata builders — SDK-C.
3
+ *
4
+ * This module extends the v0.6 permission surface beyond what SDK-B covered.
5
+ * SDK-B (`lagoon.v2.permissions.ts`) handles the 16 role-gated operational
6
+ * functions (settleDeposit, settleRedeem, updateNewTotalAssets, expireTotalAssets,
7
+ * pause, unpause, whitelist/blacklist ops, updateRates, role-address setters).
8
+ *
9
+ * This module adds the remaining 13 setter/admin/utility functions:
10
+ * - MaxCap: updateMaxCap
11
+ * - Sync: setSyncMode, updateTotalAssetsLifespan
12
+ * - Guardrails: updateGuardrails, updateActivated, securityCouncilUpdateTotalAssets
13
+ * - Sanctions: setExternalSanctionsList
14
+ * - Kill-switch: lockUpdateSafe, lockSuperOperator
15
+ * - Batch claim: claimSharesOnBehalf, claimAssetsOnBehalf
16
+ * - Metadata: updateName, updateSymbol
17
+ *
18
+ * All function signatures have been verified against the deployed v0.6 implementations:
19
+ * Arbitrum: 0x3f5A9e1D82c595d14bA93c97eB8a77928cFdee70
20
+ * Ethereum: 0x6C77c47FB8168E22976C3B0338CB1769c952249f
21
+ *
22
+ * Selector verification (2026-06-08):
23
+ * updateMaxCap(uint256) 0xe81ba080
24
+ * setSyncMode(uint8) 0x363d8de8
25
+ * updateTotalAssetsLifespan(uint128) 0xae16ea8c
26
+ * updateGuardrails((uint256,int256)) 0xced9a8de
27
+ * updateActivated(bool) 0xdc324cb2
28
+ * securityCouncilUpdateTotalAssets(uint256) 0xdeb337a5
29
+ * setExternalSanctionsList(address) 0x7de5c4f4
30
+ * lockUpdateSafe() 0x8c9881a9
31
+ * lockSuperOperator() 0x32c06a4e
32
+ * claimSharesOnBehalf(address[]) 0xf15be6f9
33
+ * claimAssetsOnBehalf(address[]) 0x26d6c82f
34
+ * updateName(string) 0x84da92a7
35
+ * updateSymbol(string) 0x537f5312
36
+ */
37
+ import type { Address } from "viem";
38
+ import { type Call, type HexString, type Unwrapable } from "../..";
39
+ /**
40
+ * Guardrails struct for Lagoon v0.6.
41
+ *
42
+ * When activated, `updateNewTotalAssets` is gated:
43
+ * - newTotalAssets must not increase by more than `upperRate` (expressed as a
44
+ * percentage delta in WAD — e.g. 1e17 = 10% max increase per interval).
45
+ * - newTotalAssets must not decrease by more than `|lowerRate|` (negative int256
46
+ * expressed in WAD — e.g. -1e17 = 10% max decrease).
47
+ *
48
+ * The Security Council can bypass these bounds via `securityCouncilUpdateTotalAssets`.
49
+ */
50
+ export type LagoonV2Guardrails = Readonly<{
51
+ upperRate: bigint;
52
+ lowerRate: bigint;
53
+ }>;
54
+ /**
55
+ * SyncMode enum for Lagoon v0.6.
56
+ *
57
+ * Async = 0 (default): standard epoch-based settlement flow.
58
+ * Sync = 1: synchronous instant settlement — deposit/redeem are settled immediately.
59
+ */
60
+ export declare const LagoonV2SyncMode: {
61
+ readonly Async: 0;
62
+ readonly Sync: 1;
63
+ };
64
+ export type LagoonV2SyncModeValue = (typeof LagoonV2SyncMode)[keyof typeof LagoonV2SyncMode];
65
+ /**
66
+ * Encodes an `updateMaxCap(uint256 maxCap)` call.
67
+ * Selector: 0xe81ba080
68
+ * Role: Owner (Admin)
69
+ *
70
+ * Sets the maximum total assets the vault is allowed to hold. Deposits that
71
+ * would push totalAssets above this cap are rejected. Set to `type(uint256).max`
72
+ * to disable the cap.
73
+ *
74
+ * Required by the DeFi-Kit mandatory-cap deploy step (DeFi-Kit#200).
75
+ */
76
+ export declare const LagoonV2UpdateMaxCapCalldata: ({ maxCap }: {
77
+ maxCap: bigint;
78
+ }) => HexString;
79
+ export declare const lagoonV2UpdateMaxCapTrx: ({ vault, maxCap }: {
80
+ vault: Address;
81
+ maxCap: bigint;
82
+ }) => Unwrapable<Call>;
83
+ /**
84
+ * Encodes a `setSyncMode(uint8 syncMode)` call.
85
+ * Selector: 0x363d8de8
86
+ * Role: Owner (Admin)
87
+ *
88
+ * Switches between Async (epoch settlement) and Sync (instant settlement) modes.
89
+ * Use `LagoonV2SyncMode.Async` or `LagoonV2SyncMode.Sync`.
90
+ *
91
+ * WARNING: switching modes mid-epoch may leave open requests in an inconsistent
92
+ * state. Only switch when no pending deposit/redeem requests are outstanding.
93
+ */
94
+ export declare const LagoonV2SetSyncModeCalldata: ({ syncMode }: {
95
+ syncMode: LagoonV2SyncModeValue;
96
+ }) => HexString;
97
+ export declare const lagoonV2SetSyncModeTrx: ({ vault, syncMode, }: {
98
+ vault: Address;
99
+ syncMode: LagoonV2SyncModeValue;
100
+ }) => Unwrapable<Call>;
101
+ /**
102
+ * Encodes an `updateTotalAssetsLifespan(uint128 lifespan)` call.
103
+ * Selector: 0xae16ea8c
104
+ * Role: Owner (Admin)
105
+ *
106
+ * Sets the duration (in seconds) for which a published NAV remains valid.
107
+ * After `lifespan` seconds, `isTotalAssetsValid()` returns false and the valuation
108
+ * manager must call `updateNewTotalAssets` to publish a fresh NAV before the next
109
+ * settlement can proceed.
110
+ *
111
+ * The Valuation Manager calls `expireTotalAssets()` to invalidate early.
112
+ * The Admin calls this to adjust the lifespan window.
113
+ */
114
+ export declare const LagoonV2UpdateTotalAssetsLifespanCalldata: ({ lifespan }: {
115
+ lifespan: bigint;
116
+ }) => HexString;
117
+ export declare const lagoonV2UpdateTotalAssetsLifespanTrx: ({ vault, lifespan, }: {
118
+ vault: Address;
119
+ lifespan: bigint;
120
+ }) => Unwrapable<Call>;
121
+ /**
122
+ * Encodes an `updateGuardrails((uint256,int256) guardrails)` call.
123
+ * Selector: 0xced9a8de
124
+ * Role: Owner (Admin)
125
+ *
126
+ * Sets the guardrail bounds for `updateNewTotalAssets`. When guardrails are
127
+ * activated (via `updateActivated(true)`), any NAV update that would move
128
+ * totalAssets outside [currentTotalAssets * (1 + lowerRate/1e18),
129
+ * currentTotalAssets * (1 + upperRate/1e18)] will revert.
130
+ *
131
+ * The Security Council can bypass guardrails via `securityCouncilUpdateTotalAssets`.
132
+ *
133
+ * @param guardrails.upperRate - Max allowed NAV increase as a WAD multiplier
134
+ * (e.g. 1e17 = 10% max increase). uint256.
135
+ * @param guardrails.lowerRate - Max allowed NAV decrease as a signed WAD multiplier
136
+ * (e.g. -1e17 = 10% max decrease). int256, must be <= 0 for a decrease bound.
137
+ */
138
+ export declare const LagoonV2UpdateGuardrailsCalldata: ({ guardrails }: {
139
+ guardrails: LagoonV2Guardrails;
140
+ }) => HexString;
141
+ export declare const lagoonV2UpdateGuardrailsTrx: ({ vault, guardrails, }: {
142
+ vault: Address;
143
+ guardrails: LagoonV2Guardrails;
144
+ }) => Unwrapable<Call>;
145
+ /**
146
+ * Encodes an `updateActivated(bool activated)` call.
147
+ * Selector: 0xdc324cb2
148
+ * Role: Owner (Admin)
149
+ *
150
+ * Enables or disables the guardrails for NAV updates.
151
+ * When `activated = true`, `updateNewTotalAssets` enforces the bounds set by
152
+ * `updateGuardrails`. When `false`, guardrails are bypassed.
153
+ */
154
+ export declare const LagoonV2UpdateActivatedCalldata: ({ activated }: {
155
+ activated: boolean;
156
+ }) => HexString;
157
+ export declare const lagoonV2UpdateActivatedTrx: ({ vault, activated, }: {
158
+ vault: Address;
159
+ activated: boolean;
160
+ }) => Unwrapable<Call>;
161
+ /**
162
+ * Encodes a `securityCouncilUpdateTotalAssets(uint256 newTotalAssets)` call.
163
+ * Selector: 0xdeb337a5
164
+ * Role: Security Council
165
+ *
166
+ * Publishes a new NAV, bypassing all guardrail bounds. Only callable by the
167
+ * address set as `securityCouncil`. Use in emergencies where the normal
168
+ * `updateNewTotalAssets` path would revert due to guardrail violations (e.g.
169
+ * after a significant NAV drawdown that exceeds the `lowerRate` bound).
170
+ *
171
+ * This directly sets the vault's total assets — verify the value before calling.
172
+ */
173
+ export declare const LagoonV2SecurityCouncilUpdateTotalAssetsCalldata: ({ newTotalAssets, }: {
174
+ newTotalAssets: bigint;
175
+ }) => HexString;
176
+ export declare const lagoonV2SecurityCouncilUpdateTotalAssetsTrx: ({ vault, newTotalAssets, }: {
177
+ vault: Address;
178
+ newTotalAssets: bigint;
179
+ }) => Unwrapable<Call>;
180
+ /**
181
+ * Encodes a `setExternalSanctionsList(address sanctionsList)` call.
182
+ * Selector: 0x7de5c4f4
183
+ * Role: Owner (Admin)
184
+ *
185
+ * Sets the external sanctions oracle address (e.g. Chainalysis OFAC sanctions
186
+ * list at 0x40C57923924B5c5c5455c48D93317139ADDaC8fb). When set to a non-zero
187
+ * address, the vault will reject transfers from/to addresses that appear on the
188
+ * sanctions list. Set to `address(0)` to disable external sanctions checking.
189
+ */
190
+ export declare const LagoonV2SetExternalSanctionsListCalldata: ({ sanctionsList }: {
191
+ sanctionsList: Address;
192
+ }) => HexString;
193
+ export declare const lagoonV2SetExternalSanctionsListTrx: ({ vault, sanctionsList, }: {
194
+ vault: Address;
195
+ sanctionsList: Address;
196
+ }) => Unwrapable<Call>;
197
+ /**
198
+ * Encodes a `lockUpdateSafe()` call.
199
+ * Selector: 0x8c9881a9
200
+ * Role: Owner (Admin)
201
+ *
202
+ * WARNING: IRREVERSIBLE. Permanently locks the ability to update the Safe address
203
+ * that controls settlement. Once called, the vault's Safe cannot be changed, ever.
204
+ * Only call after confirming the Safe address is correct and the Safe is operational.
205
+ */
206
+ export declare const LagoonV2LockUpdateSafeCalldata: () => HexString;
207
+ export declare const lagoonV2LockUpdateSafeTrx: ({ vault }: {
208
+ vault: Address;
209
+ }) => Unwrapable<Call>;
210
+ /**
211
+ * Encodes a `lockSuperOperator()` call.
212
+ * Selector: 0x32c06a4e
213
+ * Role: Owner (Admin)
214
+ *
215
+ * WARNING: IRREVERSIBLE. Permanently disables the Super Operator role. Once
216
+ * called, `updateSuperOperator` will always revert and no address can ever be
217
+ * granted Super Operator privileges on this vault again.
218
+ * Only call if you intend to permanently disable super-operator batch claim functionality.
219
+ */
220
+ export declare const LagoonV2LockSuperOperatorCalldata: () => HexString;
221
+ export declare const lagoonV2LockSuperOperatorTrx: ({ vault }: {
222
+ vault: Address;
223
+ }) => Unwrapable<Call>;
224
+ /**
225
+ * Encodes a `claimSharesOnBehalf(address[] receivers)` call.
226
+ * Selector: 0xf15be6f9
227
+ * Role: Super Operator
228
+ *
229
+ * Batch-claims settled shares on behalf of depositors who have not yet called
230
+ * `claimShares` themselves. Each address in `receivers` must have a pending
231
+ * settled deposit for the current or a past epoch.
232
+ *
233
+ * Useful for onboarding flows where the operator wants to distribute shares to
234
+ * newly admitted depositors without requiring each depositor to submit a separate
235
+ * claim transaction.
236
+ */
237
+ export declare const LagoonV2ClaimSharesOnBehalfCalldata: ({ receivers }: {
238
+ receivers: Address[];
239
+ }) => HexString;
240
+ export declare const lagoonV2ClaimSharesOnBehalfTrx: ({ vault, receivers, }: {
241
+ vault: Address;
242
+ receivers: Address[];
243
+ }) => Unwrapable<Call>;
244
+ /**
245
+ * Encodes a `claimAssetsOnBehalf(address[] receivers)` call.
246
+ * Selector: 0x26d6c82f
247
+ * Role: Super Operator
248
+ *
249
+ * Batch-claims settled underlying assets on behalf of redeemers who have not yet
250
+ * called `claimAssets` themselves. Each address in `receivers` must have a pending
251
+ * settled redemption for the current or a past epoch.
252
+ *
253
+ * Symmetric to `claimSharesOnBehalf` but for the redeem path.
254
+ */
255
+ export declare const LagoonV2ClaimAssetsOnBehalfCalldata: ({ receivers }: {
256
+ receivers: Address[];
257
+ }) => HexString;
258
+ export declare const lagoonV2ClaimAssetsOnBehalfTrx: ({ vault, receivers, }: {
259
+ vault: Address;
260
+ receivers: Address[];
261
+ }) => Unwrapable<Call>;
262
+ /**
263
+ * Encodes an `updateName(string name)` call.
264
+ * Selector: 0x84da92a7
265
+ * Role: Owner (Admin)
266
+ *
267
+ * Updates the ERC20 `name()` of the vault token. Note that this only updates
268
+ * the on-chain storage value; any off-chain caches (block explorers, dApps) will
269
+ * need to refresh.
270
+ */
271
+ export declare const LagoonV2UpdateNameCalldata: ({ name }: {
272
+ name: string;
273
+ }) => HexString;
274
+ export declare const lagoonV2UpdateNameTrx: ({ vault, name }: {
275
+ vault: Address;
276
+ name: string;
277
+ }) => Unwrapable<Call>;
278
+ /**
279
+ * Encodes an `updateSymbol(string symbol)` call.
280
+ * Selector: 0x537f5312
281
+ * Role: Owner (Admin)
282
+ *
283
+ * Updates the ERC20 `symbol()` of the vault token. Same caveats as `updateName`
284
+ * regarding off-chain cache invalidation.
285
+ */
286
+ export declare const LagoonV2UpdateSymbolCalldata: ({ symbol }: {
287
+ symbol: string;
288
+ }) => HexString;
289
+ export declare const lagoonV2UpdateSymbolTrx: ({ vault, symbol }: {
290
+ vault: Address;
291
+ symbol: string;
292
+ }) => Unwrapable<Call>;
293
+ //# sourceMappingURL=lagoon.v2.setters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lagoon.v2.setters.d.ts","sourceRoot":"","sources":["../../../src/integrations/lagoonV2/lagoon.v2.setters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAc,KAAK,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AAO/E;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB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