基于区块链的毕业设计FlightSurety – 飞行担保

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计FlightSurety – 飞行担保 是一篇很好的国外资料

FlightSurety

FlightSurety is a sample application project for Udacity’s Blockchain course.

Versions

  • Truffle v5.1.61
  • Solidity – 0.6.12
  • Node v15.5.1
  • Web3.js v1.2.9
  • Ganache v1.2.3

Install

This repository contains Smart Contract code in Solidity (using Truffle), tests (also using Truffle), dApp scaffolding (using React, Chakra-U ) and server app scaffolding.

To install, download or clone the repo, then:

  1. npm install
  2. npm --prefix ./src/dapp install ./src/dapp

truffle compile

Develop Client

To run truffle tests:

  1. ./start-ganache.sh
  2. In another Terminal :
    • truffle test ./test/flightSurety.js
    • truffle test ./test/oracles.js
    • truffle test ./test/oracleLate.js
    • truffle test ./test/oraclesOnTime.js

To use the server and dapp :

  1. ./start-ganache.sh
  2. truffle migrate --reset ( another Terminal)
  3. npm run server
  4. ./start-dapp.sh

The server is used for 3 purposes :

  • Register oracles
  • Reigstering a list of Airlines in the FlightSurety contract (in the startup)
  • Serve an API, to retrieve flights list and to manage the flight status returned by the oracles ( for simulation purpose)

To view dapp:

http://localhost:8000

Dapp Snappshots

Info Tab

FlightSurety - 飞行担保

  • All the registered Airlines, retrieved by calling the FlightSuretyApp (smart contract )

  • The flights list is retrieved from the backend server

  • The passenger accounts ( from the truffle config)

Management Tab

  • It is used to disable or enable the FlightSuretyApp smart contract

FlightSurety - 飞行担保

  • And to set the flight status that will be retrieved by the registered oracles FlightSurety - 飞行担保

  • After disabling the contract, the airlines list could not be fetched anymore FlightSurety - 飞行担保

Insurance Tab

  • From this tab the user can buy the insurance , open request to check the flight status and pay out the insurance

FlightSurety - 飞行担保

  • Case :The flight is late

FlightSurety - 飞行担保

  • Case : The flight is on time FlightSurety - 飞行担保

  • Withdraw the insurance : pay out the passenger FlightSurety - 飞行担保

Resources

  • How does Ethereum work anyway?
  • BIP39 Mnemonic Generator
  • Truffle Framework
  • Ganache Local Blockchain
  • Remix Solidity IDE
  • Solidity Language Reference
  • Ethereum Blockchain Explorer
  • Web3Js Reference

安装

FlightSurety是Udacity区块链blockchain课程的一个示例应用项目。

开发客户端

  • Truffle v5.1.61
  • Solidity-0.6.12
  • 节点v15.5.1
  • Ganache v1.2.3
  • npm安装

Dapp快照

此存储库包含可靠的智能合约代码(使用Truffle)、测试(也使用Truffle)、dApp支架(使用React、Chakra-U)和服务器应用程序支架。

安装、下载或克隆repo,然后:

  1. npm–前缀./src/dapp安装。/src/dapp
  2. /start-加纳什.sh

truffle compile

信息选项卡

运行truffle测试:

  1. 在另一个终端:块菌测试。/test/飞行保证.js松露试验/神谕.js松露试验/oracleLate.js松露试验/oraclesOnTime.js松露试验/飞行保证.js松露试验/神谕.js松露测试/测试/oracleLate.js松露试验/oraclesOnTime.js
  2. /开始-加纳什.sh

使用服务器和dapp:

  1. 在飞行担保合同中重新提供航空公司名单(在初创期)
  2. 提供一个API,用于检索航班列表和管理oracles返回的航班状态(用于模拟目的)
  3. 通过调用FlightSuretyApp(智能合约)检索的所有注册航空公司
  4. 航班列表从后端服务器

服务器用于3个目的:

  • 乘客帐户(从truffle)检索config)
  • 它用于禁用或启用FlightSuretyApp智能合约,并设置在禁用合约后由注册的oracle检索的航班状态,无法再获取航空公司列表FlightSurety - 飞行担保
  • 用户可以从该选项卡购买保险,打开请求检查航班状态并支付保险金案例:航班晚点案例:航班准时退保以太坊eth如何工作?BIP39助记符生成器

查看dapp:

http://localhost:8000所有注册航空公司,通过调用FlightSuretyApp(智能合约)检索航班列表从后端服务器检索乘客帐户(从truffle配置)并设置注册oracle检索的航班状态禁用合同后,将无法再获取航空公司列表,例如:航班准点,取消保险,为乘客支付保险

安装

开发客户端

Dapp快照

信息选项卡

管理选项卡

保险选项卡

资源

  • Truffle v5.1.61
  • Solidity-0.6.12
  • 节点v15.5.1
  • Ganache v1.2.3
  • npm安装
  • npm–前缀./src/dapp安装。/src/dapp
  • /start-加纳什.sh
  • 在另一个终端:块菌测试。/test/飞行保证.js松露试验/神谕.js松露试验/oracleLate.js松露试验/oraclesOnTime.js松露试验/飞行保证.js松露试验/神谕.js松露测试/测试/oracleLate.js松露试验/oraclesOnTime.js
  • /开始-加纳什.sh
  • 块菌迁移–重置(另一个终端)
  • npm运行服务器
  • /start-dapp.sh公司
  • 登记神谕
  • 在飞行担保合同中重新提供航空公司名单(在初创期)
  • 提供一个API,用于检索航班列表和管理oracles返回的航班状态(用于模拟目的)
  • 通过调用FlightSuretyApp(智能合约)检索的所有注册航空公司
  • 航班列表从后端服务器
  • 乘客帐户(从truffle)检索config)
  • 它用于禁用或启用FlightSuretyApp智能合约,并设置在禁用合约后由注册的oracle检索的航班状态,无法再获取航空公司列表FlightSurety - 飞行担保
  • 用户可以从该选项卡购买保险,打开请求检查航班状态并支付保险金案例:航班晚点案例:航班准时退保以太坊eth如何工作?BIP39助记符生成器
  • 管理选项卡

    保险选项卡

    FlightSurety - 飞行担保

    • All the registered Airlines, retrieved by calling the FlightSuretyApp (smart contract )

    • The flights list is retrieved from the backend server

    • The passenger accounts ( from the truffle config)

    资源

    • It is used to disable or enable the FlightSuretyApp smart contract

    FlightSurety - 飞行担保

    • And to set the flight status that will be retrieved by the registered oracles FlightSurety - 飞行担保

    • After disabling the contract, the airlines list could not be fetched anymore FlightSurety - 飞行担保

    Insurance Tab

    • From this tab the user can buy the insurance , open request to check the flight status and pay out the insurance

    FlightSurety - 飞行担保

    • Case :The flight is late

    FlightSurety - 飞行担保

    • Case : The flight is on time FlightSurety - 飞行担保

    • Withdraw the insurance : pay out the passenger FlightSurety - 飞行担保

    Resources

    • How does Ethereum work anyway?
    • BIP39 Mnemonic Generator
    • Truffle Framework
    • Ganache Local Blockchain
    • Remix Solidity IDE
    • Solidity Language Reference
    • Ethereum Blockchain Explorer
    • Web3Js Reference

    部分转自网络,侵权联系删除区块链源码网

    www.interchains.cc

    https://www.interchains.cc/20471.html

    区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
    区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计FlightSurety – 飞行担保

    提供最优质的资源集合

    立即查看 了解详情