@ercworldio/blockchain-shared 1.0.3-dev.4-PROJ-1448.4 → 1.0.3-dev.4-PROJ-1452.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.
Files changed (27) hide show
  1. package/build/contracts/Escrow.d.ts +0 -56
  2. package/build/contracts/Escrow.d.ts.map +1 -1
  3. package/build/contracts/Escrow.js +64 -68
  4. package/build/contracts/artifacts/Escrow.json +147 -19
  5. package/build/contracts/typechain-types/contracts/escrow/Escrow.d.ts +45 -10
  6. package/build/contracts/typechain-types/contracts/escrow/Escrow.d.ts.map +1 -1
  7. package/build/contracts/typechain-types/factories/contracts/escrow/EscrowAccessControl__factory.d.ts +69 -13
  8. package/build/contracts/typechain-types/factories/contracts/escrow/EscrowAccessControl__factory.d.ts.map +1 -1
  9. package/build/contracts/typechain-types/factories/contracts/escrow/EscrowAccessControl__factory.js +91 -17
  10. package/build/contracts/typechain-types/factories/contracts/escrow/EscrowErrors__factory.d.ts +69 -13
  11. package/build/contracts/typechain-types/factories/contracts/escrow/EscrowErrors__factory.d.ts.map +1 -1
  12. package/build/contracts/typechain-types/factories/contracts/escrow/EscrowErrors__factory.js +91 -17
  13. package/build/contracts/typechain-types/factories/contracts/escrow/EscrowSignature__factory.d.ts +1 -1
  14. package/build/contracts/typechain-types/factories/contracts/escrow/EscrowSignature__factory.js +1 -1
  15. package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.d.ts +114 -16
  16. package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.d.ts.map +1 -1
  17. package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.js +148 -20
  18. package/build/contracts/typechain-types/factories/contracts/lib/Events__factory.d.ts +1 -1
  19. package/build/contracts/typechain-types/factories/contracts/lib/Events__factory.js +1 -1
  20. package/build/contracts/typechain-types/factories/contracts/lib/MultisigLib__factory.d.ts +1 -1
  21. package/build/contracts/typechain-types/factories/contracts/lib/MultisigLib__factory.js +1 -1
  22. package/build/contracts/types/escrow.d.ts +4 -2
  23. package/build/contracts/types/escrow.d.ts.map +1 -1
  24. package/build/utils/custodial.d.ts +2 -1
  25. package/build/utils/custodial.d.ts.map +1 -1
  26. package/build/utils/custodial.js +1 -1
  27. package/package.json +1 -1
@@ -129,62 +129,6 @@ declare class EscrowInteraction extends Errors {
129
129
  transactionHash: string;
130
130
  fee: bigint;
131
131
  }>;
