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

Deployments #347

Merged
merged 6 commits into from
Feb 1, 2020
Merged

Deployments #347

merged 6 commits into from
Feb 1, 2020

Conversation

iamdefinitelyahuman
Copy link
Member

What I did

Detect contracts that are deployed via contract calls.

Closes #238

How I did it

  1. Added TransactionReceipt.new_contracts, a list of addresses of deployments. This information is gathered during TransactionReceipt._expand_trace.
  2. ContractContainer.at compares actual bytecode at an address against the expected bytecode. If there is a difference, it returns Contract instead of ProjectContract. This avoids various issues with traces and coverage evaluation when using Vyper's create_forwarder_to.
  3. Fix minor pre-existing bugs related to failed contract deployments.

How to verify it

Run the tests. I included new test cases, this functionality is verified using create_forwarder_to in Vyper and new in Solidity (with both CREATE and CREATE2).

Checklist

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

@iamdefinitelyahuman iamdefinitelyahuman merged commit 20fa583 into master Feb 1, 2020
@iamdefinitelyahuman iamdefinitelyahuman deleted the deployments branch February 1, 2020 21:40
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.

detect contracts that are deployed as a result of calling a contract function
1 participant