verbs_examples.uniswap.sim.init_cache#

init_cache(key: str, block_number: int, seed: int, n_steps: int) Tuple[int, int, List[Tuple[bytes, Tuple[bytes, int, bytes, bytes]]], List[Tuple[bytes, bytes, bytes]]][source]#

Generate a simulation request cache

Run a simulation from a fork and store a cache of data request for use in other simulations.

Parameters:
  • key (str) – Alchemy API key

  • block_number (int) – Block number to fork from

  • seed (int) – Random seed

  • n_steps (int) – Number of simulation steps

Returns:

cache (verbs.types.Cache) – Cache generated using verbs.envs.ForkEnv.export_cache().