Open ivpavici opened 5 months ago
Inside of tests of people using Rust SDKs for interacting with Starknet?
yes!
This could also be a part of starknet-devnet-js. That library could:
1) export a provider (already does)
2) export a Devnet wrapper: new StarknetDevnet();
Inspiration could be taken from the Devnet
class of starknet-hardhat-plugin: https://github.com/0xSpaceShard/starknet-hardhat-plugin/blob/master/src/types/devnet.ts
Closed via https://github.com/0xSpaceShard/starknet-devnet-js/pull/15. Consider reopening if needed as a Rust feature.
Reopening because it seems we need this as a Rust feature, too. We could expose the BackgroundDevnet that we already have, perhaps in a new or an existing crate, or we could open a new repo, similar to starknet-devnet-js.
Let's see for the future the possibility of instantiating devnet inside tests, like so:
reference and more examples: https://alloy.rs/examples/anvil/fork_anvil.html