Local implementation of simulated tx
hello guys, I'm realizing the development of the Sui contract toolchain and I'm currently experiencing a technical problem.
-
How to implement a devInspectTransactionBlock function locally, maybe I need to synchronize the related Object and contract bytecode locally?
-
Is it possible to implement a function similar to Hardhat's ability to replicate the state of mainet to local ?
Thank you for opening this issue, a team member will review it shortly. Until then, please do not interact with any users that claim to be from Sui support and do not click on any links!
@web3olalala to run that locally, you would need to run a local instance of Sui blockchain. You could check this project as a starter: https://suibase.io/
- That's im not sure about, but the mainnet state of Sui is fairly big, so you would at least need a large amount of storage space that's beyond most personal computer.
For 2, we do not have a forking capability yet. It's something we want to add, but there's no ETA yet.
@stefan-mysten For 1, any suggestions? I'd like to create a minimal simulation of a packge locally.
@web3olalala I am not sure, I asked internally and hope that someone will be able to share some insights on 1.
@stefan-mysten Has there been any progress?
@web3olalala not sure I would know on how to direct you. would anything from the replay tool help you there?
Check out sui/crates/sui-replay-2.
This seems to be replaying a tx, a tx predictions I want to achieve. But I will take a closer look.
Yes, that's for replaying a transaction. Another possible inspiration might be the simulacrum, however it is fully undocumented. It may help you but you'd need to dig into the code to see if anything's useful from there:
https://github.com/MystenLabs/sui/tree/main/crates/simulacrum
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.