Giter VIP home page Giter VIP logo

credit-card-system-smartcontract's Introduction

Crypto-Credit-System(Smart Contract)

It's final project for 1112 NCNU CSIE "Principles and Practice of Blockchains"

We have implemented a Crypto Credit Card System consisting of two smart contracts: Soulbound Token and Bank.

What we did

We have implemented a simple Soulbound Token (SBT), which is non-transferable. The SBT logs all credit-related activities, including borrowing, repaying, and warning events.

After minting your own SBT, you can register with any bank that trusts this SBT. Each bank can access the client's credit information to establish a credit limit. The registered client can then call the bank's pay() function to request the bank to make payments to the shop on their behalf. The client will repay the bank once they are able to cover the outstanding balance.

Additionally, we have implemented a web interface for interacting with this repository. You can find the web interface repository here.

Deploy (localhost)

  1. Open Ganache on your localhost
  2. clone this repo
    git clone $THIS_REPO_LINK
    
  3. Install the project dependencies:
    cd Credit-Card-System-smartcontract
    npm install
    
  4. Open the Truffle console
    truffle console
    
  5. Deploy the contracts in the Truffle console:
    truffle(development)> deploy    
    
  6. Once the contracts are deployed, you can set up and interact with the web interface repository here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.