TAGS

drizzle-kaleido-box

CREATED

UPDATED

STARS

INSTALL

...

REPOSITORY
GitHub Download
Please wait: Fetching readme...

b'![Drizzle & Kaleido](https://github.com/kaleido-io/drizzle-kaleido-box/blob/master/box-img-sm.png "Drizzle & Kaleido")\n\n# Drizzle & Kaleido Truffle Box\n\nThis box gives you a boilerplate to get up and running quickly with Drizzle & Truffle on a Kaleido chain.\n\n## Installation\n\nFirst ensure you are in a new and empty directory.\n\n1. Run the `unbox` command with `npx` and skip to step 3. This will install all necessary dependencies.\n\n```\nnpx truffle unbox kaleido-io/drizzle-kaleido-box\n```\n\n2. Alternatively, you can install Truffle globally and then run the `unbox` command.\n\n```\nnpm install -g truffle\ntruffle unbox kaleido-io/drizzle-kaleido-box\n```\n\n3. Run the development console. This will instantiate a local chain for you to test that Truffle is working properly.\n\n```\ntruffle develop\n```\n\n4. Ensure that you\'re able to both compile, test, and finally migrate your contracts to your local chain.\n\n```\ncompile\ntest\nmigrate\n```\n\n5. If everything looks good, you can exit the Truffle console with `.exit`.\n\n## Connect to Kaleido\n\n1. In Kaleido, select the node you want to connect to, then choose `+ Connect Node`.\n\n2. Select `Native JSON/RPC`\n\n3. Choose an application credential to use for this connection.\n\n4. Choose the `Truffle Suite` connection type.\n\n5. Copy the connection info from this panel into the respective variables inside of `truffle-config.js`. If you are using Quorum in this environment, ensure to uncomment the `type: "quorum"` property on your network object.\n\n```\nconst appCred = \'yourappcred\';\nconst connectionURL = \'nodeConnectionURL\';\n```\n```\ntype: \'quorum\' // Use this property for Quorum environments\n```\n\n6. Migrate your contracts to your Kaleido chain!\n\n```\ntruffle migrate\n```\n\n## Connect MetaMask to your Kaleido Chain\n\n1. In the `Networks` switcher in MetaMask, choose `Custom RPC`.\n\n2. Find the `New Network` section, and click `Advanced Options`. Add the `MetaMask RPC URL` from the connect panel, and give your network a nickname.\n\n## Start Your React App\n\n1. Open the `/app` directory and start the development server.\n```\ncd app && npm run start\n```\n\n2. The development server will open a browser at `http://localhost:3000` by default.\n\n3. Attempt to change the `Stored Value` of `SimpleStorage` -- you should see the refresh icon until the transaction is confirmed, at which point the `Stored Value` of `SimpleStorage` should automatically update.\n'