Skip to content
This repository has been archived by the owner on Sep 27, 2019. It is now read-only.

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
OnlyOneJMJQ authored Apr 22, 2018
2 parents e70f481 + 994ac69 commit 78061f1
Show file tree
Hide file tree
Showing 9 changed files with 809 additions and 714 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ Drizzle is a collection of front-end libraries that make writing dapp frontends

## Options

Drizzle has a number of configuration options so it only keeps track of exactly the data you need. Here's the full list of options along with their default values.

```javascript
{
contracts,
Expand All @@ -102,6 +104,10 @@ Drizzle is a collection of front-end libraries that make writing dapp frontends
eventName
]
},
polls: {
accounts: interval,
blocks: interval
},
web3: {
fallback: {
type
Expand All @@ -110,21 +116,25 @@ Drizzle is a collection of front-end libraries that make writing dapp frontends
}
}
```
### `contracts` (array, required)

### `contracts` (array)
An array of contract artifact files.

### `events` (object)
An object consisting of contract names each containing an array of strings of the event names we'd like to listen for and sync with the store.

### `polls` (object)
An object containing key/value pairs denoting what is being polled and the interval (in ms). Possible polls are accounts and blocks. Accounts will poll for addresses and balances, blocks for new blocks. **Default**: `{ blocks: 3000 }`

### `web3` (object)
Options regarding `web3` instantiation.

#### `fallback` (object)
An object consisting of the type and url of a fallback web3 provider. This is used if no injected provider, such as MetaMask or Mist, is detected.

`type` (string): The type of web3 fallback. Currently `ws` (web socket) is the only possibility.
`type` (string): The type of the fallback web3 provider. Currently the only possibility is `'ws'` (web socket). **Default**: `'ws'`

`url` (string): The full websocket url. For example: `ws://127.0.0.1:8546`.
`url` (string): The full fallback web3 provider url. **Default**: `'ws://127.0.0.1:8545'`

## Drizzle State

Expand Down
Loading

0 comments on commit 78061f1

Please sign in to comment.