From e3f42cfd94d30af13a8de6fb2de973116bf7d077 Mon Sep 17 00:00:00 2001 From: Sheng Lundquist Date: Tue, 7 Jan 2025 13:34:44 -0800 Subject: [PATCH 1/4] Only set min version for hyperdrivepy and hyperdrivetypes --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 96e731222..f525a3cf9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,8 +32,8 @@ dependencies = [ "eth-account>=0.13.3", "fixedpointmath>=0.2.1", "hexbytes>=1.2.1", - "hyperdrivepy==0.17.1", - "hyperdrivetypes==1.0.20.13", + "hyperdrivepy>=0.17.1", + "hyperdrivetypes>=1.0.20.13", "ipython>=8.26.0", "ipykernel>=6.29.5", "matplotlib>=3.9.2", From 5200a7c86de2fdcdcf26d12d9501aa7a90fd9ced Mon Sep 17 00:00:00 2001 From: Sheng Lundquist Date: Wed, 8 Jan 2025 09:57:50 -0800 Subject: [PATCH 2/4] Removing broken link in tutorial --- examples/tutorial.ipynb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/tutorial.ipynb b/examples/tutorial.ipynb index d6e40f165..f138be12d 100644 --- a/examples/tutorial.ipynb +++ b/examples/tutorial.ipynb @@ -85,8 +85,7 @@ "metadata": {}, "source": [ "The output of these trades represents the corresponding emitted event from Hyperdrive. For example, the open long event\n", - "is shown below. See [here](https://agent0.readthedocs.io/en/latest/autoapi/agent0/core/hyperdrive/interactive/event_types/index.html)\n", - "for documentation on the output event types.\n" + "is shown below.\n" ] }, { From c16e317bf960ffdaabb23fe71cfc95ce899f237f Mon Sep 17 00:00:00 2001 From: Sheng Lundquist Date: Wed, 8 Jan 2025 11:29:55 -0800 Subject: [PATCH 3/4] Fixing code examples in readme --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fcaa5a64f..30da646c5 100644 --- a/README.md +++ b/README.md @@ -69,15 +69,17 @@ hyperdrive_agent0 = chain.init_agent(base=FixedPoint(100_000), eth=FixedPoint(10 # Run trades. chain.advance_time(datetime.timedelta(weeks=1)) -open_long_event = hyperdrive_agent0.open_long(base=FixedPoint(100), eth=FixedPoint(10)) +open_long_event = hyperdrive_agent0.open_long(base=FixedPoint(100)) chain.advance_time(datetime.timedelta(weeks=5)) close_event = hyperdrive_agent0.close_long( - maturity_time=open_long_event.maturity_time, bonds=open_long_event.bond_amount + maturity_time=open_long_event.args.maturity_time, bonds=open_long_event.args.bond_amount ) # Analyze. pool_info = hyperdrive.get_pool_info(coerce_float=True) pool_info.plot(x="block_number", y="longs_outstanding", kind="line") +trade_ticker = hyperdrive_agent0.get_trade_events() +positions = hyperdrive_agent0.get_positions(show_closed_positions=True) # Shut down the chain. chain.cleanup() @@ -87,7 +89,7 @@ chain.cleanup() ```python import os -from agnet0 import Chain, Hyperdrive +from agent0 import Chain, Hyperdrive # We recommend you use env variables for sensitive information. PUBLIC_ADDRESS = os.getenv("PUBLIC_ADDRESS") @@ -114,7 +116,7 @@ with Chain(RPC_URI) as chain: ```python import os -from agnet0 import Chain, Hyperdrive +from agent0 import Chain, Hyperdrive # We recommend you use env variables for sensitive information. PRIVATE_KEY = os.getenv("PRIVATE_KEY") From 69a27f671d613eccbfbcb7c287bcfd75d99188bc Mon Sep 17 00:00:00 2001 From: Sheng Lundquist Date: Thu, 9 Jan 2025 11:13:41 -0800 Subject: [PATCH 4/4] Version bump to 0.26.2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f525a3cf9..5c84ea732 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "agent0" -version = "0.26.1" +version = "0.26.2" # Authors are the current, primary stewards of the repo # contributors can be found on github authors = [