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

nest upgrade script: add more checks to deployment, remove test & get private key from env. #94

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ungaro
Copy link
Contributor

@ungaro ungaro commented Nov 12, 2024

…ironment

What's new in this PR?

add more checks to deployment, remove test & get private key from env…

Why?

What problem does this solve?
Why is this important?
What's the context?

@ungaro ungaro requested a review from eyqs November 12, 2024 21:50
Copy link
Member

@eyqs eyqs left a comment

Choose a reason for hiding this comment

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

LGTM

UUPSUpgradeable private constant AGGREGATE_TOKEN_PROXY =
UUPSUpgradeable(payable(0x659619AEdf381c3739B0375082C2d61eC1fD8835));

function test() public { }
Copy link
Member

Choose a reason for hiding this comment

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

I think we should keep the test() so it doesn't show up in forge coverage as untested?


AGGREGATE_TOKEN_PROXY.upgradeToAndCall(address(newAggregateTokenImpl), "");
console2.log("Upgrade completed successfully");
} else {
Copy link
Member

Choose a reason for hiding this comment

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

It should already automatically fail because vm.startBroadcast(NEST_ADMIN_ADDRESS); will say you haven't unlocked NEST_ADMIN_ADDRESS

vm.load(
address(AGGREGATE_TOKEN_PROXY),
// ERC1967 IMPLEMENTATION storage slot
0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc
Copy link
Member

Choose a reason for hiding this comment

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

Can you make this into a constant? bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)

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.

2 participants