Git Product home page Git Product logo

example-data-dao-polygon's Introduction

WIP ERC-20 Data DAO built on Tableland and Polygon

This repo is a WIP.

Information

The main example token is /contracts/TokenHolders.sol and the /contracts/TokenHoldersGov.sol. Both of which were initially crafted in https://wizard.openzepplin.com and then supplemented in this repo. For development purposes, both are wrapped in proxy contracts.

There is an additional example in /contracts/GameIndex/ which shows how to limit the ability of the DAO to only modify data in a single table (created on contract initialization).

Finally, there is an example using NFT for membership instead of ERC20 in /contracts/NFTMembership.

Governance

The token contracts are written using access control roles. You can wire the contracts together using https://defender.openzeppelin.com/ and after granting the governance contract the ability to execute the TABLELAND_ROLE functions, you can then vote using governance.

You can use Tally to connect to your governance contract and host proposals & votes: https://www.tally.xyz/.

Develop

You must have a .env file with the following information

PRIVATE_KEY={your wallet key with a balance of matic}
POLYGONSCAN_API_KEY={your polyscan api key for pushing the abi}
POLYGON_MUMBAI_API_KEY={your alchemy api key for mumbai}
REPORT_GAS=true

Install

npm install

Start Tableland locally

npm run tableland

Deploy to local hardhat

npm run local or upgrade npm run localup

Deploy to ERC-20 token to Mumbai

npm run deploy

Deploy to Gov contract to Mumbai

npm run deploy-gov

Change example you deploy

For now, you modify the contents of scripts/deploy.ts and scripts/deploy-gov.ts and scripts/upgrade.ts to point at the implementations in the contracts/GameIndex folder instead. Be sure to change their imports and the contract name they try to push.

Warning

This example is not maintained.

example-data-dao-polygon's People

Contributors

andrewxhill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.