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

feat: add dynamicName in schema returned by getSchema #428

Merged
merged 6 commits into from
May 3, 2024

Conversation

CJ42
Copy link
Collaborator

@CJ42 CJ42 commented Apr 28, 2024

What kind of change does this PR introduce (bug fix, feature, docs update, ...)?

⭐ Feature

What is the current behaviour (you can also link to an open issue here)?

#400 introduced a change in the getSchema function that replaces the dynamic part <...> with the actual hex value in the name of the schema.

However, this causes a problem has the schem returned cannot be used anymore as it will the name now contains a hex value and ERC725.encodeData or ERC725.decodeData will not find the name anymore when searching through the data keys.

What is the new behaviour (if this is a feature change)?

  • Add an extra property dynamicName returned in the schema when dealing with Mapping and MappingWithGrouping data keys when using getSchema(...)
  • Preserves the full name of the data key to address the issue mentioned above.
  • Export getSchema function standalone, to make it available outside of class instance

Other information:

None

@CJ42 CJ42 force-pushed the feat/dynamic-name-schema branch from 3413800 to 12d34d2 Compare April 28, 2024 22:04
@CJ42 CJ42 changed the title feat: add dynamicPart in schema returned by getSchema feat: add dynamicName in schema returned by getSchema Apr 29, 2024
src/lib/schemaParser.test.ts Outdated Show resolved Hide resolved
@CJ42 CJ42 changed the base branch from fix/tuple-encoding-number to develop April 30, 2024 07:18
@CJ42 CJ42 force-pushed the feat/dynamic-name-schema branch from 7ce9ab4 to 0175c4f Compare April 30, 2024 15:09
@CJ42 CJ42 force-pushed the feat/dynamic-name-schema branch from 5ad3ef0 to 902b2be Compare May 2, 2024 08:49
@codecov-commenter
Copy link

codecov-commenter commented May 2, 2024

Codecov Report

Attention: Patch coverage is 94.28571% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 81.65%. Comparing base (9640d9f) to head (6b73a7e).
Report is 192 commits behind head on develop.

Files Patch % Lines
src/lib/schemaParser.ts 93.93% 0 Missing and 2 partials ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #428      +/-   ##
===========================================
- Coverage    83.71%   81.65%   -2.07%     
===========================================
  Files           18       22       +4     
  Lines         1130     1401     +271     
  Branches       255      319      +64     
===========================================
+ Hits           946     1144     +198     
- Misses          98      150      +52     
- Partials        86      107      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@CJ42 CJ42 force-pushed the feat/dynamic-name-schema branch 2 times, most recently from 693e2c9 to cf05f53 Compare May 2, 2024 23:17
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

Successfully merging this pull request may close these issues.

3 participants