Skip to content

Commit

Permalink
feat: add trip roles for hexagate kms
Browse files Browse the repository at this point in the history
  • Loading branch information
ameeshaagrawal committed Jul 25, 2024
1 parent 597fc88 commit 68f97ce
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/deploy/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ export const ownerAddresses = {
[DeploymentMode.PROD]: "0xB0BBff6311B7F245761A7846d3Ce7B1b100C1836",
};

export const hexagateTripRoleOwners = {
[DeploymentMode.DEV]: "0x081871d78fe7c35c774ce3b4d4ba6592519db223",
[DeploymentMode.SURGE]: "0x081871d78fe7c35c774ce3b4d4ba6592519db223",
[DeploymentMode.PROD]: "0x081871d78fe7c35c774ce3b4d4ba6592519db223",
};

export const overrides = (
chain: ChainSlug | number
): {
Expand Down
14 changes: 14 additions & 0 deletions scripts/deploy/scripts/configureRoles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
watcherAddresses,
executorAddresses,
ownerAddresses,
hexagateTripRoleOwners,
} from "../config/config";
import { checkAndUpdateRoles } from "./roles";
import { sleep } from "@socket.tech/dl-common";
Expand All @@ -30,6 +31,7 @@ export const configureRoles = async (
let executorAddress = executorAddresses[mode];
let transmitterAddress = transmitterAddresses[mode];
let watcherAddress = watcherAddresses[mode];
let hexagateTripRoleOwner = hexagateTripRoleOwners[mode];

let summary: { params: any; roleStatus: any }[] = [];
let s;
Expand Down Expand Up @@ -134,6 +136,10 @@ export const configureRoles = async (
ROLES.FEES_UPDATER_ROLE,
],
},
{
userAddress: hexagateTripRoleOwner,
filterRoles: [ROLES.TRIP_ROLE],
},
{
userAddress: transmitterAddress,
filterRoles: [ROLES.FEES_UPDATER_ROLE],
Expand Down Expand Up @@ -170,6 +176,10 @@ export const configureRoles = async (
ROLES.FEES_UPDATER_ROLE,
],
},
{
userAddress: hexagateTripRoleOwner,
filterRoles: [ROLES.TRIP_ROLE],
},
{
userAddress: transmitterAddress,
filterRoles: [ROLES.FEES_UPDATER_ROLE], // all roles
Expand Down Expand Up @@ -206,6 +216,10 @@ export const configureRoles = async (
ROLES.FEES_UPDATER_ROLE,
], // all roles
},
{
userAddress: hexagateTripRoleOwner,
filterRoles: [ROLES.TRIP_ROLE],
},
{
userAddress: transmitterAddress,
filterRoles: [ROLES.FEES_UPDATER_ROLE], // all roles
Expand Down

0 comments on commit 68f97ce

Please sign in to comment.