{"id":20030764,"url":"https://github.com/generationsoftware/pt-v5-builder-code-examples","last_synced_at":"2026-06-09T00:32:38.589Z","repository":{"id":207227974,"uuid":"716170450","full_name":"GenerationSoftware/pt-v5-builder-code-examples","owner":"GenerationSoftware","description":"A collection of code examples for builders looking to build on top of PoolTogether V5.","archived":false,"fork":false,"pushed_at":"2025-03-18T01:09:06.000Z","size":144,"stargazers_count":3,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T02:24:25.724Z","etag":null,"topics":["examples","pooltogether","solidity"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GenerationSoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-08T15:27:57.000Z","updated_at":"2025-03-18T01:09:08.000Z","dependencies_parsed_at":"2023-11-14T19:01:07.000Z","dependency_job_id":"27657f0b-2480-477e-bcf1-2a66480465e4","html_url":"https://github.com/GenerationSoftware/pt-v5-builder-code-examples","commit_stats":null,"previous_names":["generationsoftware/pt-v5-builder-code-examples"],"tags_count":0,"template":false,"template_full_name":"GenerationSoftware/foundry-template","purl":"pkg:github/GenerationSoftware/pt-v5-builder-code-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenerationSoftware%2Fpt-v5-builder-code-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenerationSoftware%2Fpt-v5-builder-code-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenerationSoftware%2Fpt-v5-builder-code-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenerationSoftware%2Fpt-v5-builder-code-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GenerationSoftware","download_url":"https://codeload.github.com/GenerationSoftware/pt-v5-builder-code-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenerationSoftware%2Fpt-v5-builder-code-examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34086664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["examples","pooltogether","solidity"],"created_at":"2024-11-13T09:28:10.462Z","updated_at":"2026-06-09T00:32:38.567Z","avatar_url":"https://github.com/GenerationSoftware.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PoolTogether V5 Builder Code Examples\n\nA collection of code examples for builders looking to build with the PoolTogether V5 protocol.\n\n## Directory\n\n### Vault Prize Hook Examples\n\n- [Awarding Prizes to NFT Holders](./src/prize-hooks/examples/prize-to-nft-holder/README.md)\n- [Boosting Prizes on a Vault](./src/prize-hooks/examples/prize-boost/README.md)\n- [Minting Tokens to Prize Winners](./src/prize-hooks/examples/prize-pixels/README.md)\n- [Donating Prizes back to the Prize Pool](./src/prize-hooks/examples/prize-recycle/README.md)\n\n\u003e For more info on prize hooks, see the [guide to prize hooks](https://dev.pooltogether.com/protocol/guides/prize-hooks).\n\n### Custom Vault Examples\n\n- [Creating a Custom Vault](./src/custom-vaults/examples/sponsored-vault/README.md)\n\n\u003e For more info on custom vaults, see the [guide to creating a vault](https://dev.pooltogether.com/protocol/guides/creating-vaults#non-standard-vaults).\n\n### Liquidation Examples and Guides\n\n- [Router Liquidations](./src/liquidations/examples/router-liquidations/README.md)\n- [Direct Liquidations](./src/liquidations/examples/direct-liquidations/README.md)\n- [Flashswap Liquidations](./src/liquidations/examples/flash-swap-liquidations/README.md)\n\n\u003e For more info on how to liquidate yield, see the [guide to liquidating yield](https://dev.pooltogether.com/protocol/guides/liquidating-yield).\n\n## Repository - Development \u0026 Testing\n\n### Installation\n\nYou may have to install the following tools to use this repository:\n\n- [Foundry](https://github.com/foundry-rs/foundry) to compile and test contracts\n- [direnv](https://direnv.net/) to handle environment variables\n- [lcov](https://github.com/linux-test-project/lcov) to generate the code coverage report\n\nInstall dependencies:\n\n```\nnpm i\n```\n\n### Env\n\nCopy `.envrc.example` and write down the env variables needed to run this project.\n\n```\ncp .envrc.example .envrc\n```\n\nOnce your env variables are setup, load them with:\n\n```\ndirenv allow\n```\n\n### Compile\n\nRun the following command to compile the contracts:\n\n```\nnpm run compile\n```\n\n### Coverage\n\nForge is used for coverage, run it with:\n\n```\nnpm run coverage\n```\n\nYou can then consult the report by opening `coverage/index.html`:\n\n```\nopen coverage/index.html\n```\n\n### Code quality\n\n[Husky](https://typicode.github.io/husky/#/) is used to run [lint-staged](https://github.com/okonet/lint-staged) and tests when committing.\n\n[Prettier](https://prettier.io) is used to format TypeScript and Solidity code. Use it by running:\n\n```\nnpm run format\n```\n\n[Solhint](https://protofire.github.io/solhint/) is used to lint Solidity files. Run it with:\n\n```\nnpm run hint\n```\n\n### CI\n\nA default Github Actions workflow is setup to execute on push and pull request.\n\nIt will build the contracts and run the test coverage.\n\nYou can modify it here: [.github/workflows/coverage.yml](.github/workflows/coverage.yml)\n\nFor the coverage to work, you will need to setup the `MAINNET_RPC_URL` repository secret in the settings of your Github repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenerationsoftware%2Fpt-v5-builder-code-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenerationsoftware%2Fpt-v5-builder-code-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenerationsoftware%2Fpt-v5-builder-code-examples/lists"}