• Stars
    star
    359
  • Rank 118,537 (Top 3 %)
  • Language
    JavaScript
  • License
    GNU General Publi...
  • Created over 7 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Giveth Dapp for crowdfunding and managing donations on the ethereum blockchain.

TEST Giveth Dapp

DApp - Donation Application for charitable giving without losing ownership

Welcome to the code for Giveth's DApp. This is an open source effort to realize the potential of ethereum smart contracts. More specifically, the Giveth DApp provides an alternative to traditional donation.

Table of content

Getting Started

In the following sections you will learn all you need to know to run the DApp locally and to start contributing. All the steps are also described in this amazing Video Tutorial Walkthrough by Oz.

Prerequisites

  • You need to use NodeJS v10 LTS.
  • You need to use yarn (v1.22.10 or higher) to correctly install the dependencies.
  • You need to have git.

Install

  1. Click Star on this repo near the top-right corner of this web page (if you want to).
  2. Join us on Element or Discord if you haven't already.
  3. Fork this repo by clicking Fork button in top-right corner of this web page. Continue to follow instruction steps from your own giveth-dapp repo.
  4. Clone your own "giveth-dapp" repo. Copy the link from the "Clone or download" button near the top right of this repo's home page.
  5. The rest of these steps must be done from your machine's command line. See the OSX and Linux or Windows section to continue.

OSX and Linux

If your operative system is any distribution of linux you can use an All-in-One installation scripts special thanks to Dapp contributor Jurek Brisbane, available here along with a youtube video, otherwise try the following:

  1. From the desired directory you wish to copy the "giveth-dapp" folder with source files to.
    git clone {paste your own repo link here}
    
    NOTE: Please use develop branch for contributing.
    git clone -b develop {paste your own repo link here}
    
  2. Change directories to giveth-dapp:
    cd giveth-dapp
    
  3. Make sure you have NodeJS (v10) and yarn (v1.22.10 or higher) installed.
  4. Install dependencies from within giveth-dapp directory:
    yarn install
    
  5. That is it, you are now ready to run the giveth-dapp! Head to the Run DApp section for further instructions.

Windows

  1. Install the latest version of Python from this Link. (make sure python is added to $PATH)
  2. Install Microsoft Visual Studio 2017 (double-check the version) from this link. Giveth-Dapp needs the node-gyp module and node-gyp needs VS C++ 2017 Build Tools to be installed.
  3. After downloading, install the packages marked from this image.
  4. Then run command below in command prompt
    npm config set msvs_version 2017
    
  5. After installing the above, you should install NodeJS version 10 LTS (it is better to be v10.24.1 LTS).
  6. Download and run the node-v10.24.1-x64.msi installer and then continue through the installation as normal. Be sure to have the "Enable in PATH" option enabled before installing.
  7. Open the command line in administrator mode by right-clicking on the cmd.exe application and selecting "Run as administrator"
  8. In the administrator command prompt, change to the directory where you want to store this repository.
    cd C:\some\directory\for\repositories
    
  9. Double-check the node version with CMD command:
    node -v
    
  10. After that, install the latest version of Yarn. Be careful not to install packages with NPM. If you have already tried "npm install", you should first delete "node modules" folder.
    yarn install
    
  11. That is it, you are now ready to run the giveth-dapp! Head to the Run dapp section for further instructions.

Run

  1. The Giveth dapp will need to connect to a feathers-giveth server. Follow the feathers-giveth readme instructions to install and run server before proceeding further. Alternatively, you could change the configuration to connect to the develop environment, see the Configuration section.

  2. Start the dapp.

    npm start
    
  3. Once the dapp is up in your browser, click "Sign In" from the main menu.

  4. For testing locally, choose any of the wallet files found in the giveth-dapp/keystores/ folder using the wallet password: password. DO NOT USE THESE ON ANY MAINNET EVMs.

  5. Using the test token To use the test token you need to import the keystore.json you use for your account to MetaMask. After importing, click on 'Add token' > 'Custom token' and enter the MiniMe Token address that can be found when deploying the contracts (should be 0xe78A0F7E598Cc8b0Bb87894B0F60dD2a88d6a8Ab by default but make sure to check) The token balance should show up automatically, and the token symbol is MMT. However, in the dApp the token symbol is referred to as ANT, b/c the dapp needs to be able to fetch a conversion rate.

NOTE: When resetting feathers or redeploying the contracts, you need to remove the keystore from metamask and follow this procedure again.

Build

npm run build

