Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pooltogether/v4-admin-dashboard
The PoolTogether V4 Admin Dashboard simplifies reading and writing to the V4 protocol smart contracts.
https://github.com/pooltogether/v4-admin-dashboard
defi ethereum pooltogether web3
Last synced: 6 days ago
JSON representation
The PoolTogether V4 Admin Dashboard simplifies reading and writing to the V4 protocol smart contracts.
- Host: GitHub
- URL: https://github.com/pooltogether/v4-admin-dashboard
- Owner: pooltogether
- License: mit
- Created: 2021-11-02T13:32:34.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-13T12:26:53.000Z (almost 3 years ago)
- Last Synced: 2024-04-23T21:42:41.308Z (7 months ago)
- Topics: defi, ethereum, pooltogether, web3
- Language: TypeScript
- Homepage: https://admin.pooltogether.com
- Size: 1.7 MB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# PoolTogether V4 Admin Dashboard
![CI](https://github.com/pooltogether/v4-admin-dashboard/actions/workflows/main.yml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/pooltogether/v4-admin-dashboard/badge.svg?branch=master)](https://coveralls.io/github/pooltogether/v4-admin-dashboard?branch=master)
[![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://perso.crans.org/besson/LICENSE.html)The PoolTogether V4 Admin Dashboard simplifies reading and writing to the V4 protocol smart contracts.
[admin.pooltogether.com](https://admin.pooltogether.com/)
# Getting Started
## Development
```.sh
yarn dev
```## Production
```.sh
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.- [ContractIsolatedMulticall](https://github.com/pooltogether/v4-admin-dashboard/blob/master/src/components/Web3/Contracts/ContractIsolatedMulticall.tsx)
- [ContractMulticallAndRender](https://github.com/pooltogether/v4-admin-dashboard/blob/master/src/components/Web3/Contracts/ContractMulticallAndRender.tsx)
- [ContractReadValuesGenericRender](https://github.com/pooltogether/v4-admin-dashboard/blob/master/src/components/Web3/Contracts/ContractReadValuesGenericRender.tsx)
- [GenericReadFunction](https://github.com/pooltogether/v4-admin-dashboard/blob/master/src/components/Web3/Contracts/GenericReadFunction.tsx)
- [Web3TypeRender](https://github.com/pooltogether/v4-admin-dashboard/blob/master/src/components/Web3/Web3TypeRender.tsx)
- [Web3SafeTypeRender](https://github.com/pooltogether/v4-admin-dashboard/blob/master/src/components/Web3/Web3SafeTypeRender.tsx)### 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.
```js
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 (
(
<>
>
)}
/>
);
};ContractDrawBeacon.layout = Admin;
export default ContractDrawBeacon;
```
# Changelog
**0.0.1:** Calculate PrizeDistributions and verify live parameters in the monitor view.