Skip to content

Commit

Permalink
wip: to be recommited
Browse files Browse the repository at this point in the history
  • Loading branch information
rkolpakov committed Jan 21, 2025
1 parent 357ea77 commit f85b386
Show file tree
Hide file tree
Showing 9 changed files with 352 additions and 224 deletions.
8 changes: 8 additions & 0 deletions scripts/permissions-migration/aragon-permissions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"where": "0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034",
"what": "0xa42eee1333c0758ba72be38e728b6dadb32ea767de5b4ddbaea1dae85b1b051f",
"who": "0xE92329EC7ddB11D25e25b3c21eeBf11f15eB325d",
"granted": true
}
]
300 changes: 150 additions & 150 deletions scripts/permissions-migration/config/agent-transfer-permissions-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,161 +10,161 @@ export const ARAGON_CONTRACT_ROLES_CONFIG: AragonContractPermissionConfigs = {
Lido: {
address: LIDO_CONTRACTS.Lido,
permissions: {
STAKING_CONTROL_ROLE: { manager: "None" },
RESUME_ROLE: { manager: "None" },
PAUSE_ROLE: { manager: "None" },
UNSAFE_CHANGE_DEPOSITED_VALIDATORS_ROLE: { manager: "None" },
STAKING_PAUSE_ROLE: { manager: "None" },
STAKING_CONTROL_ROLE: { manager: "None", grantedTo: ["Agent"] },
// RESUME_ROLE: { manager: "None" },
// PAUSE_ROLE: { manager: "None" },
// UNSAFE_CHANGE_DEPOSITED_VALIDATORS_ROLE: { manager: "None" },
// STAKING_PAUSE_ROLE: { manager: "None" },
},
},

// Oracle Contracts
LegacyOracle: {
address: LIDO_CONTRACTS.LegacyOracle,
permissions: {},
},
// LegacyOracle: {
// address: LIDO_CONTRACTS.LegacyOracle,
// permissions: {},
// },

// DAO Contracts
DAOKernel: {
address: LIDO_CONTRACTS.DAOKernel,
permissions: {
APP_MANAGER_ROLE: { manager: "Agent" },
},
},
Voting: {
address: LIDO_CONTRACTS.Voting,
permissions: {
UNSAFELY_MODIFY_VOTE_TIME_ROLE: { manager: "Voting" },
MODIFY_QUORUM_ROLE: { manager: "Voting", grantedTo: ["Voting"] },
MODIFY_SUPPORT_ROLE: { manager: "Voting", grantedTo: ["Voting"] },
CREATE_VOTES_ROLE: { manager: "Voting", grantedTo: ["TokenManager"] },
},
},
TokenManager: {
address: LIDO_CONTRACTS.TokenManager,
permissions: {
ISSUE_ROLE: { manager: "Voting" },
ASSIGN_ROLE: { manager: "Voting", grantedTo: ["Voting"] },
BURN_ROLE: { manager: "Voting" },
MINT_ROLE: { manager: "Voting" },
REVOKE_VESTINGS_ROLE: { manager: "Voting" },
},
},
Finance: {
address: LIDO_CONTRACTS.Finance,
permissions: {
CREATE_PAYMENTS_ROLE: {
manager: "Voting",
grantedTo: ["Voting", "EasyTrackEvmScriptExecutor"],
},
CHANGE_PERIOD_ROLE: { manager: "Voting" },
CHANGE_BUDGETS_ROLE: { manager: "Voting" },
EXECUTE_PAYMENTS_ROLE: { manager: "Voting", grantedTo: ["Voting"] },
MANAGE_PAYMENTS_ROLE: { manager: "Voting", grantedTo: ["Voting"] },
},
},
Agent: {
address: LIDO_CONTRACTS.Agent,
permissions: {
ADD_PROTECTED_TOKEN_ROLE: { manager: "Voting" },
REMOVE_PROTECTED_TOKEN_ROLE: { manager: "Voting" },
TRANSFER_ROLE: { manager: "Voting", grantedTo: ["Finance"] },
RUN_SCRIPT_ROLE: {
manager: "DualGovernance",
grantedTo: ["DualGovernance"],
},
SAFE_EXECUTE_ROLE: { manager: "None" },
DESIGNATE_SIGNER_ROLE: { manager: "Voting" },
EXECUTE_ROLE: {
manager: "DualGovernance",
grantedTo: ["DualGovernance"],
},
ADD_PRESIGNED_HASH_ROLE: { manager: "Voting" },
},
},
ACL: {
address: LIDO_CONTRACTS.ACL,
permissions: { CREATE_PERMISSIONS_ROLE: { manager: "Agent" } },
},
AragonPM: {
address: LIDO_CONTRACTS.AragonPM,
permissions: {
CREATE_REPO_ROLE: { manager: "None" },
},
},
EVMScriptRegistry: {
address: LIDO_CONTRACTS.EVMScriptRegistry,
permissions: {
REGISTRY_ADD_EXECUTOR_ROLE: { manager: "None" },
REGISTRY_MANAGER_ROLE: { manager: "None" },
},
},
VotingRepo: {
address: LIDO_CONTRACTS.VotingRepo,
permissions: {
CREATE_VERSION_ROLE: { manager: "None" },
},
},
LidoRepo: {
address: LIDO_CONTRACTS.LidoRepo,
permissions: {
CREATE_VERSION_ROLE: { manager: "None" },
},
},
LegacyOracleRepo: {
address: LIDO_CONTRACTS.LegacyOracleRepo,
permissions: {
CREATE_VERSION_ROLE: { manager: "None" },
},
},
CuratedModuleRepo: {
address: LIDO_CONTRACTS.CuratedModuleRepo,
permissions: {
CREATE_VERSION_ROLE: { manager: "None" },
},
},
SimpleDVTRepo: {
address: LIDO_CONTRACTS.SimpleDVTRepo,
permissions: {
CREATE_VERSION_ROLE: { manager: "None" },
},
},
// Staking Modules
CuratedModule: {
address: LIDO_CONTRACTS.CuratedModule,
permissions: {
STAKING_ROUTER_ROLE: { manager: "Agent", grantedTo: ["StakingRouter"] },
MANAGE_NODE_OPERATOR_ROLE: { manager: "Agent", grantedTo: ["Agent"] },
SET_NODE_OPERATOR_LIMIT_ROLE: {
manager: "Agent",
grantedTo: ["EasyTrackEvmScriptExecutor"],
},
MANAGE_SIGNING_KEYS: {
manager: "Agent",
},
},
},
SimpleDVT: {
address: LIDO_CONTRACTS.SimpleDVT,
permissions: {
STAKING_ROUTER_ROLE: {
manager: "Agent",
grantedTo: ["StakingRouter", "EasyTrackEvmScriptExecutor"],
},
MANAGE_NODE_OPERATOR_ROLE: {
manager: "Agent",
grantedTo: ["EasyTrackEvmScriptExecutor"],
},
SET_NODE_OPERATOR_LIMIT_ROLE: {
manager: "Agent",
grantedTo: ["EasyTrackEvmScriptExecutor"],
},
MANAGE_SIGNING_KEYS: {
manager: "EasyTrackEvmScriptExecutor",
grantedTo: ["EasyTrackEvmScriptExecutor"],
},
},
},
// // DAO Contracts
// DAOKernel: {
// address: LIDO_CONTRACTS.DAOKernel,
// permissions: {
// APP_MANAGER_ROLE: { manager: "Agent" },
// },
// },
// Voting: {
// address: LIDO_CONTRACTS.Voting,
// permissions: {
// UNSAFELY_MODIFY_VOTE_TIME_ROLE: { manager: "Voting" },
// MODIFY_QUORUM_ROLE: { manager: "Voting", grantedTo: ["Voting"] },
// MODIFY_SUPPORT_ROLE: { manager: "Voting", grantedTo: ["Voting"] },
// CREATE_VOTES_ROLE: { manager: "Voting", grantedTo: ["TokenManager"] },
// },
// },
// TokenManager: {
// address: LIDO_CONTRACTS.TokenManager,
// permissions: {
// ISSUE_ROLE: { manager: "Voting" },
// ASSIGN_ROLE: { manager: "Voting", grantedTo: ["Voting"] },
// BURN_ROLE: { manager: "Voting" },
// MINT_ROLE: { manager: "Voting" },
// REVOKE_VESTINGS_ROLE: { manager: "Voting" },
// },
// },
// Finance: {
// address: LIDO_CONTRACTS.Finance,
// permissions: {
// CREATE_PAYMENTS_ROLE: {
// manager: "Voting",
// grantedTo: ["Voting", "EasyTrackEvmScriptExecutor"],
// },
// CHANGE_PERIOD_ROLE: { manager: "Voting" },
// CHANGE_BUDGETS_ROLE: { manager: "Voting" },
// EXECUTE_PAYMENTS_ROLE: { manager: "Voting", grantedTo: ["Voting"] },
// MANAGE_PAYMENTS_ROLE: { manager: "Voting", grantedTo: ["Voting"] },
// },
// },
// Agent: {
// address: LIDO_CONTRACTS.Agent,
// permissions: {
// ADD_PROTECTED_TOKEN_ROLE: { manager: "Voting" },
// REMOVE_PROTECTED_TOKEN_ROLE: { manager: "Voting" },
// TRANSFER_ROLE: { manager: "Voting", grantedTo: ["Finance"] },
// RUN_SCRIPT_ROLE: {
// manager: "DualGovernance",
// grantedTo: ["DualGovernance"],
// },
// SAFE_EXECUTE_ROLE: { manager: "None" },
// DESIGNATE_SIGNER_ROLE: { manager: "Voting" },
// EXECUTE_ROLE: {
// manager: "DualGovernance",
// grantedTo: ["DualGovernance"],
// },
// ADD_PRESIGNED_HASH_ROLE: { manager: "Voting" },
// },
// },
// ACL: {
// address: LIDO_CONTRACTS.ACL,
// permissions: { CREATE_PERMISSIONS_ROLE: { manager: "Agent" } },
// },
// AragonPM: {
// address: LIDO_CONTRACTS.AragonPM,
// permissions: {
// CREATE_REPO_ROLE: { manager: "None" },
// },
// },
// EVMScriptRegistry: {
// address: LIDO_CONTRACTS.EVMScriptRegistry,
// permissions: {
// REGISTRY_ADD_EXECUTOR_ROLE: { manager: "None" },
// REGISTRY_MANAGER_ROLE: { manager: "None" },
// },
// },
// VotingRepo: {
// address: LIDO_CONTRACTS.VotingRepo,
// permissions: {
// CREATE_VERSION_ROLE: { manager: "None" },
// },
// },
// LidoRepo: {
// address: LIDO_CONTRACTS.LidoRepo,
// permissions: {
// CREATE_VERSION_ROLE: { manager: "None" },
// },
// },
// LegacyOracleRepo: {
// address: LIDO_CONTRACTS.LegacyOracleRepo,
// permissions: {
// CREATE_VERSION_ROLE: { manager: "None" },
// },
// },
// CuratedModuleRepo: {
// address: LIDO_CONTRACTS.CuratedModuleRepo,
// permissions: {
// CREATE_VERSION_ROLE: { manager: "None" },
// },
// },
// SimpleDVTRepo: {
// address: LIDO_CONTRACTS.SimpleDVTRepo,
// permissions: {
// CREATE_VERSION_ROLE: { manager: "None" },
// },
// },
// // Staking Modules
// CuratedModule: {
// address: LIDO_CONTRACTS.CuratedModule,
// permissions: {
// STAKING_ROUTER_ROLE: { manager: "Agent", grantedTo: ["StakingRouter"] },
// MANAGE_NODE_OPERATOR_ROLE: { manager: "Agent", grantedTo: ["Agent"] },
// SET_NODE_OPERATOR_LIMIT_ROLE: {
// manager: "Agent",
// grantedTo: ["EasyTrackEvmScriptExecutor"],
// },
// MANAGE_SIGNING_KEYS: {
// manager: "Agent",
// },
// },
// },
// SimpleDVT: {
// address: LIDO_CONTRACTS.SimpleDVT,
// permissions: {
// STAKING_ROUTER_ROLE: {
// manager: "Agent",
// grantedTo: ["StakingRouter", "EasyTrackEvmScriptExecutor"],
// },
// MANAGE_NODE_OPERATOR_ROLE: {
// manager: "Agent",
// grantedTo: ["EasyTrackEvmScriptExecutor"],
// },
// SET_NODE_OPERATOR_LIMIT_ROLE: {
// manager: "Agent",
// grantedTo: ["EasyTrackEvmScriptExecutor"],
// },
// MANAGE_SIGNING_KEYS: {
// manager: "EasyTrackEvmScriptExecutor",
// grantedTo: ["EasyTrackEvmScriptExecutor"],
// },
// },
// },
};

export const OZ_CONTRACT_ROLES_CONFIG: OZContractRolesConfig = {
Expand Down
36 changes: 3 additions & 33 deletions scripts/permissions-migration/config/lido-contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type LidoContractName =
export const LIDO_CONTRACTS = {
// Core Protocol
LidoLocator: "0xC1d0b3DE6792Bf6b4b37EccdcC24e45978Cfd2Eb",
Lido: "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84",
Lido: "0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034",
StakingRouter: "0xFdDf38947aFB03C621C71b06C9C70bce73f12999",
DepositSecurityModule: "0xffa96d84def2ea035c7ab153d8b991128e3d72fd",
ExecutionLayerRewardsVault: "0x388C818CA8B9251b393131C08a736A67ccB19297",
Expand All @@ -31,11 +31,11 @@ export const LIDO_CONTRACTS = {

// DAO Contracts
DAOKernel: "0xb8FFC3Cd6e7Cf5a098A1c92F48009765B24088Dc",
Voting: "0x2e59A20f205bB85a89C53f1936454680651E618e",
Voting: "0xdA7d2573Df555002503F29aA4003e398d28cc00f ",
Agent: "0x3e40D73EB977Dc6a537aF587D48316feE66E9C8c",
TokenManager: "0xf73a1260d222f447210581DDf212D915c09a3249",
Finance: "0xB9E5CBB9CA5b0d659238807E84D0176930753d86",
ACL: "0x9895f0f17cc1d1891b6f18ee0b483b6f221b37bb",
ACL: "0xfd1E42595CeC3E83239bf8dFc535250e7F48E0bC",
AragonPM: "0x0cb113890b04b49455dfe06554e2d784598a29c9",
VotingRepo: "0x4ee3118e3858e8d7164a634825bfe0f73d99c792",
LidoRepo: "0xF5Dc67E54FC96F993CD06073f71ca732C1E654B1",
Expand Down Expand Up @@ -66,36 +66,6 @@ export const LIDO_CONTRACTS = {
EasyTrackEvmScriptExecutor: "0xFE5986E06210aC1eCC1aDCafc0cc7f8D63B3F977",

// Easy Track Factories for token transfers
LOLStETH_AllowedRecipientsRegistry:
"0x48c4929630099b217136b64089E8543dB0E5163a",
RewardsShareStETH_AllowedRecipientsRegistry:
"0xdc7300622948a7AdaF339783F6991F9cdDD79776",
LegoLDO_AllowedRecipientsRegistry:
"0x97615f72c3428A393d65A84A3ea6BBD9ad6C0D74",
LegoStablecoins_AllowedRecipientsRegistry:
"0xb0FE4D300334461523D9d61AaD90D0494e1Abb43",
RCCStableCoins_AllowedRecipientsRegistry:
"0xDc1A0C7849150f466F07d48b38eAA6cE99079f80",
RCCStETH_AllowedRecipientsRegistry:
"0xAAC4FcE2c5d55D1152512fe5FAA94DB267EE4863",
PMLStablecoins_AllowedRecipientsRegistry:
"0xDFfCD3BF14796a62a804c1B16F877Cf7120379dB",
PMLStETH_AllowedRecipientsRegistry:
"0x7b9B8d00f807663d46Fb07F87d61B79884BC335B",
ATCStablecoins_AllowedRecipientsRegistry:
"0xe07305F43B11F230EaA951002F6a55a16419B707",
ATCStETH_AllowedRecipientsRegistry:
"0xd3950eB3d7A9B0aBf8515922c0d35D13e85a2c91",
TRPLDO_AllowedRecipientsRegistry:
"0x231Ac69A1A37649C6B06a71Ab32DdD92158C80b8",
GasSupplyStETH_AllowedRecipientsRegistry:
"0x49d1363016aA899bba09ae972a1BF200dDf8C55F",
AllianceOpsStablecoins_AllowedRecipientsRegistry:
"0x3B525F4c059F246Ca4aa995D21087204F30c9E2F",
StonksStETH_AllowedRecipientsRegistry:
"0x1a7cFA9EFB4D5BfFDE87B0FaEb1fC65d653868C0",
StonksStablecoins_AllowedRecipientsRegistry:
"0x3f0534CCcFb952470775C516DC2eff8396B8A368",
AllowedTokensRegistry: "0x4AC40c34f8992bb1e5E856A448792158022551ca",

// Arbitrum
Expand Down
Loading

0 comments on commit f85b386

Please sign in to comment.