Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New CarbonTracker contract and TokenTypeId (4) for NET network #379

Merged
merged 1 commit into from
Jan 4, 2022

Conversation

brioux
Copy link
Contributor

@brioux brioux commented Jan 2, 2022

TokenTypeId=4 for carbon Tokens issued (voluntarily) by registered industry of the Net Emission Token (NET) Network. This supply side token and CarbonTracker contract will enable shared emission inventories across organizations and embedded emission tracking.

Short summary of the CarbonTracker contract features:

  • a NFT using ERC721Upgradeable template create carbon trackers
  • Each NFT is used to track the unique emission profile of a product/facility based on NETs
  • NETs in each NFTs can be linked to previous NFT connect emission profiles (embedded emissions)

Major additions/changes to the NetEmissionTokenNetwork contract:

  • update _beforeTokenTransfer hook consumerOrDealer modifier for from/to addresses
  • Applies modifier to super.safeTransfer/super._mint/super._burn
  • If tokenTypeId == 4 require receiverApproved before sending tokens.

Signed-off-by: brioux [email protected]

@brioux
Copy link
Contributor Author

brioux commented Jan 2, 2022

This PR is a first attempt to address issue372.
It also includes a fix for Issue 378.

I have modified the original NetEmissionTokenNetwork.sol contract (not sure if or how we should implement this as a contract upgrade).

Modified the token-network tests for the new token type Id =4. Started building tests for new CarbonTracker contract. Preparing detailed documentation and examples.

The new CarbonTracker NFTs could be integrated with the Fabric emission audit system. Audited emission tokens could be issued as partial outputs of each NFT.

@brioux brioux force-pushed the CarbonTracker branch 5 times, most recently from ef7badd to a55aa8a Compare January 3, 2022 09:00
@lgtm-com
Copy link

lgtm-com bot commented Jan 3, 2022

This pull request introduces 1 alert when merging a55aa8a into d979c3e - view on LGTM.com

new alerts:

  • 1 for Useless assignment to local variable

@lgtm-com
Copy link

lgtm-com bot commented Jan 3, 2022

This pull request introduces 1 alert when merging 5c67e01 into d979c3e - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

TokenTypeId=4 for carbon Tokens issued (voluntarily) by registered industry of the Net Emission Token (NET) Network. This supply side token and CarbonTracker contract will enable shared emission inventories across organizations and  embedded emission tracking.

Short summary of the CarbonTracker contract features:
- a NFT using ERC721Upgradeable template create carbon trackers
- Each NFT is used to track the unique emission profile of a product/facility based on NETs
- NETs in each NFTs can be linked to previous NFT connect emission profiles (embedded emissions)

Major additions/changes to the NetEmissionTokenNetwork contract:
- update _beforeTokenTransfer hook consumerOrDealer modifier for from/to addresses
- Applies modifier to super.safeTransfer/super._mint/super._burn
- If tokenTypeId == 4 require receiverApproved before sending tokens

Signed-off-by: brioux <[email protected]>
@sichen1234 sichen1234 merged commit 2d1f47e into hyperledger-labs:main Jan 4, 2022
@brioux brioux deleted the CarbonTracker branch January 5, 2022 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants