STATUS: Experimental
A an ERC20 token backed by carbon credits - allows certified issuance, transfer and retirement.
- The project admin purchases carbon credits from a certifier such as Gold Standard
- The project admin upload the certificate purchase details to IPFS using a service like Pinata and gets the file address called the ipfs Hash. For example: the ipfs hash
QmUEGNbwdjLjk7C2hh2WDFwkNjixszwH3B1sFWqLseXTPi
can be used to look up a certificate receipt at any ipfs gateway like https://gateway.pinata.cloud/ipfs/QmUEGNbwdjLjk7C2hh2WDFwkNjixszwH3B1sFWqLseXTPi or https://cloudflare-ipfs.com/ipfs/QmUEGNbwdjLjk7C2hh2WDFwkNjixszwH3B1sFWqLseXTPi - The project admin uses a smart contract like Etherscan dApp explorer to call the
depositCarbonCreditsFromCertificate
function on the Carbon Credit ERC20 token with the value of the certificate. Note that the token has 18 decimals of precision so it should be the value of carbon credits times 10^18. - The project admin now has the value of the certificate in their account. Other people can view the event log to see the carbon certificate ipfs hash and look it up on ipfs to verify the certificate.
- A contributor contributes work to a Climate Impact Project on CoMakery
- The admin pays the contributor in carbon credits
- The contributor transfers some of their tokens to an exchange to sell
- The contributor retires the remaining carbon credit tokens to offset some of their own carbon footprint.
- The contributor has impacted the climate and a new carbon credit certificate is issued to the Project Admin
- The Project Admin deposits the carbon credit certificate in the CoMakery Climate Project and the cycle continues.
cp .env.example .env
for your Infura Ethereum node API key and Ethereum private key.
npm install -g truffle
Deploy to ropsten
testnet or another Ethereum blockchain network like mainnet
with:
truffle deploy --compile-all --reset --network ropsten-infura
So you can find the address on Etherscan or other networks. It will appear in the deploy output and look like this:
Replacing 'CarbonCredit'
------------------------
...
> contract address: 0x85ACf61EE09C3FC771013Cd2f5ddF891DA1C8D01
...
(6) Publish the verified code to Etherscan
Use the Verify On Etherscan library.
You will need to create an account on Etherscan.
Change the --network
arugument to the network you deployed to (e.g. ropsten, mainnet, etc):
API_KEY=<your_etherscan_api_key> npx verify-on-etherscan --network ropsten ./build/contracts/*