1use alloy_primitives::{Bytes, U128};
2use jsonrpsee::{core::RpcResult, proc_macros::rpc};
34/// Miner namespace rpc interface that can control miner/builder settings
5#[cfg_attr(not(feature = "client"), rpc(server, namespace = "miner"))]
6#[cfg_attr(feature = "client", rpc(server, client, namespace = "miner"))]
7pub trait MinerApi {
8/// Sets the extra data string that is included when this miner mines a block.
9 ///
10 /// Returns an error if the extra data is too long.
11#[method(name = "setExtra")]
12fn set_extra(&self, record: Bytes) -> RpcResult<bool>;
1314/// Sets the minimum accepted gas price for the miner.
15#[method(name = "setGasPrice")]
16fn set_gas_price(&self, gas_price: U128) -> RpcResult<bool>;
1718/// Sets the gaslimit to target towards during mining.
19#[method(name = "setGasLimit")]
20fn set_gas_limit(&self, gas_limit: U128) -> RpcResult<bool>;
21}