Summary

A real peer programming session!  We fixed a couple of bad links on this wiki during the call.

video1815762254.mp4

Bertrand WILLIAMSRIOUX fixed some more bugs and made this demo video:

In summary, the steps are:

As emissions auditor, go to Track tab.  Click on Create certificate.  Create an audited emissions from the auditor to the utility.  This creates an audited emissions token.

Now select "Emissions Certificates: requested".  You can add product details, such as kWH or therms.  You can add more emissions, such as other sources of emissions.

When you're done, click on Issue to issue the certificate.

Next, as the utility, go to the Track tab.  You will see your product certificates.  Click on Transfer to transfer it to building owners.

Finally, follow the example from 2022-11-21 Peer Programming Call, as the Building owner, create a certificate to transfer it to your tenant.



Time:

Dial-In Information:  [ZOOM]

You can join either from your computer or from your phone:




Hyperledger is committed to creating a safe and welcoming

community for all. For more information

please visit the Hyperledger Code of Conduct.





  • No labels

9 Comments

  1. Bertrand WILLIAMSRIOUX I tried to follow your steps here


    But only an audited emissions certificate was created.  It does not show up under the "Track" tab.

  2. I’m also not seeing the tokens with the “I requested” drop down option. 

    But the certificate should appear when selecting the “Requested” option.

  3. "I requested" is not displaying anything because the issuedFrom address recorded in the tracker token was stored as the NET contract address, the operator of the CarbonTracker.track() function.

    You can check this in the tracker PG table. issuedFrom should  equal "0x2279b7a0a67db372996a5fab50d91eaa73d2ebe6" and not the auditor's address.

    I'll fix this by setting the issuedFrom address as tx.origin instead of msg.sender.

  4. Is this correct?

  5. I tried both of these and there is still nothing in the Track tab


    0x610178dA211FEF7D417bC0e6FeD39F05609AD788 is the carbon tracker address.  0x2279b7a0a67db372996a5fab50d91eaa73d2ebe6 is the net emisisions token network:


    Deploying DAOToken with account: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266

    DAO Token deployed to: 0x5FbDB2315678afecb367f032d93F642f64180aa3

    Delegated voting power of deployer to self.

    Deploying DAO with account: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266

    Timelock deployed to: 0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0

    Governor deployed to: 0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9

    Initialized Governor address on DAOToken.

    Queued setPendingAdmin() on Timelock.

    Advanced 51 hours.

    Executed setPendingAdmin() on Timelock.

    Advancing blocks: 1 ...

    Advancing blocks: 1 ...

    Called __acceptAdmin() on Governor.

    Done performing Timelock admin switch.

    Deploying NetEmissionsTokenNetwork with account: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266

    NetEmissionsTokenNetwork deployed to: 0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6

    Timelock address set so that the DAO has permission to issue tokens with issueOnBehalf().

    Deploying CarbonTracker with account: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266

    CarbonTracker deployed to: 0x610178dA211FEF7D417bC0e6FeD39F05609AD788

    Register carbon tracker as Industry
  6. Is the PG tracker table being synched? If it is also empty then there is an issue in the api-server.

  7. hardhat should show the following after sending the issueAndTrack function with this form


    eth_sendRawTransaction
      Contract call:       NetEmissionsTokenNetwork#issueAndTrack
      Transaction:         0x20a0a4183d14d6dae6ff601ec14cf9c4e7b35d6df8ea3a7e29ee410129fc5230
      From:                0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc
      To:                  0x2279b7a0a67db372996a5fab50d91eaa73d2ebe6
      Value:               0 ETH
      Gas used:            706173 of 731687
      Block #35:           0x9140b651e21f8e1c028d04cea5044033204ef563d0eee92c1e3d576c6e19285d
    
    eth_blockNumber
    eth_call
      Contract call:       CarbonTracker#getNumOfUniqueTrackers
      From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
      To:                  0x610178da211fef7d417bc0e6fed39f05609ad788
    
    eth_call
      Contract call:       CarbonTracker#getTrackerDetails
      From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
      To:                  0x610178da211fef7d417bc0e6fed39f05609ad788
    
    eth_call
      Contract call:       CarbonTracker#decimalsCt
      From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
      To:                  0x610178da211fef7d417bc0e6fed39f05609ad788
    
    eth_call
      Contract call:       CarbonTracker#_tokenDetails
      From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
      To:                  0x610178da211fef7d417bc0e6fed39f05609ad788
    
    eth_blockNumber
    eth_call
      Contract call:       CarbonTracker#getNumOfUniqueProducts
      From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
      To:                  0x610178da211fef7d417bc0e6fed39f05609ad788
    
    eth_blockNumber
    eth_call
      Contract call:       NetEmissionsTokenNetwork#getNumOfUniqueTokens
      From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
      To:                  0x2279b7a0a67db372996a5fab50d91eaa73d2ebe6
    
    eth_call
      Contract call:       NetEmissionsTokenNetwork#getTokenDetails
      From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
      To:                  0x2279b7a0a67db372996a5fab50d91eaa73d2ebe6
    
    eth_blockNumber
    eth_getLogs (2)
    eth_getBlockByNumber
    eth_call
      Contract call:       CarbonTracker#getTrackerDetails
      From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
      To:                  0x610178da211fef7d417bc0e6fed39f05609ad788
    
    eth_call
      Contract call:       CarbonTracker#decimalsCt
      From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
      To:                  0x610178da211fef7d417bc0e6fed39f05609ad788
    
    eth_call
      Contract call:       CarbonTracker#_tokenDetails
      From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
      To:                  0x610178da211fef7d417bc0e6fed39f05609ad788
    
    eth_blockNumber (2)
    eth_getTransactionReceipt
    eth_getBlockByHash
    eth_call
      Contract call:       NetEmissionsTokenNetwork#supportsInterface
      From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
      To:                  0x2279b7a0a67db372996a5fab50d91eaa73d2ebe6
    
    eth_call
      Contract call:       NetEmissionsTokenNetwork#supportsInterface
      From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
      To:                  0x2279b7a0a67db372996a5fab50d91eaa73d2ebe6

    The eth_call follwoing the transaction verify that the api-server is synching to the ledger

  8. Also make sure you add to .env LEDGER_CARBON_TRACKER_ADDRESS="0x610178dA211FEF7D417bC0e6FeD39F05609AD788"

    As listed in .env.SAMPLE. The api-server uses this to synchronize.

  9. I checked it again and posted the results on a github issue.  See https://github.com/hyperledger-labs/blockchain-carbon-accounting/issues/661