Skip to content

Ease restrictions on self-call#2059

Merged
iamdefinitelyahuman merged 3 commits into
vyperlang:masterfrom
iamdefinitelyahuman:runtime-self-call
Jun 27, 2020
Merged

Ease restrictions on self-call#2059
iamdefinitelyahuman merged 3 commits into
vyperlang:masterfrom
iamdefinitelyahuman:runtime-self-call

Conversation

@iamdefinitelyahuman

Copy link
Copy Markdown
Contributor

What I did

Ease restrictions on a contract calling into itself:

  • remove the runtime assertion
  • remove the compile-time check on an interface cast to self

Closes #1696

How I did it

  • Deleted a couple of checks in vyper/parser/external_call.py
  • Minor documentation update - we never really explicitly said this didn't work, so there wasn't much to modify here. I could write more, but.. I'll do a proper documentation update soon:tm:, promise

How to verify it

Run the tests. I flipped a few tests around that were verifying this behavior wasn't working, now they check that it works.

Cute Animal Picture

image

@codecov-commenter

codecov-commenter commented Jun 27, 2020

Copy link
Copy Markdown

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2059      +/-   ##
==========================================
- Coverage   85.06%   85.06%   -0.01%     
==========================================
  Files          83       83              
  Lines        8115     8113       -2     
  Branches     1957     1956       -1     
==========================================
- Hits         6903     6901       -2     
  Misses        730      730              
  Partials      482      482              
Impacted Files Coverage Δ
vyper/parser/external_call.py 80.59% <ø> (-0.57%) ⬇️

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 c104fc9...c1801e3. Read the comment docs.

@iamdefinitelyahuman iamdefinitelyahuman merged commit 104785a into vyperlang:master Jun 27, 2020
@iamdefinitelyahuman iamdefinitelyahuman deleted the runtime-self-call branch July 4, 2020 14:54
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.

Runtime error when making an external call to the same contract

3 participants