Offsetting Service

Example of work is in the video:

Service to offset CO2 footprint by burning tokens in Statemine network. Produced CO2 calculates as follows: data from device in Wh multiply by coeffcients depends on the region. 1 ton of C02 is covered by consuption of 1 token. Here is the unstructions for connecting device.


  1. Register a new deivce in Digital Twin in Robonomics network
  2. Once in an interval getting last data from all device and multiply by the coefficient depending on the region
  3. Sum data and convert them to CO2 tons
  4. Subtract the total number of burning tokens from current data
  5. Burn integer number of tokens in Statemine network
  6. Saved total number of burning tokens in local DB and Datalog


Clone the repository and edit config file.

gir clone
cd service-robonomics-carbon-footprint
cp config/config_template.yaml config/config.yaml 

Configuration description

Do not edit config/config_template.yaml!

  seed: <seed for account in Robonomics Network where Digital Twin will be created>
  seed: <seed for admin account with green tokens in Statemine Netowrk>
  endpoint: <statemine endpoint>
  token_id: <id of the token which will be burned>
  ss58_format: <format of address in Polkadot (for Statemine Network is 2)>

  interval: <how often data from devices will be collected>

Coefficients for non-renewable energy have been taken from Eurostat and stored in utils/


docker-compose up
previous ← Connect Vacuum Cleaner next Connect Sensor →