agent0.core.base.agent.eth_wallet
Empty accounts for engaging with smart contracts
Classes
Stateful variable for storing what is in the agent's wallet. |
Functions
|
Perform a general non-zero check on a dictionary or class that has a __dict__ attribute. |
Module Contents
- agent0.core.base.agent.eth_wallet.check_non_zero(data: Any) None
Perform a general non-zero check on a dictionary or class that has a __dict__ attribute.
- Parameters:
data (Any) – The data to check for non-zero values. If it is a FixedPoint then it will be checked. If it is dict-like then each key/value in the dict will be checked. Otherwise it will not be checked.
- class agent0.core.base.agent.eth_wallet.EthWallet
Stateful variable for storing what is in the agent’s wallet.
- address: hexbytes.HexBytes
The associated agent’s eth address.
- balance: agent0.core.base.types.Quantity
The base assets that held by the trader.
- check_valid_wallet_state(dictionary: dict | None = None) None
Test that all wallet state variables are greater than zero.
- Parameters:
dictionary (dict | None, optional) – The dictionary to check. If not provided, it will use self.__dict__.