Skip to content

Commit

Permalink
fix: update migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
MishaShWoof committed Nov 24, 2024
1 parent 5358d33 commit b028b11
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
import { expect } from 'chai';
import { DeploymentManager } from '../../../../plugins/deployment_manager/DeploymentManager';
import { migration } from '../../../../plugins/deployment_manager/Migration';

interface Vars {};
const MULTISIG_ADDRESS = '';

export default migration('1732300422_deploy_rewards_v2', {
prepare: async (deploymentManager: DeploymentManager) => {
return {};
async prepare(deploymentManager: DeploymentManager) {
const cometRewardsV2 = await deploymentManager.deploy(
'CometRewardsV2',
'CometRewardsV2.sol',
[
MULTISIG_ADDRESS, // The governor who will control the contract
]
);
return { cometRewardsV2Address: cometRewardsV2.address };
},

enact: async (deploymentManager: DeploymentManager, govDeploymentManager: DeploymentManager, vars: Vars) => {
// No governance changes
}
enact: async () => {
//
},

async enacted(): Promise<boolean> {
return false;
},

async verify(deploymentManager: DeploymentManager) {
const cometRewardsV2 = await deploymentManager.fromDep('CometRewardsV2', 'mainnet', 'usds');
expect(MULTISIG_ADDRESS).to.be.equal(await cometRewardsV2.governor());
},
});
29 changes: 23 additions & 6 deletions deployments/base/aero/migrations/1732300459_deploy_rewards_v2.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
import { expect } from 'chai';
import { DeploymentManager } from '../../../../plugins/deployment_manager/DeploymentManager';
import { migration } from '../../../../plugins/deployment_manager/Migration';

interface Vars {};
const MULTISIG_ADDRESS = '0x3cb4653f3b45f448d9100b118b75a1503281d2ee';

export default migration('1732300459_deploy_rewards_v2', {
prepare: async (deploymentManager: DeploymentManager) => {
return {};
async prepare(deploymentManager: DeploymentManager) {
const cometRewardsV2 = await deploymentManager.deploy(
'CometRewardsV2',
'CometRewardsV2.sol',
[
MULTISIG_ADDRESS, // The governor who will control the contract
]
);
return { cometRewardsV2Address: cometRewardsV2.address };
},

enact: async (deploymentManager: DeploymentManager, govDeploymentManager: DeploymentManager, vars: Vars) => {
// No governance changes
}
enact: async () => {
//
},

async enacted(): Promise<boolean> {
return false;
},

async verify(deploymentManager: DeploymentManager) {
const cometRewardsV2 = await deploymentManager.fromDep('CometRewardsV2', 'mainnet', 'usds');
expect(MULTISIG_ADDRESS.toLowerCase()).to.be.equal((await cometRewardsV2.governor()).toLowerCase());
},
});
29 changes: 23 additions & 6 deletions deployments/base/usdbc/migrations/1732300468_deploy_rewards_v2.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
import { expect } from 'chai';
import { DeploymentManager } from '../../../../plugins/deployment_manager/DeploymentManager';
import { migration } from '../../../../plugins/deployment_manager/Migration';

interface Vars {};
const MULTISIG_ADDRESS = '0x3cb4653f3b45f448d9100b118b75a1503281d2ee';

export default migration('1732300468_deploy_rewards_v2', {
prepare: async (deploymentManager: DeploymentManager) => {
return {};
async prepare(deploymentManager: DeploymentManager) {
const cometRewardsV2 = await deploymentManager.deploy(
'CometRewardsV2',
'CometRewardsV2.sol',
[
MULTISIG_ADDRESS, // The governor who will control the contract
]
);
return { cometRewardsV2Address: cometRewardsV2.address };
},

enact: async (deploymentManager: DeploymentManager, govDeploymentManager: DeploymentManager, vars: Vars) => {
// No governance changes
}
enact: async () => {
//
},

async enacted(): Promise<boolean> {
return false;
},

async verify(deploymentManager: DeploymentManager) {
const cometRewardsV2 = await deploymentManager.fromDep('CometRewardsV2', 'mainnet', 'usds');
expect(MULTISIG_ADDRESS.toLowerCase()).to.be.equal((await cometRewardsV2.governor()).toLowerCase());
},
});
29 changes: 23 additions & 6 deletions deployments/base/usdc/migrations/1732300475_deploy_rewards_v2.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
import { expect } from 'chai';
import { DeploymentManager } from '../../../../plugins/deployment_manager/DeploymentManager';
import { migration } from '../../../../plugins/deployment_manager/Migration';

interface Vars {};
const MULTISIG_ADDRESS = '0x3cb4653f3b45f448d9100b118b75a1503281d2ee';

export default migration('1732300475_deploy_rewards_v2', {
prepare: async (deploymentManager: DeploymentManager) => {
return {};
async prepare(deploymentManager: DeploymentManager) {
const cometRewardsV2 = await deploymentManager.deploy(
'CometRewardsV2',
'CometRewardsV2.sol',
[
MULTISIG_ADDRESS, // The governor who will control the contract
]
);
return { cometRewardsV2Address: cometRewardsV2.address };
},

enact: async (deploymentManager: DeploymentManager, govDeploymentManager: DeploymentManager, vars: Vars) => {
// No governance changes
}
enact: async () => {
//
},

async enacted(): Promise<boolean> {
return false;
},

async verify(deploymentManager: DeploymentManager) {
const cometRewardsV2 = await deploymentManager.fromDep('CometRewardsV2', 'mainnet', 'usds');
expect(MULTISIG_ADDRESS.toLowerCase()).to.be.equal((await cometRewardsV2.governor()).toLowerCase());
},
});
29 changes: 23 additions & 6 deletions deployments/base/weth/migrations/1732300480_deploy_rewards_v2.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
import { expect } from 'chai';
import { DeploymentManager } from '../../../../plugins/deployment_manager/DeploymentManager';
import { migration } from '../../../../plugins/deployment_manager/Migration';

interface Vars {};
const MULTISIG_ADDRESS = '0x3cb4653F3B45F448D9100b118B75a1503281d2ee';

export default migration('1732300480_deploy_rewards_v2', {
prepare: async (deploymentManager: DeploymentManager) => {
return {};
async prepare(deploymentManager: DeploymentManager) {
const cometRewardsV2 = await deploymentManager.deploy(
'CometRewardsV2',
'CometRewardsV2.sol',
[
MULTISIG_ADDRESS, // The governor who will control the contract
]
);
return { cometRewardsV2Address: cometRewardsV2.address };
},

enact: async (deploymentManager: DeploymentManager, govDeploymentManager: DeploymentManager, vars: Vars) => {
// No governance changes
}
enact: async () => {
//
},

async enacted(): Promise<boolean> {
return false;
},

async verify(deploymentManager: DeploymentManager) {
const cometRewardsV2 = await deploymentManager.fromDep('CometRewardsV2', 'mainnet', 'usds');
expect(MULTISIG_ADDRESS.toLowerCase()).to.be.equal((await cometRewardsV2.governor()).toLowerCase());
},
});

0 comments on commit b028b11

Please sign in to comment.