-
Notifications
You must be signed in to change notification settings - Fork 110
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
Deployment config #314
Merged
Merged
Deployment config #314
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
fforbeck
force-pushed
the
deploy-config
branch
2 times, most recently
from
July 5, 2021 21:13
ec815d5
to
d97c0f2
Compare
Signed-off-by: Felipe Forbeck <felipe.forbeck@gmail.com>
adridadou
previously approved these changes
Jul 13, 2021
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.
just a little error that should happen in tests IMO bu otherwise it looks good to me!
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.
Main changes:
deployment/contracts.config.js
file following the structure:name
: the name of the contract declared in the .sol file;path
: the path of the contract in thecontracts
folder;enabled
: the flag indicating if that contract must be deployed/enabled;version
: the version of the contract that will be used to write/read to/from theDaoArtifacts
contract;type
: the type of the contract (Core = 0, Factory = 1, Extension = 2, Adapter = 3, Util = 4, Test = 5)Each contract can be removed from the deployment process, all you need to do is to added the contract name to the corresponding network config file in the
deployment/*.config.js
. Any contract name added to thedisabled
list will be skipped during the deployment. It is useful make sure you deploy only contracts that are really mandatory to your DAO.Added the
Alchemy
url as environment variable for the HD Truffle Wallet intruffle.config.js
.Increased the block polling time to reduce rate-limit issues.
TruffleUtil was updated to build the deploymentFunctionFactory using the new
DaoArtifacts
contract. If theDaoArtifacts
address is not provided as environment variables, a new contract gets created and every new Adapter, Factory and Utility contracts gets added to the newDaoArtifacts
contract, so they can be reused on future deployments. The deploy function for truffle migrate task was updated to attempt to load the contracts by Id, Version, Owner and Type from theDaoArtifacts
first, if there is a match, that contract gets attached to the new DAO - this approach saves gas during the deployment step because we don't need to create all the Adapters, Factories or Utilities contracts every time.The owner of the artifacts in the
DaoArtifacts
contract can be specified via environment variable:DAO_ARTIFACTS_OWNER_ADDR
, if not specified, theDAO_OWNER_ADDR
will be used as the default owner.The
DaoArtifacts
contract can be specified via environment variable:DAO_ARTIFACTS_CONTRACT_ADDR
, if none is specified, then a new contract gets deployed.TODO: