@bloxchain/contracts 1.0.0-alpha.14 → 1.0.0-alpha.15

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.
@@ -97,14 +97,6 @@ interface IBaseStateMachine {
97
97
  */
98
98
  function hasRole(bytes32 roleHash, address wallet) external view returns (bool);
99
99
 
100
- /**
101
- * @dev Returns if an action is supported by a function
102
- * @param functionSelector The function selector to check
103
- * @param action The action to check
104
- * @return True if the action is supported by the function, false otherwise
105
- */
106
- function isActionSupportedByFunction(bytes4 functionSelector, EngineBlox.TxAction action) external view returns (bool);
107
-
108
100
  /**
109
101
  * @dev Gets function schema information
110
102
  * @param functionSelector The function selector to get information for
@@ -94,67 +94,53 @@ interface IGuardController {
94
94
  /**
95
95
  * @dev Approves and executes a time-locked transaction
96
96
  * @param txId The transaction ID
97
- * @param expectedOperationType The expected operation type for validation
98
97
  * @return txId The transaction ID (use getTransaction(txId) for full record and result)
99
98
  * @notice Requires STANDARD execution type and EXECUTE_TIME_DELAY_APPROVE permission for the execution function
100
99
  */
101
100
  function approveTimeLockExecution(
102
- uint256 txId,
103
- bytes32 expectedOperationType
101
+ uint256 txId
104
102
  ) external returns (uint256);
105
103
 
106
104
  /**
107
105
  * @dev Cancels a time-locked transaction
108
106
  * @param txId The transaction ID
109
- * @param expectedOperationType The expected operation type for validation
110
107
  * @return txId The transaction ID (use getTransaction(txId) for full record)
111
108
  * @notice Requires STANDARD execution type and EXECUTE_TIME_DELAY_CANCEL permission for the execution function
112
109
  */
113
110
  function cancelTimeLockExecution(
114
- uint256 txId,
115
- bytes32 expectedOperationType
111
+ uint256 txId
116
112
  ) external returns (uint256);
117
113
 
118
114
  /**
119
115
  * @dev Approves a time-locked transaction using a meta-transaction
120
116
  * @param metaTx The meta-transaction containing the transaction record and signature
121
- * @param expectedOperationType The expected operation type for validation
122
- * @param requiredSelector The handler selector for validation
123
117
  * @return The transaction ID (use getTransaction(txId) for full record)
124
118
  * @notice Requires STANDARD execution type and EXECUTE_META_APPROVE permission for the execution function
125
119
  */
126
120
  function approveTimeLockExecutionWithMetaTx(
127
- EngineBlox.MetaTransaction memory metaTx,
128
- bytes32 expectedOperationType,
129
- bytes4 requiredSelector
121
+ EngineBlox.MetaTransaction memory metaTx
130
122
  ) external returns (uint256);
131
123
 
132
124
  /**
133
125
  * @dev Cancels a time-locked transaction using a meta-transaction
134
126
  * @param metaTx The meta-transaction containing the transaction record and signature
135
- * @param expectedOperationType The expected operation type for validation
136
- * @param requiredSelector The handler selector for validation
137
127
  * @return The transaction ID (use getTransaction(txId) for full record)
138
128
  * @notice Requires STANDARD execution type and EXECUTE_META_CANCEL permission for the execution function
139
129
  */
140
130
  function cancelTimeLockExecutionWithMetaTx(
141
- EngineBlox.MetaTransaction memory metaTx,
142
- bytes32 expectedOperationType,
143
- bytes4 requiredSelector
131
+ EngineBlox.MetaTransaction memory metaTx
144
132
  ) external returns (uint256);
145
133
 
146
134
  /**
147
135
  * @dev Requests and approves a transaction in one step using a meta-transaction
148
136
  * @param metaTx The meta-transaction containing the transaction record and signature
149
- * @param requiredSelector The handler selector for validation
150
137
  * @return The transaction ID (use getTransaction(txId) for full record)
151
138
  * @notice Requires STANDARD execution type
152
139
  * @notice Validates function schema and permissions for the execution function (same as executeWithTimeLock)
153
140
  * @notice Requires EXECUTE_META_REQUEST_AND_APPROVE permission for the execution function selector
154
141
  */
155
142
  function requestAndApproveExecution(
156
- EngineBlox.MetaTransaction memory metaTx,
157
- bytes4 requiredSelector
143
+ EngineBlox.MetaTransaction memory metaTx
158
144
  ) external returns (uint256);
159
145
  }
