{"_id":"@chanceprotocol/v4-mainnet","name":"@chanceprotocol/v4-mainnet","dist-tags":{"latest":"1.9.0"},"versions":{"1.9.0":{"name":"@chanceprotocol/v4-mainnet","version":"1.9.0","main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/pooltogether/v4-mainnet.git"},"author":{"name":"PoolTogether Inc."},"license":"GPL-3.0","scripts":{"hh":"hardhat","addPrizes":"hardhat run ./scripts/addPrizes.js --network ","clean":"rm -rf cache/ artifacts/","compile":"hardhat compile","console":"hardhat console --network localhost","prepare-deploy":"yarn clean && yarn compile","prepack":"yarn generate","reinstall":"rm -rf node_modules/ && yarn cache clean && yarn","docs":"hardhat deploy-markdown-export --name 'V4 Mainnet' --npm-package-name @chanceprotocol/v4-mainnet --github-base-url 'https://github.com/pooltogether/v4-mainnet/tree/master' --output-filepath mainnet.md","disburse":"hardhat run ./scripts/disburse.js --network ","deposit":"hardhat run ./scripts/deposit.js --network ","generate":"ts-node ./scripts/generateContractList.ts","format":"prettier --config .prettierrc --write \"**/*.*.{ts,js}\"","format:file":"prettier --config .prettierrc --write","deploy:v1.0.1.mainnet":"DEPLOY=mainnet hardhat deploy --network mainnet","deploy:v1.0.1.polygon":"DEPLOY=polygon hardhat deploy --network polygon","deploy:v1.1.0.avalanche":"DEPLOY=v1.1.0.avalanche hardhat deploy --network avalanche","deploy:v1.1.0.mainnet":"DEPLOY=v1.1.0.mainnet hardhat deploy --network mainnet","deploy:v1.1.0.polygon":"DEPLOY=v1.1.0.polygon hardhat deploy --network polygon","deploy:v1.2.1.avalanche":"DEPLOY=v1.2.1.avalanche hardhat deploy --network avalanche","deploy:v1.2.1.mainnet":"DEPLOY=v1.2.1.mainnet hardhat deploy --network mainnet","deploy:v1.2.1.polygon":"DEPLOY=v1.2.1.polygon hardhat deploy --network polygon","deploy:v1.3.0.avalanche":"DEPLOY=v1.3.0.avalanche hardhat deploy --network avalanche","deploy:v1.3.0.mainnet":"DEPLOY=v1.3.0.mainnet hardhat deploy --network mainnet","deploy:v1.3.0.polygon":"DEPLOY=v1.3.0.polygon hardhat deploy --network polygon","deploy:v1.4.0.avalanche":"DEPLOY=v1.4.0.avalanche hardhat deploy --network avalanche","deploy:v1.4.0.mainnet":"DEPLOY=v1.4.0.mainnet hardhat deploy --network mainnet","deploy:v1.4.0.polygon":"DEPLOY=v1.4.0.polygon hardhat deploy --network polygon","deploy:v1.5.0.mainnet":"DEPLOY=v1.5.0.mainnet hardhat deploy --network mainnet","deploy:v1.6.0.optimism":"DEPLOY=v1.6.0.optimism hardhat deploy --network optimism","deploy:v1.6.1.optimism":"DEPLOY=v1.6.1.optimism hardhat deploy --network optimism","deploy:v1.7.0.polygon":"DEPLOY=v1.7.0.polygon hardhat deploy --network polygon","deploy:v1.8.0.avalanche":"DEPLOY=v1.8.0.avalanche hardhat deploy --network avalanche","deploy:v1.9.0.mainnet":"DEPLOY=v1.9.0.mainnet hardhat deploy --network mainnet","deploy:v1.9.0.optimism":"DEPLOY=v1.9.0.optimism hardhat deploy --network optimism","deploy:v1.9.0.polygon":"DEPLOY=v1.9.0.polygon hardhat deploy --network polygon","deploy:v1.9.0.avalanche":"DEPLOY=v1.9.0.avalanche hardhat deploy --network avalanche","simulate:mainnet":"hardhat --config hardhat.config.ts run ./scripts/fork/beacon.mainnet.forkRunUpgradeV110.ts --network localhost","simulate:polygon":"hardhat --config hardhat.config.ts run ./scripts/fork/receiver.polygon.forkRunUpgradeV110.ts --network localhost","node:ethereum":"DEPLOY=mainnet hardhat node --network hardhat","node:polygon":"DEPLOY=polygon hardhat node --network hardhat","node:avalanche":"DEPLOY=v1.1.0.avalanche hardhat node --network hardhat","node:optimism":"DEPLOY=v1.6.1.optimism hardhat node --network hardhat","upgrade:mainnet":"DEPLOY=v1.1.0.mainnet hardhat deploy --network mainnet","upgrade:polygon":"DEPLOY=v1.1.0.polygon hardhat deploy --network polygon","upgrade:mainnet:test":"DEPLOY=v1.1.0.mainnet hardhat deploy --network localhost","upgrade:polygon:test":"DEPLOY=v1.1.0.polygon hardhat deploy --network localhost","verify:mainnet":"hardhat --config hardhat.config.ts run ./scripts/verify.ts --network mainnet","verify:polygon":"hardhat --config hardhat.config.polygon.ts run ./scripts/verify.ts --network polygon","verify:avalanche":"hardhat --config hardhat.config.avalanche.ts run ./scripts/verify.ts --network avalanche","verify:optimism":"hardhat --config hardhat.config.optimism.ts run ./scripts/verify.ts --network optimism","test:v1.0.1.mainnet":"yarn mainnetForkSetup; FORK_CHAIN_ID=$MAINNET_CHAIN_ID FORK_BLOCK_NUMBER=$MAINNET_FORK_BLOCK_NUMBER FORK_RPC_URL=$MAINNET_RPC_URL FORK_ENABLED=true DEPLOY=mainnet hardhat node --no-reset --network hardhat","test:v1.0.1.polygon":"yarn polygonForkSetup; FORK_CHAIN_ID=$POLYGON_CHAIN_ID FORK_BLOCK_NUMBER=$POLYGON_FORK_BLOCK_NUMBER FORK_RPC_URL=$POLYGON_RPC_URL FORK_ENABLED=true DEPLOY=polygon hardhat node --no-reset --network hardhat","test:v1.1.0.mainnet":"yarn mainnetForkSetup; FORK_CHAIN_ID=$MAINNET_CHAIN_ID FORK_BLOCK_NUMBER=$MAINNET_FORK_BLOCK_NUMBER FORK_RPC_URL=$MAINNET_RPC_URL FORK_ENABLED=true DEPLOY=v1.1.0.mainnet hardhat node --no-reset --network hardhat","test:v1.1.0.polygon":"yarn polygonForkSetup; FORK_CHAIN_ID=$POLYGON_CHAIN_ID FORK_BLOCK_NUMBER=$POLYGON_FORK_BLOCK_NUMBER FORK_RPC_URL=$POLYGON_RPC_URL FORK_ENABLED=true DEPLOY=v1.1.0.polygon hardhat node --no-reset --network hardhat","test:v1.1.0.avalanche":"FORK_CHAIN_ID=$AVALANCHE_CHAIN_ID FORK_BLOCK_NUMBER=$AVALANCHE_FORK_BLOCK_NUMBER FORK_RPC_URL=$AVALANCHE_RPC_URL FORK_ENABLED=true DEPLOY=v1.1.0.avalanche hardhat node --no-reset --network hardhat","test:v1.2.1.mainnet":"yarn mainnetForkSetup; FORK_CHAIN_ID=$MAINNET_CHAIN_ID FORK_BLOCK_NUMBER=$MAINNET_FORK_BLOCK_NUMBER FORK_RPC_URL=$MAINNET_RPC_URL FORK_ENABLED=true DEPLOY=v1.2.1.mainnet hardhat node --no-reset --network hardhat","test:v1.2.1.polygon":"yarn polygonForkSetup; FORK_CHAIN_ID=$POLYGON_CHAIN_ID FORK_BLOCK_NUMBER=$POLYGON_FORK_BLOCK_NUMBER FORK_RPC_URL=$POLYGON_RPC_URL FORK_ENABLED=true DEPLOY=v1.2.1.polygon hardhat node --no-reset --network hardhat","test:v1.2.1.avalanche":"yarn avalancheForkSetup; FORK_CHAIN_ID=$AVALANCHE_CHAIN_ID FORK_BLOCK_NUMBER=$AVALANCHE_FORK_BLOCK_NUMBER FORK_RPC_URL=$AVALANCHE_RPC_URL FORK_ENABLED=true DEPLOY=v1.2.1.avalanche hardhat node --no-reset --network hardhat","test:v1.3.0.mainnet":"yarn mainnetForkSetup; FORK_CHAIN_ID=$MAINNET_CHAIN_ID FORK_BLOCK_NUMBER=$MAINNET_FORK_BLOCK_NUMBER FORK_RPC_URL=$MAINNET_RPC_URL FORK_ENABLED=true DEPLOY=v1.3.0.mainnet hardhat node --no-reset --network hardhat","test:v1.3.0.polygon":"yarn polygonForkSetup; FORK_CHAIN_ID=$POLYGON_CHAIN_ID FORK_BLOCK_NUMBER=$POLYGON_FORK_BLOCK_NUMBER FORK_RPC_URL=$POLYGON_RPC_URL FORK_ENABLED=true DEPLOY=v1.3.0.polygon hardhat node --no-reset --network hardhat","test:v1.3.0.avalanche":"yarn avalancheForkSetup; FORK_CHAIN_ID=$AVALANCHE_CHAIN_ID FORK_BLOCK_NUMBER=$AVALANCHE_FORK_BLOCK_NUMBER FORK_RPC_URL=$AVALANCHE_RPC_URL FORK_ENABLED=true DEPLOY=v1.3.0.avalanche hardhat node --no-reset --network hardhat","test:v1.4.0.mainnet":"yarn mainnetForkSetup; FORK_CHAIN_ID=$MAINNET_CHAIN_ID FORK_BLOCK_NUMBER=$MAINNET_FORK_BLOCK_NUMBER FORK_RPC_URL=$MAINNET_RPC_URL FORK_ENABLED=true DEPLOY=v1.4.0.mainnet hardhat node --no-reset --network hardhat","test:v1.4.0.polygon":"yarn polygonForkSetup; FORK_CHAIN_ID=$POLYGON_CHAIN_ID FORK_BLOCK_NUMBER=$POLYGON_FORK_BLOCK_NUMBER FORK_RPC_URL=$POLYGON_RPC_URL FORK_ENABLED=true DEPLOY=v1.4.0.polygon hardhat node --no-reset --network hardhat","test:v1.4.0.avalanche":"yarn avalancheForkSetup; FORK_CHAIN_ID=$AVALANCHE_CHAIN_ID FORK_BLOCK_NUMBER=$AVALANCHE_FORK_BLOCK_NUMBER FORK_RPC_URL=$AVALANCHE_RPC_URL FORK_ENABLED=true DEPLOY=v1.4.0.avalanche hardhat node --no-reset --network hardhat","test:v1.5.0.mainnet":"yarn mainnetForkSetup; FORK_CHAIN_ID=$MAINNET_CHAIN_ID FORK_BLOCK_NUMBER=$MAINNET_FORK_BLOCK_NUMBER FORK_RPC_URL=$MAINNET_RPC_URL FORK_ENABLED=true DEPLOY=v1.5.0.mainnet hardhat node --no-reset --network hardhat","test:v1.6.0.optimism":"yarn optimismForkSetup; FORK_CHAIN_ID=$OPTIMISM_CHAIN_ID FORK_BLOCK_NUMBER=$OPTIMISM_FORK_BLOCK_NUMBER FORK_RPC_URL=$OPTIMISM_RPC_URL FORK_ENABLED=true DEPLOY=v1.6.0.optimism hardhat node --no-reset --network hardhat","test:v1.6.1.optimism":"yarn optimismForkSetup; FORK_CHAIN_ID=$OPTIMISM_CHAIN_ID FORK_BLOCK_NUMBER=$OPTIMISM_FORK_BLOCK_NUMBER FORK_RPC_URL=$OPTIMISM_RPC_URL FORK_ENABLED=true DEPLOY=v1.6.1.optimism hardhat node --no-reset --network hardhat","mainnetForkSetup":"rm -rf deployments/localhost ; cp -r deployments/mainnet deployments/localhost","polygonForkSetup":"rm -rf deployments/localhost ; cp -r deployments/polygon deployments/localhost","avalancheForkSetup":"rm -rf deployments/localhost ; cp -r deployments/avalanche deployments/localhost","optimismForkSetup":"rm -rf deployments/localhost ; cp -r deployments/optimism deployments/localhost"},"dependencies":{"@chainlink/contracts":"0.4.0","@openzeppelin/contracts":"4.4.2","@chanceprotocol/aave-v3-yield-source":"workspace:*","@chanceprotocol/aave-yield-source":"workspace:*","@chanceprotocol/draw-calculator-js":"workspace:*","@chanceprotocol/owner-manager-contracts":"workspace:*","@chanceprotocol/pooltogether-rng-contracts":"workspace:*","@chanceprotocol/v4-core":"workspace:*","@chanceprotocol/v4-periphery":"workspace:*","@chanceprotocol/v4-timelocks":"workspace:*","@chanceprotocol/v4-twab-delegator":"workspace:*","@chanceprotocol/yield-source-interface":"workspace:*","find":"0.3.0","glob":"7.2.0","lodash":"^4.17.21"},"devDependencies":{"@ethersproject/hardware-wallets":"5.6.0","@nomiclabs/hardhat-ethers":"npm:hardhat-deploy-ethers","@nomiclabs/hardhat-etherscan":"3.0.0","@chanceprotocol/hardhat-deploy-markdown-export":"0.3.5","@types/jsonfile":"6.0.1","@types/node":"17.0.12","ajv":"8.9.0","chalk":"4.1.2","colors":"1.4.0","debug":"4.3.3","ethers":"5.6.1","hardhat":"2.9.1","hardhat-dependency-compiler":"1.1.2","hardhat-deploy":"0.11.0","hardhat-deploy-ethers":"0.3.0-beta.13","idx":"2.5.6","jsonfile":"6.1.0","luxon":"2.3.0","prettier":"2.5.1","ts-node":"10.4.0","typescript":"4.5.5"},"peerDependencies":{},"gitHead":"765543576b1bfbccf88773d6867e5c9c35633461","description":"The PoolTogether V4 \"mainnet\" deployment scripts.","bugs":{"url":"https://github.com/pooltogether/v4-mainnet/issues"},"homepage":"https://github.com/pooltogether/v4-mainnet#readme","_id":"@chanceprotocol/v4-mainnet@1.9.0","_nodeVersion":"16.15.1","_npmVersion":"9.6.5","dist":{"integrity":"sha512-6Q/zEeN3gJQFICxox6pRnMkBVCSfDmPpRjAU2cR4CNTk5YFDsDPrCwjT4i3D/dWxrYE4W5H5NOuZJyxOHXIzSg==","shasum":"8ef904013539e53892fc5bbf0ed75e411ce544ae","tarball":"https://registry.npmjs.org/@chanceprotocol/v4-mainnet/-/v4-mainnet-1.9.0.tgz","fileCount":126,"unpackedSize":27062160,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG2mnoAfeUEQeLocdE4/D6kKmZnRUmaioWkFypWO4E+qAiBj0j6RujfM5lLLNdoYgYiRgZ9phaUkBZFUW2b+sWfT+g=="}]},"_npmUser":{"name":"chanceprotocol","email":"chance@netixsol.com"},"directories":{},"maintainers":[{"name":"chanceprotocol","email":"chance@netixsol.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/v4-mainnet_1.9.0_1692256123820_0.8218579031343858"},"_hasShrinkwrap":false}},"time":{"created":"2023-08-17T07:08:43.744Z","1.9.0":"2023-08-17T07:08:44.097Z","modified":"2023-08-17T07:08:44.333Z"},"maintainers":[{"name":"chanceprotocol","email":"chance@netixsol.com"}],"description":"The PoolTogether V4 \"mainnet\" deployment scripts.","homepage":"https://github.com/pooltogether/v4-mainnet#readme","repository":{"type":"git","url":"git+ssh://git@github.com/pooltogether/v4-mainnet.git"},"author":{"name":"PoolTogether Inc."},"bugs":{"url":"https://github.com/pooltogether/v4-mainnet/issues"},"license":"GPL-3.0","readme":"# PoolTogether V4 Mainnet\n\nThe PoolTogether V4 \"mainnet\" deployment scripts.\n\nThe deployment scripts are separated into versions.\n\n- v1.0.1\n- v1.1.0\n- v1.2.1\n- v1.3.0\n\n# Getting Started\n\nInstall `direnv` module.\n\nWe use [direnv](https://direnv.net/) to manage environment variables.  You'll likely need to install it.\n\n```sh\ncp .envrc.example .envrc\n```\n\nThe RPC endpoints will need to be updated if you wish to deploy.  The RPC endpoints will also need to point to archival nodes if you wish to run fork tests.\n\n```.sh\nyarn\n```\n\n# Development\n\nThe deployment scripts can be tested in forked environments.  The following commands will fork the network then run the deployment script against the fork.\n\nNote: You must configure RPC endpoints for archival nodes in the .envrc.\n\n## Fork and Deploy\n\n```\nyarn test:v1.x.x.mainnet\n```\n\n```\nyarn test:v1.x.x.avalanche\n```\n\n```\nyarn test:v1.x.x.polygon\n```\n\n# Deployment\n\n```\nyarn deploy:v1.x.x.mainnet\n```\n\n```\nyarn deploy:v1.x.x.avalanche\n```\n\n```\nyarn deploy:v1.x.x.polygon\n```\n\n# Changelog\n\n## v1.0.1\n\nThis version was the original V4 launch across Ethereum and Polygon.\n\n## v1.1.0\n\nThis version launched V4 on Avalanche, and included upgrades to Ethereum and Polygon.  New contracts are being deployed across Avalanche, Ethereum and Polygon.\n\nThis version upgrades the existing configuration, so some changes need to be completed by the PoolTogether Executive Team once the contracts have been launched.  Those post-deploy configuration changes are detailed below.\n\n### v1.1.0 Post-Deploy Configuration Changes\n\n#### Polygon\n\n1. Set the PrizeDistributionBuffer manager to be the new PrizeDistributionFactory\n2. Set the DrawCalculatorTimelock manager to be the ReceiverTimelockTrigger\n3. Set the DrawBuffer to be managed by the ReceiverTimelockTrigger\n4. exec team needs to claim ownership of PrizeDistributionFactory\n5. exec team needs to claim ownership of ReceiverTimelockTrigger\n6. exec team needs to claim ownership of PrizeTierHistory\n\n#### Mainnet\n\n- exec team needs to claim ownership of PrizeDistributionFactory\n- exec team needs to claim ownership of BeaconTimelockTrigger\n- PrizeDistributionBuffer needs to be managed by the PDFactory\n- DrawCalculatorTimelock needs to be managed by the BeaconTimelockTrigger\n\n#### Avalanche\n\n- exec teams needs to claim ownership of PrizeDistributionFactory\n- exec teams needs to claim ownership of DrawCalculatorTimelock\n- exec teams needs to claim ownership of PrizeFlush\n- exec teams needs to claim ownership of Reserve\n- exec teams needs to claim ownership of YieldSourcePrizePool\n- exec teams needs to claim ownership of PrizeTierHistory\n- exec teams needs to claim ownership of PrizeSplitStrategy\n- exec teams needs to claim ownership of DrawBuffer\n- exec teams needs to claim ownership of PrizeDistributionBuffer\n- exec teams needs to claim ownership of ReceiverTimelockTrigger\n\n## v1.2.1\n\nDeploy TWAB Rewards contract across Avalanche, Ethereum and Polygon.\n\n## v1.3.0\n\nDeploy TWAB Delegator contract across Avalanche, Ethereum and Polygon.\n\n## v1.4.0\n\nDeploy new BeaconTimelockTrigger, DrawCalculatorTimelock, PrizeDistributionFactory and PrizeTierHistory contracts on Ethereum.\n\nDeploy new DrawCalculatorTimelock, PrizeDistributionFactory, PrizeTierHistory and ReceiverTimelockTrigger contracts on Avalanche and Polygon.\n\n## v1.5.0\n\nDeploy RNGChainlinkV2 on Ethereum.\n\n## v1.5.1\n\nRedeploy TWABRewards on Avalanche, Ethereum and Polygon.\n\n## v1.6.0\n\nDeploy USDC Prize Pool on Optimism.\n\n### Post-Deploy Configuration Changes\n\n#### Optimism\n\nExecutive team needs to claim ownership of the following contracts:\n- PrizeDistributionFactory\n- DrawCalculatorTimelock\n- PrizeFlush\n- Reserve\n- YieldSourcePrizePool\n- PrizeTierHistory\n- PrizeSplitStrategy\n- DrawBuffer\n- PrizeDistributionBuffer\n- ReceiverTimelockTrigger\n\n## v1.6.1\n\nRe-deploy USDC Prize Pool on Optimism.\n\n## v1.7.0\n\nDeploy RNGChainlinkV2 on Polygon and setup DrawBeacon to compute draw onchain.\n\n### Post-Deploy Configuration Changes\n\n#### Polygon\n\nExecutive team needs to claim ownership of the following contracts:\n- RNGChainlinkV2\n- DrawBeacon\n- BeaconTimelockTrigger\n\n## v1.8.0\n\nDeploy RNGChainlinkV2 on Avalanche and setup DrawBeacon to compute draw onchain.\n\n### Post-Deploy Configuration Changes\n\n#### Avalanche\n\nExecutive team needs to claim ownership of the following contracts:\n- RNGChainlinkV2\n- DrawBeacon\n- BeaconTimelockTrigger\n\n## v1.9.0\n\nDeploy DPR upgrade to Avalanche, Ethereum, Polygon and Optimism.\n\n### Post-Deploy Configuration Changes\n\n#### All networks\n\nExecutive team needs to claim ownership of the following contracts:\n- PrizeTierHistoryV2\n- PrizeDistributionFactoryV2\n","readmeFilename":"README.md"}