NOTE: due to some web3 libraries that are not transpiled from es6, we have to use our giveth-react-scripts fork of react-scripts .

Configuration

The DApp has several node environment variables which can be used to alter the DApp behaviour without changing the code. You can set them through .env or .env.local files in the DApp folder.

Variable name Default Value Description
PORT 3010 Port on which the DApp runs
REACT_APP_ENVIRONMENT 'localhost' To which feathers environment should the DApp connect. By default it connects to localhost feathers. Allowed values are: localhost, develop, release, alpha, mainnet. See Deployment Environments.
REACT_APP_DECIMALS 8 How many decimal should be shown for cryptocurrency values. Note that the calculations are still done with 18 decimals.
REACT_APP_FEATHERJS_CONNECTION_URL Differs per REACT_APP_ENVIRONMENT Overwrites the environment injected feathers connection URL.
REACT_APP_NODE_CONNECTION_URL Differs per REACT_APP_ENVIRONMENT Overwrites the EVM node connection URL for making EVM transactions.
REACT_APP_LIQUIDPLEDGING_ADDRESS Differs per REACT_APP_ENVIRONMENT Overwrites the Liquid Pledging contract address.
REACT_APP_DAC_FACTORY_ADDRESS Differs per REACT_APP_ENVIRONMENT Overwrites the Communities contract address.
REACT_APP_CAMPAIGN_FACTORY_ADDRESS Differs per REACT_APP_ENVIRONMENT Overwrites the Campaign Factory contract address.
REACT_APP_MILESTONE_FACTORY_ADDRESS Differs per REACT_APP_ENVIRONMENT Overwrites the MilestoneFactory contract address.
REACT_APP_TOKEN_ADDRESSES Differs per REACT_APP_ENVIRONMENT Overwrites the bridged token addresses. This is a JSON object string w/ token name : token address.
REACT_APP_BLOCKEXPLORER Differs per REACT_APP_ENVIRONMENT Overwrites the block explorer base URL. The DApp assumes such blockexplorer api is \<BLOCKEXPLORER\>/tx/\<TRANSACTION_HASH\>
REACT_APP_DEFAULT_GASPRICE 10 Overwrites the default gasPrice that is used if ethgasstation service is down. The value is in gwei.
REACT_APP_ANALYTICS_KEY "" Overwrites Segment analytics key

Example of .env.local file that makes the DApp run on port 8080, connects to the develop environment and uses custom blockexplorer:

PORT=8080
REACT_APP_ENVIRONMENT='develop'
REACT_APP_BLOCKEXPLORER='www.awesomeopensourceexplorer.io'

The rest of the configuration can be found in configuration.js

Analytics

Segment Analytics can be enabled by setting REACT_APP_ANALYTICS_KEY

Query Strings

The milestone creation/proposal view now supports query string arguments! The following arguments are available:

Argument Expected Values Type
title The title of the milestone string
description The description of the milestone string
recipientAddress The address of the recipient string
reviewerAddress The address of the reviewer string
selectedFiatType A valid fiat type (i.e. USD) string
date A valid milestone date string string
token A valid token symbol (i.e. DAI) string
tokenAddress A valid token address string
maxAmount A valid max amount of ETH or token number
fiatAmount A valid max amount of fiat (dependant on selectedFiatType) number
isCapped Determines whether the milestone should be capped 0 or 1 (boolean)
requireReviewer Determines whether the milestone should require a reviewer 0 or 1 (boolean)

Contributing

The DApp is fully open-source software, and we would love to have your helping hand! See CONTRIBUTING.md for more information on what we're looking for and how to get started. You can then look for issues labeled good first issue or help wanted. We regularly reward contributions with ether using the Reward DAO.

If you are not a developer, you can still help us by testing new releases periodically. See the Release Process section.

If you want to better understand how does the development process works, please refer to our wiki pages, especially to the Product Definition, Product Roadmap and Development Process & Quality Assurance.

Local Development

At first you would like to run the DApp locally. When running testrpc locally in deterministic mode, you can use any of the keystores in the giveth-dapp/keystores as your wallet. This will provide you access to the testrpc accounts for local development. Each keystore uses the same password: password. DO NOT USE THESE ON ANY MAINNET EVMs

The keystores are seeded with 10.000 ANT tokens for testing donations. To get started with testing donations, make sure to add your account's keystore to MetaMask and swith MetaMask to Ganache. The donation modal should then show the appropriate balance when donating in ANT tokens.

NOTE: If you get a nonce error in MetaMask or if the dapp fails to load with your metamask unlocked, it could be b/c metamask is confused. You should go to "settings" -> "Reset Account" in MetaMask in order to reset the nonce & cached account data.

