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 support for new getData([]) #48

Merged
merged 6 commits into from
Oct 31, 2021
Merged

feat: add support for new getData([]) #48

merged 6 commits into from
Oct 31, 2021

Conversation

Hugoo
Copy link
Contributor

@Hugoo Hugoo commented Oct 28, 2021

Closes #44

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

Add support for new ERC725 getData. See issue above for details.

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

Does't support getData() with array version (bytes[] and bytes32[])

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

Now, supports getData() with array version (bytes[] and bytes32[])

! Does not support GraphQL provider !

It doesn't support "1 call" for multiple data yet

The work in this PR was already too big to handle this feature. I opened a ticket for this optimisation step:
#49

TODO:

  • perform extra 'e2e' tests with MetaMask to check ethereum provider mock implementation
  • merge duplicated code on web3 / ethereum providers (supports interface)

@Hugoo Hugoo marked this pull request as draft October 28, 2021 17:48
Copy link
Contributor

@rryter rryter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good Job so far Hugo. I'll do another review once you are ready to merge.

src/providers/ethereumProviderWrapper.ts Outdated Show resolved Hide resolved
src/providers/ethereumProviderWrapper.ts Outdated Show resolved Hide resolved
src/providers/web3ProviderWrapper.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@CallumGrindle CallumGrindle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

@codecov-commenter
Copy link

codecov-commenter commented Oct 30, 2021

Codecov Report

Merging #48 (86c856e) into main (8f5fba4) will increase coverage by 4.22%.
The diff coverage is 81.52%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #48      +/-   ##
==========================================
+ Coverage   80.04%   84.27%   +4.22%     
==========================================
  Files           8        8              
  Lines         406      477      +71     
  Branches       88      100      +12     
==========================================
+ Hits          325      402      +77     
+ Misses         44       35       -9     
- Partials       37       40       +3     
Impacted Files Coverage Δ
src/lib/provider-wrapper-utils.ts 92.30% <ø> (ø)
src/index.ts 78.70% <72.72%> (+0.27%) ⬆️
src/lib/utils.ts 79.45% <73.80%> (+2.52%) ⬆️
src/providers/ethereumProviderWrapper.ts 81.08% <75.00%> (-6.42%) ⬇️
src/providers/web3ProviderWrapper.ts 89.13% <79.16%> (-10.87%) ⬇️
src/lib/constants.ts 100.00% <100.00%> (ø)
src/lib/encoder.ts 90.42% <100.00%> (+18.51%) ⬆️
src/types/Method.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a326cd6...86c856e. Read the comment docs.

@Hugoo Hugoo marked this pull request as ready for review October 30, 2021 11:33
@frozeman frozeman merged commit 6cbb1e7 into main Oct 31, 2021
@frozeman frozeman deleted the get-data branch October 31, 2021 15:07
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.

Add compatibility for new getData([]) with backward comp. of getData()
5 participants