If we take every
ConfigurableCorePoolas a state machine, then a
SimulatorRoadmapManagercan be taken as
PoolStatecontainer as well as
ConfigurableCorePoolmanager. At this point, every state machine can be expanded as a roadmap of states.
First let's get the instance of
let simulatorRoadmapManager: SimulatorRoadmapManager =
You can list and check all
ConfigurableCorePoolcreated by Tuner within the program.
let pools: ConfigurableCorePool = await simulatorRoadmapManager.listRoutes();
ConfigurableCorePoolid, Tuner can print route from the first pool state to current pool state of the state machine in pretty format.
Also you can persist the route for selecting them in the internal database later.
let roadmapId = await simulatorRoadmapManager.persistRoute(
"description for roadmap"
Then load the roadmap and print the route in pretty format.
Note: As the storage scale of Uniswap V3 CorePool(up to 160,000+ Ticks and unlimited Positions), frequent persistence of route as well as snapshot is not recommended. Please pay attention to space cost.