Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(genesis): mainnet values in gen alloc and testing #443

Merged
merged 4 commits into from
Dec 18, 2024

Conversation

Ramarti
Copy link
Contributor

@Ramarti Ramarti commented Dec 17, 2024

  • Unifies Timelock initialization across chains
  • Refactor admin (if KEEP_TIMELOCK_ADMIN_ROLE = true)
  • Refactor chain ids into utils library
  • Sets min delay values in mainnet
  • Test upgrade of last Predeploy proxy and scheduling over min delay

issue: none

Copy link
Contributor

@0xHansLee 0xHansLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

contracts/script/utils/ChainIds.sol Outdated Show resolved Hide resolved
contracts/script/GenerateAlloc.s.sol Show resolved Hide resolved
address[] memory proposers = new address[](1);
proposers[0] = protocolAdmin;
address[] memory executors = new address[](1);
executors[0] = timelockExecutor;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it setting it to anyone can execute?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It allows having address(0) in env files so it's public

if (timelockExecutor == address(0)) {

contracts/script/GenerateAlloc.s.sol Show resolved Hide resolved
// Optionally allocate 10k test accounts for devnets/testnets
bool private constant ALLOCATE_10K_TEST_ACCOUNTS = false;
// Optionally keep the timelock admin role for testnets
bool private constant KEEP_TIMELOCK_ADMIN_ROLE = true;

/// @notice this call should only be available from Test.sol, for speed
function disableStateDump() external {
require(block.chainid == 31337, "Only for local tests");
require(block.chainid == ChainIds.FOUNDRY, "Only for local tests");
saveState = false;
}

/// @dev this call should only be available from Test.sol
function setAdminAddresses(address protocol, address executor, address guardian) external {
Copy link
Contributor

@jdubpark jdubpark Dec 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, we could write to internal storage slots directly in tests (but having setAdminAddresses in script doesn't impact performance or anything).

@limengformal limengformal merged commit e9da1b4 into main Dec 18, 2024
8 checks passed
@limengformal limengformal deleted the fix-gen-alloc branch December 18, 2024 11:04
Copy link

Binary uploaded successfully 🎉

📦 Version Name: 0.14.1-unstable-e9da1b4
📦 Download Source: AWS S3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants