Skip to Content
Ethereum Cookbook
book

Ethereum Cookbook

by Manoj P R
August 2018
Intermediate to advanced
404 pages
11h 19m
English
Packt Publishing
Content preview from Ethereum Cookbook

How to do it...

  1. Drizzle is based on JavaScript and is distributed via npm. Use the npm install command to get the library:
npm install --save drizzle

If you are already using React, you can get the react flavored drizzle to use with your application. Use the npm install --save drizzle-react command to get the library. If you are starting from scratch, it is recommended to get the drizzle box using truffle unbox drizzle. It includes a complete example of using drizzle-react in your DApp.

  1. Include providers from Drizzle by using the import statement:
import { Drizzle, generateStore } from 'drizzle';
  1. Create an options object with the necessary contract artifacts:
const options = {     contracts,     events: {         contractName: [             eventName         ]     }, polls: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building Ethereum Dapps

Building Ethereum Dapps

Roberto Infante
Ethereum For Dummies

Ethereum For Dummies

Michael G. Solomon

Publisher Resources

ISBN: 9781789133998Supplemental Content