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

Fix: Subcalls to empty accounts #1106

Merged
merged 7 commits into from
Jul 1, 2021

Conversation

skellet0r
Copy link
Collaborator

@skellet0r skellet0r commented Jun 4, 2021

What I did

Minor patch of the logic in transactions.py to handle direct calls/staticcalls/delegatecalls to empty accounts.

Fixes #1105

How I did it

Added to the if statement that determines whether a call is being made to a contract, and handled calls to the datacopy address from vyper.

How to verify it

There is a parameterized test verifying functionality in both solidity and vyper contracts.

Checklist

  • I have confirmed that my PR passes all linting checks
  • I have included test cases
  • I have added an entry to the changelog

@skellet0r skellet0r changed the title WIP: Subcalls to empty accounts Fix: Subcalls to empty accounts Jun 4, 2021
Low-level calls through the use of `raw_call` in vyper, and the `call`,
`staticcall`, and `delegatecall` address members in solidity, should
appear in the tx.subcalls list when directed to addresses where no
contracts are deployed.
Errors appeard in the internal_transfers property due to the newly added
subcall logic, this fixes it to make the test suite pass again.
@iamdefinitelyahuman iamdefinitelyahuman merged commit eae71d3 into eth-brownie:master Jul 1, 2021
@skellet0r skellet0r deleted the fix/subcalls branch July 3, 2021 23:50
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.

Bug: Calls to empty accounts do not appear in tx.subcalls
2 participants