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

Consider more restrictive schemas for EVM base types #600

Open
cygnusv opened this issue Oct 29, 2024 · 0 comments
Open

Consider more restrictive schemas for EVM base types #600

cygnusv opened this issue Oct 29, 2024 · 0 comments

Comments

@cygnusv
Copy link
Member

cygnusv commented Oct 29, 2024

I was thinking about this some more. Perhaps we need to separate this schema into two parts.

  1. What is allowed for blockchain RPC / smart contract calls
  2. What is generally allowed

The original goal of the paramSchema on L9 was 2), but we are now limiting it to 1).

Solidity doesn't have floating point numbers, so limiting it to z.number().int() is fine. However, a JsonApiCondition can require floating point numbers. For example, the paramOrContextParamSchema is used for the value used for the returnValueTest () - and for a JSON API, checking a floating point number is perfectly fine, but now it won't be; typified by the fact that I saw you had to modify the floating point test.

Originally posted by @derekpierre in #598 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant