Coder Social home page Coder Social logo

escrow_donation's Introduction

Table of Contents

GIVfi-donation-handler

The DonationHandler can be used to transfer whitelisted assets to whitelisted addresses. Furthermore, the donator can specify a fee that the protocol or the fee receiver will receive. All assets are hold by the DonationHandler contract and can be withdrawn later by the recipients.

Special token address 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE represents the native currency of the network. Use this address to donate and withdraw the native currency. The address is whitelisted by default.

Requirements

Foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust. Learn more.

Quickstart

git clone https://github.com/Giveth/GIVfi-donation-handler
cd GIVfi-donation-handler
make # This installs the project's dependencies.
make test

Run Tests

make test or forge test

Deploying to a network

You'll need to add the following variables to a .env file:

  • GOERLI_RPC_URL: A URL to connect to the Goerli Testnet.
  • GNOSIS_RPC_URL: A URL to connect to the Gnosis Chain.
  • PRIVATE_KEY: A private key from your wallet.
  • Optional ETHERSCAN_API_KEY: If you want to verify on etherscan

Initialization Parameter

Before deploying to one of the networks, please adjust the DonationHandler initialization parameter in script/Config.sol. You need to specify the whitelisted addresses for the accepted token, donation recipients, fee receivers and admins. You can set the parameters for each network separately in the corresponding functions (e.g. getGnosisEthConfig()).

Deploying

  • make deploy-gnosis Deploys the DonationHandler, a ProxyAdmin and a TransparentUpgradeableProxy to gnosis chain.

  • make deploy-goerli Deploys the DonationHandler, a ProxyAdmin and a TransparentUpgradeableProxy to goerli testnet.

  • make deploy-anvil Deploys the DonationHandler, a ProxyAdmin and a TransparentUpgradeableProxy to your local anvil chain. Please run make anvil before deploying.

Security

To use slither, you'll first need to install slither.

Then, you can run:

make slither

escrow_donation's People

Contributors

0xkurt avatar aminlatifi 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.