Skip to content

Origin is a set of toolkits that together provide a system for issuance and management of Energy Attribute Certificates

License

Notifications You must be signed in to change notification settings

manihagh/origin

 
 

Repository files navigation


EnergyWeb
EnergyWeb Origin

Origin is a set of toolkits that together provide a system for issuance and management of Energy Attribute Certificates (EACs). This repository is an entry point to Origin systems. It has a goal of explaining briefly the whole system and providing you with insight and info where to explore next.

Table of Contents

Packages

SDK

Package Version Description
@energyweb/asset-registry npm Contracts and client for Asset Registry
@energyweb/market-matcher npm Off-chain services for demand and supply matching
@energyweb/market npm Contacts and client for Origin Market
@energyweb/origin npm Contracts and client Origin ceritifacts
@energyweb/user-registry npm Contracts and client User Registry
@energyweb/utils-general npm Utilities
@energyweb/utils-testbackend npm Example backend for storing off-chain meta-data

UI and demo

Package Description
@energyweb/origin-ui UI for Origin
@energyweb/solar-simulator Solar production and consumption simulator
@energyweb/utils-demo Demo deployment and configuration utilities

Installation

Make sure have latest yarn package manager installed.

yarn

Build

yarn build:static
yarn build

Test

yarn test

Run demo

yarn run:origin

Find line like @energyweb/utils-demo: [backend] PUT - OriginContractLookupMarketLookupMapping 0xb4ec89404c4a24f4c80d157ba9ad803cbc4db614 where the contracts address is used to visit the UI at

http://localhost:3000/0xb4ec89404c4a24f4c80d157ba9ad803cbc4db614

Energy Attribute Certificates

Energy Attribute Certificates, or EACs, is an official document which guarantees that produced energy comes from a renewable source. There are different standards that regulate how data is stored and validated. In Europe, this document is called Guarantee of Origin (GO), in North America, it's called Renewable Energy Certificate (REC), and in parts of Asia, Africa, the Middle East, and Latin America governing standard is International REC (I-REC). Standards do vary, but they all share the same core principles.

The main purpose of EACs is to act as an accounting vehicle to prove that consumed energy came from a renewable source. EACs are mostly used to address sustainability reports regarding Scope 2 emissions.

Key modules and components

Overview of architecture

Key repositories

This section lists key entry points to start your journey with Origin.

  1. utils-demo - demo repository with build scripts that enable easy deployment of smart contracts to Tobalaba or local blockchain. Often used to demo and get to know features and capabilities of Origin.
  2. utils-testbackend - Origin combines on and off-chain data storage. This repository is used to act as a backend service for off-chain data storage. You'll need this to run utils-demo (store data), and origin-ui to display stored data.
  3. origin-ui - frontend of the system needed to view data stored in smart contracts (on-chain) and in the backend (off-chain). To interact Origin frontend you'll need MetaMask.

Other components

  1. user-registry - high-level library to interact with user registry. Can be used to i. a. create new user or set user's role in the system.
  2. asset-registry - high-level library for creating and managing electricity producing and consuming assets. Depends on user-registry, because only user with Asset Manager role can be owner of asset.
  3. origin - a heart of Origin systems, contains logic for storing and transferring Energy Attribute Certificates (as a form of unique ERC721 tokens). This library also has a more general construct called TradeableEntity that can be used to wrap, as name suggests, other tradeable entities, such as Power Purchase Agreements or certificate bundles.
  4. market - a library that allows to create demand (for buyers), supply (for sellers) and agreements between buyers and sellers.
  5. market-matcher - the most important part of marketplace, guarantees automatic matching of supply and demand between sellers and buyers. Matching rules can be highly customized and afterwards the algorithm can be tested by running matching simulator.
  6. erc-test-contracts - Test ERC20 token for demo purposes, especially for doing an on-chain test purchase of a certificate using tokens
  7. utils-general - Contains logic for more straightforward interaction with contracts, such as watching events. It is also a base layer for other libraries to build upon. It provides a foundation for things like off-chain data storage that is universal for all entities.
  8. solar-simulator - This service simulates smart-meter readings based on example solar data from whole year in 15-mins intervals. Also allows you to generate the config based on data from public I-REC registry.

Deployment

For deployment instructions please refer to Deployment wiki page.

Contribution guidelines

If you want to contribute to Origin, be sure to follow classic open source contribution guidelines (described below).

  1. Commiting a change
    • Fork the repository
    • Make a change to repo code
    • Commit the change to the master branch
  2. Pull request
    • Open a pull request from your fork master branch
    • Request code reviews from @Kuzirashi, @JosephBagaric or @kosecki123
    • Once the PR is approved and the build passes, it will be merged to the master branch

About

Origin is a set of toolkits that together provide a system for issuance and management of Energy Attribute Certificates

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 96.6%
  • JavaScript 2.1%
  • CSS 1.3%