132
- admin_batch_withdraw(payloads: BatchWithdrawPayload[], token_price: number): Promise<{
133
- status: TransactionStatus;
134
- transactionHash: null;
135
- receipt: null;
136
- data: {
137
- success: number[];
138
- failed: number[];
139
- dropped: number[];
140
- cancel: number[];
141
- };
142
- fee?: undefined;
143
- feePerTx?: undefined;
144
- feePerTxDecimals?: undefined;
145
- feePerTxUsd?: undefined;
146
- feePerTxUsdDecimals?: undefined;
147
- executed_at?: undefined;
148
- error?: undefined;
149
- } | {
150
- status: TransactionStatus;
151
- transactionHash: string;
152
- fee: bigint;
153
- feePerTx: bigint;
154
- feePerTxDecimals: number;
155
- feePerTxUsd: bigint;
156
- feePerTxUsdDecimals: number;
157
- receipt: ethers.ContractTransactionReceipt;
158
- executed_at: Date;
159
- data: {
160
- success: number[];
161
- failed: number[];
162
- dropped: number[];
163
- cancel: number[];
164
- };
165
- error?: undefined;
166
- } | {
167
- status: TransactionStatus;
168
- transactionHash: null;
169
- receipt: null;
170
- executed_at: Date;
171
- error: {
172
- name: "ContractBusy" | "ContractPaused" | "InvalidSignature" | "SignatureAlreadyUsed" | "ZeroValue" | "ZeroAddress" | "RequestAlreadyFulfilled" | "EtherDirectTransferNotAllowed" | "DepositOnlyERC20" | "TokenNotAllowed" | "InsufficientBalance" | "InsufficientReserves" | "TransferError" | "NotAdmin" | "NotAuthorized" | "ExceedsLimit" | "ExceedsMax" | "UnknownError" | "InvalidNonce" | "TimelockConfigGroupNotSet" | "ConfigGroupNotSet" | "TimelockConfigNotSet" | "CommitmentNotFound" | "AlreadyCreatedTransaction" | "AccountAlreadyHasSignerRole" | "InvalidOperation" | "InvalidConfig" | "InvalidSignatures" | "AdminMultisigConfigNotSet" | "MultisigConfigNotSet" | "RequireTreasuryReceiverRole" | "InvalidMultiSig" | "RequireMultiSig" | "TimelockNotExpired" | "InsufficientExecutiveSigs" | "InsufficientManagerSigs" | "InvalidMultiSigForRequest" | "InsufficientManagerSigsForRequest" | "InsufficientExecutiveSigsForRequest";
173
- message: string;
174
- data?: any;
175
- };
176
- data: {
177
- success: number[];
178
- failed: number[];
179
- dropped: number[];
180
- cancel: number[];
181
- };
182
- fee?: undefined;
183
- feePerTx?: undefined;
184
- feePerTxDecimals?: undefined;
185
- feePerTxUsd?: undefined;
186
- feePerTxUsdDecimals?: undefined;
187
- }>;
188
132
  /**
189
133
  * Entry point for withdraw, requires signer to be set
190
134
  * @param amount Amount of tokens to withdraw in decimal format. e.g: 1.5 ETH
@@ -1 +1 @@
1
- {"version":3,"file":"Escrow.d.ts","sourceRoot":"","sources":["../../src/contracts/Escrow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAqC,MAAM,EAA2B,MAAM,QAAQ,CAAC;AAG9G,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAqB,MAAM,gBAAgB,CAAC;AACpF,OAAO,MAAM,MAAM,8BAA8B,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAiB,wBAAwB,EAAE,kBAAkB,EAAiB,MAAM,EAAa,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGhM;;;GAGG;AACH,cAAM,iBAAkB,SAAQ,MAAM;IAClC,OAAO,CAAC,MAAM,CAAuB;IAC9B,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC;IACrC,OAAO,CAAC,QAAQ,CAAyB;IACzC,OAAO,CAAC,aAAa,CAAa;gBAEf,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EA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kBAAkB,CAAC,OAAO,EAAE,wBAAwB;;;;;IA0FjE;;;;;;;;OAQG;IACU,QAAQ,CACjB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,eAAe,EAAE,MAAM,EACvB,SAAS,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;;;;;YAyCpC,aAAa;YAiCb,aAAa;IA0C3B,iBAAiB,CAAC,KAAK,EAAE,WAAW;CAkBvC;AAED,eAAe,iBAAiB,CAAC"}
@@ -237,7 +237,7 @@ class EscrowInteraction extends TransactionsErrors_1.default {
237
237
  try {
238
238
  if (!this.signer)
239
239
  throw new Error("Signer not set");
240
- const tx = yield this.escrowContract.executeWithdrawal(payload.amount, payload.requestId, payload.tokenAddress, payload.receiverAddress, payload.executeAt);
240
+ const tx = yield this.escrowContract.executeWithdrawal(payload.committedAmount, payload.netAmount, payload.requestId, payload.tokenAddress, payload.receiverAddress, payload.executeAt);
241
241
  const receipt = yield tx.wait(this.CONFIRMATIONS);
242
242
  if (!receipt)
243
243
  throw new Error(this.UnexpectedError("Failed to retrieve transaction receipt"));
@@ -253,73 +253,69 @@ class EscrowInteraction extends TransactionsErrors_1.default {
253
253
  }
254
254
  });
255
255
  }
256
- admin_batch_withdraw(payloads, token_price) {
257
- return __awaiter(this, void 0, void 0, function* () {
258
- let success = [];
259
- let failed = [];
260
- let dropped = [];
261
- let cancel = [];
262
- const executed_at = new Date();
263
- try {
264
- if (!this.signer)
265
- throw new Error("Signer not set");
266
- if (!payloads.length)
267
- return {
268
- status: escrow_1.TransactionStatus.FAILED,
269
- transactionHash: null,
270
- receipt: null,
271
- data: {
272
- success,
273
- failed,
274
- dropped,
275
- cancel
276
- }
277
- };
278
- let tx = yield this.escrowContract.batch_withdraw(payloads);
279
- let receipt = yield tx.wait(this.CONFIRMATIONS);
280
- if (!receipt)
281
- throw new Error(this.UnexpectedError("Failed to retrieve transaction receipt"));
282
- success = payloads.map(p => p.requestId);
283
- const fee_per_transaction = receipt.fee / BigInt(payloads.length);
284
- const fee_per_tx_decimals = parseFloat((0, ethers_1.formatEther)(fee_per_transaction));
285
- const fee_per_tx_usd_decimals = fee_per_tx_decimals * token_price;
286
- const fee_per_tx_usd = (0, ethers_1.parseUnits)(fee_per_tx_decimals.toFixed(5), 6);
287
- return {
288
- status: escrow_1.TransactionStatus.SUCCESS,
289
- transactionHash: tx.hash,
290
- fee: receipt.fee,
291
- feePerTx: fee_per_transaction,
292
- feePerTxDecimals: fee_per_tx_decimals,
293
- feePerTxUsd: fee_per_tx_usd,
294
- feePerTxUsdDecimals: fee_per_tx_usd_decimals,
295
- receipt,
296
- executed_at,
297
- data: {
298
- success,
299
- failed,
300
- dropped,
301
- cancel
302
- }
303
- };
304
- }
305
- catch (e) {
306
- const errorResult = this.decodeRevertError(e);
307
- return {
308
- status: escrow_1.TransactionStatus.FAILED,
309
- transactionHash: null,
310
- receipt: null,
311
- executed_at,
312
- error: Object.assign({}, errorResult),
313
- data: {
314
- success,
315
- failed,
316
- dropped,
317
- cancel
318
- }
319
- };
320
- }
321
- });
322
- }
256
+ // public async admin_batch_withdraw(payloads: BatchWithdrawPayload[], token_price: number) {
257
+ // let success: number[] = [];
258
+ // let failed: number[] = [];
259
+ // let dropped: number[] = [];
260
+ // let cancel: number[] = [];
261
+ // const executed_at = new Date();
262
+ // try {
263
+ // if (!this.signer) throw new Error("Signer not set");
264
+ // if (!payloads.length) return {
265
+ // status: TransactionStatus.FAILED,
266
+ // transactionHash: null,
267
+ // receipt: null,
268
+ // data: {
269
+ // success,
270
+ // failed,
271
+ // dropped,
272
+ // cancel
273
+ // }
274
+ // }
275
+ // let tx = await this.escrowContract.batch_withdraw(payloads);
276
+ // let receipt = await tx.wait(this.CONFIRMATIONS);
277
+ // if (!receipt) throw new Error(this.UnexpectedError("Failed to retrieve transaction receipt"));
278
+ // success = payloads.map(p => p.requestId);
279
+ // const fee_per_transaction = receipt.fee / BigInt(payloads.length);
280
+ // const fee_per_tx_decimals = parseFloat(formatEther(fee_per_transaction));
281
+ // const fee_per_tx_usd_decimals = fee_per_tx_decimals * token_price;
282
+ // const fee_per_tx_usd = parseUnits(fee_per_tx_decimals.toFixed(5), 6);
283
+ // return {
284
+ // status: TransactionStatus.SUCCESS,
285
+ // transactionHash: tx.hash,
286
+ // fee: receipt.fee,
287
+ // feePerTx: fee_per_transaction,
288
+ // feePerTxDecimals: fee_per_tx_decimals,
289
+ // feePerTxUsd: fee_per_tx_usd,
290
+ // feePerTxUsdDecimals: fee_per_tx_usd_decimals,
291
+ // receipt,
292
+ // executed_at,
293
+ // data: {
294
+ // success,
295
+ // failed,
296
+ // dropped,
297
+ // cancel
298
+ // }
299
+ // }
300
+ // } catch (e) {
301
+ // const errorResult = this.decodeRevertError(e as ErrorObject);
302
+ // return {
303
+ // status: TransactionStatus.FAILED,
304
+ // transactionHash: null,
305
+ // receipt: null,
306
+ // executed_at,
307
+ // error: {
308
+ // ...errorResult
309
+ // },
310
+ // data: {
311
+ // success,
312
+ // failed,
313
+ // dropped,
314
+ // cancel
315
+ // }
316
+ // };
317
+ // }
318
+ // }
323
319
  /**
324
320
  * Entry point for withdraw, requires signer to be set
325
321
  * @param amount Amount of tokens to withdraw in decimal format. e.g: 1.5 ETH
@@ -47,22 +47,6 @@
47
47
  "name": "AlreadyCreatedTransaction",
48
48
  "type": "error"
49
49
  },
50
- {
51
- "inputs": [
52
- {
53
- "internalType": "uint256",
54
- "name": "request_id",
55
- "type": "uint256"
56
- },
57
- {
58
- "internalType": "uint8",
59
- "name": "error_id",
60
- "type": "uint8"
61
- }
62
- ],
63
- "name": "BatchError",
64
- "type": "error"
65
- },
66
50
  {
67
51
  "inputs": [
68
52
  {
@@ -125,6 +109,27 @@
125
109
  "name": "ExceedsMaxBatch",
126
110
  "type": "error"
127
111
  },
112
+ {
113
+ "inputs": [
114
+ {
115
+ "internalType": "uint256",
116
+ "name": "requestId",
117
+ "type": "uint256"
118
+ },
119
+ {
120
+ "internalType": "uint256",
121
+ "name": "delta",
122
+ "type": "uint256"
123
+ },
124
+ {
125
+ "internalType": "uint256",
126
+ "name": "maxAllowed",
127
+ "type": "uint256"
128
+ }
129
+ ],
130
+ "name": "FeeDeltaExceedsCap",
131
+ "type": "error"
132
+ },
128
133
  {
129
134
  "inputs": [
130
135
  {
@@ -204,6 +209,27 @@
204
209
  "name": "InsufficientExecutiveSigsForRequest",
205
210
  "type": "error"
206
211
  },
212
+ {
213
+ "inputs": [
214
+ {
215
+ "internalType": "uint256",
216
+ "name": "requestId",
217
+ "type": "uint256"
218
+ },
219
+ {
220
+ "internalType": "uint256",
221
+ "name": "required",
222
+ "type": "uint256"
223
+ },
224
+ {
225
+ "internalType": "uint256",
226
+ "name": "provided",
227
+ "type": "uint256"
228
+ }
229
+ ],
230
+ "name": "InsufficientExecutiveSigsForRequest",
231
+ "type": "error"
232
+ },
207
233
  {
208
234
  "inputs": [
209
235
  {
@@ -257,6 +283,27 @@
257
283
  "name": "InsufficientManagerSigsForRequest",
258
284
  "type": "error"
259
285
  },
286
+ {
287
+ "inputs": [
288
+ {
289
+ "internalType": "uint256",
290
+ "name": "requestId",
291
+ "type": "uint256"
292
+ },
293
+ {
294
+ "internalType": "uint256",
295
+ "name": "required",
296
+ "type": "uint256"
297
+ },
298
+ {
299
+ "internalType": "uint256",
300
+ "name": "provided",
301
+ "type": "uint256"
302
+ }
303
+ ],
304
+ "name": "InsufficientManagerSigsForRequest",
305
+ "type": "error"
306
+ },
260
307
  {
261
308
  "inputs": [],
262
309
  "name": "InsufficientReserves",
@@ -310,6 +357,33 @@
310
357
  "name": "InvalidMultiSigForRequest",
311
358
  "type": "error"
312
359
  },
360
+ {
361
+ "inputs": [
362
+ {
363
+ "internalType": "uint256",
364
+ "name": "requestId",
365
+ "type": "uint256"
366
+ },
367
+ {
368
+ "internalType": "uint256",
369
+ "name": "sig_idx",
370
+ "type": "uint256"
371
+ }
372
+ ],
373
+ "name": "InvalidMultiSigForRequest",
374
+ "type": "error"
375
+ },
376
+ {
377
+ "inputs": [
378
+ {
379
+ "internalType": "uint256",
380
+ "name": "request_id",
381
+ "type": "uint256"
382
+ }
383
+ ],
384
+ "name": "InvalidNegativeFee",
385
+ "type": "error"
386
+ },
313
387
  {
314
388
  "inputs": [
315
389
  {
@@ -1385,7 +1459,12 @@
1385
1459
  "components": [
1386
1460
  {
1387
1461
  "internalType": "uint256",
1388
- "name": "amount",
1462
+ "name": "committedAmount",
1463
+ "type": "uint256"
1464
+ },
1465
+ {
1466
+ "internalType": "uint256",
1467
+ "name": "netAmount",
1389
1468
  "type": "uint256"
1390
1469
  },
1391
1470
  {
@@ -1461,7 +1540,12 @@
1461
1540
  "components": [
1462
1541
  {
1463
1542
  "internalType": "uint256",
1464
- "name": "amount",
1543
+ "name": "committedAmount",
1544
+ "type": "uint256"
1545
+ },
1546
+ {
1547
+ "internalType": "uint256",
1548
+ "name": "netAmount",
1465
1549
  "type": "uint256"
1466
1550
  },
1467
1551
  {
@@ -1690,7 +1774,12 @@
1690
1774
  "inputs": [
1691
1775
  {
1692
1776
  "internalType": "uint256",
1693
- "name": "amount",
1777
+ "name": "committedAmount",
1778
+ "type": "uint256"
1779
+ },
1780
+ {
1781
+ "internalType": "uint256",
1782
+ "name": "netAmount",
1694
1783
  "type": "uint256"
1695
1784
  },
1696
1785
  {
@@ -2334,6 +2423,19 @@
2334
2423
  "stateMutability": "view",
2335
2424
  "type": "function"
2336
2425
  },
2426
+ {
2427
+ "inputs": [],
2428
+ "name": "maxFeeDelta",
2429
+ "outputs": [
2430
+ {
2431
+ "internalType": "uint256",
2432
+ "name": "",
2433
+ "type": "uint256"
2434
+ }
2435
+ ],
2436
+ "stateMutability": "view",
2437
+ "type": "function"
2438
+ },
2337
2439
  {
2338
2440
  "inputs": [
2339
2441
  {
@@ -2549,6 +2651,32 @@
2549
2651
  "stateMutability": "nonpayable",
2550
2652
  "type": "function"
2551
2653
  },
2654
+ {
2655
+ "inputs": [
2656
+ {
2657
+ "internalType": "uint256",
2658
+ "name": "amount",
2659
+ "type": "uint256"
2660
+ }
2661
+ ],
2662
+ "name": "setMaxFeeDelta",
2663
+ "outputs": [],
2664
+ "stateMutability": "nonpayable",
2665
+ "type": "function"
2666
+ },
2667
+ {
2668
+ "inputs": [
2669
+ {
2670
+ "internalType": "uint256",
2671
+ "name": "amount",
2672
+ "type": "uint256"
2673
+ }
2674
+ ],
2675
+ "name": "setMaxFundWalletAmount",
2676
+ "outputs": [],
2677
+ "stateMutability": "nonpayable",
2678
+ "type": "function"
2679
+ },
2552
2680
  {
2553
2681
  "inputs": [
2554
2682
  {
@@ -35,20 +35,23 @@ export declare namespace Types {
35
35
  s: string;
36
36
  };
37
37
  type ExecuteWithdrawalPayloadStruct = {
38
- amount: BigNumberish;
38
+ committedAmount: BigNumberish;
39
+ netAmount: BigNumberish;
39
40
  requestId: BigNumberish;
40
41
  tokenAddress: AddressLike;
41
42
  receiverAddress: AddressLike;
42
43
  executeAt: BigNumberish;
43
44
  };
44
45
  type ExecuteWithdrawalPayloadStructOutput = [
45
- amount: bigint,
46
+ committedAmount: bigint,
47
+ netAmount: bigint,
46
48
  requestId: bigint,
47
49
  tokenAddress: string,
48
50
  receiverAddress: string,
49
51
  executeAt: bigint
50
52
  ] & {
51
- amount: bigint;
53
+ committedAmount: bigint;
54
+ netAmount: bigint;
52
55
  requestId: bigint;
53
56
  tokenAddress: string;
54
57
  receiverAddress: string;
@@ -63,20 +66,23 @@ export declare namespace Types {
63
66
  token: string;
64
67
  };
65
68
  type BatchWithdrawWithTimelockStruct = {
66
- amount: BigNumberish;
69
+ committedAmount: BigNumberish;
70
+ netAmount: BigNumberish;
67
71
  requestId: BigNumberish;
68
72
  tokenAddress: AddressLike;
69
73
  receiverAddress: AddressLike;
70
74
  signatures: Types.SignatureStruct[];
71
75
  };
72
76
  type BatchWithdrawWithTimelockStructOutput = [
73
- amount: bigint,
77
+ committedAmount: bigint,
78
+ netAmount: bigint,
74
79
  requestId: bigint,
75
80
  tokenAddress: string,
76
81
  receiverAddress: string,
77
82
  signatures: Types.SignatureStructOutput[]
78
83
  ] & {
79
- amount: bigint;
84
+ committedAmount: bigint;
85
+ netAmount: bigint;
80
86
  requestId: bigint;
81
87
  tokenAddress: string;
82
88
  receiverAddress: string;
@@ -258,7 +264,7 @@ export declare namespace Types {
258
264
  };
259
265
  }
260
266
  export interface EscrowInterface extends Interface {
261
- getFunction(nameOrSignature: "ADMIN_TREASURY_EXECUTIVE_ROLE" | "ADMIN_TREASURY_MANAGER_ROLE" | "CONFIG_EXECUTIVE_ROLE" | "CONFIG_MANAGER_ROLE" | "DEFAULT_ADMIN_ROLE" | "DOMAIN_SEPARATOR" | "FUNDS_MANAGER_ROLE" | "OPERATOR_ROLE" | "TIMELOCK_CONFIG_EXECUTIVE_ROLE" | "TIMELOCK_CONFIG_MANAGER_ROLE" | "TIMELOCK_DELAY" | "TREASURY_DISPATCH_ROLE" | "TREASURY_EXECUTIVE_ROLE" | "TREASURY_MANAGER_ROLE" | "TREASURY_RECEIVER_ROLE" | "__AccessControl_init" | "__Signature_init" | "__TokensWhitelist_init" | "addTokens" | "adminTokenThresholdSettings" | "adminWithdraw" | "batchExecuteWithdrawal" | "batchSweepERC20" | "batchWithdrawWithTimelock" | "batch_withdraw" | "cancelWithdrawal" | "configNonce" | "configThresholdSettings" | "deposit" | "depositErc20" | "executeWithdrawal" | "fundWallets" | "getAdminMultisigConfig" | "getBalance()" | "getBalance(address)" | "getDepositSigner" | "getGroupConfig" | "getNonce" | "getRequestStatus" | "getReservesCoverage" | "getRoleAdmin" | "getTokenMultisigConfig" | "getWithdrawalSigner" | "get_admin_used_ids" | "get_used_ids" | "grantRole" | "hasRole" | "initialize" | "isFundsManager" | "isPaused" | "isWhitelisted" | "nonces" | "pause" | "receiverTimelockConfig" | "removeTokens" | "renounceRole" | "reset_admin_request_ids" | "reset_request_ids" | "revokeRole" | "setAdminTokenMultisigThreshold" | "setGroupConfig" | "setTimelock" | "setTimelockGranular" | "setTokenMultisigThreshold" | "signerBitmap" | "supportsInterface" | "sweepFunds" | "timelockCommitments" | "timelockConfig" | "timelockConfigNonce" | "timelockThresholdSettings" | "tokenThresholdSettings" | "unpackAdminThresholds" | "unpackTokenThresholds" | "unpause" | "whitelist" | "withdraw" | "withdrawWithTimelock"): FunctionFragment;
267
+ getFunction(nameOrSignature: "ADMIN_TREASURY_EXECUTIVE_ROLE" | "ADMIN_TREASURY_MANAGER_ROLE" | "CONFIG_EXECUTIVE_ROLE" | "CONFIG_MANAGER_ROLE" | "DEFAULT_ADMIN_ROLE" | "DOMAIN_SEPARATOR" | "FUNDS_MANAGER_ROLE" | "OPERATOR_ROLE" | "TIMELOCK_CONFIG_EXECUTIVE_ROLE" | "TIMELOCK_CONFIG_MANAGER_ROLE" | "TIMELOCK_DELAY" | "TREASURY_DISPATCH_ROLE" | "TREASURY_EXECUTIVE_ROLE" | "TREASURY_MANAGER_ROLE" | "TREASURY_RECEIVER_ROLE" | "__AccessControl_init" | "__Signature_init" | "__TokensWhitelist_init" | "addTokens" | "adminTokenThresholdSettings" | "adminWithdraw" | "batchExecuteWithdrawal" | "batchSweepERC20" | "batchWithdrawWithTimelock" | "batch_withdraw" | "cancelWithdrawal" | "configNonce" | "configThresholdSettings" | "deposit" | "depositErc20" | "executeWithdrawal" | "fundWallets" | "getAdminMultisigConfig" | "getBalance()" | "getBalance(address)" | "getDepositSigner" | "getGroupConfig" | "getNonce" | "getRequestStatus" | "getReservesCoverage" | "getRoleAdmin" | "getTokenMultisigConfig" | "getWithdrawalSigner" | "get_admin_used_ids" | "get_used_ids" | "grantRole" | "hasRole" | "initialize" | "isFundsManager" | "isPaused" | "isWhitelisted" | "maxFeeDelta" | "nonces" | "pause" | "receiverTimelockConfig" | "removeTokens" | "renounceRole" | "reset_admin_request_ids" | "reset_request_ids" | "revokeRole" | "setAdminTokenMultisigThreshold" | "setGroupConfig" | "setMaxFeeDelta" | "setMaxFundWalletAmount" | "setTimelock" | "setTimelockGranular" | "setTokenMultisigThreshold" | "signerBitmap" | "supportsInterface" | "sweepFunds" | "timelockCommitments" | "timelockConfig" | "timelockConfigNonce" | "timelockThresholdSettings" | "tokenThresholdSettings" | "unpackAdminThresholds" | "unpackTokenThresholds" | "unpause" | "whitelist" | "withdraw" | "withdrawWithTimelock"): FunctionFragment;
262
268
  getEvent(nameOrSignatureOrTopic: "AdminWithdraw" | "ConfigureAdminMultisig" | "ConfigureTokenMultisig" | "Deposit" | "FundWallets" | "FundedContract" | "Initialized" | "LowReserves" | "RoleAdminChanged" | "RoleGranted" | "RoleRevoked" | "SetTimelockGranular" | "SetTokenTimelock" | "SweepTokens" | "TokenAdded" | "TokenRemoved" | "Withdrawal" | "WithdrawalCancelled" | "WithdrawalExecuted" | "WithdrawalScheduled"): EventFragment;
263
269
  encodeFunctionData(functionFragment: "ADMIN_TREASURY_EXECUTIVE_ROLE", values?: undefined): string;
264
270
  encodeFunctionData(functionFragment: "ADMIN_TREASURY_MANAGER_ROLE", values?: undefined): string;
@@ -296,7 +302,14 @@ export interface EscrowInterface extends Interface {
296
302
  encodeFunctionData(functionFragment: "configThresholdSettings", values?: undefined): string;
297
303
  encodeFunctionData(functionFragment: "deposit", values: [string, Types.SignatureStruct]): string;
298
304
  encodeFunctionData(functionFragment: "depositErc20", values: [BigNumberish, AddressLike, string, Types.SignatureStruct]): string;
299
- encodeFunctionData(functionFragment: "executeWithdrawal", values: [BigNumberish, BigNumberish, AddressLike, AddressLike, BigNumberish]): string;
305
+ encodeFunctionData(functionFragment: "executeWithdrawal", values: [
306
+ BigNumberish,
307
+ BigNumberish,
308
+ BigNumberish,
309
+ AddressLike,
310
+ AddressLike,
311
+ BigNumberish
312
+ ]): string;
300
313
  encodeFunctionData(functionFragment: "fundWallets", values: [AddressLike[], BigNumberish]): string;
301
314
  encodeFunctionData(functionFragment: "getAdminMultisigConfig", values?: undefined): string;
302
315
  encodeFunctionData(functionFragment: "getBalance()", values?: undefined): string;
@@ -337,6 +350,7 @@ export interface EscrowInterface extends Interface {
337
350
  encodeFunctionData(functionFragment: "isFundsManager", values: [AddressLike]): string;
338
351
  encodeFunctionData(functionFragment: "isPaused", values?: undefined): string;
339
352
  encodeFunctionData(functionFragment: "isWhitelisted", values: [AddressLike]): string;
353
+ encodeFunctionData(functionFragment: "maxFeeDelta", values?: undefined): string;
340
354
  encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string;
341
355
  encodeFunctionData(functionFragment: "pause", values?: undefined): string;
342
356
  encodeFunctionData(functionFragment: "receiverTimelockConfig", values: [AddressLike]): string;
@@ -350,6 +364,8 @@ export interface EscrowInterface extends Interface {
350
364
  Types.SignatureStruct[]
351
365
  ]): string;
352
366
  encodeFunctionData(functionFragment: "setGroupConfig", values: [BigNumberish, BigNumberish, BigNumberish]): string;
367
+ encodeFunctionData(functionFragment: "setMaxFeeDelta", values: [BigNumberish]): string;
368
+ encodeFunctionData(functionFragment: "setMaxFundWalletAmount", values: [BigNumberish]): string;
353
369
  encodeFunctionData(functionFragment: "setTimelock", values: [Types.SetTimelockConfigSignDataStruct, Types.SignatureStruct[]]): string;
354
370
  encodeFunctionData(functionFragment: "setTimelockGranular", values: [
355
371
  Types.SetReceiverTimelockConfigSignDataStruct,
@@ -434,6 +450,7 @@ export interface EscrowInterface extends Interface {
434
450
  decodeFunctionResult(functionFragment: "isFundsManager", data: BytesLike): Result;
435
451
  decodeFunctionResult(functionFragment: "isPaused", data: BytesLike): Result;
436
452
  decodeFunctionResult(functionFragment: "isWhitelisted", data: BytesLike): Result;
453
+ decodeFunctionResult(functionFragment: "maxFeeDelta", data: BytesLike): Result;
437
454
  decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result;
438
455
  decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result;
439
456
  decodeFunctionResult(functionFragment: "receiverTimelockConfig", data: BytesLike): Result;
@@ -444,6 +461,8 @@ export interface EscrowInterface extends Interface {
444
461
  decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result;
445
462
  decodeFunctionResult(functionFragment: "setAdminTokenMultisigThreshold", data: BytesLike): Result;
446
463
  decodeFunctionResult(functionFragment: "setGroupConfig", data: BytesLike): Result;
464
+ decodeFunctionResult(functionFragment: "setMaxFeeDelta", data: BytesLike): Result;
465
+ decodeFunctionResult(functionFragment: "setMaxFundWalletAmount", data: BytesLike): Result;
447
466
  decodeFunctionResult(functionFragment: "setTimelock", data: BytesLike): Result;
448
467
  decodeFunctionResult(functionFragment: "setTimelockGranular", data: BytesLike): Result;
449
468
  decodeFunctionResult(functionFragment: "setTokenMultisigThreshold", data: BytesLike): Result;
@@ -958,7 +977,8 @@ export interface Escrow extends BaseContract {
958
977
  void
959
978
  ], "nonpayable">;
960
979
  executeWithdrawal: TypedContractMethod<[
961
- amount: BigNumberish,
980
+ committedAmount: BigNumberish,
981
+ netAmount: BigNumberish,
962
982
  requestId: BigNumberish,
963
983
  tokenAddress: AddressLike,
964
984
  receiverAddress: AddressLike,
@@ -1060,6 +1080,7 @@ export interface Escrow extends BaseContract {
1060
1080
  isFundsManager: TypedContractMethod<[caller: AddressLike], [boolean], "view">;
1061
1081
  isPaused: TypedContractMethod<[], [boolean], "view">;
1062
1082
  isWhitelisted: TypedContractMethod<[_token: AddressLike], [boolean], "view">;
1083
+ maxFeeDelta: TypedContractMethod<[], [bigint], "view">;
1063
1084
  nonces: TypedContractMethod<[_owner: AddressLike], [bigint], "view">;
1064
1085
  pause: TypedContractMethod<[], [void], "nonpayable">;
1065
1086
  receiverTimelockConfig: TypedContractMethod<[
@@ -1112,6 +1133,16 @@ export interface Escrow extends BaseContract {
1112
1133
  ], [
1113
1134
  void
1114
1135
  ], "nonpayable">;
1136
+ setMaxFeeDelta: TypedContractMethod<[
1137
+ amount: BigNumberish
1138
+ ], [
1139
+ void
1140
+ ], "nonpayable">;
1141
+ setMaxFundWalletAmount: TypedContractMethod<[
1142
+ amount: BigNumberish
1143
+ ], [
1144
+ void
1145
+ ], "nonpayable">;
1115
1146
  setTimelock: TypedContractMethod<[
1116
1147
  configData: Types.SetTimelockConfigSignDataStruct,
1117
1148
  signatures: Types.SignatureStruct[]
@@ -1292,7 +1323,8 @@ export interface Escrow extends BaseContract {
1292
1323
  void
1293
1324
  ], "nonpayable">;
1294
1325
  getFunction(nameOrSignature: "executeWithdrawal"): TypedContractMethod<[
1295
- amount: BigNumberish,
1326
+ committedAmount: BigNumberish,
1327
+ netAmount: BigNumberish,
1296
1328
  requestId: BigNumberish,
1297
1329
  tokenAddress: AddressLike,
1298
1330
  receiverAddress: AddressLike,
@@ -1379,6 +1411,7 @@ export interface Escrow extends BaseContract {
1379
1411
  getFunction(nameOrSignature: "isFundsManager"): TypedContractMethod<[caller: AddressLike], [boolean], "view">;
1380
1412
  getFunction(nameOrSignature: "isPaused"): TypedContractMethod<[], [boolean], "view">;
1381
1413
  getFunction(nameOrSignature: "isWhitelisted"): TypedContractMethod<[_token: AddressLike], [boolean], "view">;
1414
+ getFunction(nameOrSignature: "maxFeeDelta"): TypedContractMethod<[], [bigint], "view">;
1382
1415
  getFunction(nameOrSignature: "nonces"): TypedContractMethod<[_owner: AddressLike], [bigint], "view">;
1383
1416
  getFunction(nameOrSignature: "pause"): TypedContractMethod<[], [void], "nonpayable">;
1384
1417
  getFunction(nameOrSignature: "receiverTimelockConfig"): TypedContractMethod<[
@@ -1427,6 +1460,8 @@ export interface Escrow extends BaseContract {
1427
1460
  ], [
1428
1461
  void
1429
1462
  ], "nonpayable">;
1463
+ getFunction(nameOrSignature: "setMaxFeeDelta"): TypedContractMethod<[amount: BigNumberish], [void], "nonpayable">;
1464
+ getFunction(nameOrSignature: "setMaxFundWalletAmount"): TypedContractMethod<[amount: BigNumberish], [void], "nonpayable">;
1430
1465
  getFunction(nameOrSignature: "setTimelock"): TypedContractMethod<[
1431
1466
  configData: Types.SetTimelockConfigSignDataStruct,
1432
1467
  signatures: Types.SignatureStruct[]