The PoolTogether V4 "mainnet" deployment scripts.
The deployment scripts are separated into versions.
- v1.0.1
- v1.1.0
- v1.2.1
- v1.3.0
Install direnv
module.
We use direnv to manage environment variables. You'll likely need to install it.
cp .envrc.example .envrc
The 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.
yarn
The deployment scripts can be tested in forked environments. The following commands will fork the network then run the deployment script against the fork.
Note: You must configure RPC endpoints for archival nodes in the .envrc.
yarn test:v1.x.x.mainnet
yarn test:v1.x.x.avalanche
yarn test:v1.x.x.polygon
yarn deploy:v1.x.x.mainnet
yarn deploy:v1.x.x.avalanche
yarn deploy:v1.x.x.polygon
This version was the original V4 launch across Ethereum and Polygon.
This version launched V4 on Avalanche, and included upgrades to Ethereum and Polygon. New contracts are being deployed across Avalanche, Ethereum and Polygon.
This 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.
- Set the PrizeDistributionBuffer manager to be the new PrizeDistributionFactory
- Set the DrawCalculatorTimelock manager to be the ReceiverTimelockTrigger
- Set the DrawBuffer to be managed by the ReceiverTimelockTrigger
- exec team needs to claim ownership of PrizeDistributionFactory
- exec team needs to claim ownership of ReceiverTimelockTrigger
- exec team needs to claim ownership of PrizeTierHistory
- exec team needs to claim ownership of PrizeDistributionFactory
- exec team needs to claim ownership of BeaconTimelockTrigger
- PrizeDistributionBuffer needs to be managed by the PDFactory
- DrawCalculatorTimelock needs to be managed by the BeaconTimelockTrigger
- exec teams needs to claim ownership of PrizeDistributionFactory
- exec teams needs to claim ownership of DrawCalculatorTimelock
- exec teams needs to claim ownership of PrizeFlush
- exec teams needs to claim ownership of Reserve
- exec teams needs to claim ownership of YieldSourcePrizePool
- exec teams needs to claim ownership of PrizeTierHistory
- exec teams needs to claim ownership of PrizeSplitStrategy
- exec teams needs to claim ownership of DrawBuffer
- exec teams needs to claim ownership of PrizeDistributionBuffer
- exec teams needs to claim ownership of ReceiverTimelockTrigger
Deploy TWAB Rewards contract across Avalanche, Ethereum and Polygon.
Deploy TWAB Delegator contract across Avalanche, Ethereum and Polygon.
Deploy new BeaconTimelockTrigger, DrawCalculatorTimelock, PrizeDistributionFactory and PrizeTierHistory contracts on Ethereum.
Deploy new DrawCalculatorTimelock, PrizeDistributionFactory, PrizeTierHistory and ReceiverTimelockTrigger contracts on Avalanche and Polygon.
Deploy RNGChainlinkV2 on Ethereum.
Redeploy TWABRewards on Avalanche, Ethereum and Polygon.
Deploy USDC Prize Pool on Optimism.
Executive team needs to claim ownership of the following contracts:
- PrizeDistributionFactory
- DrawCalculatorTimelock
- PrizeFlush
- Reserve
- YieldSourcePrizePool
- PrizeTierHistory
- PrizeSplitStrategy
- DrawBuffer
- PrizeDistributionBuffer
- ReceiverTimelockTrigger
Re-deploy USDC Prize Pool on Optimism.
Deploy RNGChainlinkV2 on Polygon and setup DrawBeacon to compute draw onchain.
Executive team needs to claim ownership of the following contracts:
- RNGChainlinkV2
- DrawBeacon
- BeaconTimelockTrigger
Deploy RNGChainlinkV2 on Avalanche and setup DrawBeacon to compute draw onchain.
Executive team needs to claim ownership of the following contracts:
- RNGChainlinkV2
- DrawBeacon
- BeaconTimelockTrigger
Deploy DPR upgrade to Avalanche, Ethereum, Polygon and Optimism.
Executive team needs to claim ownership of the following contracts:
- PrizeTierHistoryV2
- PrizeDistributionFactoryV2