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

Add deprecation warning for selfdestruct usage #3372

Merged
merged 3 commits into from
Apr 28, 2023
Merged

Add deprecation warning for selfdestruct usage #3372

merged 3 commits into from
Apr 28, 2023

Conversation

pcaversaccio
Copy link
Collaborator

@pcaversaccio pcaversaccio commented Apr 28, 2023

What I did

Fixes #3277.

How I did it

Add the following warning if selfdestruct is used:

`selfdestruct` is deprecated! The opcode is no longer recommended for use.

I also updated the docs.

How to verify it

Run the following function:

@external
def foo():
    selfdestruct(msg.sender)

Compilation Output

Warning: `selfdestruct` is deprecated! The opcode is no longer recommended for use.
0x61003961000f6000396100396000f360003560e01c346100285763c2985578811861002157600436106100285733ff005b5060006000fd5b600080fda1657679706572830001000a

Commit message

Add deprecation warning for selfdestruct usage

Description for the changelog

Add deprecation warning for selfdestruct usage.

Cute Animal Picture

image

Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
@codecov-commenter
Copy link

codecov-commenter commented Apr 28, 2023

Codecov Report

Merging #3372 (5396194) into master (1cfeabb) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master    #3372      +/-   ##
==========================================
- Coverage   88.81%   88.78%   -0.03%     
==========================================
  Files          84       84              
  Lines       10656    10660       +4     
  Branches     2223     2224       +1     
==========================================
+ Hits         9464     9465       +1     
- Misses        790      791       +1     
- Partials      402      404       +2     
Impacted Files Coverage Δ
vyper/builtins/functions.py 89.21% <100.00%> (-0.13%) ⬇️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
@charles-cooper charles-cooper merged commit 4f1a98a into vyperlang:master Apr 28, 2023
@pcaversaccio pcaversaccio deleted the feat/selfdestruct-warning branch April 28, 2023 16:49
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.

Deprecation warning for selfdestruct usage
3 participants