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

Fully support ABIv2 State Mutability Field #2054

Merged
merged 10 commits into from
Jun 28, 2020

Conversation

fubuloubu
Copy link
Member

@fubuloubu fubuloubu commented Jun 27, 2020

Closes: #2042
Closes: #1931

What I did

  • Changed modifying to nonpayable in external interface definitions
  • Add support for payable in external interface definitions (check for value=... iff payable)
  • Write tests and docs for payable usage
  • Output only stateMutability in ABI output

Description for the changelog

  • Changed modifying to nonpayable in external interface definitions
  • Add support for payable in external interface definitions
  • Deprecated ABIv1 output in favor of ABIv2

Cute Animal Picture

dogs to doughnuts

@fubuloubu fubuloubu force-pushed the refactor/abi-stateMutability branch from 4544ae9 to 64358e9 Compare June 27, 2020 13:25
@codecov-commenter
Copy link

codecov-commenter commented Jun 27, 2020

Codecov Report

Merging #2054 into master will decrease coverage by 0.53%.
The diff coverage is 71.87%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2054      +/-   ##
==========================================
- Coverage   84.91%   84.37%   -0.54%     
==========================================
  Files          83       83              
  Lines        8133     8129       -4     
  Branches     1967     1966       -1     
==========================================
- Hits         6906     6859      -47     
- Misses        738      773      +35     
- Partials      489      497       +8     
Impacted Files Coverage Δ
vyper/context/validation/local.py 87.71% <0.00%> (ø)
vyper/parser/parser.py 86.81% <ø> (ø)
vyper/context/types/function.py 83.76% <71.42%> (-1.01%) ⬇️
vyper/context/types/meta/interface.py 87.67% <100.00%> (-1.08%) ⬇️
vyper/signatures/interface.py 80.74% <100.00%> (ø)
vyper/functions/functions.py 83.71% <0.00%> (-4.45%) ⬇️
vyper/ast/nodes.py 92.72% <0.00%> (-1.62%) ⬇️

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 0946b4e...64358e9. Read the comment docs.

@fubuloubu fubuloubu force-pushed the refactor/abi-stateMutability branch from f7a9c57 to 773b219 Compare June 28, 2020 01:57
@fubuloubu
Copy link
Member Author

fubuloubu commented Jun 28, 2020

Note: will try refactoring out vyper/signature in favor of adding ContractFunctionType.to_abi ABI serializer, and replacing all uses of vyper/signature in vyper/parser in another PR (see https://github.com/fubuloubu/vyper/tree/refactor/abi-serializer)

Copy link
Contributor

@iamdefinitelyahuman iamdefinitelyahuman left a comment

Choose a reason for hiding this comment

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

Looks really good. I really like that the interface logic moved into from_FunctionDef, it's much easier to grok now.

docs/structure-of-a-contract.rst Show resolved Hide resolved
vyper/context/types/function.py Outdated Show resolved Hide resolved
@iamdefinitelyahuman
Copy link
Contributor

Note to self: Once this merges, rename ContractFunctionType to ContractFunction

Co-authored-by: Ben Hauser <35276322+iamdefinitelyahuman@users.noreply.github.com>
@fubuloubu fubuloubu merged commit ac57884 into vyperlang:master Jun 28, 2020
@fubuloubu fubuloubu deleted the refactor/abi-stateMutability branch June 28, 2020 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants