Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
StanislavBreadless committed Jan 25, 2024
1 parent 3293947 commit 732b18c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions system-contracts/contracts/L1Messenger.sol
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ contract L1Messenger is IL1Messenger, ISystemContract {
// - keccakGasCost(64) and gasSpentOnMessageHashing when reconstructing Messages
// - at most 1 time keccakGasCost(64) when building the Merkle tree (as merkle tree can contain
// ~2*N nodes, where the first N nodes are leaves the hash of which is calculated on the previous step).
uint256 gasToPay =
keccakGasCost(L2_TO_L1_LOG_SERIALIZE_SIZE) +
uint256 gasToPay = keccakGasCost(L2_TO_L1_LOG_SERIALIZE_SIZE) +
3 *
keccakGasCost(64) +
gasSpentOnMessageHashing;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ library SystemContractHelper {
/// system contracts corresponding to the list of precompiles above can do `precompileCall`.
/// @dev If used not in the `sha256`, `keccak256` or `ecrecover` contracts, it will just burn the gas provided.
/// @dev This method is `unsafe` because it does not check whether there is enough gas to burn.
function unsafePrecompileCall(uint256 _rawParams, uint32 _gasToBurn, uint32 _pubdataToSpend) internal view returns (bool success) {
function unsafePrecompileCall(
uint256 _rawParams,
uint32 _gasToBurn,
uint32 _pubdataToSpend
) internal view returns (bool success) {
address callAddr = PRECOMPILE_CALL_ADDRESS;

uint256 params = uint256(_gasToBurn) + (uint256(_pubdataToSpend) << 32);
Expand Down

0 comments on commit 732b18c

Please sign in to comment.