Skip to content

add bridge upgrade script#181

Merged
poszu merged 2 commits intomainfrom
bridge-upgrade-script
Mar 19, 2026
Merged

add bridge upgrade script#181
poszu merged 2 commits intomainfrom
bridge-upgrade-script

Conversation

@poszu
Copy link
Contributor

@poszu poszu commented Mar 11, 2026

Script to upgrade bridge proxy to new implementation

import {ITransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";

contract UpgradeBridge is Script {
/// @dev ERC-1967 admin slot: bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1)
Copy link
Collaborator

@ogabrielides ogabrielides Mar 19, 2026

Choose a reason for hiding this comment

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

I just don't understand why . Could you explain why?

Suggested change
/// @dev ERC-1967 admin slot: bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1)
/// @dev ERC-1967 admin slot: bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The upgradable proxy stores the address in specific storage slot and that's how the address of the slot is calculated. I changed that to use a constant from openzeppeling ERC1967.

@poszu poszu merged commit bf0f5fe into main Mar 19, 2026
8 of 9 checks passed
@poszu poszu deleted the bridge-upgrade-script branch March 19, 2026 11:12
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