foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
7.87k stars 1.58k forks source link

Publish crates to crates.io #665

Open joleeee opened 2 years ago

joleeee commented 2 years ago
[![Crates.io][crates-badge]][crates-url]

[crates-badge]: https://img.shields.io/crates/v/foundry.svg
[crates-url]: https://crates.io/crates/foundry-rs

README.md contains a link to https://crates.io/crates/foundry-rs whichs 404s, and a badge which points to /foundry.svg (no -rs suffix), which is another crate entirely: https://crates.io/crates/foundry

gakonst commented 2 years ago

I got access to the Foundry crate as a placeholder, but never ended up publishing cuz our deps (primarily ethers and sputnik evm) are not yet published.

onbjerg commented 2 years ago

Do we want to publish internal Foundry crates on crates.io @gakonst?

onbjerg commented 1 year ago

Component

Anvil

Describe the feature you would like

Feature Request

Hello, I would like to have anvil crate published to crates.io as a crate (not just the binary) and that we can be able to use it from normal rust projects.

Context and use cases

It would be super useful to have a fully running local EVM node from our Rust projects and be able to interact with them using ethers-rs for example, and here is specifically what are our use case:

As a developer, I would like to be able to spawn a local EVM node, deploy some contracts on it (using ethers-rs), run a few tests on it, then at the end tear down everything.

Talking more specific, we are building General Purpose Oracles, in Rust using ethers-rs, and we built a general EventWatcher module that watches for contract events and then calls handle_event to a set of preconfigured event handlers. We want to test this and make sure it works under different scenarios.

What we did consider before? we did fallback to use and write all of our tests in Typescript with ganache and ethers.js and run our oracle as a child process with JSON logging, man, it is a crazy process to just test a few things. What we hope for is that, with everything being in Rust using anvil it will be super simple as we can use Rust's built-in test framework to do all these things in much simpler way so that we test each part in more isolated way.

Additional context

Here is a link to our Oracle code of the EventWatcher that I was talking about above.

Posted in https://github.com/foundry-rs/foundry/issues/2441

lucas-manuel commented 1 year ago

Close-able? @mds1

mds1 commented 1 year ago

leaving this open since I don't think the foundry crates are published on crates.io yet