TAGS

harmony-box

CREATED

UPDATED

STARS

INSTALL

...

REPOSITORY
GitHub Download
Please wait: Fetching readme...

b'# ![Harmony](box-img-sm.png)\n\n# Harmony Box\n\nHarmony Box is a Truffle box that will get you quickly up and running deploying smart contracts on Harmony using Truffle & native Ethereum tooling.\n\n## Getting started\n\n### Truffle\n\nIf you have Truffle installed globally:\n\n(Until the box has been approved by Truffle you have to rely on the git installation step below)\n\n```\nmkdir harmony && cd harmony\ntruffle unbox harmony\n```\n\nOr if you want to install via git:\n\n```\ngit clone https://github.com/harmony-one/harmony-box.git\ncd harmony-box\n```\n\n### .env\n\nCopy .env-example to .env:\n\n```\ncp .env-example .env\n```\n\nModify .env and replace "`ENTER_PRIVATE_KEY_HERE`" for each network with the respective private key you want to use when deploying contracts.\n\n### Dependencies\n\nInstall all required dependencies using yarn:\n\n```\nyarn install\n```\n\nThe dependencies installed are the following:\n\n- truffle: if you want to use a local installation rather than a global installation\n- solc: Solidity compiler\n- @trufflesuite/web3-provider-engine: framework for composing custom web3 providers\n- ethereumjs-wallet: a lightweight Ethereum wallet implementation\n- @openzeppelin/contracts: industry standard smart contract templates\n- dotenv: .env file parsing library\n\n## Compilation\n\nGlobally installed Truffle:\n```\ntruffle compile\n```\n\nLocally installed Truffle:\n```\nnode_modules/.bin/truffle compile\n```\n\n## Migration\n\nThe Harmony Box comes pre-configured with three separate networks:\n\n- Localnet (http://localhost:9500)\n- Testnet (https://api.s0.b.hmny.io)\n- Mainnet (https://api.s0.t.hmny.io)\n\nTo deploy your contracts to these networks, you can run the following:\n\nGlobally installed Truffle:\n```\ntruffle migrate --reset --skip-dry-run --network localnet\ntruffle migrate --reset --skip-dry-run --network testnet\ntruffle migrate --reset --skip-dry-run --network mainnet\n```\n\nLocally installed Truffle:\n```\nnode_modules/.bin/truffle migrate --reset --skip-dry-run --network localnet\nnode_modules/.bin/truffle migrate --reset --skip-dry-run --network testnet\nnode_modules/.bin/truffle migrate --reset --skip-dry-run --network mainnet\n```\n\n## Testing\n\nGlobally installed Truffle:\n```\ntruffle test\n```\n\nLocally installed Truffle:\n```\nnode_modules/.bin/truffle test\n```\n\n## Attribution\n\n[private-provider.js](private-provider.js)\xc2\xa0was originally ported from [Moonbeam\'s Truffle Box](https://github.com/PureStake/moonbeam-truffle-box/blob/db2f86516c1063b6bf56050e950b7ad67b500fe5/private-provider.js).\n'