-
-
Notifications
You must be signed in to change notification settings - Fork 135
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: Raise warning if value=
is specified for anything but a payable
function [APE-1283]
#1599
Merged
fubuloubu
merged 37 commits into
ApeWorX:main
from
Aviksaikat:feat/Raise-warning-if-value
Aug 17, 2023
Merged
feat: Raise warning if value=
is specified for anything but a payable
function [APE-1283]
#1599
fubuloubu
merged 37 commits into
ApeWorX:main
from
Aviksaikat:feat/Raise-warning-if-value
Aug 17, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…iables and docs updated
…ape into feat/accounts-env-passphrase
…iables and docs updated
Co-authored-by: antazoey <[email protected]>
Co-authored-by: antazoey <[email protected]>
Co-authored-by: antazoey <[email protected]>
Co-authored-by: antazoey <[email protected]>
… function [APE-874] #1396
vany365
changed the title
feat: Raise warning if
feat: Raise warning if Aug 10, 2023
value=
is specified for anything but a payable
functionvalue=
is specified for anything but a payable
function [APE-1283]
fubuloubu
previously approved these changes
Aug 11, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a test
Co-authored-by: El De-dog-lo <[email protected]>
…loy test added & working on test_sending_funds_to_non_payable_constructor_by_accountDeploy
…loy test added & test_sending_funds_to_non_payable_constructor_by_accountDeploy & hopefully final commit. file updated, ~ape/api/accounts.py, ~ape/contracts/base.py, ~ape/exceptions.py, tests/functional/test_contract_instance.py
fubuloubu
reviewed
Aug 13, 2023
…rror & exception type changed from ApeException to ContractError
…rror & exception type changed from ApeException to ContractError. fixing the last blunder
fubuloubu
previously approved these changes
Aug 13, 2023
fubuloubu
previously approved these changes
Aug 16, 2023
fubuloubu
approved these changes
Aug 17, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
Raise warning if value= is specified for anything but a payable function
fixes: #1396 (Raise warning if value= is specified for anything but a payable function [APE-874])
How I did it
Added check to see if
msg.value
is getting passed to anon-payable
contractHow to verify it
test
orscript
with the following contentsape run path/to/script
orape test -k testName
ERROR: (ContractError) Sending funds to a non-payable constructor!!
Checklist
(Only applicable if there is a page for Exceptions)you added a docstring to the excpetion, that will get autogenerated