Git Product home page Git Product logo

web3task-contracts's Introduction

Web3Task-contracts

This protocol aims to solve the problem of monetized contribuitions by fractionalizing work and demands just like the github issues, where the company creates the issues and places a bouty for users to solve them under the company's terms.

Current Status

Project is currently under the MvP stage. The following features will be implemented in the next versions:

  • Bid
  • Disputes
  • Ranking
  • Proxy
  • Fee Mechanism
  • Deployment for 3rd-parties (Multiple projects using the same contract to optimize front-end indexing)

if you are a developer and want to contribute to this features, please contact us as we are still in the conception phase of them.

Disputes

We are aware that disputes are a common ground in this kind of service, so we are not mainly working on a solution to address this problem as a lot of people tried and failed. Instead our solution is a gamified approach for both task creator and task assignee. Delivering prior to date will harvest better score for the assignee, while having its created tasks completed the task creator will also harvest profile score. This score will be used to rank users in the platform, and the higher the score the more trustable the user is. Opening disputes is supposed to be a risky and unworthy move by both sides, as disputes will drastically decrease the score of both sides or the side that is wrong according to the DAO final saying.

Bounties

The task creator will be able to create a task and set a bounty for it, and the task assignee will be able to start the task and submit it for review. If the task creator approves the task, the bounty will be sent to the task assignee, otherwise the task creator will be able to cancel the task and get the bounty back.

Ranking

The ranking system will be based on the score of the user, which will be calculated based on the following factors:

  • Deliver time prior to deadline
  • Reward Amount
  • Disputes during the execution of the task

The scores will only be applied after the task final complitude.

Features

Regarding Task management, the following features are implemented:

  • Create
  • Start
  • Review
  • Complete
  • Cancel
  • Edit Title
  • Edit Description
  • Edit Deadline
  • Edit Metadata

Note that editing sensitive information that might affect the task assignee will not be allowed.

To manage the Access Control of users, the following methods are implemented:

  • Set Role: Sets the role id for an address as true,
  • Set Operator: Sets which role id can manage the contract functions.

Note that every function in the contract must have a role id assigned to operate it, as well as an address authorized by a role id.

Contracts

  • TaskManager: The main contract that manages the tasks.
  • AccessControl: The contract that manages the access control of the users.
  • Web3Task: The core implementation of the task marketplace.
  • IW3Task: The interface of the Web3Task contract.

Installation

yarn
npm i

Setting Up Local Blockchain

Run a Hardhat node:

npx hardhat node

The node will generate some accounts. You can realize they are already set at .env.sample, you should just let it be.

Add the first one to Metamask to be the leader and the second to be the member. The account will be:

0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
0x70997970C51812dc3A010C7d01b50e0d17dc79C8

To add the localhost network to metamask, click on the network dropdown and select Custom RPC. Fill in the following fields:

  • Network Name: localhost
  • New RPC URL: http://localhost:8545
  • Chain ID: 31337
  • Currency Symbol: ETH

NOTE: Use the recommended accounts to avoid errors.

Deploying Smart Contracts in the Localhost

Makefile will set everything for us, just run:

make mocks

Livenet Deployment

Remove the .sample from the .env.sample file and fill in the values with the corresponding API from RPC providers.

Usage

If you are not using livenet, you should comment chain condigurations at hardhat.config.ts or mock the keys in the .env file, otherwise you will get an error from hardhat.

To run all the unitary tests, run:

yarn test

Contact

Advisor: 0xneves (@ownerlessinc)

This project is under the MIT license, feel free to use it and contribute. If you have any questions, please contact us at https://discord.gg/web3dev under the pod-labs channel.

web3task-contracts's People

Contributors

0xneves avatar danicuki avatar durdsvianna avatar guboehm avatar heronlancellot avatar

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.