Development and PR Testing

  1. The Giveth Dapp is auto deployed from the develop branch and is live on Rinkeby develop.giveth.io. All pull requests are autodeployed and the PR preview will be generated upon submission. To learn how to access PR previews see Development Process & Quality Assurance on our wiki.
  2. In order to use the dapp you will need to create account. If this is your first time, click "sign up" to create an account. If you already have a valid keychain file, use it to sign in.
  3. You will need test ether on the Rinkeby network. Go to the "wallet" page to see your new address (0x..). Copy that address and use the faucet to get some: https://faucet.rinkeby.io/

Deployment Environments

At Giveth, we are using the gitflow branching model to deploy to 4 different environments.

Name Blockchain Branch Deployed Auto Deploy Use
mainnet Ethereum Main Network master no Main network deployment for now abandoned due to high transaction costs until sustainable solution is found.
alpha Rinkeby Test Network master no Environment used as a production version until scalability is resolved.
release Rinkeby Test Network release yes Environment for release candidate quality control testing by non-devs.
develop Rinkeby Test Network develop yes Development environment for integrating new features. Feature and pull request branches are also automatically deployed to this environment.

You can change the environment to which the DApp connects through the node environment variables. See the Configuration section for more details.

Release Process

The development uses the Gitflow process with 2 weeks long sprints. This means there is new release to be tested every fortnight. We invite contributors to help us test the DApp in the release environment before we merge it to the master branch and deploy to production environments. If you are interested, write to the DApp Development channel on Element . You can read more about the release planning on our wiki.

Help

Reach out to us on Element or Discord for any help or to share ideas.

More Repositories

1

minime

Minimi Token. ERC20 compatible clonable token
Solidity
671
star
2

feathers-giveth

Featherjs server for caching giveth data.
JavaScript
87
star
3

liquidpledging

Liquid Pledging
Solidity
67
star
4

giveth-dapps-v2

This project is the aggregation of GIVeconomy and Giveth.io DApps in a single repo
TypeScript
61
star
5

vaultcontract

Timelock vault for securing the payments
JavaScript
57
star
6

impact-graph

TypeScript
49
star
7

giveth-docs

Documentation and Guides for Giveth.io
JavaScript
37
star
8

giveconomy-foundry

Solidity
29
star
9

giveth-planning

28
star
10

giv-token-contracts

TypeScript
27
star
11

ui-design-system

TypeScript
26
star
12

notification-center

It's a microservice that would handle all notification of giveth.io and trace.giveth.io
TypeScript
24
star
13

giveth-gatsby

Giveth 2.0 implementation in GatsbyJS
JavaScript
24
star
14

SiweAuthMicroservice

Implements Sign in with ethereum
TypeScript
24
star
15

DeVouch-FE

Front-end repository of the DeVouch project
TypeScript
24
star
16

givback-calculation

Calculate givback calculation for giveth donors
TypeScript
23
star
17

giveconomy-subgraph

TypeScript
23
star
18

giveconomy-balance-aggregator

TypeScript
23
star
19

analytics-dashboard

Analytics dashboard for Giveth data
TypeScript
23
star
20

givpower-bot

TypeScript
22
star
21

DeVouch-BE

DeVouch - Decentralized Vouching via Attestations
TypeScript
22
star
22

giveth-next

Giveth 2.0 implementation in NextJS
JavaScript
20
star
23

common-contract-deps

Base layer smart contracts that Giveth likes to use :-D
Solidity
18
star
24

milestonetracker

Milestone Tracker Contract
JavaScript
17
star
25

yogatoken

Yoga Token
Solidity
17
star
26

giveth-wiki

Wiki for giveth.io
HTML
16
star
27

solcpiler

Solidity compiler wraper to generate JS.
JavaScript
15
star
28

giveth-bridge

Giveth bridge
JavaScript
12
star
29

giveth-bot

Giveth matrix community bot
JavaScript
10
star
30

WHGBalanceVerification

Verification of the balances rescued from the multisig compromise
Python
10
star
31

buddy-bot

JavaScript
10
star
32

MVP

The First Prototype of CharityDAO: An Open Source Platform for Effective Charitable Giving
Solidity
9
star
33

liquidity-mining-dapp

TypeScript
9
star
34

milestonetracker-ui

User Interface for the Milestone Tracker
JavaScript
8
star
35

website

Website for Giveth
HTML
8
star
36

xchange-rates

