Example Truffle project integrated with Angular. Includes contracts, migrations, tests, user interface and Angular build pipeline.
Node v.6+ and npm v.3+
Truffle. See: http://truffleframework.com/
An ethereum client. See: http://truffleframework.com/docs/getting_started/client
To initialize a project with this example, clone the project and run
Building and the frontend
- First run
truffle compileto compile the contracts
- Then run
truffle migrateto deploy the contracts onto your network of choice (default "development").
- Finally run
truffle buildto build the app and serve it on http://localhost:3000
Compiling new Smart contracts
To compile new smart contracts and expose them to the app, store them in the 'contracts' directory and run
truffle compile and
truffle migrate again. The contract's ABIs will be generated, converted to .ts files and stored in 'src/app/web3/contracts' directory for you. Now you can conveniently import them into your services.
Project based on:
Windows known issue
Note that running truffle build (or npm start) using bash for windows will fail. Use windows command line instead