Git Product home page Git Product logo

b2e2_contracts's Introduction

B2E2 - Smart Contracts

Based on experience with prototypical use cases, our team at Energie Baden-Württemberg AG (EnBW) has written the whitepaper 'EnergyTokenModel'. In this paper we describe how distributed ledger technology or blockchain can be used in the energy industry providing a basis for a blockchain based energy ecosystem in which usecases as i.e. energy sharing, proof of origin, local markets can be realized. The presented approach shows a way how real-world objects can be digitally mapped on a blockchain and how properties and transactions can be documented in a trustworthy way. The White Paper is currently available for download in German language here.

With the publication of the smart contracts in this repository we are taking the next step. After we have explained in the white paper how DLT mechanisms can be applied in the energy industry, we show here how the implementation looks like. Since we believe that the advantage of using DLT is to have a common transaction layer, we publish the repository under a MIT open source license.

With our publications, we are contributing to the public discussion on how the block chain can be used in the energy industry and hope to receive further ideas and impulses.

The Blockchain identities are implemented with the ERC725 and ERC735 standards. The energy tokens are implemented with the ERC1155 standard.

The latest version of the sequence and entity relationship diagrams from the whitepaper can be found in the directory './documentation'.

Setup

Make sure that your node JS version is 20.12.0 because some of the dependencies do not work with newer versions.

Cloning the repository

git clone --recursive https://github.com/B2E2/b2e2_contracts.git

Installing Dependencies

sudo npm global add truffle ganache ganache-cli
cd Energietokens-Implementierung
npm install
cd dependencies/jsmnSol
npm install

Building & Deployment

Launch Ganache:

npx ganache-cli -l 1000000000

Choose a sender address from the list that's printed and replace the address in the line containing from: in truffle-config.js by it.

Then (in a different terminal instance) compile the contracts and deploy them:

npx truffle compile
npx truffle deploy

Testing

npm run build
npm run tests

Expected behavior: 28 tests passing, 0 tests failing, 1 test skipped ("pending")

b2e2_contracts's People

Contributors

afloat6715 avatar axks avatar chrisagithub avatar cleanunicorn avatar dependabot[bot] avatar m1cm1c avatar mgsgde avatar mstumpp avatar

Watchers

 avatar  avatar

b2e2_contracts's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.