Skip to content

Commit 57df6c9

Browse files
committed
refactor: more intuitive naming for executors, fix e2e tst
1 parent 9dc4c1f commit 57df6c9

File tree

6 files changed

+19
-14
lines changed

6 files changed

+19
-14
lines changed

contracts/pods/PodExecutor.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {CoreRef} from "../refs/CoreRef.sol";
88
/// @notice Executor gateway contract which exposes the execution of prepared timelock transactions and makes them public
99
/// @dev EXECUTOR_ROLE must be granted to this contract by the relevant timelock, in order for this contract to execute
1010
contract PodExecutor is CoreRef {
11-
event ExecuteTransaction(address timelock, bytes32 dataHash);
11+
event ExecuteTransaction(address timelock, bytes32 proposalId);
1212

1313
constructor(address _core) CoreRef(_core) {}
1414

proposals/dao/pod_exec_v2.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ const fipNumber = 'pod_executor_v2';
2323
// This should exclusively include new contract deployments
2424
const deploy: DeployUpgradeFunc = async (deployAddress: string, addresses: NamedAddresses, logging: boolean) => {
2525
const PodExecutorFactory = await ethers.getContractFactory('PodExecutor');
26-
const newPodExecutor = await PodExecutorFactory.deploy(addresses.core);
27-
await newPodExecutor.deployTransaction.wait();
28-
logging && console.log('Pod Executor deployed to: ', newPodExecutor.address);
26+
const podExecutor = await PodExecutorFactory.deploy(addresses.core);
27+
await podExecutor.deployTransaction.wait();
28+
logging && console.log('Pod Executor deployed to: ', podExecutor.address);
2929

3030
return {
31-
newPodExecutor
31+
podExecutor
3232
};
3333
};
3434

@@ -52,10 +52,10 @@ const validate: ValidateUpgradeFunc = async (addresses, oldContracts, contracts,
5252

5353
// 1. Validate new podExecutor has EXECUTOR role
5454
const EXECUTOR_ROLE = await tribalCouncilTimelock.EXECUTOR_ROLE();
55-
expect(await tribalCouncilTimelock.hasRole(EXECUTOR_ROLE, addresses.newPodExecutor)).to.be.true;
55+
expect(await tribalCouncilTimelock.hasRole(EXECUTOR_ROLE, addresses.podExecutor)).to.be.true;
5656

5757
// 2. Revoke old podExecutor EXECUTOR_ROLE
58-
expect(await tribalCouncilTimelock.hasRole(EXECUTOR_ROLE, addresses.podExecutor)).to.be.false;
58+
expect(await tribalCouncilTimelock.hasRole(EXECUTOR_ROLE, addresses.oldPodExecutor)).to.be.false;
5959
};
6060

6161
export { deploy, setup, teardown, validate };

proposals/description/pod_exec_v2.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const pod_executor_v2: TemplatedProposalDescription = {
99
method: 'grantRole(bytes32,address)',
1010
arguments: (addresses) => [
1111
'0xd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63', // EXECUTOR_ROLE
12-
addresses.newPodExecutor
12+
addresses.podExecutor
1313
],
1414
description: `
1515
Tribal Council timelock grants the new Pod Executor v2 contract
@@ -22,7 +22,7 @@ const pod_executor_v2: TemplatedProposalDescription = {
2222
method: 'revokeRole(bytes32,address)',
2323
arguments: (addresses) => [
2424
'0xd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63', // EXECUTOR_ROLE
25-
addresses.podExecutor
25+
addresses.oldPodExecutor
2626
],
2727
description: `
2828
Migrate Pod Executor contracts

protocol-configuration/mainnetAddresses.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,12 +2038,12 @@ const MainnetContractsConfig: MainnetContractsConfig = {
20382038
address: '0x84dc71500D504163A87756dB6368CC8bB654592f',
20392039
category: AddressCategory.Volt
20402040
},
2041-
podExecutor: {
2041+
oldPodExecutor: {
20422042
artifactName: 'PodExecutor',
20432043
address: '0x99d8b669F48A708f7C0373AF6CE31F0726ab6CaD',
20442044
category: AddressCategory.Deprecated
20452045
},
2046-
// newPodExecutor: {
2046+
// podExecutor: {
20472047
// artifactName: 'PodExecutor',
20482048
// address: '',
20492049
// category: AddressCategory.Governance

test/integration/tests/podExecutor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ describe('Pod executor', function () {
7575

7676
tcMultisigSigner = await getImpersonatedSigner(contractAddresses.tribalCouncilSafe);
7777
tribalCouncilTimelock = contracts.tribalCouncilTimelock as TimelockController;
78-
podExecutor = contracts.newPodExecutor as PodExecutor;
78+
podExecutor = contracts.podExecutor as PodExecutor;
7979

8080
// Setup Tribal Council timelock with DAI
8181
const daiWhale = '0x6B175474E89094C44Da98b954EedeAC495271d0F';

test/integration/tests/podOperation.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,19 @@ describe('Pod operation and veto', function () {
146146
// 3.0 Execute transaction on Safe
147147
const executeTxResponse = await safeSDK.executeTransaction(safeTransaction);
148148
await executeTxResponse.transactionResponse?.wait();
149+
150+
// 4.0 Grant new PodExecutor contract the EXECUTOR role
151+
const podTimelockSigner = await getImpersonatedSigner(podTimelock.address);
152+
const EXECUTOR_ROLE = await podTimelock.EXECUTOR_ROLE();
153+
await podTimelock.connect(podTimelockSigner).grantRole(EXECUTOR_ROLE, contractAddresses.podExecutor);
149154
});
150155

151156
it('should allow a proposal to be proposed and executed', async () => {
152157
// Fast forward time on timelock
153158
await time.increase(podConfig.minDelay);
154159

155160
// Execute timelocked transaction - need to call via the podExecutor
156-
const podExecutor = contracts.newPodExecutor;
161+
const podExecutor = contracts.podExecutor;
157162
const executeTx = await podExecutor.execute(
158163
timelockAddress,
159164
contractAddresses.governanceMetadataRegistry,
@@ -257,7 +262,7 @@ describe('Pod operation and veto', function () {
257262
// Fast forward time on timelock
258263
await time.increase(tribeCouncilPodConfig.minDelay);
259264

260-
const podExecutor = contracts.newPodExecutor;
265+
const podExecutor = contracts.podExecutor;
261266
const executeTx = await podExecutor.execute(
262267
tribalCouncilTimelock.address,
263268
contractAddresses.roleBastion,

0 commit comments

Comments
 (0)