Skip to content

Commit fe3c7b2

Browse files
feat: update l2 erc20 bridge address in updater as well (#3500)
## What ❔ update l2 erc20 bridge address as well as l2 shared bridge ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`. Co-authored-by: Jobe Smith <[email protected]>
1 parent 4c381a8 commit fe3c7b2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

core/node/api_server/src/web3/state.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,9 @@ impl BridgeAddressesHandle {
241241
self.0.write().await.l1_shared_default_bridge = Some(l1_shared_bridge);
242242
}
243243

244-
pub async fn update_l2_shared_bridge(&self, l2_shared_bridge: Address) {
244+
pub async fn update_l2_bridges(&self, l2_shared_bridge: Address) {
245245
self.0.write().await.l2_shared_default_bridge = Some(l2_shared_bridge);
246+
self.0.write().await.l2_erc20_default_bridge = Some(l2_shared_bridge);
246247
}
247248

248249
pub async fn read(&self) -> api::BridgeAddresses {

core/node/node_framework/src/implementations/layers/web3_api/server/bridge_addresses.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl L1UpdaterInner {
8080
// - To not undo the previous change in case of a network error
8181
if info.should_use_l2_asset_router {
8282
self.bridge_address_updater
83-
.update_l2_shared_bridge(L2_ASSET_ROUTER_ADDRESS)
83+
.update_l2_bridges(L2_ASSET_ROUTER_ADDRESS)
8484
.await;
8585
}
8686
}

0 commit comments

Comments
 (0)