Skip to content

Commit

Permalink
block number added as parameter and docstring typo fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
msabvid committed Mar 20, 2024
1 parent f24cb89 commit d75a0b9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
8 changes: 7 additions & 1 deletion aave_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
type=str,
help="Generate a new request cache file.",
)
parser.add_argument(
"--block",
type=int,
default=19163600,
help="Ethereum Block number for mainnet forking",
)

args = parser.parse_args()

Expand All @@ -53,7 +59,7 @@
), "Alchemy key required, set with '--alchemy_key' argument"
cache = sim.init_cache(
args.alchemy_key,
19163600,
args.block,
args.seed,
args.n_steps,
args.n_borrow_agents,
Expand Down
8 changes: 7 additions & 1 deletion uniswap_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
type=str,
help="Generate a new request cache file.",
)
parser.add_argument(
"--block",
type=int,
default=19163600,
help="Ethereum Block number for mainnet forking",
)
args = parser.parse_args()

with open(os.path.join("verbs_examples", "uniswap", "cache.json"), "r") as f:
Expand All @@ -45,7 +51,7 @@
), "Alchemy key required, set with '--alchemy_key' argument"
cache = sim.init_cache(
args.alchemy_key,
19163600,
args.block,
args.seed,
args.n_steps,
)
Expand Down
2 changes: 1 addition & 1 deletion verbs_examples/agents/uniswap_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ def update(self, rng: np.random.Generator, env) -> List[verbs.types.Transaction]
list
List of transactions to be processed in the next block
of the simulation. This can be an empty list if the
agent is not submitting any transacti
agent is not submitting any transactions.
"""

sqrt_target_price_x96 = price_from_tick(self.ticks_to_explore[self.step])
Expand Down

0 comments on commit d75a0b9

Please sign in to comment.