This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
Add Support for Tuples (aka Structs) in the ABI Contract Schema #2064
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR upgrades
ajv
tov6
which implementsdraft07
of the JSON Schema. It also adds support for tuples (which is howstruct
Solidity types are represented) as a parameter type.You'll see https://github.com/trufflesuite/truffle/pull/2064/files#diff-da060bd5170ce9e90e14ece903806d3eR135 says that the
components
property has an array ofobject
types. This is supposed to be"items": { "$ref": "#/definitions/Parameter" }
, but the https://github.com/bcherny/json-schema-to-typescript dependency we use to generate typings fails due to the recursion (gets aMaximum call stack size exceeded
error when building), despite the schema supports this recursion.The dependency has known about this issue for 2 years now (bcherny/json-schema-to-typescript#76 which depends on another dependency issue APIDevTools/json-schema-ref-parser#37), but a fix has yet to come.
#2065 tracks this issue