@ercworldio/blockchain-shared 1.0.3-dev.6 → 1.0.5-dev.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 (99) hide show
  1. package/build/chains/Provider.js +1 -1
  2. package/build/chains/networks_dev.json +17 -17
  3. package/build/chains/networks_prod-dz.json +0 -35
  4. package/build/chains/networks_prod-sh.json +40 -4
  5. package/build/chains/networks_prod-yb.json +40 -4
  6. package/build/contracts/Escrow.d.ts +16 -6
  7. package/build/contracts/Escrow.d.ts.map +1 -1
  8. package/build/contracts/Escrow.js +112 -4
  9. package/build/contracts/EscrowErrors.d.ts +110 -1
  10. package/build/contracts/EscrowErrors.d.ts.map +1 -1
  11. package/build/contracts/EscrowErrors.js +71 -14
  12. package/build/contracts/artifacts/Escrow.json +244 -14
  13. package/build/contracts/contract-events/AccessControlEvents.d.ts +12 -2
  14. package/build/contracts/contract-events/AccessControlEvents.d.ts.map +1 -1
  15. package/build/contracts/contract-events/AccessControlEvents.js +29 -5
  16. package/build/contracts/contract-events/EscrowEvents.d.ts +134 -2
  17. package/build/contracts/contract-events/EscrowEvents.d.ts.map +1 -1
  18. package/build/contracts/contract-events/EscrowEvents.js +67 -17
  19. package/build/contracts/contract-events/types/events.d.ts +35 -1
  20. package/build/contracts/contract-events/types/events.d.ts.map +1 -1
  21. package/build/contracts/typechain-types/contracts/escrow/Escrow.d.ts +76 -15
  22. package/build/contracts/typechain-types/contracts/escrow/Escrow.d.ts.map +1 -1
  23. package/build/contracts/typechain-types/contracts/lib/Events.d.ts +2 -8
  24. package/build/contracts/typechain-types/contracts/lib/Events.d.ts.map +1 -1
  25. package/build/contracts/typechain-types/factories/contracts/escrow/EscrowAccessControl__factory.d.ts +69 -1
  26. package/build/contracts/typechain-types/factories/contracts/escrow/EscrowAccessControl__factory.d.ts.map +1 -1
  27. package/build/contracts/typechain-types/factories/contracts/escrow/EscrowAccessControl__factory.js +91 -1
  28. package/build/contracts/typechain-types/factories/contracts/escrow/EscrowErrors__factory.d.ts +69 -1
  29. package/build/contracts/typechain-types/factories/contracts/escrow/EscrowErrors__factory.d.ts.map +1 -1
  30. package/build/contracts/typechain-types/factories/contracts/escrow/EscrowErrors__factory.js +91 -1
  31. package/build/contracts/typechain-types/factories/contracts/escrow/EscrowSignature__factory.d.ts +1 -1
  32. package/build/contracts/typechain-types/factories/contracts/escrow/EscrowSignature__factory.js +1 -1
  33. package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.d.ts +188 -13
  34. package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.d.ts.map +1 -1
  35. package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.js +245 -15
  36. package/build/contracts/typechain-types/factories/contracts/lib/Events__factory.d.ts +1 -11
  37. package/build/contracts/typechain-types/factories/contracts/lib/Events__factory.d.ts.map +1 -1
  38. package/build/contracts/typechain-types/factories/contracts/lib/Events__factory.js +1 -13
  39. package/build/contracts/typechain-types/factories/contracts/lib/MultisigLib__factory.d.ts +45 -1
  40. package/build/contracts/typechain-types/factories/contracts/lib/MultisigLib__factory.d.ts.map +1 -1
  41. package/build/contracts/typechain-types/factories/contracts/lib/MultisigLib__factory.js +59 -1
  42. package/build/contracts/types/escrow.d.ts +16 -2
  43. package/build/contracts/types/escrow.d.ts.map +1 -1
  44. package/build/contracts/types/escrow.js +4 -0
  45. package/build/entities/AdminOperationThresholds.d.ts +0 -1
  46. package/build/entities/AdminOperationThresholds.d.ts.map +1 -1
  47. package/build/entities/AdminOperationThresholds.js +1 -5
  48. package/build/entities/ClaimJob.d.ts +1 -0
  49. package/build/entities/ClaimJob.d.ts.map +1 -1
  50. package/build/entities/ClaimJob.js +4 -0
  51. package/build/entities/EscrowRoles.js +1 -1
  52. package/build/entities/GlobalTimelock.d.ts +0 -1
  53. package/build/entities/GlobalTimelock.d.ts.map +1 -1
  54. package/build/entities/GlobalTimelock.js +1 -5
  55. package/build/entities/RoleHash.js +1 -1
  56. package/build/entities/TokenExecutionThresholds.d.ts +0 -1
  57. package/build/entities/TokenExecutionThresholds.d.ts.map +1 -1
  58. package/build/entities/TokenExecutionThresholds.js +1 -5
  59. package/build/errors/errors.d.ts +33 -0
  60. package/build/errors/errors.d.ts.map +1 -1
  61. package/build/errors/errors.js +70 -2
  62. package/build/index.d.ts +6 -9
  63. package/build/index.d.ts.map +1 -1
  64. package/build/index.js +22 -11
  65. package/build/interfaces.d.ts +2 -2
  66. package/build/interfaces.d.ts.map +1 -1
  67. package/build/services/AlchemyService.d.ts +2 -1
  68. package/build/services/AlchemyService.d.ts.map +1 -1
  69. package/build/services/AlchemyService.js +8 -2
  70. package/build/services/AlchemyWebhooks.d.ts.map +1 -1
  71. package/build/services/AlchemyWebhooks.js +34 -29
  72. package/build/services/AzureEventHubHandler.d.ts.map +1 -1
  73. package/build/services/AzureEventHubHandler.js +17 -5
  74. package/build/services/ClaimJobService.d.ts +6 -2
  75. package/build/services/ClaimJobService.d.ts.map +1 -1
  76. package/build/services/ClaimJobService.js +155 -24
  77. package/build/services/db/roles/ContractRoles.d.ts +2 -2
  78. package/build/services/db/roles/ContractRoles.d.ts.map +1 -1
  79. package/build/services/db/roles/ContractRoles.js +18 -12
  80. package/build/services/types/azure_event_hub_handler.d.ts +9 -1
  81. package/build/services/types/azure_event_hub_handler.d.ts.map +1 -1
  82. package/build/services/types/azure_event_hub_handler.js +8 -0
  83. package/build/services/types/claim.d.ts +17 -1
  84. package/build/services/types/claim.d.ts.map +1 -1
  85. package/build/services/types/claim_job_service.d.ts +9 -1
  86. package/build/services/types/claim_job_service.d.ts.map +1 -1
  87. package/build/services/types/index.d.ts +1 -0
  88. package/build/services/types/index.d.ts.map +1 -1
  89. package/build/services/types/index.js +1 -0
  90. package/build/services/utils/alchemy.d.ts.map +1 -1
  91. package/build/services/utils/alchemy.js +6 -1
  92. package/build/utils/AsyncTTLCache.d.ts +2 -0
  93. package/build/utils/AsyncTTLCache.d.ts.map +1 -1
  94. package/build/utils/AsyncTTLCache.js +10 -2
  95. package/build/utils/custodial.d.ts +9 -0
  96. package/build/utils/custodial.d.ts.map +1 -1
  97. package/build/utils/custodial.js +32 -4
  98. package/build/utils/solana.js +1 -1
  99. package/package.json +6 -3
