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: 3 months 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 (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-13T12:26:53.000Z (over 4 years ago)
- Last Synced: 2025-05-04T15:40:18.091Z (about 1 year ago)
- Topics: defi, ethereum, pooltogether, web3
- Language: TypeScript
- Homepage: https://admin.pooltogether.com
- Size: 1.7 MB
- Stars: 4
- Watchers: 2
- 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

[](https://coveralls.io/github/pooltogether/v4-admin-dashboard?branch=master)
[](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.