Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy: Delta devnet #620

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions deploy/deploy_contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const LIVE_NETWORKS = [
"rinkebyDevnet",
"arbitrumRinkeby",
"arbitrumRinkebyDevnet",
"arbitrumGoerliDevnet",
"gethDev"
]

Expand Down
51 changes: 51 additions & 0 deletions deploy/deploy_delta_audit_uprade.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import {HardhatRuntimeEnvironment} from "hardhat/types"
import {DeployFunction} from "hardhat-deploy/types"

import ContractDeployer from "../utils/deployer"

const PROD_NETWORKS = ["mainnet", "arbitrumMainnet"]

const isProdNetwork = (name: string): boolean => {
return PROD_NETWORKS.indexOf(name) > -1
}

const func: DeployFunction = async function(hre: HardhatRuntimeEnvironment) {
const {deployments, getNamedAccounts} = hre // Get the deployments and getNamedAccounts which are provided by hardhat-deploy
const {deploy} = deployments // the deployments object itself contains the deploy function

const {deployer} = await getNamedAccounts() // Fetch named accounts from hardhat.config.ts

const contractDeployer = new ContractDeployer(deploy, deployer, deployments)
const controller = isProdNetwork(hre.network.name) ?
await deployments.get("Controller") : // on prod networks, deploy contracts here but registration is done through governance
await contractDeployer.fetchDeployedController() // on test networks, the deployer must also be the controller owner

const llDeployment = await deployments.get("SortedDoublyLL")

await contractDeployer.deployAndRegister({
contract: "BondingManager",
name: "BondingManagerTarget",
libraries: {
SortedDoublyLL: llDeployment.address
},
args: [controller.address],
proxy: false // we're deploying the Target directly, so proxy is false
})

await contractDeployer.deployAndRegister({
contract: "BondingVotes",
name: "BondingVotesTarget",
args: [controller.address],
proxy: false // we're deploying the Target directly, so proxy is false
})

await contractDeployer.deployAndRegister({
contract: "LivepeerGovernor",
name: "LivepeerGovernorTarget",
args: [controller.address],
proxy: false // we're deploying the Target directly, so proxy is false
})
}

func.tags = ["DeltaAuditUpgrade"]
export default func
19 changes: 19 additions & 0 deletions deploy/migrations.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,24 @@ const arbitrumRinkeby = {

const arbitrumRinkebyDevnet = arbitrumRinkeby

const arbitrumGoerliDevnet = {
...arbitrumRinkeby,
roundsManager: {
roundLength: 360,
roundLockAmount: 100000
},
treasury: {
minDelay: 0 // 0s initial proposal execution delay
},
livepeerGovernor: {
initialVotingDelay: 1, // 1 round
initialVotingPeriod: 10, // 10 rounds
initialProposalThreshold: ethers.utils.parseEther("100"), // 100 LPT
initialQuorum: 333300, // 33%
quota: 500000 // 50%
}
}

const arbitrumMainnet = {
governor: {
// Governance multisig
Expand Down Expand Up @@ -180,6 +198,7 @@ const networkConfigs: any = {
rinkebyDevnet,
arbitrumRinkeby,
arbitrumRinkebyDevnet,
arbitrumGoerliDevnet,
arbitrumMainnet,
gethDev
}
Expand Down
1 change: 1 addition & 0 deletions deployments/arbitrumGoerliDevnet/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
421613
183 changes: 183 additions & 0 deletions deployments/arbitrumGoerliDevnet/BondingManager.json

Large diffs are not rendered by default.

183 changes: 183 additions & 0 deletions deployments/arbitrumGoerliDevnet/BondingManagerProxy.json

Large diffs are not rendered by default.