You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our Forest node leverages RPC types for building a JSON-RPC API. To improve the robustness and clarity of these types, we propose adding decorators that enforce additional constraints on their format.
For instance, an EthHash type should be represented as a string containing 40 hexadecimal characters, prefixed with "0x", matching a given regex pattern (e.g., ^0x[a-fA-F0-9]{40}$). This would ensure consistency and help prevent incorrect data.
Acceptance Criteria
Following Forest types are making use of constraints and forest-tool shed openrpc can generate them:
Our Forest node leverages RPC types for building a JSON-RPC API. To improve the robustness and clarity of these types, we propose adding decorators that enforce additional constraints on their format.
For instance, an
EthHash
type should be represented as a string containing 40 hexadecimal characters, prefixed with "0x", matching a given regex pattern (e.g.,^0x[a-fA-F0-9]{40}$
). This would ensure consistency and help prevent incorrect data.Acceptance Criteria
Following Forest types are making use of constraints and
forest-tool shed openrpc
can generate them:EthInt64
EthHash
BlockHash
EthBytes
Bloom
EthAddress
Resources
https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-00#rfc.section.6.3
https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-00#numeric
The text was updated successfully, but these errors were encountered: