deployment

This commit is contained in:
Thrilok kumar 2024-02-12 18:12:52 +04:00
parent c29eb93461
commit 3e5fa7e74f
5 changed files with 105 additions and 7 deletions

View File

@ -55,21 +55,23 @@ contract PayloadIGP8Mock {
uint256 public constant PROPOSAL_ID = 8; uint256 public constant PROPOSAL_ID = 8;
IGovernorBravo public constant GOVERNOR = IGovernorBravo(0x0204Cd037B2ec03605CFdFe482D8e257C765fA1B); IGovernorBravo public constant GOVERNOR = IGovernorBravo(0x0204Cd037B2ec03605CFdFe482D8e257C765fA1B);
ITimelock public constant OLD_TIMELOCK = ITimelock(0xC7Cb1dE2721BFC0E0DA1b9D526bCdC54eF1C0eFC); IDSAV2 public constant TREASURY = IDSAV2(0x28849D2b63fA8D361e5fc15cB8aBB13019884d09);
ITimelock public immutable TIMELOCK;
address public immutable ADDRESS_THIS;
IInstaIndex public constant INSTAINDEX = IInstaIndex(0x2971AdFa57b20E5a416aE5a708A8655A9c74f723); IInstaIndex public constant INSTAINDEX = IInstaIndex(0x2971AdFa57b20E5a416aE5a708A8655A9c74f723);
ILite public constant LITE = ILite(0xA0D3707c569ff8C87FA923d3823eC5D81c98Be78); ILite public constant LITE = ILite(0xA0D3707c569ff8C87FA923d3823eC5D81c98Be78);
IDSAV2 public constant TREASURY = IDSAV2(0x28849D2b63fA8D361e5fc15cB8aBB13019884d09);
ITimelock public constant OLD_TIMELOCK = ITimelock(0xC7Cb1dE2721BFC0E0DA1b9D526bCdC54eF1C0eFC);
address public immutable ADDRESS_THIS;
ITimelock public immutable TIMELOCK;
address public immutable GOVERNOR_IMPLEMENTATION_ADDRESS;
address public constant TEAM_MULTISIG = 0x4F6F977aCDD1177DCD81aB83074855EcB9C2D49e;
uint256 public constant ONE_DAY_TIME_IN_SECONDS = 1 days; // 1 day in seconds. 86400s uint256 public constant ONE_DAY_TIME_IN_SECONDS = 1 days; // 1 day in seconds. 86400s
uint256 public constant ONE_DAY_TIME_IN_BLOCKS = 7_200; // 1 day in blocks. 12s per block uint256 public constant ONE_DAY_TIME_IN_BLOCKS = 7_200; // 1 day in blocks. 12s per block
uint256 public constant TWO_DAY_TIME_IN_BLOCKS = 14_400; // 2 day in blocks. 12s per block uint256 public constant TWO_DAY_TIME_IN_BLOCKS = 14_400; // 2 day in blocks. 12s per block
address public immutable GOVERNOR_IMPLEMENTATION_ADDRESS;
address public constant TEAM_MULTISIG = 0x4F6F977aCDD1177DCD81aB83074855EcB9C2D49e;
constructor (address governor_, address timelock_) { constructor (address governor_, address timelock_) {
TIMELOCK = ITimelock(address(timelock_)); TIMELOCK = ITimelock(address(timelock_));
GOVERNOR_IMPLEMENTATION_ADDRESS = address(governor_); GOVERNOR_IMPLEMENTATION_ADDRESS = address(governor_);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

48
scripts/deployIGP7.js Normal file
View File

@ -0,0 +1,48 @@
const hre = require("hardhat");
const { ethers } = hre;
async function main() {
const oldTimelockAddress = "0xC7Cb1dE2721BFC0E0DA1b9D526bCdC54eF1C0eFC"
const guardain = "0x4F6F977aCDD1177DCD81aB83074855EcB9C2D49e"
// const Timelock = await ethers.getContractFactory("InstaTimelock")
const timelock = await ethers.getContractAt("InstaTimelock", "0x2386dc45added673317ef068992f19421b481f4c")
// const timelock = await Timelock.deploy(oldTimelockAddress, guardain)
// await timelock.deployed()
// const GovernorDelegate = await ethers.getContractFactory("InstaGovernorBravoDelegate")
const governorDelegate = await ethers.getContractAt("InstaGovernorBravoDelegate", "0x00613f7e762124711c7647f9eab5c8a88632ee47")
// const governorDelegate = await GovernorDelegate.deploy()
// await governorDelegate.deployed()
const PayloadIGP7 = await ethers.getContractFactory("PayloadIGP7")
const payloadIGP7 = await PayloadIGP7.deploy(governorDelegate.address, timelock.address)
await payloadIGP7.deployed()
console.log("PayloadIGP7: ", payloadIGP7.address)
console.log("InstaTimelock: ", timelock.address)
console.log("InstaGovernorBravoDelegate: ", governorDelegate.address)
await hre.run("verify:verify", {
address: timelock.address,
constructorArguments: [oldTimelockAddress, guardain]
})
await hre.run("verify:verify", {
address: governorDelegate.address,
constructorArguments: []
})
await hre.run("verify:verify", {
address: payloadIGP7.address,
constructorArguments: [governorDelegate.address, timelock.address]
})
}
main()
.then(() => process.exit(0))
.catch(error => {
console.error(error);
process.exit(1);
});

View File

@ -0,0 +1,46 @@
const hre = require("hardhat");
const { ethers } = hre;
async function main() {
const oldTimelockAddress = "0xC7Cb1dE2721BFC0E0DA1b9D526bCdC54eF1C0eFC"
const guardain = "0x4F6F977aCDD1177DCD81aB83074855EcB9C2D49e"
const governorDelegate = await ethers.deployContract("InstaGovernorBravoDelegate")
await governorDelegate.waitForDeployment()
console.log(governorDelegate)
const timelock = await ethers.deployContract("InstaTimelock", [oldTimelockAddress, guardain])
await timelock.waitForDeployment()
const payload = await ethers.deployContract("PayloadIGP7", [governorDelegate.target, timelock.target])
await payload.waitForDeployment()
const payload2 = await ethers.deployContract("PayloadIGP8Mock", [governorDelegate.target, timelock.target])
await payload2.waitForDeployment()
console.log("InstaTimelock: ", timelock.target)
console.log("InstaGovernorBravoDelegate: ", governorDelegate.target)
console.log("PayloadIGP7: ", payload.target)
console.log("PayloadIGP8Mock: ", payload2.target)
console.log()
await hre.run("verify:verify", {
address: governorDelegate.target,
constructorArguments: []
})
await hre.run("verify:verify", {
address: timelock.target,
constructorArguments: [oldTimelockAddress, guardain]
})
}
main()
.then(() => process.exit(0))
.catch(error => {
console.error(error);
process.exit(1);
});