-
Notifications
You must be signed in to change notification settings - Fork 595
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
Add status task to hardhat #1437
Merged
Merged
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
mjlescano
reviewed
Aug 2, 2021
hardhat/tasks/task-status.js
Outdated
.addOptionalParam('block', 'Block number to check again') | ||
.addOptionalParam('providerUrl', 'The http provider to use for communicating with the blockchain') | ||
.addOptionalParam('deploymentPath', 'Specify the path to the deployment data directory') | ||
.setAction(async (taskArguments, hre, runSuper) => { |
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.
Suggested change
.setAction(async (taskArguments, hre, runSuper) => { | |
.setAction(async (taskArguments, hre) => { |
theethernaut
approved these changes
Aug 2, 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.
Looks awesome @leomassazza !!
A few comments:
- Can we remove the "get" from actions. Even though including it is more rational, I think it will get in the way in terms of UX.
- I'd prefer if we did not introduce hardhat task specific utils. We're spreading utils like getContract all over the place - in fact, we will probably need to unify them all soon. I'd rather putting them in place in the script or using things like the interact does, via synthetix.
- I'd also rather moving statusActions out of utils and instead put this task under a folder "status", where the main file is index.js, next to "actions.js" or something. Like the deploy script declares a folder because its a multi-file script.
- The latter two opinions would imply the deletion of hardhat/util.
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.
This PR adds a new script to run from hardhat. Based (copied) on
synthetix-scripts
's status.js. It allows the user to see state of the system.Adds two capabilities:
i.e.
npx hardhat status --currency-keys SNX,iCOMP
will get only exchangeRate of SNX and iCOMP instead of the whole list
npx hardhat status --execute-actions Synthetix,SystemSettings,FeePool
will only get status information of Synthetix, SystemSettings and FeePool
or combining both
npx hardhat status --currency-keys SNX,iCOMP --execute-actions ExchangeRates
will only get ExchangeRates for SNX and iCOMP
The complete list of available actions/contracts to query up to now is: