-
Notifications
You must be signed in to change notification settings - Fork 65
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
Implement Counterfactual Safes creation rate limit #1801
Conversation
Pull Request Test Coverage Report for Build 10281742208Details
💛 - Coveralls |
{ length: creationRateLimitCalls }, | ||
(_, i) => | ||
createCounterfactualSafeDtoBuilder() | ||
.with('chainId', i.toString()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chainId
is set as a discriminator to avoid the DTO properties collision edge case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As with the other implementation for accounts, this seems more guard-like behaviour? It might even allow us to reduce repetition if it was in a guard. What do you think?
I've answered in #1800 (comment), we can follow the discussion there if you are happy with it. |
e08697c
to
9ca3900
Compare
Adds a rate limitation controlled by a cache key before proceeding with Counterfactual Safes creation
Summary
This PR introduces a rate limitation to creating Counterfactual Safes using the related
CounterfactualSafesController
endpoint. This rate limit is applied by taking theAccount
associated with the Counterfactual Safe to calculate the limit threshold.Changes