Skip to content

Commit

Permalink
feat: change the constant name
Browse files Browse the repository at this point in the history
  • Loading branch information
clauBv23 committed Mar 28, 2024
1 parent 7fc0e2c commit 79efa9a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/subgraph/src/plugin/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
ProposalCreated,
ProposalExecuted,
} from '../../generated/templates/Plugin/Admin';
import {EXECUTE_PROPOSAL_PERMISSION_HASH} from '../utils/constants';
import {EXECUTE_PROPOSAL_PERMISSION_ID} from '../utils/constants';
import {generateAdministratorAdminPluginEntityId} from '../utils/ids';
import {
generateActionEntityId,
Expand Down Expand Up @@ -110,6 +110,6 @@ export function handleMembershipContractAnnounced(
): void {
const context = new DataSourceContext();
context.setString('pluginAddress', event.address.toHexString());
context.setString('permissionId', EXECUTE_PROPOSAL_PERMISSION_HASH);
context.setString('permissionId', EXECUTE_PROPOSAL_PERMISSION_ID);
AdminMembers.createWithContext(event.params.definingContract, context);
}
2 changes: 1 addition & 1 deletion packages/subgraph/src/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// keccack256 of EXECUTE_PROPOSAL_PERMISSION
export const EXECUTE_PROPOSAL_PERMISSION_HASH =
export const EXECUTE_PROPOSAL_PERMISSION_ID =
'0xf281525e53675515a6ba7cc7bea8a81e649b3608423ee2d73be1752cea887889';
8 changes: 4 additions & 4 deletions packages/subgraph/tests/plugin/adminMembers.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Administrator, AdministratorAdminPlugin} from '../../generated/schema';
import {handleGranted, handleRevoked} from '../../src/plugin/adminMembers';
import {EXECUTE_PROPOSAL_PERMISSION_HASH} from '../../src/utils/constants';
import {EXECUTE_PROPOSAL_PERMISSION_ID} from '../../src/utils/constants';
import {generateAdministratorAdminPluginEntityId} from '../../src/utils/ids';
import {ADDRESS_ONE, ADDRESS_TWO, DAO_ADDRESS} from '../utils/constants';
import {createGrantedEvent, createRevokedEvent} from '../utils/events/plugin';
Expand All @@ -26,7 +26,7 @@ describe('AdminMembers', function () {

beforeEach(function () {
let context = new DataSourceContext();
context.setString('permissionId', EXECUTE_PROPOSAL_PERMISSION_HASH);
context.setString('permissionId', EXECUTE_PROPOSAL_PERMISSION_ID);
context.setString('pluginAddress', pluginEntityId);
dataSourceMock.setContext(context);
});
Expand All @@ -42,7 +42,7 @@ describe('AdminMembers', function () {

// create the event and handle it
let event = createGrantedEvent(
EXECUTE_PROPOSAL_PERMISSION_HASH,
EXECUTE_PROPOSAL_PERMISSION_ID,
DAO_ADDRESS,
pluginEntityId,
administratorEntityId
Expand Down Expand Up @@ -112,7 +112,7 @@ describe('AdminMembers', function () {

// create revoke event and handle it
let revokedEvent = createRevokedEvent(
EXECUTE_PROPOSAL_PERMISSION_HASH,
EXECUTE_PROPOSAL_PERMISSION_ID,
DAO_ADDRESS,
pluginEntityId,
administratorEntityId
Expand Down

0 comments on commit 79efa9a

Please sign in to comment.