Git Product home page Git Product logo

soliditreesmartcontracts's Introduction

SolidiTree Smart Conctracts

ChariFi platform to benefit tree planting in areas affected from deforestation by staking funds on Aave v3 pools.

Project commands

yarn install 
yarn hardhat compile
yarn hardhat node --fork https://polygon-mumbai.g.alchemy.com/v2/<key> 
yarn hardhat run scripts/NftTest.js  
yarn hardhat run scripts/NftDeployment.js --network mumbai
yarn hardhat run scripts/AAVE.js 

https://polygon-mumbai.g.alchemy.com/v2/<key>

in key change it for the API of your alchemy node

Networks available. { ropsten, mumbai }

You got 3 scripts, 2 tests, 1 deployment,

The NftTest.js check the whitelisting process after depositing in the protocol, and also the events of resuming. For this to work you need to deploy the NFT first, then the Wrapper, and Set the underlying asset and the Address of the NFT to set the Whitelisting roles.

Use --network if you want to use this script in any other network than a local node.

The NftDeployment script is used to deploy the contracts to the testnet, at the end of the execution it gives you the address of:

  • Nft Contract Adress
  • Token Contract Adress
  • Protocol Contract Adress

The AAVE.js script lets you impersonate an account with a high USDT balance, so you can check the integration with the AAVE protocol, but for this, you need to --fork the mainnet.

documentation:

you already have this command, yarn hardhat node --fork https://polygon-mumbai.g.alchemy.com/v2/<key> change the key with your API key of an alchemy node.

then run yarn hardhat run scripts/AAVE.js w/o network to use your forked node of mumbai.

For other networks, you need.

  1. Pool-Proxy-{network}
  2. The Underlying Asset Adress {Asset to deposit, in our case USDT}
  1. https://docs.aave.com/developers/deployed-contracts/v3-testnet-addresses
  2. https://docs.aave.com/developers/deployed-contracts/v3-mainnet

.env.example

PRIVATE_KEY = ""
ALCHEMY_ENDPOINT_RINKEBY = "https://eth-rinkeby.alchemyapi.io/v2/<key>"
ALCHEMY_ENDPOINT_MUMBAI = "https://polygon-testnet.blastapi.io/<key>"
RELAYER_API_KEY = "https://polygon-mumbai.g.alchemy.com/v2/<key>"
RELAYER_SECRET_KEY = ""

soliditreesmartcontracts's People

Contributors

th3nolo avatar

Stargazers

 avatar  avatar

Watchers

 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.