Share proof of a crypto fiat exchange rate at a specific date
JavaScript
8
star
37

giveth-1-simulation

Generating giveth 1 whole state by processing network events
TypeScript
7
star
38

giveth-design-assets

Find all logos and graphics concerning the Giveth universe here and more in this link
Rich Text Format
7
star
39

wall-of-fame

Giveth Video Wall of Fame
JavaScript
7
star
40

dapp-mailer

Email notification system for (d)apps
HTML
6
star
41

GIVeconomy

The Giveth Economy is the collective of projects, donors, builders, and community members builders that build the future of giving
6
star
42

givbacks-scripts

Jupyter Notebook
5
star
43

ethereum-signal-aggregator

Minimum bias ethereum signal aggregator
JavaScript
5
star
44

pollmanager

Smart Contract that allows any kind of voting to the holders of a MiniMe contract
Solidity
5
star
45

withdrawcontract

Contract to distribute tokens/ethers to Minime to token holders
Solidity
4
star
46

Communication

Where we decentralize Giveth Communication
4
star
47

Donation-Doubler

Solidity
4
star
48

eth-contract-class

generate a js wrapper class given a contract abi
JavaScript
4
star
49

giveth-toshi-app

Giveth's Toshi chat bot app
JavaScript
4
star
50

giveth-io-typescript

Giveth.io TypeScript
TypeScript
4
star
51

liquidpledging-ui

Generic UI implementation for the Liquid Pledging smart contract
JavaScript
3
star
52

lpp-campaign

Ethereum contract for liquid pledging campaign plugin
JavaScript
3
star
53

lpp-milestone

Simple milestone plugin for liquid plading.
JavaScript
3
star
54

ApproveAndVoteGov

Approve and Vote Governance Contract for a DAO
3
star
55

givethdirectory

Giveth campaign directory
JavaScript
3
star
56

giveth-bridge-monitor

JavaScript
3
star
57

lpp-capped-milestone

LiquidPledging plugin to manage capped milestones
JavaScript
3
star
58

giveth-docs-bot

Ask questions about Giveth to a bot that fetches answers directly from Giveth Docs
Python
2
star
59

GIVfi-subgraph

TypeScript
2
star
60

Website-3.0

The Giveth website written in React
JavaScript
2
star
61

giveth-contracts-template

Useful template for developing and testing Solidity contracts, built with hardhat and waffle
TypeScript
2
star
62

gov-lab

Roff
2
star
63

apiGive

TypeScript
2
star
64

giv-token-subgraph

TypeScript
2
star
65

GIVfi

Solidity
1
star
66

giveth-beta-docs

Documentation and Guides for beta.giveth.io
JavaScript
1
star
67

coodcad

Simplify the cadCAD conviction3 simulation by introducing a smattering of Object Orientedness
Jupyter Notebook
1
star
68

youtube-video-backup

To Backup videos from Giveth's YouTube channels
Python
1
star
69

monoswap

TypeScript
1
star
70

givethai

JavaScript
1
star
71

reward-dao

JavaScript
1
star
72

fund-forwarder

Smart contract for the forwarding of funds to a campaign with an escape hatch to prevent loss of non-ether tokens.
Solidity
1
star
73

giveconomy-notification-service

TypeScript
1
star
74

website-old

@sebrohan's playground
CSS
1
star
75

univ3-liquidity-calc

Some back-of-the envelope calculation for uniV3 liquidity and liquidity ratio calculation
Python
1
star
76

lpp-dac

LiquidPledging plugin for dacs, which mints tokens for givers
JavaScript
1
star
77

giveth-world

D3js world map of
HTML
1
star
78

segment-analytics-node

Rewrite of the package to make http requests
TypeScript
1
star
79

GIVeconomy-fundraising

1
star
80

multisig

A fork of the Multisig contract that is used for the Ethereum Foundation, The DAO, and many other projects.
JavaScript
1
star
81

giveth-1-preview

Giveth 1 preview provider for social networks
JavaScript
1
star
82

giveth-monitor

Monitoring stack to be deployed on all our machines
Shell
1
star
83

Ethereum-dapp-bin

This repository contains the Multisig contract that is used for the Ethereum Foundation, The DAO, and many other projects.
JavaScript
1
star
84

docker-dapp

Docker image of the dapp, including feathers
1
star
85

giv-supply-function

JavaScript
1
star
86

vault-fetch-service

A simple systemd service that fetches Hashicorp Vault Secrets based on your needs
Shell
1
star
87

giveth-caddy

Dockerfile
1
star