TAGS

angulartruffledapp

CREATED

UPDATED

STARS

INSTALL

...

REPOSITORY
GitHub Download
Please wait: Fetching readme...

b"\n![Logo](https://i.ibb.co/TkzPNnk/1-CIJ0-LEa6-ZR17-GFZSjy2ce-Q.png)\n\n# Angular + Truffle = \xf0\x9f\x92\x93 \xc3\x90APPS\nThis Trufflebox provides a base for Truffle Framework and Angular DAPP. and you can make transactions between accounts and scale you app with beautiful material design \n\n\nThis was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.1\n\n\n## Development server\n\nRun `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.\n\n## Code scaffolding\n\nRun `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.\n\n## Build\n\n1. Install truffle, Angular CLI and an Ethereum client. If you don't have a test environment \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 ng-es/angulartruffledapp\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. Install the dependencies and Compile and migrate your contracts, into the directory Blockchain using :\n ```bash\n npm install \n ```\n5. Change the port in truffle-config.js\n ```\n change the port in truffle-config.js 8545 in windows the port is 7545 but in linux the defaul port is 8545\n ```\n6. Navigate into the Frontend Directory \n ```bash\n npm install & ng serve , And lets Buidl \n ```\n7. If you want to customize <===\n\n+ __First__\nChange the contract in Blockchain/contracts or make your own contract and compile and migrate\n\n+ __Second__\nChange the app/service/contract.service.ts with your builded contract .json and you custom directives and functions\n\n\n## __Common errors and their solutions__\n\n| Error | Solution |\n|-------|----------|\n| `Module not found: Error: Can't resolve '../../../../../Blockchain/build/contracts/Payment.json'` during `ng serve` | Run `truffle compile` |\n| `Error: the tx doesn't have the correct nonce.` in MetaMask | Reset MetaMask: Settings -> Reset Account //Warning only with test accounts |\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 | `Error: i cannot see my account or balance` Ensure you are logged in metamask and refresh | If you have a custom rcp in ganache you can change the dir in `src/app/contract/contract.service.ts line21 with your dir `| `Error: [ethjs-rpc] rpc error with payload` in Metamask | You may need update Ganache and restart metamask because some old vesions give 0 gas and the transaction is mark as underpriced the error givet is errot with payload we recomend use the newest version of ganache cli |\n\n\n## Code contributions welcome!\n\n1. Fork it\n2. Add new features\n\n```bash\ngit checkout -b my-new-feature\ngit commit -am 'Add some feature'\ngit push origin my-new-feature\n```\n\n3. Create a pull request\n"