angular-ethereum-decentralized-application

所属分类:区块链开发
开发工具:TypeScript
文件大小:16396KB
下载次数:0
上传日期:2023-01-24 04:44:35
上 传 者sh-1993
说明:  angular以太坊去中心化应用程序,一个在以太坊区块链和angular前端运行的全栈去中心化的应用程序的例子。
(angular-ethereum-decentralized-application,An example of full stack decentralized application running on Ethereum blockchain and Angular frontend.)

文件列表:
.editorconfig (245, 2019-06-06)
.travis.yml (168, 2019-06-06)
LICENSE (11357, 2019-06-06)
Makefile (442, 2019-06-06)
NOTICE (272, 2019-06-06)
angular.json (4993, 2019-06-06)
box-img-lg.png (19859, 2019-06-06)
box-img-sm.png (7199, 2019-06-06)
build (0, 2019-06-06)
build\contracts (0, 2019-06-06)
build\contracts\Migrations.json (53094, 2019-06-06)
build\contracts\Superheroes.json (361299, 2019-06-06)
build_ropsten (0, 2019-06-06)
build_ropsten\contracts (0, 2019-06-06)
build_ropsten\contracts\Migrations.json (53091, 2019-06-06)
build_ropsten\contracts\Superheroes.json (361296, 2019-06-06)
ci (0, 2019-06-06)
ci\build.sh (409, 2019-06-06)
ci\install-deps.sh (115, 2019-06-06)
contracts (0, 2019-06-06)
contracts\Migrations.sol (506, 2019-06-06)
contracts\Superheroes.sol (2527, 2019-06-06)
docs (0, 2019-06-06)
docs\3rdpartylicenses.txt (124636, 2019-06-06)
docs\Dmytro Zharkov Integrate SPA with Blockchain.pptx (9266334, 2019-06-06)
docs\favicon.ico (5430, 2019-06-06)
docs\images (0, 2019-06-06)
docs\images\Demo.gif (5010618, 2019-06-06)
docs\images\MMSetup.gif (1402705, 2019-06-06)
docs\index.html (1032, 2019-06-06)
docs\main-es2015.e44d760c2d7090da35c9.js (1747807, 2019-06-06)
docs\main-es5.1fabf5e9b413ac9ac09f.js (1836111, 2019-06-06)
docs\polyfills-es2015.da727c8b9db2bbd29052.js (99201, 2019-06-06)
docs\polyfills-es5.39524f9d7b2fc6abd9fa.js (175090, 2019-06-06)
docs\runtime-es2015.fa0071edbcd493596be9.js (1440, 2019-06-06)
docs\runtime-es5.9c308a63d02029c20228.js (1440, 2019-06-06)
docs\styles.d181d80f753b34fe6f9e.css (63217, 2019-06-06)
... ...

# Angular 8 Ethereum full stack example application. This is an example of DApp (decentralized application). The blockchain part is an Ethereum, Solidity Smart contract, here it is basically the backend (a service). Frontend application is an Angular-cli project. It allows you to review superheroes (add marks, write some feedback), add new superheroes. All data is stored on a blockchain: superheroes, reviews. ![App preview](https://github.com/DmitriyNoa/angular-ethereum-decentralized-application/blob/master/docs/images/Demo.gif?raw=true "App preview") ## Disclaimer This is a learning project. It's not recommended for a production. The Solidity contracts are implemented with experimental flags enabled to simplify the development. I will improve it to make production ready soon. If you would like to help me bringing it ready to production, just let know on dmytro.zharkov@gmail.com. ## Technologies: * Ethereum. * Solidity. * Truffle. * Angular cli. * Angular 7. * Web3. * Truffle-contract. * TypeScript. * JavaScript. ## Requirements. * Ganache cli. * Truffle. * MetaMask plugin for your browser or a blockchain based browser like Mist. ## Installation. ### Simple installation. Run against Ropsten deployment (adding new heroes is restricted to account owner). 1. ```git clone https://github.com/DmitriyNoa/angular-ethereum-decentralized-application.git```. 2. ```cd angular-ethereum-decentralized-application```. 3. ```npm i```. 4. ```npm start```. ### Full local setup. Run against local Ethereum instance. 1. ```git clone https://github.com/DmitriyNoa/angular-ethereum-decentralized-application.git```. 2. In a terminal run ```cd angular-ethereum-decentralized-application```. 3. ```make install_all```. 4. Open new a terminal tab and run the local Ethereum with: ```make run_local_ethereum```. 5. Now when local Ganache instance is running we need to deploy the contract to it. In a new terminal tab run: ```make deploy_to_local_ethereum```. 6. If the deployment has been successful start the angular app with ```npm run start_local```. 7. The project is now available under http://localhost:4200. 8. As this is local deployment the app will start with an empty heroes list. To add heroes setup your MetaMask as shown below. ### Prepare you browser. ####This step is required if you want to add reviews (perform write operations), or add a superhero when running on local environment. 1. Install MetaMask plugin for your browser. FireFox, Chrome and Opera are supported. Follow instruction on https://metamask.io/ or get it from your browser store. 2. If running against local Ehtereum: 2.1. go to terminal tab where you ran "make run_local_ethereum". 2.2. At the beginning of terminal output you should see available accounts list. 2.3. Copy the first one under "Private Keys". 3. Go to your browser. Click on the MetaMask extension icon. On the top of the plugin window, change the network to http://localhost:8545. 4. In the plugin window click on the circle in tight top corner -> import account and copy paste the private key, click add. If everything went well you will see your nw account, it should have just a little bit less then 100 test ETH (99.96 ETH). The small amount of ETH was charged for the contract deployment in previous steps. ![Accounts import](https://github.com/DmitriyNoa/angular-ethereum-decentralized-application/blob/master/docs/images/MMSetup.gif?raw=true "Accounts import")

近期下载者

相关文件


收藏者