@@ -59,7 +59,116 @@ export interface NotAuthorizedError {
59
59
  name: "NotAuthorized";
60
60
  args: [];
61
61
  }
62
- type ErrorName = "NotAuthorized" | "NotAdmin" | "TransferError" | "InsufficientReserves" | "InsufficientBalance" | "TokenNotAllowed" | "DepositOnlyERC20" | "EtherDirectTransferNotAllowed" | "RequestAlreadyFulfilled" | "ZeroAddress" | "ZeroValue" | "SignatureAlreadyUsed" | "InvalidSignature" | "ContractPaused" | "ContractBusy" | "UnknownError";
62
+ export interface ExceedsLimitError {
63
+ name: "ExceedsLimit";
64
+ args: [];
65
+ }
66
+ export interface ExceedsMaxError {
67
+ name: "ExceedsMax";
68
+ args: [];
69
+ }
70
+ export interface UnknownError {
71
+ name: "UnknownError";
72
+ args: [];
73
+ }
74
+ export interface InvalidNonceError {
75
+ name: "InvalidNonce";
76
+ args: [];
77
+ }
78
+ export interface TimelockConfigGroupNotSetError {
79
+ name: "TimelockConfigGroupNotSet";
80
+ args: [];
81
+ }
82
+ export interface ConfigGroupNotSetError {
83
+ name: "ConfigGroupNotSet";
84
+ args: [];
85
+ }
86
+ export interface TimelockConfigNotSetError {
87
+ name: "TimelockConfigNotSet";
88
+ args: [];
89
+ }
90
+ export interface CommitmentNotFoundError {
91
+ name: "CommitmentNotFound";
92
+ args: [string];
93
+ }
94
+ export interface AlreadyCreatedTransactionError {
95
+ name: "AlreadyCreatedTransaction";
96
+ args: [number];
97
+ }
98
+ export interface AccountAlreadyHasSignerRoleError {
99
+ name: "AccountAlreadyHasSignerRole";
100
+ args: [string];
101
+ }
102
+ export interface InvalidOperationError {
103
+ name: "InvalidOperation";
104
+ args: [];
105
+ }
106
+ export interface InvalidConfigError {
107
+ name: "InvalidConfig";
108
+ args: [];
109
+ }
110
+ export interface InvalidSignaturesError {
111
+ name: "InvalidSignatures";
112
+ args: [];
113
+ }
114
+ export interface AdminMultisigConfigNotSetError {
115
+ name: "AdminMultisigConfigNotSet";
116
+ args: [];
117
+ }
118
+ export interface MultisigConfigNotSetError {
119
+ name: "MultisigConfigNotSet";
120
+ args: [];
121
+ }
122
+ export interface RequireTreasuryReceiverRoleError {
123
+ name: "RequireTreasuryReceiverRole";
124
+ args: [];
125
+ }
126
+ export interface InvalidMultiSigError {
127
+ name: "InvalidMultiSig";
128
+ args: [];
129
+ }
130
+ export interface RequireMultiSigError {
131
+ name: "RequireMultiSig";
132
+ args: [];
133
+ }
134
+ export interface TimelockNotExpiredError {
135
+ name: "TimelockNotExpired";
136
+ args: [number];
137
+ }
138
+ export interface InsufficientExecutiveSigsError {
139
+ name: "InsufficientExecutiveSigs";
140
+ args: [number, number];
141
+ }
142
+ export interface InsufficientManagerSigsError {
143
+ name: "InsufficientManagerSigs";
144
+ args: [number, number];
145
+ }
146
+ export interface InvalidMultiSigForRequest {
147
+ name: "InvalidMultiSigForRequest";
148
+ args: [number, number];
149
+ }
150
+ export interface InsufficientManagerSigsForRequest {
151
+ name: "InsufficientManagerSigsForRequest";
152
+ args: [number, number, number];
153
+ }
154
+ export interface InsufficientExecutiveSigsForRequest {
155
+ name: "InsufficientExecutiveSigsForRequest";
156
+ args: [number, number, number];
157
+ }
158
+ export interface InsufficientSigsForRequestErrorData {
159
+ requestId: number;
160
+ required: number;
161
+ provided: number;
162
+ }
163
+ export interface InsufficientSigsErrorData {
164
+ required: number;
165
+ provided: number;
166
+ }
167
+ export interface InvalidMultisigForRequestErrorData {
168
+ requestId: number;
169
+ sigIndex: number;
170
+ }
171
+ type ErrorName = "NotAuthorized" | "NotAdmin" | "TransferError" | "InsufficientReserves" | "InsufficientBalance" | "TokenNotAllowed" | "DepositOnlyERC20" | "EtherDirectTransferNotAllowed" | "RequestAlreadyFulfilled" | "ZeroAddress" | "ZeroValue" | "SignatureAlreadyUsed" | "InvalidSignature" | "ContractPaused" | "ContractBusy" | "ExceedsLimit" | "ExceedsMax" | "UnknownError" | "InvalidNonce" | "TimelockConfigGroupNotSet" | "ConfigGroupNotSet" | "TimelockConfigNotSet" | "CommitmentNotFound" | "AlreadyCreatedTransaction" | "AccountAlreadyHasSignerRole" | "InvalidOperation" | "InvalidConfig" | "InvalidSignatures" | "AdminMultisigConfigNotSet" | "MultisigConfigNotSet" | "RequireTreasuryReceiverRole" | "InvalidMultiSig" | "RequireMultiSig" | "TimelockNotExpired" | "InsufficientExecutiveSigs" | "InsufficientManagerSigs" | "InvalidMultiSigForRequest" | "InsufficientManagerSigsForRequest" | "InsufficientExecutiveSigsForRequest";
63
172
  export interface EscrowErrorMessage {
64
173
  name: ErrorName;
65
174
  message: string;
@@ -1 +1 @@
1
- {"version":3,"file":"EscrowErrors.d.ts","sourceRoot":"","sources":["../../src/contracts/EscrowErrors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,gBAAgB,CAAC;IACvB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,qBAAqB;IAClC,IAAI,EAAE,kBAAkB,CAAC;IACzB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,yBAAyB;IACtC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,4BAA4B;IACzC,IAAI,EAAE,yBAAyB,C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AAmB,GACnB,2BAA2B,GAC3B,sBAAsB,GACtB,6BAA6B,GAC7B,iBAAiB,GACjB,iBAAiB,GACjB,oBAAoB,GACpB,2BAA2B,GAC3B,yBAAyB,GACzB,2BAA2B,GAC3B,mCAAmC,GACnC,qCAAqC,CAAA;AAE3C,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,GAAG,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,iBAAiB,GAAI,cAAc,gBAAgB,KAAG,kBAmGlE,CAAC"}
@@ -6,23 +6,25 @@ const parseDecodedError = (decodedError) => {
6
6
  case "ContractPaused":
7
7
  return { name: decodedError.name, message: `Contract is currently paused by the administrators.` };
8
8
  case "ContractBusy":
9
- return { name: decodedError.name, message: `Contract is busy with another tranasction.` };
10
- case "ContractBusy":
11
- return { name: decodedError.name, message: `Contract is busy with another tranasction.` };
9
+ return { name: decodedError.name, message: `Contract is busy with another transaction.` };
12
10
  case "DepositOnlyERC20":
13
- return { name: decodedError.name, message: `Only ERC20 tokend deposits are allowed.` };
11
+ return { name: decodedError.name, message: `Only ERC20 token deposits are allowed.` };
14
12
  case "EtherDirectTransferNotAllowed":
15
- return {
16
- name: decodedError.name,
17
- message: `Direct transfer of native token to the contract is not allowed. Please use the deposit methods instead.`
18
- };
13
+ return { name: decodedError.name, message: `Direct transfer of native token to the contract is not allowed. Please use the deposit methods instead.` };
19
14
  case "InvalidSignature":
20
15
  return { name: decodedError.name, message: `Transaction signature does not match.` };
16
+ case "InvalidSignatures":
17
+ return { name: decodedError.name, message: `One or more signatures are invalid.` };
21
18
  case "InsufficientReserves":
22
19
  return { name: decodedError.name, message: `Contract token balance is low.` };
23
- // case "InsufficientBalance":
24
- // const [holder, token, available, requested] = decodedError.args;
25
- // return { name: decodedError.name, message: `Balance of ${holder} of token: ${token} is low. Requested ${requested}, but has ${available}. ` }
20
+ case "InsufficientExecutiveSigs": {
21
+ const [required, provided] = decodedError.args;
22
+ return { name: decodedError.name, data: { required, provided }, message: `Insufficient executive signatures. Required: ${required}, provided: ${provided}.` };
23
+ }
24
+ case "InsufficientManagerSigs": {
25
+ const [required, provided] = decodedError.args;
26
+ return { name: decodedError.name, data: { required, provided }, message: `Insufficient manager signatures. Required: ${required}, provided: ${provided}.` };
27
+ }
26
28
  case "NotAuthorized":
27
29
  return { name: decodedError.name, message: `User is not authorized for this action.` };
28
30
  case "NotAdmin":
@@ -33,15 +35,70 @@ const parseDecodedError = (decodedError) => {
33
35
  return { name: decodedError.name, message: `Token transfer failed.` };
34
36
  case "SignatureAlreadyUsed":
35
37
  return { name: decodedError.name, message: `Transaction cannot be repeated.` };
36
- case "TokenNotAllowed":
38
+ case "TokenNotAllowed": {
37
39
  const [tokenAddress] = decodedError.args;
38
40
  return { name: decodedError.name, message: `Transfer of token ${tokenAddress} is not allowed.` };
41
+ }
39
42
  case "ZeroAddress":
40
- return { name: decodedError.name, message: `Transfer to the Ethereum Zero Address is not allowed.` };
43
+ return { name: decodedError.name, message: `Transfer to the Ethereum zero address is not allowed.` };
41
44
  case "ZeroValue":
42
45
  return { name: decodedError.name, message: `Token amount cannot be zero.` };
46
+ case "ExceedsMax":
47
+ return { name: decodedError.name, message: `Funding amount exceeded hard limit.` };
48
+ case "ExceedsLimit":
49
+ return { name: decodedError.name, message: `Batch exceeds max limit.` };
50
+ case "InvalidNonce":
51
+ return { name: decodedError.name, message: `Invalid transaction nonce.` };
52
+ case "InvalidOperation":
53
+ return { name: decodedError.name, message: `Operation type is not valid.` };
54
+ case "InvalidConfig":
55
+ return { name: decodedError.name, message: `Contract configuration is invalid.` };
56
+ case "InvalidMultiSig":
57
+ return { name: decodedError.name, message: `Multisig configuration or signatures are invalid.` };
58
+ case "RequireMultiSig":
59
+ return { name: decodedError.name, message: `This operation requires multisig approval.` };
60
+ case "RequireTreasuryReceiverRole":
61
+ return { name: decodedError.name, message: `Receiver address does not have the required treasury receiver role.` };
62
+ case "TimelockConfigGroupNotSet":
63
+ return { name: decodedError.name, message: `Timelock config group is not configured for this escrow.` };
64
+ case "TimelockConfigNotSet":
65
+ return { name: decodedError.name, message: `Timelock configuration is not set.` };
66
+ case "ConfigGroupNotSet":
67
+ return { name: decodedError.name, message: `Configuration group is not set for this escrow.` };
68
+ case "AdminMultisigConfigNotSet":
69
+ return { name: decodedError.name, message: `Admin multisig configuration is not set.` };
70
+ case "MultisigConfigNotSet":
71
+ return { name: decodedError.name, message: `Multisig configuration is not set.` };
72
+ case "TimelockNotExpired": {
73
+ const [unlockAt] = decodedError.args;
74
+ return { name: decodedError.name, message: `Timelock has not expired yet. Unlocks at: ${unlockAt}.` };
75
+ }
76
+ case "CommitmentNotFound": {
77
+ const [commitmentHash] = decodedError.args;
78
+ return { name: decodedError.name, message: `Commitment not found: ${commitmentHash}.` };
79
+ }
80
+ case "AlreadyCreatedTransaction": {
81
+ const [requestId] = decodedError.args;
82
+ return { name: decodedError.name, message: `Transaction already created for request id: ${requestId}.` };
83
+ }
84
+ case "AccountAlreadyHasSignerRole": {
85
+ const [signerAddress] = decodedError.args;
86
+ return { name: decodedError.name, message: `Account ${signerAddress} already has the signer role.` };
87
+ }
88
+ case "InvalidMultiSigForRequest": {
89
+ const [requestId, sigIdx] = decodedError.args;
90
+ return { name: decodedError.name, data: { requestId, sigIndex: sigIdx }, message: `Invalid signature at index: ${sigIdx} for request id: ${requestId}` };
91
+ }
92
+ case "InsufficientManagerSigsForRequest": {
93
+ const [requestId, required, provided] = decodedError.args;
94
+ return { name: decodedError.name, data: { requestId, required, provided }, message: `Insufficient manager signatures for request ${requestId}. Required: ${required}, provided: ${provided}.` };
95
+ }
96
+ case "InsufficientExecutiveSigsForRequest": {
97
+ const [requestId, required, provided] = decodedError.args;
98
+ return { name: decodedError.name, data: { requestId, required, provided }, message: `Insufficient executive signatures for request ${requestId}. Required: ${required}, provided: ${provided}.` };
99
+ }
43
100
  default:
44
- return { name: "UnknownError", message: "Unexpected error occured." };
101
+ return { name: "UnknownError", message: `Unexpected error occurred. Error: ${decodedError.name}` };
45
102
  }
46
103
  };
47
104
  exports.parseDecodedError = parseDecodedError;
@@ -109,6 +109,27 @@
109
109
  "name": "ExceedsMaxBatch",
110
110
  "type": "error"
111
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
+ },
112
133
  {
113
134
  "inputs": [
114
135
  {
@@ -167,6 +188,48 @@
167
188
  "name": "InsufficientExecutiveSigs",
168
189
  "type": "error"
169
190
  },
191
+ {
192
+ "inputs": [
193
+ {
194
+ "internalType": "uint256",
195
+ "name": "requestId",
196
+ "type": "uint256"
197
+ },
198
+ {
199
+ "internalType": "uint256",
200
+ "name": "required",
201
+ "type": "uint256"
202
+ },
203
+ {
204
+ "internalType": "uint256",
205
+ "name": "provided",
206
+ "type": "uint256"
207
+ }
208
+ ],
209
+ "name": "InsufficientExecutiveSigsForRequest",
210
+ "type": "error"
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
+ },
170
233
  {
171
234
  "inputs": [
172
235
  {
@@ -199,6 +262,48 @@
199
262
  "name": "InsufficientManagerSigs",
200
263
  "type": "error"
201
264
  },
265
+ {
266
+ "inputs": [
267
+ {
268
+ "internalType": "uint256",
269
+ "name": "requestId",
270
+ "type": "uint256"
271
+ },
272
+ {
273
+ "internalType": "uint256",
274
+ "name": "required",
275
+ "type": "uint256"
276
+ },
277
+ {
278
+ "internalType": "uint256",
279
+ "name": "provided",
280
+ "type": "uint256"
281
+ }
282
+ ],
283
+ "name": "InsufficientManagerSigsForRequest",
284
+ "type": "error"
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
+ },
202
307
  {
203
308
  "inputs": [],
204
309
  "name": "InsufficientReserves",
@@ -236,6 +341,49 @@
236
341
  "name": "InvalidMultiSig",
237
342
  "type": "error"
238
343
  },
344
+ {
345
+ "inputs": [
346
+ {
347
+ "internalType": "uint256",
348
+ "name": "requestId",
349
+ "type": "uint256"
350
+ },
351
+ {
352
+ "internalType": "uint256",
353
+ "name": "sig_idx",
354
+ "type": "uint256"
355
+ }
356
+ ],
357
+ "name": "InvalidMultiSigForRequest",
358
+ "type": "error"
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
+ },
239
387
  {
240
388
  "inputs": [
241
389
  {
@@ -434,12 +582,6 @@
434
582
  {
435
583
  "anonymous": false,
436
584
  "inputs": [
437
- {
438
- "indexed": false,
439
- "internalType": "address",
440
- "name": "caller",
441
- "type": "address"
442
- },
443
585
  {
444
586
  "indexed": false,
445
587
  "internalType": "address",
@@ -776,12 +918,6 @@
776
918
  {
777
919
  "anonymous": false,
778
920
  "inputs": [
779
- {
780
- "indexed": false,
781
- "internalType": "address",
782
- "name": "caller",
783
- "type": "address"
784
- },
785
921
  {
786
922
  "indexed": false,
787
923
  "internalType": "address",
@@ -1317,6 +1453,51 @@
1317
1453
  "stateMutability": "nonpayable",
1318
1454
  "type": "function"
1319
1455
  },
1456
+ {
1457
+ "inputs": [
1458
+ {
1459
+ "components": [
1460
+ {
1461
+ "internalType": "uint256",
1462
+ "name": "committedAmount",
1463
+ "type": "uint256"
1464
+ },
1465
+ {
1466
+ "internalType": "uint256",
1467
+ "name": "netAmount",
1468
+ "type": "uint256"
1469
+ },
1470
+ {
1471
+ "internalType": "uint256",
1472
+ "name": "requestId",
1473
+ "type": "uint256"
1474
+ },
1475
+ {
1476
+ "internalType": "address",
1477
+ "name": "tokenAddress",
1478
+ "type": "address"
1479
+ },
1480
+ {
1481
+ "internalType": "address",
1482
+ "name": "receiverAddress",
1483
+ "type": "address"
1484
+ },
1485
+ {
1486
+ "internalType": "uint256",
1487
+ "name": "executeAt",
1488
+ "type": "uint256"
1489
+ }
1490
+ ],
1491
+ "internalType": "struct Types.ExecuteWithdrawalPayload[]",
1492
+ "name": "payload",
1493
+ "type": "tuple[]"
1494
+ }
1495
+ ],
1496
+ "name": "batchExecuteWithdrawal",
1497
+ "outputs": [],
1498
+ "stateMutability": "nonpayable",
1499
+ "type": "function"
1500
+ },
1320
1501
  {
1321
1502
  "inputs": [
1322
1503
  {
@@ -1359,7 +1540,12 @@
1359
1540
  "components": [
1360
1541
  {
1361
1542
  "internalType": "uint256",
1362
- "name": "amount",
1543
+ "name": "committedAmount",
1544
+ "type": "uint256"
1545
+ },
1546
+ {
1547
+ "internalType": "uint256",
1548
+ "name": "netAmount",
1363
1549
  "type": "uint256"
1364
1550
  },
1365
1551
  {
@@ -1588,7 +1774,12 @@
1588
1774
  "inputs": [
1589
1775
  {
1590
1776
  "internalType": "uint256",
1591
- "name": "amount",
1777
+ "name": "committedAmount",
1778
+ "type": "uint256"
1779
+ },
1780
+ {
1781
+ "internalType": "uint256",
1782
+ "name": "netAmount",
1592
1783
  "type": "uint256"
1593
1784
  },
1594
1785
  {
@@ -2232,6 +2423,19 @@
2232
2423
  "stateMutability": "view",
2233
2424
  "type": "function"
2234
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
+ },
2235
2439
  {
2236
2440
  "inputs": [
2237
2441
  {
@@ -2447,6 +2651,32 @@
2447
2651
  "stateMutability": "nonpayable",
2448
2652
  "type": "function"
2449
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
+ },
2450
2680
  {
2451
2681
  "inputs": [
2452
2682
  {
@@ -2,9 +2,19 @@ import { GrantRoleEventData, RevokeRoleEventData } from "./types/AccessControlEv
2
2
  declare enum Roles {
3
3
  DEFAULT_ADMIN_ROLE = "Contract Super Admin",
4
4
  OPERATOR_ROLE = "Signature Admin",
5
- WITHDRAW_ROLE = "Contract Accounting Admin"
5
+ WITHDRAW_ROLE = "Contract Accounting Admin",
6
+ ADMIN_TREASURY_MANAGER_ROLE = "",
7
+ ADMIN_TREASURY_EXECUTIVE_ROLE = "",
8
+ TREASURY_RECEIVER_ROLE = "",
9
+ TREASURY_MANAGER_ROLE = "",
10
+ TREASURY_EXECUTIVE_ROLE = "",
11
+ TREASURY_DISPATCH_ROLE = "",
12
+ CONFIG_MANAGER_ROLE = "",
13
+ CONFIG_EXECUTIVE_ROLE = "",
14
+ TIMELOCK_CONFIG_MANAGER_ROLE = "",
15
+ TIMELOCK_CONFIG_EXECUTIVE_ROLE = ""
6
16
  }
7
- type RoleName = "DEFAULT_ADMIN_ROLE" | "OPERATOR_ROLE" | "WITHDRAW_ROLE";
17
+ type RoleName = "DEFAULT_ADMIN_ROLE" | "OPERATOR_ROLE" | "WITHDRAW_ROLE" | "ADMIN_TREASURY_MANAGER_ROLE" | "ADMIN_TREASURY_EXECUTIVE_ROLE" | "TREASURY_RECEIVER_ROLE" | "TREASURY_MANAGER_ROLE" | "TREASURY_EXECUTIVE_ROLE" | "TREASURY_DISPATCH_ROLE" | "CONFIG_MANAGER_ROLE" | "CONFIG_EXECUTIVE_ROLE" | "TIMELOCK_CONFIG_MANAGER_ROLE" | "TIMELOCK_CONFIG_EXECUTIVE_ROLE";
8
18
  /**
9
19
  * Class for handling events related to the `AccessControl` contract.
10
20
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AccessControlEvents.d.ts","sourceRoot":"","sources":["../../../src/contracts/contract-events/AccessControlEvents.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGtF,aAAK,KAAK;IACN,kBAAkB,yBAAyB;IAC3C,aAAa,oBAAoB;IACjC,aAAa,8BAA8B;CAC9C;AAED,KAAK,QAAQ,GAAG,oBAAoB,GAAG,eAAe,GAAG,eAAe,CAAC;AAEzE;;GAEG;AACH,cAAM,mBAAmB;IACrB,gDAAgD;IAChD,MAAM,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAAQ;IACnD,oDAAoD;IAC7C,uBAAuB,EAAE,QAAQ,EAAE,CAA4D;IACtG,mDAAmD;IACnD,OAAO,CAAC,OAAO,CAAwB;IAEvC,OAAO;IAkBP;;;OAGG;IACH,MAAM,CAAC,WAAW;IAQlB;;;;OAIG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM;IAIjC;;;;;OAKG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM;IAQ7B;;;;OAIG;IACH,sBAAsB,CAAC,KAAK,EAAE,kBAAkB,GAAG,kBAAkB;IASrE;;;;OAIG;IACH,sBAAsB,CAAC,KAAK,EAAE,mBAAmB,GAAG,mBAAmB;CAQ1E;AAED,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"AccessControlEvents.d.ts","sourceRoot":"","sources":["../../../src/contracts/contract-events/AccessControlEvents.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGtF,aAAK,KAAK;IACN,kBAAkB,yBAAyB;IAC3C,aAAa,oBAAoB;IACjC,aAAa,8BAA8B;IAC3C,2BAA2B,KAAK;IAChC,6BAA6B,KAAK;IAClC,sBAAsB,KAAK;IAC3B,qBAAqB,KAAK;IAC1B,uBAAuB,KAAK;IAC5B,sBAAsB,KAAK;IAC3B,mBAAmB,KAAK;IACxB,qBAAqB,KAAK;IAC1B,4BAA4B,KAAK;IACjC,8BAA8B,KAAK;CACtC;AAED,KAAK,QAAQ,GAAG,oBAAoB,GAAG,eAAe,GAAG,eAAe,GACpE,6BAA6B,GAC7B,+BAA+B,GAC/B,wBAAwB,GACxB,uBAAuB,GACvB,yBAAyB,GACzB,wBAAwB,GACxB,qBAAqB,GACrB,uBAAuB,GACvB,8BAA8B,GAC9B,gCAAgC,CAAA;AAEpC;;GAEG;AACH,cAAM,mBAAmB;IACrB,gDAAgD;IAChD,MAAM,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAAQ;IACnD,oDAAoD;IAC7C,uBAAuB,EAAE,QAAQ,EAAE,CAcxC;IAEF,mDAAmD;IACnD,OAAO,CAAC,OAAO,CAAwB;IAEvC,OAAO;IAkBP;;;OAGG;IACH,MAAM,CAAC,WAAW;IAQlB;;;;OAIG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM;IAIjC;;;;;OAKG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM;IAQ7B;;;;OAIG;IACH,sBAAsB,CAAC,KAAK,EAAE,kBAAkB,GAAG,kBAAkB;IASrE;;;;OAIG;IACH,sBAAsB,CAAC,KAAK,EAAE,mBAAmB,GAAG,mBAAmB;CAQ1E;AAED,eAAe,mBAAmB,CAAC"}
@@ -6,6 +6,16 @@ var Roles;
6
6
  Roles["DEFAULT_ADMIN_ROLE"] = "Contract Super Admin";
7
7
  Roles["OPERATOR_ROLE"] = "Signature Admin";
8
8
  Roles["WITHDRAW_ROLE"] = "Contract Accounting Admin";
9
+ Roles["ADMIN_TREASURY_MANAGER_ROLE"] = "";
10
+ Roles["ADMIN_TREASURY_EXECUTIVE_ROLE"] = "";
11
+ Roles["TREASURY_RECEIVER_ROLE"] = "";
12
+ Roles["TREASURY_MANAGER_ROLE"] = "";
13
+ Roles["TREASURY_EXECUTIVE_ROLE"] = "";
14
+ Roles["TREASURY_DISPATCH_ROLE"] = "";
15
+ Roles["CONFIG_MANAGER_ROLE"] = "";
16
+ Roles["CONFIG_EXECUTIVE_ROLE"] = "";
17
+ Roles["TIMELOCK_CONFIG_MANAGER_ROLE"] = "";
18
+ Roles["TIMELOCK_CONFIG_EXECUTIVE_ROLE"] = "";
9
19
  })(Roles || (Roles = {}));
10
20
  /**
11
21
  * Class for handling events related to the `AccessControl` contract.
@@ -13,7 +23,21 @@ var Roles;
13
23
  class AccessControlEvents {
14
24
  constructor() {
15
25
  /** Array of role names supported by the contract */
16
- this.accessControlEventNames = ["DEFAULT_ADMIN_ROLE", "OPERATOR_ROLE", "WITHDRAW_ROLE"];
26
+ this.accessControlEventNames = [
27
+ "DEFAULT_ADMIN_ROLE",
28
+ "OPERATOR_ROLE",
29
+ "WITHDRAW_ROLE",
30
+ "ADMIN_TREASURY_MANAGER_ROLE",
31
+ "ADMIN_TREASURY_EXECUTIVE_ROLE",
32
+ "TREASURY_RECEIVER_ROLE",
33
+ "TREASURY_MANAGER_ROLE",
34
+ "TREASURY_EXECUTIVE_ROLE",
35
+ "TREASURY_DISPATCH_ROLE",
36
+ "CONFIG_MANAGER_ROLE",
37
+ "CONFIG_EXECUTIVE_ROLE",
38
+ "TIMELOCK_CONFIG_MANAGER_ROLE",
39
+ "TIMELOCK_CONFIG_EXECUTIVE_ROLE"
40
+ ];
17
41
  // Create a map of role hashes to role names
18
42
  this.roleMap = new Map(this.accessControlEventNames.map(name => {
19
43
  if (name.includes("DEFAULT_ADMIN_ROLE")) {
@@ -65,8 +89,8 @@ class AccessControlEvents {
65
89
  * @returns The parsed event with role mapped to human-readable name and gasUsed converted to number
66
90
  */
67
91
  mutateRoleGrantedEvent(event) {
68
- const role = this.getRoleName(event.role);
69
- return Object.assign(Object.assign({}, event), { gasUsed: Number(event.gasUsed), role });
92
+ const roleName = this.getRoleName(event.role);
93
+ return Object.assign(Object.assign({}, event), { gasUsed: Number(event.gasUsed), roleName });
70
94
  }
71
95
  /**
72
96
  * Parses the RoleRevoked event object.
@@ -74,8 +98,8 @@ class AccessControlEvents {
74
98
  * @returns The parsed event with role mapped to human-readable name and gasUsed converted to number
75
99
  */
76
100
  mutateRoleRevokedEvent(event) {
77
- const role = this.getRoleName(event.role);
78
- return Object.assign(Object.assign({}, event), { gasUsed: Number(event.gasUsed), role });
101
+ const roleName = this.getRoleName(event.role);
102
+ return Object.assign(Object.assign({}, event), { gasUsed: Number(event.gasUsed), roleName });
79
103
  }
80
104
  }
81
105
  /** Singleton instance of AccessControlEvents */