diff --git a/crates/precompile/Cargo.toml b/crates/precompile/Cargo.toml index ed455c04..d1ab327c 100644 --- a/crates/precompile/Cargo.toml +++ b/crates/precompile/Cargo.toml @@ -126,7 +126,7 @@ portable = ["revm-primitives/portable", "c-kzg?/portable"] # Use `secp256k1` as a faster alternative to `k256`. # The problem that `secp256k1` has is it fails to build for `wasm` target on Windows and Mac as it is c lib. # In Linux it passes. If you don't require to build wasm on win/mac, it is safe to use it and it is enabled by default. -secp256k1 = ["dep:secp256k1"] +secp256k1 = ["dep:secp256k1", "tendermint"] # Enables the BLS12-381 precompiles. blst = ["dep:blst"] diff --git a/crates/precompile/src/lib.rs b/crates/precompile/src/lib.rs index cf61f3db..bd4d3354 100644 --- a/crates/precompile/src/lib.rs +++ b/crates/precompile/src/lib.rs @@ -3,6 +3,8 @@ //! Implementations of EVM precompiled contracts. #![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(not(feature = "std"), no_std)] +#![allow(unused_mut)] +#![allow(unused_crate_dependencies)] #[macro_use] #[cfg(not(feature = "std"))] diff --git a/crates/precompile/src/tm_secp256k1.rs b/crates/precompile/src/tm_secp256k1.rs index 3874b184..955d825b 100644 --- a/crates/precompile/src/tm_secp256k1.rs +++ b/crates/precompile/src/tm_secp256k1.rs @@ -3,11 +3,9 @@ use crate::{Bytes, Error, Precompile, PrecompileError, PrecompileResult, PrecompileWithAddress}; use revm_primitives::PrecompileOutput; use secp256k1::{ecdsa, Message, PublicKey}; -#[cfg(feature = "bsc")] use tendermint::{account, public_key}; /// Tendermint SECP256K1 signature recover precompile for BSC. -#[cfg(feature = "bsc")] pub(crate) const TM_SECP256K1_SIGNATURE_RECOVER: PrecompileWithAddress = PrecompileWithAddress( crate::u64_to_address(105), Precompile::Standard(tm_secp256k1_signature_recover_run), @@ -24,7 +22,6 @@ const SECP256K1_SIGNATURE_MSGHASH_LENGTH: usize = 32; /// | PubKey | Signature | SignatureMsgHash | /// /// | 33 bytes | 64 bytes | 32 bytes | -#[cfg(feature = "bsc")] fn tm_secp256k1_signature_recover_run(input: &Bytes, gas_limit: u64) -> PrecompileResult { const TM_SECP256K1_SIGNATURE_RECOVER_BASE: u64 = 3_000; @@ -76,7 +73,6 @@ fn tm_secp256k1_signature_recover_run(input: &Bytes, gas_limit: u64) -> Precompi } #[cfg(test)] -#[cfg(feature = "bsc")] mod tests { use super::*; use revm_primitives::hex;