cryptoroots.xyz

Inspiration

My goal is to BUIDL a platform that encourages everyone to go carbon neutral by using blockchain.
NFTs haven't reached their full potential yet. With cryptoroots.xyz, users will be able to invest in the earth by planting trees with NFTs!

Climate change is our enemy, and trees are our biggest weapon to fight against it.
WE CAN CONTROL CLIMATE CHANGE!

What it does

cryptoroots.xyz is a platform that allows users to offset their carbon footprint by planting trees ($1 = 1 tree) and earn ERC-1155 powered climate change impact badges.

cryptoroots.xyz is a No-profit organization, 100% of the cryptoroots funds will be donated to #teamtrees cause (founded by YouTubers Mr. Beast and Mark Rober in 2019, they’ve planted 20 million + trees till now). We will frequently release donation receipts on our platform for transparency (will send emails to those who opt to subscribe to our mailing list). Also, users can track how many trees they've planted, how much area is covered, and how much carbon emission is reversed/year.

NFTs for Public Goods by Vitalik Buterin

Benefits:

  • 🌱 Offset carbon emission: Plant trees! An average grown tree offsets 24kg of co2/year.
  • 🌱 Save soil: The number of microbes (8 billion in a handful of soil) is decreasing. Soil is a major source of nutrients needed by plants for growth. Trees reduce soil erosion.
  • 🌱 Climate change awareness: Show your environmental impact, NFTs are verifiable digital assets on the blockchain.
  • 🌱 Gifts: Gift plants instead of things that produce carbon.
  • 🌱 Tickets: Get access to global environmental events/activities as NFT tickets.
  • 🌱 Community: Turn donations into NFTs! Show your environmental work, and collaborate with environmental activists all over the world.

How we built it

Languages: Solidity, JavaScript, HTML5, CSS3
Libraries: React.js, web3.js
Tools: Truffle, IPFS, nft.storage, Chainlink data feeds, Web3modal, Firebase, tailwindcss
Platforms: Fleek.co
Blockchain: Polygon Testnet
Token standard: ERC-1155

Qualifying bounties:

IPFS/Filecoin (Social Good Warrior):

->nft.storage (NFTs & metadata): https://github.com/akhileshthite/chainlink-fall-2022-cryptoroots.xyz/blob/6e5a410ae39487153eda74e0607b5ea7c6149901/contracts/CryptoRoots.sol#L1510

-> nftstorage.link examples:
Metadata: https://bafybeifgz4l3tfaoj2zbdxy3cu5xclzk4bfu2cmrpgz4qraxoylvxnawdy.ipfs.nftstorage.link/1.json
Image: https://bafybeianxg47c67njxhy3ger5rhnunedmaerhdqxomcdum6gpaoe5eg5g4.ipfs.nftstorage.link/1_tree.png

-> Deployed dapp on IPFS using fleek.co: https://dweb.link/ipfs/QmQy24QzuFsieH6ebda4H77CM45iZzFfTKwwZhhCsDYbBm/

-> ⚠️ FVM Deployment: At the current moment, FVM does not support event logs and contracts like ERC-1155. Hence, I wasn't able to deploy CryptoRoots contracts on the Filecoin Wallaby testnet.
https://github.com/akhileshthite/chainlink-fall-2022-cryptoroots.xyz/blob/6e5a410ae39487153eda74e0607b5ea7c6149901/truffle-config.js#L23

Chainlink (data feeds to get the latest MATIC/USD prices):

-> https://github.com/akhileshthite/chainlink-fall-2022-cryptoroots.xyz/blob/6e5a410ae39487153eda74e0607b5ea7c6149901/contracts/CryptoRoots.sol#L1521

Polygon:

-> Testnet deployed contract: https://mumbai.polygonscan.com/address/0xD6a5DBF13165941259c5Efb45Bf4013fce147212

-> Smart contracts: https://github.com/akhileshthite/chainlink-fall-2022-cryptoroots.xyz/blob/6e5a410ae39487153eda74e0607b5ea7c6149901/contracts/CryptoRoots.sol#L1486

Challenges we ran into

  • At the current moment, FVM does not support event logs and contracts like ERC-1155. Hence, I wasn't able to deploy CryptoRoots contracts on the Filecoin Wallaby testnet.

Filecoin Wallaby Testnet Error

  • Learning and writing the smart contracts.
  • Solidity version issues.
  • ERC-1155 contract verification error (Unable to generate Contract ByteCode and ABI). smart contract verification error

  • Countless front-end errors.

Accomplishments that we're proud of

  • I'm proud of finishing what I've planned for this hackathon.

What we learned

  • Advanced Solidity concepts.
  • ERC-1155 token standard contracts.
  • FVM smart contract deployment.
  • React hooks and ternary rendering.
  • Web3modal wallet provider integration (walletconnect)
  • Chainlink data feeds implementation.
  • Learned a lot about IPFS and thinking in a decentralized way.
  • Firestore implementation.

What's next for cryptoroots.xyz

Roadmap (after Hackathon tasks):

  • Research and implement biconomy for gasless transactions and to receive funds in USDC on Polygon Mainnet.
  • Create a subgraph to query totalSupply data from the blockchain by using The Graph protocol (so that the stats will be visible without connecting the wallet).
  • Leaderboard (maximum number of trees donated).
  • Write tests in mocha, follow best practices in Solidity (such as use SafeMath for math calculations, private some functions, etc.)
  • Resolve erc-1155 contract verification error (Unable to generate Contract ByteCode and ABI).
  • A co2 emission calculator that tells how much an individual is emitting CO2/year and how many trees they need to offset their CO2 footprint (make a predictive ML model based on datasets).
  • FAQ section for better UX.
  • Whitepaper.
  • Improve NFT artwork before public launch (animated cards that contain info regarding CO2 emission).
  • Improve UI.
  • Deploy on Polygon and Filecoin Mainnet.

Built With

Share this project:

Updates