-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathArbDebug.sol
More file actions
47 lines (37 loc) · 1.56 KB
/
ArbDebug.sol
File metadata and controls
47 lines (37 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright 2021-2023, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.4.21 <0.9.0;
/**
* @title A test contract whose methods are only accessible in debug mode
* @notice Precompiled contract that exists in every Arbitrum chain at 0x00000000000000000000000000000000000000ff.
*/
interface ArbDebug {
/// @notice Caller becomes a chain owner
function becomeChainOwner() external;
/// @notice Overwrite an existing contract's code
function overwriteContractCode(
address target,
bytes calldata newCode
) external returns (bytes memory oldCode);
/// @notice Emit events with values based on the args provided
function events(bool flag, bytes32 value) external payable returns (address, uint256);
/// @notice Tries (and fails) to emit logs in a view context
function eventsView() external view;
// Events that exist for testing log creation and pricing
event Basic(bool flag, bytes32 indexed value);
event Mixed(
bool indexed flag, bool not, bytes32 indexed value, address conn, address indexed caller
);
event Store(
bool indexed flag, address indexed field, uint24 number, bytes32 value, bytes store
);
function customRevert(
uint64 number
) external pure;
/// @notice Available in ArbOS version 30 and above
function panic() external;
function legacyError() external pure;
error Custom(uint64, string, bool);
error Unused();
}