Skip to content

Commit

Permalink
Merge pull request #10 from pooltogether/pool-2137-mainnet-deploy-rng…
Browse files Browse the repository at this point in the history
…-chainlink-20-on

feat(mainnet): add v1.5.0 scripts
  • Loading branch information
PierrickGT authored Apr 14, 2022
2 parents 459ff72 + 66323b2 commit 17c711a
Show file tree
Hide file tree
Showing 11 changed files with 2,527 additions and 1,166 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,13 @@ Deploy TWAB Rewards contract across Avalanche, Ethereum and Polygon.

Deploy TWAB Delegator contract across Avalanche, Ethereum and Polygon.

## v1.4.0

Deploy new BeaconTimelockTrigger, DrawCalculatorTimelock, PrizeDistributionFactory and PrizeTierHistory contracts on Ethereum.

Deploy new DrawCalculatorTimelock, PrizeDistributionFactory, PrizeTierHistory and ReceiverTimelockTrigger contracts on Avalanche and Polygon.

## v1.5.0

Deploy RNGChainlinkV2 on Ethereum.

2 changes: 1 addition & 1 deletion contracts.json

Large diffs are not rendered by default.

Empty file removed contracts/.gitkeep
Empty file.
40 changes: 40 additions & 0 deletions deploy/v1.5.0/mainnet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { dim } from 'chalk';
import { HardhatRuntimeEnvironment } from 'hardhat/types';

import { deployAndLog } from '../../src/deployAndLog';
import { setManager } from '../../src/setManager';
import { transferOwnership } from '../../src/transferOwnership';

export default async function deployToEthereumMainnet(hardhat: HardhatRuntimeEnvironment){
if (process.env.DEPLOY === 'v1.5.0.mainnet') {
dim(`Deploying: TWAB Delegator Ethereum Mainnet`)
dim(`Version: 1.5.0`)
} else { return }

const { getNamedAccounts, ethers } = hardhat;
const { getContract } = ethers;

const { deployer, executiveTeam } = await getNamedAccounts();

const drawBeacon = await getContract('DrawBeacon');

// ===================================================
// Deploy Contracts
// ===================================================

await deployAndLog('RNGChainlinkV2', {
from: deployer,
args: [
deployer,
'0x271682DEB8C4E0901D1a1550aD2e64D568E69909', // VRF Coordinator address
63, // Subscription id
'0xff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92', // 500 gwei key hash gas lane
],
skipIfAlreadyDeployed: true,
});

await setManager('RNGChainlinkV2', null, drawBeacon.address);

const rngService = await getContract('RNGChainlinkV2');
await transferOwnership('RNGChainlinkV2', rngService, executiveTeam);
}
Loading

0 comments on commit 17c711a

Please sign in to comment.