-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sync with latest changes to system contracts
- Loading branch information
Showing
20 changed files
with
144 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,11 @@ | |
|
||
pragma solidity 0.8.20; | ||
|
||
/** | ||
* @author Matter Labs | ||
* @custom:security-contact [email protected] | ||
* @notice The interface for the ComplexUpgrader contract. | ||
*/ | ||
interface IComplexUpgrader { | ||
function upgrade(address _delegateTo, bytes calldata _calldata) external payable; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,12 @@ uint8 constant LENGTH_BITS_OFFSET = 3; | |
// The maximal length in bytes that an enumeration index can have. | ||
uint8 constant MAX_ENUMERATION_INDEX_SIZE = 8; | ||
|
||
/** | ||
* @author Matter Labs | ||
* @custom:security-contact [email protected] | ||
* @notice The interface for the Compressor contract, responsible for verifying the correctness of | ||
* the compression of the state diffs and bytecodes. | ||
*/ | ||
interface ICompressor { | ||
function publishCompressedBytecode( | ||
bytes calldata _bytecode, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,12 @@ | |
|
||
pragma solidity 0.8.20; | ||
|
||
/** | ||
* @author Matter Labs | ||
* @custom:security-contact [email protected] | ||
* @notice The interface for the KnownCodesStorage contract, which is responsible | ||
* for storing the hashes of the bytecodes that have been published to the network. | ||
*/ | ||
interface IKnownCodesStorage { | ||
event MarkedAsKnown(bytes32 indexed bytecodeHash, bool indexed sendBytecodeToL1); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,11 @@ bytes32 constant L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH = 0x72abee45b59e344af8a6e5202 | |
/// @dev The current version of state diff compression being used. | ||
uint256 constant STATE_DIFF_COMPRESSION_VERSION_NUMBER = 1; | ||
|
||
/** | ||
* @author Matter Labs | ||
* @custom:security-contact [email protected] | ||
* @notice The interface of the L1 Messenger contract, responsible for sending messages to L1. | ||
*/ | ||
interface IL1Messenger { | ||
// Possibly in the future we will be able to track the messages sent to L1 with | ||
// some hooks in the VM. For now, it is much easier to track them with L2 events. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ pragma solidity 0.8.20; | |
|
||
/** | ||
* @author Matter Labs | ||
* @custom:security-contact [email protected] | ||
* @notice Contract that stores some of the context variables, that may be either | ||
* block-scoped, tx-scoped or system-wide. | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ pragma solidity 0.8.20; | |
|
||
/** | ||
* @author Matter Labs | ||
* @custom:security-contact [email protected] | ||
* @notice The interface with deprecated functions of the SystemContext contract. It is aimed for backward compatibility. | ||
*/ | ||
interface ISystemContextDeprecated { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,17 @@ pragma solidity 0.8.20; | |
import {SystemContractHelper} from "../libraries/SystemContractHelper.sol"; | ||
import {BOOTLOADER_FORMAL_ADDRESS} from "../Constants.sol"; | ||
|
||
/// @dev Solidity does not allow exporting modifiers via libraries, so | ||
/// the only way to do reuse modifiers is to have a base contract | ||
/// @dev Never add storage variables into this contract as some | ||
/// system contracts rely on this abstract contract as on interface! | ||
|
||
|
||
/** | ||
* @author Matter Labs | ||
* @custom:security-contact [email protected] | ||
* @notice An abstract contract that is used to reuse modifiers across the system contracts. | ||
* @dev Solidity does not allow exporting modifiers via libraries, so | ||
* the only way to do reuse modifiers is to have a base contract | ||
* @dev Never add storage variables into this contract as some | ||
* system contracts rely on this abstract contract as on interface! | ||
*/ | ||
abstract contract ISystemContract { | ||
/// @notice Modifier that makes sure that the method | ||
/// can only be called via a system call. | ||
|
Oops, something went wrong.