Giter Site home page Giter Site logo

kyodo-protocol's Introduction

Kyōdō Protocol

The future of work is being transformed by the relationship between Professionals, Communities and Businesses. Kyōdō Protocol facilitates trusted connections between these professional parties with a decentralized, blockchain-driven solution. The protocol provides a payments system with verifiable credentials and proof of curriculum using Zero Knowledge Proofs (ZKP) to enhance privacy.

For more information about how Kyōdō functions, head to Kyōdō Protocol docs.

Prerequisites

Before you begin, make sure you have Node.js and npm installed on your machine. If not, you can download and install them from the official Node.js website.

Getting Started

Step 0: Install Dependencies

First, you'll need to install the project dependencies. Navigate to the project root directory in your terminal and run:

npm install
# or
yarn install

Index


1 - Environment Setup

Make sure you have an .env.development.local file in your root directory. A template file named .env.development.local.sample is provided. Rename it to .env.development.local

To run tests or deploy contracts on the Mumbai test network, you'll need to set up the appropriate environment variables in the .env file in your root directory. A template file named .env.sample is provided. Rename it to .env

2 - Setting Up Local Blockchain

Run a Hardhat node:

cd contracts/ethereum
npx hardhat node --fork https://rpc.ankr.com/eth_goerli

The node will generate some accounts. Add the first one to Metamask.

NOTE: Note: Use the first account to avoid errors.

3 - Deploying Smart Contracts

Deploy the Agreement contract and the fake Stablecoin:

cd contracts/ethereum
npx hardhat run scripts/deploy.js

4 - Run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

🌟 Interacting with Smart Contracts 🌟

You can interact with the smart contracts either through the frontend application or by running the following scripts:

Via Scripts

Create an agreement:

cd contracts/ethereum
npx hardhat run scripts/createAgreements.js

Retrieve all agreements or the user (deployer) agreements:

cd contracts/ethereum
npx hardhat run scripts/retrieveAgreements.js

Pay for the agreement you've created:

cd contracts/ethereum
npx hardhat run scripts/payAgreements.js

Via Frontend

To pay for the agreement through the user interface, you need to allow the contract first, as the logic to check allowance through the UI is not implemented yet:

cd contracts/ethereum
npx hardhat run scripts/allow.js

Contribution

We're always open to contributions to improve and expand the project! If you're interested in contributing, the best way to start is by checking out our Roadmap and Milestones under the Projects tab. This will give you an overview of what we're currently working on and what we plan to tackle next.

Contact

For more information or if you have any questions, feel free to reach out to us on our Discord Server. We're more than happy to assist you!

License

This project is licensed under the MIT License. This means you are free to use, modify, and distribute the code, as long as you include the original copyright and license notice in any copy of the software/source. For more details, please refer to the LICENSE file in the repository.

Editing styles

Global SASS

header, footer, forms, grid, components...

className="class-name"

Modules

Contextualized SASS

className={styles["class-name"]}

kyodo-protocol's People

Contributors

mikaelcarrara avatar jaxiii avatar danicuki avatar williangrios avatar nomadbitcoin avatar lucasarchangelo avatar

Stargazers

 avatar Guilherme Ventura avatar  avatar Anderson Dantas avatar Tiago Ferreira Cavazin avatar  avatar  avatar  avatar  avatar  avatar Alex Gomes avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

kyodo-protocol's Issues

Referral link

Imagine that we have professionals or hiring companies that refer the usage of Kyodo Protocol. These referees can earn a % of paid value to the protocol.

Create Community - Front

  • Page for community leaders to add their community to the Kyodo Protocol
  • Configurable Fields:
  • mint token / existing token address
  • community fee
  • Community Discord
  • Other community links

Improve UX for payments

  • Always allow payment, because it is recurring
  • allowance and payment should be "automaticaly" done
  • user puts the amount to pay. We check if she allowed. If no, ask for allowance and then pay (2 transactions). If it is already allowed, pay (1 transaction)

Implement solution for wallet options

Problem:
The majority of MultiChain Wallet Connectors rely on "wagmi" chains. However, "wagmi" doesn't support Solana. As a result, even though wallets like Phantom are displayed, managing connections with Solana networks becomes challenging.

Solution:
There should be a prompt asking users to specify their preferred chain for connection: EVMs > Solana > Others. Based on this selection, the wallet selector modal should then display the appropriate wallets for the chosen chains.

Front Q.A.

  • Favicon
  • Title
  • Add link to web3dev logo in the footer
  • Add coin icon to payment history
  • Dashboard responsive

Convert all CSS files to SASS files

  • AddAgreement
  • AgreementList

Contextualize SASS

  • ConnectWallet
  • Dashboard
  • AddAgreement

Implement the final design - Front

Structure

  • Main navigation (menu)
  • Footer with terms and privacy nav
  • Mobile general adjustments

Visual enhancement

  • ConnectWallet page
  • AddAgreement page
  • AgreementList page

Improvements on agreements page

  • add a "create new agreement" link on agreements list page
  • use a form framework to validate fields (value numeric, wallet address, etc)

Manual Refresh Needed to View New Agreement After Submission

The /agreements page isn't updating as expected after a transaction is initiated from /agreements/new.

The addAgreement promise has an onConfirmation callback that triggers a router.push("/agreements") upon successful completion. However, during manual testing, even after manually reloading the page, the list doesn't reflect the most recently added agreement. The only method that results in fetching and displaying the latest agreement is by manually entering the URL in the browser's address bar.

This behavior happens with the local node so the delay is theoretically minimal so I don't think it is a delay.

Pay All / Pay selected

  • Company can pay a group of selected agreements / or all agreements in a single transaction

standardize value in total paid

At present, our Vault operates on a generic basis, where both deposit and withdrawal functions accept assets as parameters. We need to refine and establish clear rules regarding:

  1. The criteria or conditions for tokens when making a deposit.
  2. The options available to professionals during withdrawal. Specifically, should they be allowed to claim their payment in any token that the vault currently holds? Or should they only be able to withdraw the specific token that was used for the payment by the company in their agreement?

improvements on dashboard

  • list only 2 or 3 payments in list, click "more..." to see all payments in the payments page
  • bug: duplicating payments - it happens when I am the payer and the receiver. It should not allow user to create agreement for himself or pay himself.
  • should be discriminated if payment is

add VaulToken after Redeem

Show a button to add the vaultToken at metamask token list after the transaction to Redeem is processed

Fix bug on behaviors after transactions

Some screens are not being corrected load after the transaction runs.

  • Check route.push() vs component re-load
  • Check tx.wait()
  • Implement Toasts.
  • Replace Botloaders

Professional Dashboard

  • professional can claim stable coin balance and community tokens
  • list historical payments

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.