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