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

Allow HashMap to map to an Interface #2048

Closed
wants to merge 7 commits into from

Conversation

fubuloubu
Copy link
Member

@fubuloubu fubuloubu commented Jun 26, 2020

Closes: #1824

What I did

  • Refactored "Factory" example into new example "TokenSwap"
  • Updated some of storage variables to use Interfaces directly (other than exchange HashMap)
  • Updated some comments
  • Refactor to use imported interfaces (waiting on Error with Mutual importing when interfaces are used as a variable #2107)
  • Refactor to allow HashMaps to map to Interfaces
  • Update exchange HashMap to use Interfaces (waiting on parser/ refactoring)
  • Refresh test suite for "TokenSwap"

Cute Animal Picture

Cuteeee

@fubuloubu fubuloubu changed the title Allow HashMap to map to an Interface WIP: Allow HashMap to map to an Interface Jun 26, 2020
@fubuloubu fubuloubu added the work in progress Work on this PR or issue is not yet complete but reviewers are free to add their input for guidance. label Jun 26, 2020
@fubuloubu fubuloubu force-pushed the bug/interface-mapping branch 2 times, most recently from cce315d to 128c3f3 Compare June 28, 2020 20:19
@fubuloubu fubuloubu force-pushed the bug/interface-mapping branch 2 times, most recently from dc3667a to 41508c3 Compare July 14, 2020 01:58
@fubuloubu fubuloubu force-pushed the bug/interface-mapping branch from 41508c3 to 4a111ad Compare August 4, 2020 03:45
@codecov-commenter
Copy link

codecov-commenter commented Aug 4, 2020

Codecov Report

Merging #2048 into master will decrease coverage by 38.27%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #2048       +/-   ##
===========================================
- Coverage   84.95%   46.67%   -38.28%     
===========================================
  Files          83       83               
  Lines        8333     8332        -1     
  Branches     2012     2012               
===========================================
- Hits         7079     3889     -3190     
- Misses        752     3897     +3145     
- Partials      502      546       +44     
Impacted Files Coverage Δ
vyper/parser/events.py 7.04% <0.00%> (-86.62%) ⬇️
vyper/parser/s_expressions.py 5.88% <0.00%> (-85.30%) ⬇️
vyper/ast/natspec.py 14.81% <0.00%> (-83.96%) ⬇️
vyper/cli/vyper_json.py 10.40% <0.00%> (-74.40%) ⬇️
vyper/cli/utils.py 18.42% <0.00%> (-73.69%) ⬇️
vyper/parser/external_call.py 10.00% <0.00%> (-73.34%) ⬇️
vyper/signatures/event_signature.py 25.53% <0.00%> (-70.22%) ⬇️
vyper/compiler/output.py 34.31% <0.00%> (-65.69%) ⬇️
vyper/signatures/sig_utils.py 35.71% <0.00%> (-64.29%) ⬇️
...er/function_definitions/parse_internal_function.py 35.64% <0.00%> (-62.38%) ⬇️
... and 53 more

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 c173ba7...990e164. Read the comment docs.

@fubuloubu fubuloubu force-pushed the bug/interface-mapping branch 2 times, most recently from 7dd6127 to 990e164 Compare September 19, 2020 16:09
@fubuloubu fubuloubu force-pushed the bug/interface-mapping branch from 990e164 to c7089a0 Compare March 23, 2021 15:25
@codecov-io
Copy link

codecov-io commented Mar 23, 2021

Codecov Report

Merging #2048 (13458fe) into master (5db35ef) will increase coverage by 0.02%.
The diff coverage is 86.36%.

❗ Current head 13458fe differs from pull request most recent head 2a42e56. Consider uploading reports for the commit 2a42e56 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2048      +/-   ##
==========================================
+ Coverage   85.70%   85.72%   +0.02%     
==========================================
  Files          90       90              
  Lines        8765     8780      +15     
  Branches     2091     2097       +6     
==========================================
+ Hits         7512     7527      +15     
+ Misses        762      761       -1     
- Partials      491      492       +1     
Impacted Files Coverage Δ
vyper/parser/expr.py 76.34% <80.00%> (-0.42%) ⬇️
vyper/parser/external_call.py 85.43% <85.71%> (+1.06%) ⬆️
vyper/types/types.py 82.58% <85.71%> (+0.17%) ⬆️
vyper/parser/global_context.py 71.42% <100.00%> (ø)
vyper/parser/stmt.py 83.33% <100.00%> (+0.12%) ⬆️
vyper/cli/vyper_json.py 85.20% <0.00%> (+0.40%) ⬆️
vyper/ast/validation.py 73.33% <0.00%> (+4.44%) ⬆️

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 5db35ef...2a42e56. Read the comment docs.

@fubuloubu fubuloubu removed the work in progress Work on this PR or issue is not yet complete but reviewers are free to add their input for guidance. label Mar 23, 2021
@fubuloubu fubuloubu changed the title WIP: Allow HashMap to map to an Interface Allow HashMap to map to an Interface Mar 23, 2021
@fubuloubu fubuloubu force-pushed the bug/interface-mapping branch from 2a42e56 to a3dda4e Compare July 30, 2021 03:56
@fubuloubu
Copy link
Member Author

Dup of #2697, closing

@fubuloubu fubuloubu closed this Mar 12, 2022
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.

Allow interfaces to be used in mappings
3 participants