Cargo Features

ethers-core has no features set by default.

[dependencies]
ethers-core = { version = "2.0.14", features = ["celo", "legacy", "macros", "optimism", "eip712"] }
celo = legacy

celo support extends the transaction format with extra fields

Affects block::Block.randomness, block::Block.epoch_snark_data, block::Randomness, block::EpochSnarkData, request::TransactionRequest.fee_currency, request::TransactionRequest.gateway_fee_recipient, request::TransactionRequest.gateway_fee, response::Transaction.fee_currency, response::Transaction.gateway_fee_recipient, response::Transaction.gateway_fee

legacy celo?
macros = cargo_metadata, once_cell, syn

Affects ethers-core::macros

optimism

Affects transaction::optimism, response::Transaction.source_hash, response::Transaction.mint, response::Transaction.is_system_tx, response::TransactionReceipt.deposit_nonce, response::TransactionReceipt.l1_fee, response::TransactionReceipt.l1_fee_scalar, response::TransactionReceipt.l1_gas_price, response::TransactionReceipt.l1_gas_used

eip712

Deprecated

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

once_cell macros?
cargo_metadata macros?

Enables cargo_metadata

macros feature enabled dependencies

syn macros?