Skip to content

BailianBlockchain/Blockchain-FinalProject-SupplyChainFinancialPlatform

 
 

Repository files navigation

基于区块链的供应链金融平台

使用FISCO BCOS


一、依赖环境

1. 链端与后端

2. 前端

  • MacOS
  • Xcode

二、文件说明

三、运行

Ubuntu配置好依赖环境后,将 Loan.sol 部署到节点上,若成功部署,会得到 合约地址。你可以先在控制台中调用合约,产生一些实例以及发送交易。

用得到的合约地址替换 python-sdk/Loan_contract_flask_backend.pyLine 9 中的地址,将语句改为:

loan_contract = Loan_Contract(address=your_new_address)

注意保留双引号

假设在你的Ubuntu中,FISCO BCOS Python SDK路径为 $FB-Python-SDK
Loan.sol 复制到你的 $FB-Python-SDK/contracts 中;
python-sdk/Loan_contract_invoke.pypython-sdk/Loan_contract_flask_backend.py 复制到你的 $FB-Python-SDK

此时运行 Loan_contract_flask_backend.py,服务端会在8383端口监听请求。
请求示例:

  • 获取名称为A的公司的信息
GET: {IP}:8383/get_company_inf/?cpName=A
  • 获取所有公司A参与交易的单据
GET: {IP}:8383/get_receipt/?cpName=A
  • 获取银行bank_1向公司A提供的信用资产的数额
GET: {IP}:8383/get_AmountOfCreditAsset_bank_GiveTo_TrustedCompany/?bName=bank_1&cpName=A

在MacOS中打开 Loan_UI/Loan_UI.xcworkspace,在Xcode点击运行按钮即可使用前端界面。
注意修改 Loan_UI/Loan_UI/SearchCompanyPage/SearchCompanyViewController.mLoan_UI/Loan_UI/SearchReceiptPage/SearchReceiptViewController.mLoan_UI/Loan_UI/SearchCreditAssetPage 里的URL

四、补充

背景介绍、方案设计和功能测试等详见 17343107_王明业.pdf
Demo见本目录下的.mp4视频。

English Introduction

An independent work. Finish the whole platform including the front end, the back end and the chain end. Use the consortium blockchain platform FISCO-BCOS maintained by Tencent.

Consider the following scenario:

There are three companies A, B and C. Company A has a large scale, good credit, great risk-bearing capacity, and is qualified to directly obtain large amounts of financing from banks and other financial institutions.

Companies B and C are small and cannot obtain large amount of money directly from any financial institutions.

Now Company A orders a batch of goods from company B. Company B needs to order supplementary materials from company C to produce this batch of goods.

Company A is currently short of funds. A document signed by company A is sent to company B, promising to pay company B for the goods. At this time, company B can use this document to get a loan from the bank, With the credit of company A.

And company B can sign a document to company C in the same way. Company C can get a loan from the bank through the document.

Under the traditional method, such a process requires a very complicated authorization and verification process.

This project uses blockchain technology to efficiently implement such a credit transfer process and realize a blockchain-based supply chain financial platform.

About

基于区块链的供应链金融平台

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 89.2%
  • Objective-C 7.3%
  • Shell 3.0%
  • Other 0.5%