Skip to content

Commit 07114dc

Browse files
committed
Add resource constraint methods to ArbOwner
Part of NIT-3488
1 parent 2942ee7 commit 07114dc

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

ArbOwner.sol

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,23 @@ interface ArbOwner {
256256
bool enable
257257
) external;
258258

259+
/// @notice Adds or updates a resource constraint
260+
/// @notice Available on ArbOS version 50 and above
261+
/// @param resource the resource kind (see Nitro documentation for the list of resources)
262+
/// @param periodSecs the time window for the constraint
263+
/// @param targetPerPeriod the target limit for the given period and resource
264+
function setResourceConstraint(
265+
uint8 resource,
266+
uint32 periodSecs,
267+
uint64 targetPerPeriod
268+
) external;
269+
270+
/// @notice Removes a resource constraint
271+
/// @notice Available on ArbOS version 50 and above
272+
/// @param resource the resource kind (see Nitro documentation for the list of resources)
273+
/// @param periodSecs the time window for the constraint
274+
function clearConstraint(uint8 resource, uint32 periodSecs) external;
275+
259276
/// Emitted when a successful call is made to this precompile
260277
event OwnerActs(bytes4 indexed method, address indexed owner, bytes data);
261278
}

0 commit comments

Comments
 (0)