TAGS

truffle-kaleido-box

CREATED

UPDATED

STARS

INSTALL

...

REPOSITORY
GitHub Download
Please wait: Fetching readme...

b'![Truffle & Kaleido](https://github.com/kaleido-io/truffle-kaleido-box/blob/master/box-img-sm.png "Truffle & Kaleido")\n\n# Truffle & Kaleido Truffle Box\n\nThis box gives you a boilerplate to get up and running quickly with 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/truffle-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/truffle-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'