Skip to content

Commit

Permalink
use a function for the function selector
Browse files Browse the repository at this point in the history
  • Loading branch information
Santiago Pittella authored and Santiago Pittella committed Feb 22, 2024
1 parent fcee5d1 commit 96035d8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/lib/zksync_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ pub mod sync_layer;
pub mod temp_config_store;
mod utils;

/// Returns the selector of the `getPubdataPriceMode()`.
fn get_pubdata_price_mode_selector() -> Bytes {
serde_json::from_str::<Bytes>(r#""0x252e5966""#).unwrap()
}

/// Inserts the initial information about zkSync tokens into the database.
pub async fn genesis_init(
postgres_config: &PostgresConfig,
Expand Down Expand Up @@ -636,7 +641,7 @@ pub async fn initialize_components(
.call(
CallRequest::builder()
.to((&contracts_config).executor_facet_addr.clone())
.data(serde_json::from_str::<Bytes>(r#""0x252e5966""#).unwrap()) // The selector of "getPubdataPriceMode()"
.data(get_pubdata_price_mode_selector())
.build(),
)
.await
Expand Down

0 comments on commit 96035d8

Please sign in to comment.