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
8.17k stars 1.7k forks source link

feat(config): add support for authentication in `[rpc_endpoints]` #8276

Closed mattsse closed 1 month ago

mattsse commented 3 months ago

Component

Forge

Describe the feature you would like

https://github.com/foundry-rs/foundry/blob/f9674c3ea80ec9cd92e5f96a75542b3a26fa4752/crates/config/src/endpoints.rs#L215-L215

we already support settings like cups and retries:

https://github.com/foundry-rs/foundry/blob/f9674c3ea80ec9cd92e5f96a75542b3a26fa4752/crates/config/src/endpoints.rs#L219-L228

we can easily integrate authentication as well,

this should probably be something like

auth = "bearer|basic:${BEARER}"

TODO

Additional context

No response

caiquejjx commented 2 months ago

hey! I'd like to work in this one if available

mattsse commented 2 months ago

awesome, lmk if you need some pointers by opening a draft pr

caiquejjx commented 2 months ago

@mattsse I was taking a look at it and I wasn't able to completely understand the Provider part as I didn't found the config being used, I appreciate if you can give some pointers

mattsse commented 2 months ago

oh interesting, I believe you're right.

let's first add support for auth parsing to the config and then we actually integrate this

caiquejjx commented 2 months ago

@mattsse I opened a PR with the basic stuff of adding the auth field, since I'm not sure how it's going to be used can you check if it's enough for now? Thanks!