-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add support for blacklisted rpc endpoints #9055
Labels
Comments
mattsse
added
good first issue
Good for newcomers
T-feature
Type: feature
C-anvil
Command: anvil
labels
Oct 7, 2024
Hi, I would like to give this one a try |
related #8731 |
@mattsse I have 2 questions:
or is this one better:
|
yeah method not found or method not whitelisted |
I'd also like to support some presets, like |
@mattsse Could you elaborate on that? Maybe provide an example |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Component
Anvil
Describe the feature you would like
anvil's api is quite massive and some endpoints are considered "god mode"
there are usecases where these should be restricted.
this should be done on the rpc server level because this is how the server is exposed and the easiest solution here is:
foundry/crates/anvil/server/src/config.rs
Line 8 in e215f3f
foundry/crates/anvil/server/src/lib.rs
Lines 76 to 78 in e215f3f
this layer should deserialize the request and reject disallowed methods, this is likely slightly inefficient but this deserialization overhead should be fine because we only need to check for method.
Additional context
No response
The text was updated successfully, but these errors were encountered: