Skip to content

Commit 97e7b48

Browse files
authored
Using shasta bindings from taiko-bindings crate instead of self created. (#768)
1 parent bdbf258 commit 97e7b48

File tree

6 files changed

+13
-97
lines changed

6 files changed

+13
-97
lines changed

Cargo.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ resolver = "2"
1212
default-members = ["node"]
1313

1414
[workspace.package]
15-
version = "1.23.28"
15+
version = "1.23.29"
1616
edition = "2024"
1717
repository = "https://github.com/NethermindEth/Catalyst"
1818
license = "MIT"

shasta/src/l1/bindings/mod.rs

Lines changed: 0 additions & 3 deletions
This file was deleted.

shasta/src/l1/bindings/preconf_whitelist.rs

Lines changed: 0 additions & 71 deletions
This file was deleted.

shasta/src/l1/execution_layer.rs

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// TODO remove allow dead_code when the module is used
2-
#![allow(dead_code)]
3-
4-
use super::bindings::PreconfWhitelist;
51
use super::config::EthereumL1Config;
62
use super::proposal_tx_builder::ProposalTxBuilder;
73
use super::protocol_config::ProtocolConfig;
@@ -36,10 +32,7 @@ pub struct ExecutionLayer {
3632
common: ExecutionLayerCommon,
3733
provider: DynProvider,
3834
preconfer_address: Address,
39-
config: EthereumL1Config,
4035
pub transaction_monitor: TransactionMonitor,
41-
metrics: Arc<Metrics>,
42-
extra_gas_percentage: u64,
4336
contract_addresses: ContractAddresses,
4437
}
4538

@@ -88,10 +81,7 @@ impl ELTrait for ExecutionLayer {
8881
common,
8982
provider,
9083
preconfer_address: common_config.signer.get_address(),
91-
config: specific_config,
9284
transaction_monitor,
93-
metrics,
94-
extra_gas_percentage: common_config.extra_gas_percentage,
9585
contract_addresses,
9686
})
9787
}
@@ -286,8 +276,10 @@ impl ExecutionLayer {
286276

287277
impl WhitelistProvider for ExecutionLayer {
288278
async fn is_operator_whitelisted(&self) -> Result<bool, Error> {
289-
let contract =
290-
PreconfWhitelist::new(self.contract_addresses.proposer_checker, &self.provider);
279+
let contract = taiko_bindings::preconf_whitelist::PreconfWhitelist::new(
280+
self.contract_addresses.proposer_checker,
281+
&self.provider,
282+
);
291283
let operators = contract
292284
.operators(self.preconfer_address)
293285
.call()
@@ -299,7 +291,6 @@ impl WhitelistProvider for ExecutionLayer {
299291
))
300292
})?;
301293

302-
// _0 is the activeSince field
303-
Ok(operators._0 > 0)
294+
Ok(operators.activeSince > 0)
304295
}
305296
}

shasta/src/l1/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
mod bindings;
21
pub mod config;
32
pub mod execution_layer;
43
pub mod proposal_tx_builder;

0 commit comments

Comments
 (0)