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
195 stars 104 forks source link

not able to issue carbon tracker tokens #661

Open sichen1234 opened 1 year ago

sichen1234 commented 1 year ago

This continues from https://wiki.hyperledger.org/display/CASIG/2022-12-05+Peer+Programming+Call

I just checked (see https://youtu.be/l-WXuLLkVoM)

The postgresql tracker table is empty.

My .env does have

LEDGER_CARBON_TRACKER_ADDRESS="0x610178dA211FEF7D417bC0e6FeD39F05609AD788"

I think there is something wrong with the api-server. See the attached log files

api-server.log hardhat.log

brioux commented 1 year ago

@sichen1234 I recloned the project but was unable to reproduce the errors in hardhat.log and api-server.log. Looking at the hardhat.log i noticed the following

eth_blockNumber
eth_call
  WARNING: Calling an account which is not a contract
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xa51c1fc2f0d1a1b8494ed1fe312d7c3a78ed91c0

To reproduce the errors I set LEDGER_CARBON_TRACKER_ADDRESS=0xa51c1fc2f0d1a1b8494ed1fe312d7c3a78ed91c0 in .env

check if LEDGER_CARBON_TRACKER_ADDRESS (0x610178dA211FEF7D417bC0e6FeD39F05609AD788) is being overwritten somewhere in your env to the incorrect address from the log