
Security News
Oxlint Introduces Type-Aware Linting Preview
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
@generationsoftware/pt-v5-cli
Advanced tools
The @generationsoftware/pt-v5-cli
node module package is a Node command line interface (CLI) to interact with the PoolTogether V5 protocol. The CLI uses the v5-autotasks-library
modules to fetch and run calculations/computations for essential PoolTogether V5 tasks.
Primary CLI Commands (help)
npx @generationsoftware/pt-v5-cli help compute drawPrizes
$ npm install -g @generationsoftware/pt-v5-cli
$ ptv5 COMMAND
running command...
$ ptv5 (--version)
@generationsoftware/pt-v5-cli/1.1.0-beta.1 darwin-arm64 node-v18.17.0
$ ptv5 --help [COMMAND]
USAGE
$ ptv5 COMMAND
...
ptv5 compute vaultAccounts
Computes the previous draw's depositors with a non-zero balance for a PrizePool to a target output directory.
JSON is in the format required by the @GenerationSoftware/foundry-winner-calc repo to quickly winners.
Simply pass a chainId
, prizePool
and outDir
to compute and locally save the results.
USAGE
$ ptv5 compute vaultAccounts --chainId 1 --outDir ./temp --prizePool '0xdd4d117723C257CEe402285D3aCF218E9A8236E1'
DESCRIPTION
Computes the previous draw's depositors with a non-zero balance for a PrizePool to a target output directory.
EXAMPLES
$ ptv5 compute vaultAccounts --chainId 1 --prizePool 0x0000000000000000000000000000000000000000 --outDir ./temp
Running compute:vaultAccounts on chainId: 1
{
"chainId": 10,
"prizePoolAddress": "0xe32e5E1c5f0c80bD26Def2d0EA5008C107000d6A",
"vaultAddress": "0xf0B19f02c63d51B69563A2b675e0160e1C34397C",
"userAddresses": [
"0x07967251f6db5f9d095119379bd8fc4fce60b3e1",
"0x084039db4e3c6775eabfc59cbd3725d3d9a6d752"
// ...
]
}
{
"status": "LOADING",
"createdAt": "11"
}
{
"status": "SUCCESS",
"createdAt": 1693423691768,
"updatedAt": 1693423805132,
"runtime": 114,
"meta": {
"numVaults": 7,
"numTiers": 3,
"numPrizeIndices": 21,
"numAccounts": 3830
}
}
{
"status": "FAILURE",
"createdAt": "11",
"updatedAt": "33",
"runtime": "22",
"error": "ErrorCode"
}
ptv5 compute drawPrizes
Computes the previous draw's prizes for a PrizePool to a target output directory.
Simply pass a chainId
, prizePool
and outDir
to compute and locally save the results.
USAGE
$ ptv5 compute drawPrizes --chainId 1 --outDir ./temp --prizePool '0xdd4d117723C257CEe402285D3aCF218E9A8236E1'
DESCRIPTION
Computes the previous draw's prizes for a PrizePool to a target output directory.
EXAMPLES
$ ptv5 compute drawPrizes --chainId 1 --prizePool 0x0000000000000000000000000000000000000000 --outDir ./temp
Running compute:drawPrizes on chainId: 1
[
{
"vault": "0x0bfe04201c496a9994b920deb6087a60bdadfbbb",
"winner": "0x07967251f6db5f9d095119379bd8fc4fce60b3e1",
"tier": 3,
"prizeIndex": 11,
"claimed": true,
"amount": "1633936709514027714"
},
{
"vault": "0x0bfe04201c496a9994b920deb6087a60bdadfbbb",
"winner": "0x084039db4e3c6775eabfc59cbd3725d3d9a6d752",
"tier": 2,
"prizeIndex": 1,
"claimed": false,
"amount": "1633936709514027714"
}
]
{
"status": "LOADING",
"createdAt": "11"
}
{
"status": "SUCCESS",
"createdAt": 1693423691768,
"updatedAt": 1693423805132,
"runtime": 114,
"meta": {
"numVaults": 7,
"numTiers": 3,
"numPrizeIndices": 21,
"numAccounts": 3830,
"numPrizes": 1052,
"prizesByTier": {
"0": {
"count": 2,
"claimed": 1
},
"1": {
"count": 50,
"claimed": 44
},
"2": {
"count": 1000,
"claimed": 300
}
},
"prizePoolReserve": "431450369493570544008",
"amountsTotal": "318001330964753848953",
"tierPrizeAmounts": {
"0": "271304907889060131200",
"1": "45062486366179690039",
"2": "1633936709514027714"
},
"vaultPortions": {
"0x0410cae69dd01f58224d54881648e35c6cb874fa": "12491920408565",
"0x0bfe04201c496a9994b920deb6087a60bdadfbbb": "973235150974337855",
"0x4b7a2e1a70ea05523542c9189fa51b133884f321": "232229504251603",
"0x9e11c3d53a68c07f6d839e5d89a94052753cedcb": "5916502876505634",
"0xb9a647d3391b939cb49b44d3c5e93c63d96ad4a4": "9173734225780914",
"0xe2ef926250b0e8a07578d76d9f57e5092340a6fa": "11429890498715426",
"0xffb08a9ffc360806be7ef8cf815c1274ef92cea9": "0"
}
}
}
{
"status": "FAILURE",
"createdAt": "11",
"updatedAt": "33",
"runtime": "22",
"error": "ErrorCode"
}
ptv5 help [COMMAND]
Display help for ptv5.
USAGE
$ ptv5 help [COMMAND] [-n]
ARGUMENTS
COMMAND Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for ptv5.
You can test the CLI while developing by using the following, with whichever chain / prizePool flags you want to test with:
./bin/run.js compute drawPrizes --chainId 80001 -o ./temp -p '0xA32C8f94191c9295634f0034eb2b0e2749e77974'
FAQs
PoolTogether V5 Command Line Interface
The npm package @generationsoftware/pt-v5-cli receives a total of 15,732 weekly downloads. As such, @generationsoftware/pt-v5-cli popularity was classified as popular.
We found that @generationsoftware/pt-v5-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.