zpywallet.fees.eth package

Submodules

zpywallet.fees.eth.fullnode module

class EthereumWeb3FeeEstimator(**kwargs)[source]

Bases: object

Fee estimation class for Ethereum full nodes.

Note: Ethereum calls fees “gas”. So returned units are in gas. There is also another function that returns the gas price.

estimate_gas(transaction_obj)[source]
estimate_gas_price()[source]
add_web3_cache_middleware(middleware_onion)[source]

zpywallet.fees.eth.loadbalancer module

class EthereumFeeEstimator(**kwargs)[source]

Bases: object

A class representing a Ethereum gas estimator.

Developers should use this class, because it autoselects the most stable providers to fetch data from.

estimate_gas(transaction_obj)[source]

Gets the gas required for a particular transaction.

Returns:

The gas required for the transaction.

Return type:

int

Raises:

NetworkException – If the API request fails or the gas cannot be retrieved.

Module contents