All Projects → ConsenSysMesh → Panvala

ConsenSysMesh / Panvala

Licence: apache-2.0
Sustain Ethereum Together

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Panvala

Aeternity
æternity: solving scalability problems by making sense of state-channels
Stars: ✭ 923 (+3318.52%)
Mutual labels:  ethereum, smart-contracts
Gdai.io
gDAI - Gas less DAI transfers by using GSN, Fulcrum and KyberNetwork
Stars: ✭ 26 (-3.7%)
Mutual labels:  ethereum, smart-contracts
Web3swift
Elegant Web3js functionality in Swift. Native ABI parsing and smart contract interactions on Ethereum network.
Stars: ✭ 462 (+1611.11%)
Mutual labels:  ethereum, smart-contracts
Eth.social
An Ethereum dApp for posting social events.
Stars: ✭ 17 (-37.04%)
Mutual labels:  ethereum, smart-contracts
Ethlint
(Formerly Solium) Code quality & Security Linter for Solidity
Stars: ✭ 698 (+2485.19%)
Mutual labels:  ethereum, smart-contracts
Blockchainstore
💰 Retail Store that runs on Ethereum
Stars: ✭ 425 (+1474.07%)
Mutual labels:  ethereum, smart-contracts
Web3.php
A php interface for interacting with the Ethereum blockchain and ecosystem. Native ABI parsing and smart contract interactions.
Stars: ✭ 507 (+1777.78%)
Mutual labels:  ethereum, smart-contracts
Solhint
Solhint is an open source project created by https://protofire.io. Its goal is to provide a linting utility for Solidity code.
Stars: ✭ 363 (+1244.44%)
Mutual labels:  ethereum, smart-contracts
Uniswap V2 Core
🎛 Core smart contracts of Uniswap V2
Stars: ✭ 889 (+3192.59%)
Mutual labels:  ethereum, smart-contracts
Echidna
Ethereum smart contract fuzzer
Stars: ✭ 571 (+2014.81%)
Mutual labels:  ethereum, smart-contracts
Eth Crypto
Cryptographic javascript-functions for ethereum and tutorials to use them with web3js and solidity
Stars: ✭ 420 (+1455.56%)
Mutual labels:  ethereum, smart-contracts
Ethereum Development With Go Book
📖 A little book on Ethereum Development with Go (golang)
Stars: ✭ 754 (+2692.59%)
Mutual labels:  ethereum, smart-contracts
React Ethereum Dapp Example
A starter boilerplate for an Ethereum dapp using web3.js v1.0, truffle, react, and parity
Stars: ✭ 384 (+1322.22%)
Mutual labels:  ethereum, smart-contracts
Smart Contract Best Practices
A guide to smart contract security best practices
Stars: ✭ 4,784 (+17618.52%)
Mutual labels:  ethereum, smart-contracts
Buidl
A browser-based IDE for creating, deploying, and sharing blockchain apps (DApps, or decentralized apps). Publish your first blockchain DApps in 5 minutes! Here is how: https://docs.secondstate.io/buidl-developer-tool/getting-started
Stars: ✭ 376 (+1292.59%)
Mutual labels:  ethereum, smart-contracts
Baseline
The Baseline Protocol is an open source initiative that combines advances in cryptography, messaging, and blockchain to execute secure and private business processes at low cost via the public Ethereum Mainnet. The protocol will enable confidential and complex collaboration between enterprises without leaving any sensitive data on-chain
Stars: ✭ 479 (+1674.07%)
Mutual labels:  ethereum, smart-contracts
Ethereum Php
PHP interface to Ethereum JSON-RPC API. Fully typed Web3 for PHP 7.X
Stars: ✭ 343 (+1170.37%)
Mutual labels:  ethereum, smart-contracts
Colonynetwork
Colony Network smart contracts
Stars: ✭ 351 (+1200%)
Mutual labels:  ethereum, smart-contracts
Btcrelay
Ethereum contract for Bitcoin SPV: Live on https://etherscan.io/address/0x41f274c0023f83391de4e0733c609df5a124c3d4
Stars: ✭ 533 (+1874.07%)
Mutual labels:  ethereum, smart-contracts
Hardhat
Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software. Get Solidity stack traces & console.log.
Stars: ✭ 727 (+2592.59%)
Mutual labels:  ethereum, smart-contracts

Panvala

CircleCI

Initiated by ConsenSys, Panvala is a decentralized foundation that funds the work the Ethereum ecosystem depends on. This app is used by PAN token holders to determine which grant applications should be funded using a process called slate governance.

Version 1 of the application is live on mainnet and contains four object types: proposals, grant slates, governance slates, and ballots. For those looking to receive a grant, proposals can be added directly into the application to be displayed publicly, or they can be sent directly to a slate creator (the later option affords the grant proposer more privacy in the consideration of their proposal).

