Index
b'# Truffle Box for Angular\n\nThis Truffle Box provides a base for working with the Truffle Framework and Angular.\nIt provides a basic working example of the MetaCoin contracts with Angular components.\nThis project is generated with [Angular CLI](https://cli.angular.io/).\n\n## Prerequisites\n\nIn order to run the Truffle box, you will need [Node.js](https://nodejs.org) (tested with version 10.x.y). This will include `npm`, needed\nto install dependencies. In order install these dependencies, you will also need [Python](https://www.python.org) (version 2.7.x) and\n[git](https://git-scm.com/downloads). You will also need the [MetaMask](https://metamask.io/) plugin for Chrome.\n\n## Building\n\n1. Install truffle, Angular CLI and an Ethereum client. If you don\'t have a test environment, we recommend ganache-cli\n ```bash\n npm install -g truffle\n npm install -g @angular/cli\n npm install -g ganache-cli\n ```\n\n2. Download the box.\n ```bash\n truffle unbox Quintor/angular-truffle-box\n ```\n\n3. Run your Ethereum client. For Ganache CLI:\n ```bash\n ganache-cli\n ```\nNote the mnemonic 12-word phrase printed on startup, you will need it later.\n\n4. Compile and migrate your contracts.\n ```bash\n truffle compile && truffle migrate\n ```\n\n## Configuration\n1. In order to connect with the Ethereum network, you will need to configure MetaMask\n2. Log into the `ganache-cli` test accounts in MetaMask, using the 12-word phrase printed earlier.\n 1. A detailed explaination of how to do this can be found [here](https://truffleframework.com/docs/truffle/getting-started/truffle-with-metamask)\n 1. Normally, the available test accounts will change whenever you restart `ganache-cli`.\n 2. In order to receive the same test accounts every time you start `ganache-cli`, start it with a seed like this: `ganache-cli --seed 0` or `ganache-cli -m "put your mnemonic phrase here needs twelve words to work with MetaMask"`\n3. Point MetaMask to `ganache-cli` by connecting to the network `localhost:8545` \n\n\n## Running\n\n1. Run the app using Angular CLI:\n ```bash\n npm start\n ```\nThe app is now served on localhost:4200\n\n2. Making sure you have configured MetaMask, visit http://localhost:4200 in your browser.\n\n3. Send MetaCoins!\n\n## Testing\n\n1. Running the Angular component tests:\n ```bash\n ng test\n ```\n\n2. Running the Truffle tests:\n ```bash\n truffle test\n ```\n\n3. Running Protactor end-to-end tests\n\n ```bash\n ng e2e\n ```\n## Releasing\nUsing the Angular CLI you can build a distributable of your app. Will be placed in `dist/`\n\n ```bash\n ng build\n ```\n\n## FAQ\n\n* __Where can I find more documentation?__\n\nThis Truffle box is a union of [Truffle](http://truffleframework.com/) and an Angular setup created with [Angular CLI](https://cli.angular.io/).\nFor solidity compilation and Ethereum related issues, try the [Truffle documentation](http://truffleframework.com/docs/).\nFor Angular CLI and typescript issues, refer to the [Angular CLI documentation](https://github.com/angular/angular-cli/wiki)\n\n* __Common errors and their solutions__\n\n| Error | Solution |\n|-------|----------|\n| `Module not found: Error: Can\'t resolve \'../../../../build/contracts/MetaCoin.json\'` during `ng serve` | Run `truffle compile` |\n| `Error: the tx doesn\'t have the correct nonce.` in MetaMask | Reset MetaMask: Settings -> Reset Account |\n| `Error getting balance; see log.` in UI, with `Error: MetaCoin has not been deployed to detected network (network/artifact mismatch)` in browser console | Ensure you have started ganache, run `truffle migrate` and configured MetaMask to point to ganache |\n\n\n\n* __How do I get this to work on Windows?__\n\nPossible issues:\n\n- If you\'re missing a C++ compiler, run `npm install --global --production windows-build-tools` in a cmd with administrative rights.\n- If the `truffle.js` file opens when you\'re trying to run truffle commands, rename the file to `truffle-config.js`\n'