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

Setting to save development artifacts and store them in a map #590

Merged
merged 20 commits into from
Jun 2, 2020

Conversation

matnad
Copy link
Collaborator

@matnad matnad commented Jun 1, 2020

What I did

  • Add a setting to save deployment artifacts in development networks
  • Add a deployment map that keeps track of deployed contracts, sorted by time

closes #576

How I did it

Save deployment artifacts for development networks at build/deployments/dev/
Maintain a deployment map (of all deployments) at build/depoyments/map.json in the form of

{
  "chainid": { 
    "contractName": [
      "contract address 1", 
      "contract address 2"
    ]
  }

How to verify it

  • Deploy a contract and check build/deployments
  • I wrote tests for this PR

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

Copy link
Member

@iamdefinitelyahuman iamdefinitelyahuman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good overall! A few nit-picks but nothing major.

brownie/network/contract.py Show resolved Hide resolved
brownie/project/main.py Outdated Show resolved Hide resolved
brownie/project/main.py Outdated Show resolved Hide resolved
brownie/project/main.py Outdated Show resolved Hide resolved
brownie/project/main.py Outdated Show resolved Hide resolved
Copy link
Member

@iamdefinitelyahuman iamdefinitelyahuman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on this.


Brownie will maintain a ``map.json`` file in your ``build/deployment/`` folder that lists all deployed contracts on live networks, sorted by chain and contract name.

::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
::
.. code-block:: json

I'm not 100% on if json works - but definitely could be python or javascript - just to ensure proper code highlighting.

@iamdefinitelyahuman iamdefinitelyahuman merged commit 9b1b372 into eth-brownie:master Jun 2, 2020
@matnad matnad mentioned this pull request Jun 2, 2020
4 tasks
@matnad matnad deleted the feat-dev-artifacts branch December 28, 2020 12:16
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.

Add deployment artifacts in development networks
2 participants