Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pooltogether/pooltogether-contracts-template
Template opinionated repo to setup contract projects
https://github.com/pooltogether/pooltogether-contracts-template
Last synced: about 2 months ago
JSON representation
Template opinionated repo to setup contract projects
- Host: GitHub
- URL: https://github.com/pooltogether/pooltogether-contracts-template
- Owner: pooltogether
- Created: 2021-05-17T17:35:42.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-08-26T22:24:33.000Z (over 2 years ago)
- Last Synced: 2024-04-23T21:42:37.647Z (9 months ago)
- Language: JavaScript
- Size: 1.23 MB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PoolTogether Contracts Template
[![Coverage Status](https://coveralls.io/repos/github/pooltogether/pooltogether-contracts-template/badge.svg?branch=master)](https://coveralls.io/github/pooltogether/pooltogether-contracts-template?branch=master)
![Tests](https://github.com/pooltogether/pooltogether-contracts-template/actions/workflows/main.yml/badge.svg)
# Usage
1. Clone this repo: `git clone [email protected]:pooltogether/pooltogether-contracts-template.git `
1. Create repo using Github GUI
1. Set remote repo (`git remote add origin [email protected]:pooltogether/.git`),
1. Checkout a new branch (`git checkout -b name_of_new_branch`)
1. Begin implementing as appropriate.
1. Update this README## Usage
This repo is setup to compile (`nvm use && yarn compile`) and successfully pass tests (`yarn test`)
# Preset Packages
## Generic Proxy Factory
The minimal proxy factory is a powerful pattern used throughout PoolTogethers smart contracts. A [typescript package](https://www.npmjs.com/package/@pooltogether/pooltogether-proxy-factory-package) is available to use a generic deployed instance. This is typically used in the deployment script.
## Generic Registry
The [generic registry](https://www.npmjs.com/package/@pooltogether/pooltogether-generic-registry) is a iterable singly linked list data structure that is commonly used throughout PoolTogethers contracts. Consider using this where appropriate or deploying in a seperate repo such as the (Prize Pool Registry)[https://github.com/pooltogether/pooltogether-prizepool-registry.
# Installation
Install the repo and dependencies by running:
`yarn`## Deployment
These contracts can be deployed to a network by running:
`yarn deploy `## Verification
These contracts can be verified on Etherscan, or an Etherscan clone, for example (Polygonscan) by running:
`yarn etherscan-verify ` or `yarn etherscan-verify-polygon matic`# Testing
Run the unit tests locally with:
`yarn test`## Coverage
Generate the test coverage report with:
`yarn coverage`