GithubHelp home page GithubHelp logo

pooltogether / v4-admin-dashboard Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 2.0 1.75 MB

The PoolTogether V4 Admin Dashboard simplifies reading and writing to the V4 protocol smart contracts.

Home Page: https://admin.pooltogether.com

License: MIT License

Shell 0.03% JavaScript 0.90% TypeScript 96.88% CSS 2.19%
web3 pooltogether ethereum defi

v4-admin-dashboard's Introduction

PoolTogether Brand


PoolTogether V4 Admin Dashboard

CI Coverage Status GPLv3 license

The PoolTogether V4 Admin Dashboard simplifies reading and writing to the V4 protocol smart contracts.

admin.pooltogether.com

Getting Started

Development

yarn dev

Production

yarn build

When the production is updated a new build will be deployed on Netlify.

Overview

Core Web3 Components

The application is built with modularity in mind. Components can express what data is required and the fetching/normalizing for the frontend will be handled automatically.

Example View

The ContractDrawBeacon view defines with reads should be executed and the values are passed to dynamic render component.

Ideally, the generic render components utilize the Tailwind CSS classes for modularity and minimally perriptive in design.

import React from 'react';

import { AppPageHeader } from '@src/components/App/AppPageHeader';
import { ContractMulticallAndRender } from '@src/components/Web3/Contracts/ContractMulticallAndRender';
import { ContractReadValuesGenericRender } from '@src/components/Web3/Contracts/ContractReadValuesGenericRender';
import { InterfaceDrawBeacon } from '@src/contracts/interfaces';
import { Admin } from '@src/templates/Admin';

const ContractDrawBeacon = () => {
 const methods = [
   'owner',
   'getDrawBuffer',
   'getRngService',
   'canStartDraw',
   'canCompleteDraw',
   'calculateNextBeaconPeriodStartTimeFromCurrentTime',
   'calculateNextBeaconPeriodStartTime',
   'beaconPeriodRemainingSeconds',
   'beaconPeriodEndAt',
   'getNextDrawId',
   'getBeaconPeriodSeconds',
   'getLastRngLockBlock',
   'getLastRngRequestId',
   'getRngTimeout',
   'isBeaconPeriodOver',
   'isRngCompleted',
   'isRngRequested',
   'isRngTimedOut',
 ];
 const inputs = [];

 return (
   <div className="card">
     <AppPageHeader
       className="mt-0"
       title="DrawBeacon"
       description="Create and Propagates Draws"
     />
     <ContractMulticallAndRender
       contractInterface={InterfaceDrawBeacon}
       contractName="DrawBeacon"
       methods={methods}
       args={inputs}
       component={(props) => (
         <>
           <ContractReadValuesGenericRender
             className="text-base block px-8 pb-8 pt-5 shadow-md border-t-2 rounded-xl mt-5 "
             classNameRender="flex justify-between border-b-2 py-2 "
             classNameValue="text-sm"
             classNameLabel="font-bold text-sm"
             values={props.values}
           />
         </>
       )}
     />
   </div>
 );
};

ContractDrawBeacon.layout = Admin;

export default ContractDrawBeacon;

Changelog

0.0.1: Calculate PrizeDistributions and verify live parameters in the monitor view.

v4-admin-dashboard's People

Contributors

kamescg avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

v4-admin-dashboard'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.