Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #565 from trufflesuite/readme/clarify-accounts
Browse files Browse the repository at this point in the history
docs: clarify `accounts` property in options object in README
  • Loading branch information
adrianmcli authored Apr 17, 2020
2 parents 25de0e2 + 89d1e48 commit a5f43a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ server.listen(port, function(err, blockchain) { ... });

Both `.provider()` and `.server()` take a single object which allows you to specify behavior of the Ganache instance. This parameter is optional. Available options are:

* `"accounts"`: `Array` of `Object`'s. Each object should have a `balance` key with a hexadecimal value. The key `secretKey` can also be specified, which represents the account's private key. If no `secretKey`, the address is auto-generated with the given balance. If specified, the key is used to determine the account's address.
* `"accounts"`: `Array` of `Object`'s of the following shape: `{ secretKey: privateKey, balance: HexString }`.
* If `secretKey` is specified, the key is used to determine the account's address. Otherwise, the address is auto-generated.
* The `balance` is a hexadecimal value of the amount of Ether (in Wei) you want the account to be pre-loaded with.
* `"debug"`: `boolean` - Output VM opcodes for debugging
* `"blockTime"`: `number` - Specify blockTime in seconds for automatic mining. If you don't specify this flag, ganache will instantly mine a new block for every transaction. Using the `blockTime` option is discouraged unless you have tests which require a specific mining interval.
* `"logger"`: `Object` - Object, like `console`, that implements a `log()` function.
Expand Down

0 comments on commit a5f43a4

Please sign in to comment.