Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Devnet provider API in Rust #502

Open
ivpavici opened this issue Jun 18, 2024 · 5 comments
Open

Expose Devnet provider API in Rust #502

ivpavici opened this issue Jun 18, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@ivpavici
Copy link
Contributor

ivpavici commented Jun 18, 2024

Let's see for the future the possibility of instantiating devnet inside tests, like so:

// Ensure `anvil` is available in $PATH.
let anvil = Anvil::new().fork("https://eth.merkle.io").try_spawn()?;

println!("Anvil running at `{}`", anvil.endpoint());

reference and more examples:
https://alloy.rs/examples/anvil/fork_anvil.html

@ivpavici ivpavici added the enhancement New feature or request label Jun 18, 2024
@FabijanC
Copy link
Contributor

Inside of tests of people using Rust SDKs for interacting with Starknet?

@ivpavici
Copy link
Contributor Author

yes!

@FabijanC
Copy link
Contributor

FabijanC commented Jul 1, 2024

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

@FabijanC FabijanC self-assigned this Jul 17, 2024
@FabijanC
Copy link
Contributor

FabijanC commented Jul 29, 2024

Closed via 0xSpaceShard/starknet-devnet-js#15. Consider reopening if needed as a Rust feature.

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in starknet-devnet-rs Jul 29, 2024
@FabijanC
Copy link
Contributor

FabijanC commented Aug 6, 2024

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.

@FabijanC FabijanC reopened this Aug 6, 2024
@github-project-automation github-project-automation bot moved this from ✅ Done to 📋 Backlog in starknet-devnet-rs Aug 6, 2024
@FabijanC FabijanC changed the title Easily spawn devnet inside of tests Expose a Devnet provider API in Rust Aug 13, 2024
@FabijanC FabijanC changed the title Expose a Devnet provider API in Rust Expose Devnet provider API in Rust Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants