agent0.core.hyperdrive.agent.hyperdrive_wallet
Empty accounts for engaging with smart contracts.
Classes
An open long position. |
|
An open short position. |
|
Stateful variable for storing what is in the agent's wallet. |
Module Contents
- class agent0.core.hyperdrive.agent.hyperdrive_wallet.Long
An open long position.
- balance: fixedpointmath.FixedPoint
The amount of bonds that the position is long.
- maturity_time: int
The maturity time of the long.
- class agent0.core.hyperdrive.agent.hyperdrive_wallet.Short
An open short position.
- balance: fixedpointmath.FixedPoint
The amount of bonds that the position is short.
- maturity_time: int
The maturity time of the short.
- class agent0.core.hyperdrive.agent.hyperdrive_wallet.HyperdriveWallet
Bases:
agent0.core.base.EthWalletStateful variable for storing what is in the agent’s wallet.
- lp_tokens: fixedpointmath.FixedPoint
The LP tokens held by the trader.
The amount of unclaimed withdraw shares held by the agent.
- longs: dict[int, Long]
The long positions held by the trader. The dictionary is keyed by the maturity time in seconds.
- shorts: dict[int, Short]
The short positions held by the trader. The dictionary is keyed by the maturity time in seconds.
- copy() HyperdriveWallet
Return a new copy of self.
- Returns:
A deep copy of the wallet.
- Return type: