-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from matter-labs/sb-rename-ergs-gas
Rename ergs->gas
- Loading branch information
Showing
45 changed files
with
568 additions
and
434 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
{ | ||
"L2_TX_MAX_ERGS_LIMIT": 80000000, | ||
"MAX_PUBDATA_PER_BLOCK": 110000, | ||
"PRIORITY_TX_MAX_PUBDATA": 99000, | ||
"FAIR_ERGS_PRICE_PER_PUBDATA": 500000000, | ||
"GAS_PER_PUBDATA_BYTE": 17, | ||
"BLOCK_OVERHEAD_ERGS": 1200000, | ||
"BLOCK_OVERHEAD_L1_GAS": 1000000, | ||
"MAX_TRANSACTIONS_IN_BLOCK": 256, | ||
"BOOTLOADER_TX_ENCODING_SPACE": 522857, | ||
"L1_TX_INTRINSIC_ERGS": 159849, | ||
"L1_TX_INTRINSIC_PUBDATA": 88, | ||
"L1_TX_MIN_ERGS_BASE": 166479, | ||
"L1_TX_DELTA_544_ENCODING_BYTES": 1656, | ||
"L1_TX_DELTA_FACTORY_DEPS_ERGS": 2631, | ||
"L1_TX_DELTA_FACTORY_DEPS_PUBDATA": 64, | ||
"MAX_NEW_FACTORY_DEPS": 32, | ||
"DEFAULT_ERGS_PRICE_PER_PUBDATA": 800 | ||
"L2_TX_MAX_GAS_LIMIT": 80000000, | ||
"MAX_PUBDATA_PER_BLOCK": 110000, | ||
"PRIORITY_TX_MAX_PUBDATA": 99000, | ||
"FAIR_L2_GAS_PRICE": 500000000, | ||
"L1_GAS_PER_PUBDATA_BYTE": 17, | ||
"BLOCK_OVERHEAD_L2_GAS": 1200000, | ||
"BLOCK_OVERHEAD_L1_GAS": 1000000, | ||
"MAX_TRANSACTIONS_IN_BLOCK": 256, | ||
"BOOTLOADER_TX_ENCODING_SPACE": 522857, | ||
"L1_TX_INTRINSIC_L2_GAS": 166400, | ||
"L1_TX_INTRINSIC_PUBDATA": 88, | ||
"L1_TX_MIN_L2_GAS_BASE": 172726, | ||
"L1_TX_DELTA_544_ENCODING_BYTES": 1656, | ||
"L1_TX_DELTA_FACTORY_DEPS_L2_GAS": 2473, | ||
"L1_TX_DELTA_FACTORY_DEPS_PUBDATA": 64, | ||
"MAX_NEW_FACTORY_DEPS": 32, | ||
"DEFAULT_L2_GAS_PRICE_PER_PUBDATA": 800 | ||
} |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
CHAIN_ETH_NETWORK=localhost | ||
CONTRACTS_PRIORITY_TX_MAX_ERGS_LIMIT=72000000 | ||
CONTRACTS_PRIORITY_TX_MAX_GAS_LIMIT=72000000 | ||
ETH_CLIENT_WEB3_URL=http://127.0.0.1:8545 |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
/* | ||
* Copyright 2019-2021, Offchain Labs, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
library AddressAliasHelper { | ||
uint160 constant offset = uint160(0x1111000000000000000000000000000000001111); | ||
|
||
/// @notice Utility function that converts the address in the L1 that submitted a tx to | ||
/// the inbox to the msg.sender viewed in the L2 | ||
/// @param l1Address the address in the L1 that triggered the tx to L2 | ||
/// @return l2Address L2 address as viewed in msg.sender | ||
function applyL1ToL2Alias(address l1Address) internal pure returns (address l2Address) { | ||
unchecked { | ||
l2Address = address(uint160(l1Address) + offset); | ||
} | ||
} | ||
|
||
/// @notice Utility function that converts the msg.sender viewed in the L2 to the | ||
/// address in the L1 that submitted a tx to the inbox | ||
/// @param l2Address L2 address as viewed in msg.sender | ||
/// @return l1Address the address in the L1 that triggered the tx to L2 | ||
function undoL1ToL2Alias(address l2Address) internal pure returns (address l1Address) { | ||
unchecked { | ||
l1Address = address(uint160(l2Address) - offset); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.