-
Notifications
You must be signed in to change notification settings - Fork 27
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
Update ganache && fixes to devchain parametrization #79
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,20 +35,9 @@ exports.builder = yargs => { | |
description: 'Specify blockTime in seconds for automatic mining', | ||
alias: 'b', | ||
}) | ||
.option('default-balance-ether', { | ||
description: 'The default account balance, specified in ether', | ||
default: 100, | ||
alias: 'e', | ||
}) | ||
.option('mnemonic', { | ||
type: 'string', | ||
default: MNEMONIC, | ||
description: 'Mnemonic phrase', | ||
alias: 'm', | ||
}) | ||
.option('gas-limit', { | ||
default: BLOCK_GAS_LIMIT, | ||
description: 'Block gas limit', | ||
description: 'Block gas limit. Must be specified as a hex string', | ||
alias: 'l', | ||
}) | ||
.option('reset', { | ||
|
@@ -66,16 +55,14 @@ exports.builder = yargs => { | |
default: false, | ||
type: 'boolean', | ||
description: 'Enable verbose devchain output', | ||
alias: 'v', | ||
alias: 'd', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Usually verbose is shortened to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh yes, I decide to include alias to have a similar syntax as ganache. Then I realize that there were a clash between the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, good question, the two might be mutually compatible, but confusing.
Of those two, I think |
||
}) | ||
} | ||
|
||
exports.task = async function({ | ||
port = 8545, | ||
networkId, | ||
defaultBalanceEther = 100, | ||
blockTime, | ||
mnemonic = MNEMONIC, | ||
gasLimit = BLOCK_GAS_LIMIT, | ||
verbose = false, | ||
reset = false, | ||
|
@@ -129,14 +116,13 @@ exports.task = async function({ | |
{ | ||
title: 'Starting a local chain from snapshot', | ||
task: async (ctx, task) => { | ||
ctx.id = networkId || parseInt(1e8 * Math.random()) | ||
ctx.id = parseInt(networkId) || parseInt(1e8 * Math.random()) | ||
|
||
const options = { | ||
network_id: ctx.id, | ||
default_balance_ether: defaultBalanceEther, | ||
blockTime, | ||
gasLimit, | ||
mnemonic, | ||
mnemonic: MNEMONIC, | ||
db_path: snapshotPath, | ||
logger: verbose ? { log: reporter.info.bind(reporter) } : undefined, | ||
debug, | ||
|
@@ -221,9 +207,7 @@ exports.handler = async ({ | |
reporter, | ||
port, | ||
networkId, | ||
defaultBalanceEther, | ||
blockTime, | ||
mnemonic, | ||
gasLimit, | ||
reset, | ||
verbose, | ||
|
@@ -234,9 +218,7 @@ exports.handler = async ({ | |
const task = await exports.task({ | ||
port, | ||
networkId, | ||
defaultBalanceEther, | ||
blockTime, | ||
mnemonic, | ||
gasLimit, | ||
reset, | ||
verbose, | ||
|
@@ -245,7 +227,7 @@ exports.handler = async ({ | |
silent, | ||
debug, | ||
}) | ||
const { privateKeys, id } = await task.run() | ||
const { privateKeys, id, mnemonic } = await task.run() | ||
exports.printAccounts(reporter, privateKeys) | ||
exports.printMnemonic(reporter, mnemonic) | ||
exports.printResetNotice(reporter, reset) | ||
|
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.
@0xGabi I remember us rolling back to 6.2.0 due to a forwarding bug; did we test that it was resolved on newer ganache-core versions?
Ahh... I see
[email protected]
has this exact fix :).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.
Yes 🎉