SimulatedWallet#

tradeexecutor.backtest.simulated_wallet.SimulatedWallet class.

class SimulatedWallet[source]#

Bases: object

A wallet that keeps token balances by ERC-20 address.

__init__()[source]#

Methods

__init__()

fetch_nonce_and_tx_hash()

Allocates a dummy nonce for a transaction.

get_balance(token_address)

update_balance(token_address, delta)

__init__()[source]#
fetch_nonce_and_tx_hash()[source]#

Allocates a dummy nonce for a transaction.

Returns

Tuple (nonce, tx_hash)

Return type

Tuple[int, str]