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

Commit c32cfe5

Browse files
Merge pull request #43 from pemulis/patch-1
a few typo and formatting fixes
2 parents 994ac69 + 78061f1 commit c32cfe5

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Drizzle is a collection of front-end libraries that make writing dapp frontends
3838

3939
1. Get contract data. Calling the `cacheCall()` function on a contract will execute the desired call and return a corresponding key so the data can be retrieved from the store. When a new block is received, Drizzle will refresh the store automatically _if_ any transactions in the block touched our contract. For more information on how this works, see [How Data Stays Fresh](#how-data-stays-fresh).
4040

41-
**Note:** We have to check that Drizzle is initialized before fetching data. A simple if statement such as below is fine for display a few pieces of data, but a better approach for larger dapps is to use a [loading component](https://github.com/trufflesuite/drizzle-react#recipe-loading-component). We've already built one for you in our [`drizzle-react-components` library](https://github.com/trufflesuite/drizzle-react-components) as well.
41+
**Note:** We have to check that Drizzle is initialized before fetching data. A simple if statement such as below is fine for displaying a few pieces of data, but a better approach for larger dapps is to use a [loading component](https://github.com/trufflesuite/drizzle-react#recipe-loading-component). We've already built one for you in our [`drizzle-react-components` library](https://github.com/trufflesuite/drizzle-react-components) as well.
4242
```javascript
4343
// Assuming we're observing the store for changes.
4444
var state = drizzle.store.getState()
@@ -63,7 +63,7 @@ Drizzle is a collection of front-end libraries that make writing dapp frontends
6363

6464
1. Send a contract transaction. Calling the `cacheSend()` function on a contract will send the desired transaction and return a corresponding transaction hash so the status can be retrieved from the store. The last argument can optionally be an options object with the typical from, gas and gasPrice keys. Drizzle will update the transaction's state in the store (pending, success, error) and store the transaction receipt. For more information on how this works, see [How Data Stays Fresh](#how-data-stays-fresh).
6565

66-
**Note:** We have to check that Drizzle is initialized before fetching data. A simple if statement such as below is fine for display a few pieces of data, but a better approach for larger dapps is to use a [loading component](https://github.com/trufflesuite/drizzle-react#recipe-loading-component). We've already built one for you in our [`drizzle-react-components` library](https://github.com/trufflesuite/drizzle-react-components) as well.
66+
**Note:** We have to check that Drizzle is initialized before fetching data. A simple if statement such as below is fine for displaying a few pieces of data, but a better approach for larger dapps is to use a [loading component](https://github.com/trufflesuite/drizzle-react#recipe-loading-component). We've already built one for you in our [`drizzle-react-components` library](https://github.com/trufflesuite/drizzle-react-components) as well.
6767
```javascript
6868
// Assuming we're observing the store for changes.
6969
var state = drizzle.store.getState()
@@ -162,10 +162,10 @@ An object consisting of the type and url of a fallback web3 provider. This is us
162162
status
163163
}
164164
},
165-
transactionStack
165+
transactionStack,
166166
drizzleStatus: {
167167
initialized
168-
}
168+
},
169169
web3: {
170170
status
171171
}
@@ -181,13 +181,15 @@ A series of contract state objects, indexed by the contract name as declared in
181181
#### `contractName` (object)
182182

183183
`initialized` (boolean): `true` once contract is fully instantiated.
184+
184185
`synced` (boolean): `false` if contract state changes have occurred in a block and Drizzle is re-running its calls.
185186

186187
`events` (array): An array of event objects. Drizzle will only listen for the events we declared in options.
187188

188189
The contract's state also includes the state of each constant function called on the contract (`callerFunctionName`). The functions are indexed by name, and contain the outputs indexed by a hash of the arguments passed during the call (`argsHash`). If no arguments were passed, the hash is `0x0`. Drizzle reads from the store for you, so it should be unnecessary to touch this data cache manually.
189190

190191
`args` (array): Arguments passed to function call.
192+
191193
`value` (mixed): Value returned from function call.
192194

193195
### `transactions` (object)
@@ -196,7 +198,9 @@ A series of transaction objects, indexed by transaction hash.
196198
#### `txHash` (object)
197199

198200
`confirmations` (array): After the initial receipt, further confirmation receipts (up to the 24th).
201+
199202
`error` (object): contains the returned error if any.
203+
200204
`receipt` (object): contains the first transaction receipt received from a transaction's `success` event.
201205

202206
`status` (string): `true` or `false` depending on transaction status

0 commit comments

Comments
 (0)