-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from pooltogether/pool-2137-mainnet-deploy-rng…
…-chainlink-20-on feat(mainnet): add v1.5.0 scripts
- Loading branch information
Showing
11 changed files
with
2,527 additions
and
1,166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |
Oops, something went wrong.