160
146
 
@@ -47,14 +47,27 @@ library GuardControllerDefinitions {
47
47
  // GuardController: cancelTimeLockExecution(uint256)
48
48
  bytes4 public constant CANCEL_TIMELOCK_EXECUTION_SELECTOR = bytes4(keccak256("cancelTimeLockExecution(uint256)"));
49
49
 
50
- // GuardController: approveTimeLockExecutionWithMetaTx(...)
51
- bytes4 public constant APPROVE_TIMELOCK_EXECUTION_META_SELECTOR = bytes4(keccak256("approveTimeLockExecutionWithMetaTx((uint256,uint256,uint8,(address,address,uint256,uint256,bytes32,bytes4,bytes),bytes32,bytes,(address,uint256,address,uint256)),(uint256,uint256,address,bytes4,uint8,uint256,uint256,address),bytes32,bytes,bytes))"));
50
+
51
+ // GuardController: approveTimeLockExecutionWithMetaTx(EngineBlox.MetaTransaction)
52
+ bytes4 public constant APPROVE_TIMELOCK_EXECUTION_META_SELECTOR = bytes4(
53
+ keccak256(
54
+ "approveTimeLockExecutionWithMetaTx(((uint256,uint256,uint8,(address,address,uint256,uint256,bytes32,bytes4,bytes),bytes32,bytes,(address,uint256,address,uint256)),(uint256,uint256,address,bytes4,uint8,uint256,uint256,address),bytes32,bytes,bytes))"
55
+ )
56
+ );
52
57
 
53
- // GuardController: cancelTimeLockExecutionWithMetaTx(...)
54
- bytes4 public constant CANCEL_TIMELOCK_EXECUTION_META_SELECTOR = bytes4(keccak256("cancelTimeLockExecutionWithMetaTx((uint256,uint256,uint8,(address,address,uint256,uint256,bytes32,bytes4,bytes),bytes32,bytes,(address,uint256,address,uint256)),(uint256,uint256,address,bytes4,uint8,uint256,uint256,address),bytes32,bytes,bytes))"));
58
+ // GuardController: cancelTimeLockExecutionWithMetaTx(EngineBlox.MetaTransaction)
59
+ bytes4 public constant CANCEL_TIMELOCK_EXECUTION_META_SELECTOR = bytes4(
60
+ keccak256(
61
+ "cancelTimeLockExecutionWithMetaTx(((uint256,uint256,uint8,(address,address,uint256,uint256,bytes32,bytes4,bytes),bytes32,bytes,(address,uint256,address,uint256)),(uint256,uint256,address,bytes4,uint8,uint256,uint256,address),bytes32,bytes,bytes))"
62
+ )
63
+ );
55
64
 
56
- // GuardController: requestAndApproveExecution(...)
57
- bytes4 public constant REQUEST_AND_APPROVE_EXECUTION_SELECTOR = bytes4(keccak256("requestAndApproveExecution((uint256,uint256,uint8,(address,address,uint256,uint256,bytes32,bytes4,bytes),bytes32,bytes,(address,uint256,address,uint256)),(uint256,uint256,address,bytes4,uint8,uint256,uint256,address),bytes32,bytes,bytes))"));
65
+ // GuardController: requestAndApproveExecution(EngineBlox.MetaTransaction)
66
+ bytes4 public constant REQUEST_AND_APPROVE_EXECUTION_SELECTOR = bytes4(
67
+ keccak256(
68
+ "requestAndApproveExecution(((uint256,uint256,uint8,(address,address,uint256,uint256,bytes32,bytes4,bytes),bytes32,bytes,(address,uint256,address,uint256)),(uint256,uint256,address,bytes4,uint8,uint256,uint256,address),bytes32,bytes,bytes))"
69
+ )
70
+ );
58
71
 
59
72
  // GuardController: guardConfigBatchRequestAndApprove(...)
60
73
  bytes4 public constant GUARD_CONFIG_BATCH_META_SELECTOR = bytes4(
@@ -171,7 +184,7 @@ library GuardControllerDefinitions {
171
184
 
172
185
  // Schema 3: GuardController.approveTimeLockExecutionWithMetaTx
173
186
  schemas[3] = EngineBlox.FunctionSchema({
174
- functionSignature: "approveTimeLockExecutionWithMetaTx((uint256,uint256,uint8,(address,address,uint256,uint256,bytes32,bytes4,bytes),bytes32,bytes,(address,uint256,address,uint256)),(uint256,uint256,address,bytes4,uint8,uint256,uint256,address),bytes32,bytes,bytes))",
187
+ functionSignature: "approveTimeLockExecutionWithMetaTx(((uint256,uint256,uint8,(address,address,uint256,uint256,bytes32,bytes4,bytes),bytes32,bytes,(address,uint256,address,uint256)),(uint256,uint256,address,bytes4,uint8,uint256,uint256,address),bytes32,bytes,bytes))",
175
188
  functionSelector: APPROVE_TIMELOCK_EXECUTION_META_SELECTOR,
176
189
  operationType: CONTROLLER_OPERATION,
177
190
  operationName: "CONTROLLER_OPERATION",
@@ -182,7 +195,7 @@ library GuardControllerDefinitions {
182
195
 
183
196
  // Schema 4: GuardController.cancelTimeLockExecutionWithMetaTx
184
197
  schemas[4] = EngineBlox.FunctionSchema({
185
- functionSignature: "cancelTimeLockExecutionWithMetaTx((uint256,uint256,uint8,(address,address,uint256,uint256,bytes32,bytes4,bytes),bytes32,bytes,(address,uint256,address,uint256)),(uint256,uint256,address,bytes4,uint8,uint256,uint256,address),bytes32,bytes,bytes))",
198
+ functionSignature: "cancelTimeLockExecutionWithMetaTx(((uint256,uint256,uint8,(address,address,uint256,uint256,bytes32,bytes4,bytes),bytes32,bytes,(address,uint256,address,uint256)),(uint256,uint256,address,bytes4,uint8,uint256,uint256,address),bytes32,bytes,bytes))",
186
199
  functionSelector: CANCEL_TIMELOCK_EXECUTION_META_SELECTOR,
187
200
  operationType: CONTROLLER_OPERATION,
188
201
  operationName: "CONTROLLER_OPERATION",
@@ -193,7 +206,7 @@ library GuardControllerDefinitions {
193
206
 
194
207
  // Schema 5: GuardController.requestAndApproveExecution
195
208
  schemas[5] = EngineBlox.FunctionSchema({
196
- functionSignature: "requestAndApproveExecution((uint256,uint256,uint8,(address,address,uint256,uint256,bytes32,bytes4,bytes),bytes32,bytes,(address,uint256,address,uint256)),(uint256,uint256,address,bytes4,uint8,uint256,uint256,address),bytes32,bytes,bytes))",
209
+ functionSignature: "requestAndApproveExecution(((uint256,uint256,uint8,(address,address,uint256,uint256,bytes32,bytes4,bytes),bytes32,bytes,(address,uint256,address,uint256)),(uint256,uint256,address,bytes4,uint8,uint256,uint256,address),bytes32,bytes,bytes))",
197
210
  functionSelector: REQUEST_AND_APPROVE_EXECUTION_SELECTOR,
198
211
  operationType: CONTROLLER_OPERATION,
199
212
  operationName: "CONTROLLER_OPERATION",