GithubHelp home page GithubHelp logo

okolievans / blockgrid Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.64 MB

License: MIT License

Makefile 0.07% Nix 0.01% Solidity 64.04% JavaScript 28.90% Ruby 6.49% Python 0.04% Shell 0.23% TypeScript 0.21% CSS 0.02%

blockgrid's Introduction

Block Grid

Block grid is an on-chain electricitiy subscription system where energy users can buy uints using cryptocurrencies. First time users on the platform get free GRID token airdropped to their wallet.

How to:

  • Create Disco: Electricity distribution companies can create business profile on the platform, passing in required parameters

  • BuyWithUSDC: Subscribers can either buy units with USDC or Ether. To buy with USDC, select "buy with USDC", then pass in meterNo and the unit amount to recharge.

  • BuyWithEther: To buy units with Ether, select "buy with Ether", pass in your meter number and the amount of Ether you want to subscribe. First time subscribers are rewarded with some Metro tokens.

  • setUnitPrice: Registered electricity distribution companies can update their unit prices using the "setUnitPrice" function. Only the account assigned as the company admin can perform this.

  • withdrawEther: Registered companies can withdraw their Ether easily from the platform by using this function. This can only be performed bby the assigned admin for each company.

  • withdrawUSDC: Almost the same with withdrawEther, but the token to withdraw here is USDC.

Developers

Start

$ git clone https://github.com/OkoliEvans/Blockgrid

Installation

$ cd backend
$ forge install

Build

$ forge build

Test

$ forge test

Deploy

$ forge create --rpc-url <your_rpc_url> \
    --private-key <your_private_key> \
    --etherscan-api-key <your_etherscan_api_key> \
    --verify \
    src/metroFactory.sol:MetroFactory

Frontend

Installation

$ cd frontend
$ npm install

Build

$ npm run dev

Block grid Factory contract deployment address on Scroll Sepolia: 0x75B26665502D10016c2F037c60E7E6950f679b4a

GRID token deployment address on Scroll Sepolia: 0xF79326F5b24F0dd4A9256C1991A1560A8737d648

Pricefeed deployment address: 0xa88B8eA2a9D1A143d7cB9b04fA05741EdD53eb41

blockgrid's People

Contributors

okolievans avatar

Watchers

 avatar

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.