hyperledger-labs / blockchain-carbon-accounting

This project implements blockchain applications for climate action and accounting, including emissions calculations, carbon trading, and validation of climate claims. It is part of the Linux Foundation's Hyperledger Climate Action and Accounting SIG.
https://wiki.hyperledger.org/display/CASIG/Carbon+Accounting+and+Certification+WG
Apache License 2.0
191 stars 104 forks source link

Update CarbonTracker contract and api-server synchronizer. #653

Closed brioux closed 1 year ago

brioux commented 1 year ago

Update CarbonTracker contract and api-server synchronizer.

Update Carbon Tracker to use ERC 1155 standard instead of ERC 721 to handle both Tracker tokenTypeId=2 as NFT, and ProductToken (tokenTypeId=2) as FT.

New PG DB entities used in Carbon Tracker and ProductToken synchronizer Introduce new relations for Carbon Tracker and ProductToken balances TrackedToken and TrackedProduct relation for NET and ProductToken amounts used to store inputs to Tracker token, respectively. Introduce CarbonTracker event detection in api-serve synchronizer.