Skip to content

Commit e8fce20

Browse files
committed
fix(l2): set pendingPrivilegedTxIndex in initializer (#5161)
**Motivation** <!-- Why does this pull request exist? What are its goals? --> OZ's upgrade tools require the variables to be set in initializers and not in constructor/variable declaration. This should not be such a problem as it will always be initialized as 0, but with this change we avoid the tool error **Description** <!-- A clear and concise general description of the changes this PR introduces --> <!-- Link to issues: Resolves #111, Resolves #222 -->
1 parent 03576da commit e8fce20

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

crates/l2/contracts/src/l1/CommonBridge.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ contract CommonBridge is
9393
address public NATIVE_TOKEN_L1;
9494

9595
/// @dev Index pointing to the first unprocessed privileged transaction in the queue.
96-
uint256 private pendingPrivilegedTxIndex = 0;
96+
uint256 private pendingPrivilegedTxIndex;
9797

9898
modifier onlyOnChainProposer() {
9999
require(
@@ -124,6 +124,7 @@ contract CommonBridge is
124124

125125
lastFetchedL1Block = block.number;
126126
transactionId = 0;
127+
pendingPrivilegedTxIndex = 0;
127128

128129
PRIVILEGED_TX_MAX_WAIT_BEFORE_INCLUSION = inclusionMaxWait;
129130

crates/l2/sdk/src/sdk.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ pub use ethrex_sdk_contract_utils::*;
3737

3838
use calldata::from_hex_string_to_h256_array;
3939

40-
// 0x79d6af40f7c9145b0741639ea969c13d5faa3cc6
40+
// 0xcecd5910a4404ccf2718feb58dac13e975a862a2
4141
pub const DEFAULT_BRIDGE_ADDRESS: Address = H160([
42-
0x79, 0xd6, 0xaf, 0x40, 0xf7, 0xc9, 0x14, 0x5b, 0x07, 0x41, 0x63, 0x9e, 0xa9, 0x69, 0xc1, 0x3d,
43-
0x5f, 0xaa, 0x3c, 0xc6,
42+
0xce, 0xcd, 0x59, 0x10, 0xa4, 0x40, 0x4c, 0xcf, 0x27, 0x18, 0xfe, 0xb5, 0x8d, 0xac, 0x13, 0xe9,
43+
0x75, 0xa8, 0x62, 0xa2,
4444
]);
4545

4646
// 0x000000000000000000000000000000000000ffff

0 commit comments

Comments
 (0)