After proposals are added to the system, a slate creator selects the proposals they wish to add to their slate. During (or after) the creation of a slate, that slate must be staked to be added to the ballot. An unstaked slate can also be created, but that slate won't appear on the ballot during the voting period.

Governance slates are added in the same way, but adjust a specific parameter that token holders might want to see adjusted. For example, the required number of tokens to stake a slate is a parameter that can be adjusted via a token holder vote.

The system will progress through four stages: Slate Submission, Intermission, Commit Voting, and Vote Reveal. These stages are repeated across each epoch. At the time of writing, Panvala is in its fourth epoch. During the commit voting stage, the token holders can vote using their tokens for one slate or porposals or another. Only one grant slate and one governance slate will win per quarter. The system also uses a first choice, second choice run-off voting system that enables the token holders to support a favorite slate without wasting their vote.

To learn more, read Panvala's wihtepaper here: https://www.panvala.com/img/docs/Panvala%20Whitepaper%20(June%2026).pdf

Documentation

Documentation is available at https://panvala.gitbook.io/docs

Mainnet Contracts

Quickstart

Set up your environment for local development.

First, install the following prerequisites:

If you're on MacOS, you can get both of these from Homebrew

brew install node yarn

Local blockchain and contracts

Install Ganache (recommended) or ganache-cli. Start Ganache.

Install Truffle for deploying contracts and running tests.

npm install -g truffle

Install dependencies, compile, and deploy the governance contracts to Ganache.

cd governance-contracts
yarn install
truffle migrate --network ganache

You should see output with the contract addresses for the Gatekeeper and the TokenCapacitor. Save these values for later configuration steps.

Set up the database

The Panvala API uses PostgreSQL for its database, so you'll need to run an instance to use it.

Run with Docker

The easiest way to run PostgreSQL is to use Docker. You'll need to install it separately.

Create a file docker/postgres/postgres.env with the following environment variables:

# docker/postgres/postgres.env
POSTGRES_USER=panvala_devel
POSTGRES_PASSWORD=panvala
POSTGRES_DB=panvala_api

You can set the POSTGRES_PASSWORD and POSTGRES_DB to anything, but POSTGRES_USER must be panvala_devel.

Now, you can start the database by running the included script from the root of the repository.

scripts/dev/start-db.sh

Standalone

Alternatively, if you have a PostgreSQL server running on your machine, you can use it. You will need to create a user panvala_devel and set a password.

Configure the applications

We recommend creating a .env file somewhere outside the repository with the required values, and sourcing it to set the environment variables. Note that DB_PASSWORD must equal POSTGRES_PASSWORD from the previous step.

Fill in the GATEKEEPER_ADDRESS and TOKEN_CAPACITOR_ADDRESS with the values you got from deploying to Ganache.

# panvala.env

## API
DB_PASSWORD=panvala
DB_NAME=panvala_api

## Frontend
API_HOST=http://localhost:5000

## Ethereum
RPC_ENDPOINT=http://localhost:7545  # default Ganache endpoint
GATEKEEPER_ADDRESS={your-deployed-gatekeeper}
TOKEN_CAPACITOR_ADDRESS={your-deployed-capacitor}

## IPFS (optional)
IPFS_HOST=ipfs.infura.io
IPFS_PORT=5001

Set the environment by sourcing the file:

source <path-to-panvala.env>

You will need to do this each time you start the API or the frontend in a new terminal, or add this line to your shell startup script (e.g. .bashrc).

Start the API

Install dependencies and set up the database tables. Remember to source the .env file first.

cd api/
source <path-to-panvala.env>
yarn install
# yarn db:create (if it does not already exist)
yarn migrate
yarn start

You should be able to reach the API in your browser at http://localhost:5000. To verify that it is properly connected to your database and blockchain, visit http://localhost:5000/ready. You should see the response ok if everything is fine. Otherwise, any errors should be printed to the terminal.

Set up MetaMask

To interact with your contracts through the web application, install the MetaMask browser extension.

First, you'll need to add your local Ganache network by clicking the network dropdown (it says something like "Mainnet") and selecting "Custom RPC". Scroll down to "New Network", put http://127.0.0.1:7545 (or whatever your Ganache instance is running on) into the "New RPC URL" field, and save.

Next, you need to import a private key from your network into MetaMask. In Ganache, select the accounts tab, click the key icon next to the first address, and copy the private key. In MetaMask, click the account icon in the upper right and select "Import account". Paste the private key into the field. Give the account a recognizable name.

Start the frontend

cd client/
source <path-to-panvala.env>
yarn install
yarn dev

You should be able to visit the application in your browser at http://localhost:3000 and receive a prompt to let the application connect to MetaMask.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].