Skip to content

Commit

Permalink
Fixed deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
Zartaj0 committed Feb 12, 2024
1 parent d9df8c0 commit c00d9ba
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions scripts/deployGovernance.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async function main() {
await logic.waitForDeployment();
console.log("logic deployed on", logic.target);
console.log("verifying logic");
await logic.deploymentTransaction().wait(6);
await logic.deploymentTransaction().wait(4);

try {
await hre.run("verify:verify", {
Expand All @@ -34,7 +34,7 @@ async function main() {

console.log("timelock deployed to:", timelock.target);
console.log("verifying timelock");
await timelock.deploymentTransaction().wait(6);
await timelock.deploymentTransaction().wait(4);

try {
await hre.run("verify:verify", {
Expand All @@ -45,13 +45,29 @@ async function main() {
console.log("Verification failed :", error);
}

console.log("deploying proxy");
console.log("deploying proxy Admin");

const proxyAdmin = await ethers.deployContract("PushBravoAdmin");
console.log("proxyAdmin deployed to:", proxyAdmin.target);

console.log("verifying proxy Admin");
await proxyAdmin.deploymentTransaction().wait(4);
try {
await hre.run("verify:verify", {
address: proxyAdmin.target,
constructorArguments: [],
contract:"contracts/PushBravoAdmin.sol:PushBravoAdmin"
});
} catch (error) {
console.log("Verification failed :", error);
}


console.log("deploying proxy");

const proxy = await ethers.deployContract("PushBravoProxy", [
logic.target,
proxyAdmin.address,
proxyAdmin.target,
_admin,
timelock.target,
_push,
Expand All @@ -64,12 +80,13 @@ async function main() {
console.log("proxy deployed to:", proxy.target);

console.log("verifying proxy");
await proxy.deploymentTransaction().wait(6);
await proxy.deploymentTransaction().wait(4);
try {
await hre.run("verify:verify", {
address: proxy.target,
constructorArguments: [
logic.target,
proxyAdmin.target,
_admin,
timelock.target,
_push,
Expand Down

0 comments on commit c00d9ba

Please sign in to comment.