-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
C-forgeCommand: forgeCommand: forgeCmd-forge-scriptCommand: forge scriptCommand: forge scriptT-featureType: featureType: feature
Description
Component
Forge
Describe the feature you would like
- Currently implementing jsonParse and forge-std helper functions. Although we don't have to use the same field names in Solidity and in the JSON (they are serially decoded as a tuple -- we only care about the correct type), I think it would be unintuitive to the programmer if a field called
typein the Json appeared astransactionTypein the Solidity struct .transactions[].typeis a special word in Solidity.transactions[].tx.functionis a special word in Solidity.receipts[].returnsis a special word in Soliditytransactions[].txis a special word in Solidity.transactions[].txhave some optional fields that are not serialized in case ofNone. That makes the struct parsing very hard, as I have to create different structs for the different combinations and the user needs to expect that (otherwise the tuple serialization will be wrong). It would be better if we serialized them with anullvalue, so the object is consistent with every run.
jsonParse: #2293
forge-std branch: https://github.com/odyslam/forge-std/tree/feat/parse-json
originally discussed in #2153 by @mds1
Additional context
No response
Metadata
Metadata
Assignees
Labels
C-forgeCommand: forgeCommand: forgeCmd-forge-scriptCommand: forge scriptCommand: forge scriptT-featureType: featureType: feature
Type
Projects
Status
Done