Go to file
2023-06-13 16:47:32 +08:00
contracts feat: add destroy 2023-06-12 22:13:03 +08:00
migrations fix: pay & repay but 2023-06-06 16:45:49 +08:00
test feat: On Chain ERC721 2023-06-04 19:59:46 +08:00
.gitignore fix: remove build files 2023-06-04 23:15:28 +08:00
package-lock.json feat: On Chain ERC721 2023-06-04 19:59:46 +08:00
package.json feat: On Chain ERC721 2023-06-04 19:59:46 +08:00
README.md docs(fix): incorect deploy steps 2023-06-13 16:47:32 +08:00
truffle-config.js feat: On Chain ERC721 2023-06-04 19:59:46 +08:00

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.