pub trait HardhatApiClient: ClientT {
Show 16 methods
// Provided methods
fn hardhat_drop_transaction(
&self,
tx_hash: FixedBytes<32>,
) -> impl Future<Output = Result<bool, Error>> + Send { ... }
fn hardhat_impersonate_account(
&self,
address: Address,
) -> impl Future<Output = Result<(), Error>> + Send { ... }
fn hardhat_get_automine(
&self,
) -> impl Future<Output = Result<bool, Error>> + Send { ... }
fn hardhat_metadata(
&self,
) -> impl Future<Output = Result<Metadata, Error>> + Send { ... }
fn hardhat_mine(
&self,
blocks: Option<Uint<256, 4>>,
interval: Option<Uint<256, 4>>,
) -> impl Future<Output = Result<(), Error>> + Send { ... }
fn hardhat_reset(
&self,
fork: Option<Forking>,
) -> impl Future<Output = Result<(), Error>> + Send { ... }
fn hardhat_set_balance(
&self,
address: Address,
balance: Uint<256, 4>,
) -> impl Future<Output = Result<(), Error>> + Send { ... }
fn hardhat_set_code(
&self,
address: Address,
code: Bytes,
) -> impl Future<Output = Result<(), Error>> + Send { ... }
fn hardhat_set_coinbase(
&self,
address: Address,
) -> impl Future<Output = Result<(), Error>> + Send { ... }
fn hardhat_set_logging_enabled(
&self,
enabled: bool,
) -> impl Future<Output = Result<(), Error>> + Send { ... }
fn hardhat_set_min_gas_price(
&self,
gas_price: Uint<256, 4>,
) -> impl Future<Output = Result<(), Error>> + Send { ... }
fn hardhat_set_next_block_base_fee_per_gas(
&self,
base_fee_per_gas: Uint<256, 4>,
) -> impl Future<Output = Result<(), Error>> + Send { ... }
fn hardhat_set_prev_randao(
&self,
prev_randao: FixedBytes<32>,
) -> impl Future<Output = Result<(), Error>> + Send { ... }
fn hardhat_set_nonce(
&self,
address: Address,
nonce: Uint<256, 4>,
) -> impl Future<Output = Result<(), Error>> + Send { ... }
fn hardhat_set_storage_at(
&self,
address: Address,
slot: Uint<256, 4>,
value: FixedBytes<32>,
) -> impl Future<Output = Result<(), Error>> + Send { ... }
fn hardhat_stop_impersonating_account(
&self,
address: Address,
) -> impl Future<Output = Result<(), Error>> + Send { ... }
}client and rpc only.Expand description
Client implementation for the HardhatApi RPC API.
Provided Methods§
Sourcefn hardhat_drop_transaction(
&self,
tx_hash: FixedBytes<32>,
) -> impl Future<Output = Result<bool, Error>> + Send
fn hardhat_drop_transaction( &self, tx_hash: FixedBytes<32>, ) -> impl Future<Output = Result<bool, Error>> + Send
Removes the given transaction from the mempool, if it exists.
Returns true if successful, otherwise false.
Sourcefn hardhat_impersonate_account(
&self,
address: Address,
) -> impl Future<Output = Result<(), Error>> + Send
fn hardhat_impersonate_account( &self, address: Address, ) -> impl Future<Output = Result<(), Error>> + Send
Allows Hardhat Network to sign transactions as the given address.
Sourcefn hardhat_get_automine(
&self,
) -> impl Future<Output = Result<bool, Error>> + Send
fn hardhat_get_automine( &self, ) -> impl Future<Output = Result<bool, Error>> + Send
Returns true if automatic mining is enabled, and false otherwise.
Sourcefn hardhat_metadata(
&self,
) -> impl Future<Output = Result<Metadata, Error>> + Send
fn hardhat_metadata( &self, ) -> impl Future<Output = Result<Metadata, Error>> + Send
Returns an object with metadata about the instance of the Hardhat network.
Sourcefn hardhat_mine(
&self,
blocks: Option<Uint<256, 4>>,
interval: Option<Uint<256, 4>>,
) -> impl Future<Output = Result<(), Error>> + Send
fn hardhat_mine( &self, blocks: Option<Uint<256, 4>>, interval: Option<Uint<256, 4>>, ) -> impl Future<Output = Result<(), Error>> + Send
Mines a specified number of blocks at a given interval.
Sourcefn hardhat_reset(
&self,
fork: Option<Forking>,
) -> impl Future<Output = Result<(), Error>> + Send
fn hardhat_reset( &self, fork: Option<Forking>, ) -> impl Future<Output = Result<(), Error>> + Send
Resets back to a fresh forked state, fork from another block number or disable forking.
Sourcefn hardhat_set_balance(
&self,
address: Address,
balance: Uint<256, 4>,
) -> impl Future<Output = Result<(), Error>> + Send
fn hardhat_set_balance( &self, address: Address, balance: Uint<256, 4>, ) -> impl Future<Output = Result<(), Error>> + Send
Sets the balance for the given address.
Sourcefn hardhat_set_code(
&self,
address: Address,
code: Bytes,
) -> impl Future<Output = Result<(), Error>> + Send
fn hardhat_set_code( &self, address: Address, code: Bytes, ) -> impl Future<Output = Result<(), Error>> + Send
Modifies the bytecode stored at an account’s address.
Sourcefn hardhat_set_coinbase(
&self,
address: Address,
) -> impl Future<Output = Result<(), Error>> + Send
fn hardhat_set_coinbase( &self, address: Address, ) -> impl Future<Output = Result<(), Error>> + Send
Sets the coinbase address to be used in new blocks.
Sourcefn hardhat_set_logging_enabled(
&self,
enabled: bool,
) -> impl Future<Output = Result<(), Error>> + Send
fn hardhat_set_logging_enabled( &self, enabled: bool, ) -> impl Future<Output = Result<(), Error>> + Send
Enables or disables logging.
Sourcefn hardhat_set_min_gas_price(
&self,
gas_price: Uint<256, 4>,
) -> impl Future<Output = Result<(), Error>> + Send
fn hardhat_set_min_gas_price( &self, gas_price: Uint<256, 4>, ) -> impl Future<Output = Result<(), Error>> + Send
Changes the minimum gas price accepted by the network (in wei).
Sourcefn hardhat_set_next_block_base_fee_per_gas(
&self,
base_fee_per_gas: Uint<256, 4>,
) -> impl Future<Output = Result<(), Error>> + Send
fn hardhat_set_next_block_base_fee_per_gas( &self, base_fee_per_gas: Uint<256, 4>, ) -> impl Future<Output = Result<(), Error>> + Send
Sets the base fee of the next block.
Sourcefn hardhat_set_prev_randao(
&self,
prev_randao: FixedBytes<32>,
) -> impl Future<Output = Result<(), Error>> + Send
fn hardhat_set_prev_randao( &self, prev_randao: FixedBytes<32>, ) -> impl Future<Output = Result<(), Error>> + Send
Sets the PREVRANDAO value of the next block.
Sourcefn hardhat_set_nonce(
&self,
address: Address,
nonce: Uint<256, 4>,
) -> impl Future<Output = Result<(), Error>> + Send
fn hardhat_set_nonce( &self, address: Address, nonce: Uint<256, 4>, ) -> impl Future<Output = Result<(), Error>> + Send
Modifies an account’s nonce by overwriting it.
Sourcefn hardhat_set_storage_at(
&self,
address: Address,
slot: Uint<256, 4>,
value: FixedBytes<32>,
) -> impl Future<Output = Result<(), Error>> + Send
fn hardhat_set_storage_at( &self, address: Address, slot: Uint<256, 4>, value: FixedBytes<32>, ) -> impl Future<Output = Result<(), Error>> + Send
Writes a single position of an account’s storage.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".