-
Notifications
You must be signed in to change notification settings - Fork 55
Add script to generate DAI for given testchain address #192
Conversation
usage: > node_modules/.bin/babel-node scripts/generateDai.js <address> <daiAmount>
Maybe this script should live somewhere else? It seems to be very specific to some use case, e.g. it not only generates Dai for an address but sets the price and debt ceiling for the entire testchain and removes the allowance for the address. |
scripts/generateDai.js
Outdated
@@ -0,0 +1,45 @@ | |||
// usage: | |||
// > node_modules/.bin/babel-node scripts/fundTestAccount.js <address> |
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.
update usage comment
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.
done
scripts/generateDai.js
Outdated
// usage: | ||
// > node_modules/.bin/babel-node scripts/fundTestAccount.js <address> | ||
|
||
import Maker from '../packages/dai/src'; |
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.
please use absolute imports, i.e. @makerdao/dai
; once you run the repo setup (docs) they will use the local builds anyway
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.
done
- updated usage command - cleaned up script to only generate MDAI - use absolute imports - print account MDAI balance after generating MDAI
Oops, I clean out script to leave only part for generating DAI |
Let's move this into the test-helpers package since it's only for the testchain. You can create |
Done with last commit. Following this structure - shouldn't fundTestAccount.js be moved in same place as generateDai.js? Thanks |
Yes, quite right. I'll take care of that |
usage: > node_modules/.bin/babel-node scripts/generateDai.js