-
Notifications
You must be signed in to change notification settings - Fork 1
fix(test): assert ownership of the IN-USE production beacons per chain #266
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| // SPDX-License-Identifier: LicenseRef-DCL-1.0 | ||
| // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd | ||
| pragma solidity ^0.8.25; | ||
|
|
||
| import {LibProdDeployV1} from "./LibProdDeployV1.sol"; | ||
| import {LibProdDeployV4} from "../generated/LibProdDeployV4.sol"; | ||
|
|
||
| /// @title LibProdBeaconsBase | ||
| /// @notice The three ST0x production beacons on **Base** and the | ||
| /// implementations they point at — the Base counterpart of | ||
| /// `LibProdBeaconsEthereum`, same shape and index order so per-chain | ||
| /// consumers dispatch to one lib per chain instead of hand-assembling | ||
| /// either side. | ||
| /// @dev Base's production tokens run on the **V1-generation** beacon | ||
| /// addresses: deployed at V1, retained through every implementation upgrade | ||
| /// since (a beacon address is a per-chain deploy artifact that never | ||
| /// changes; only the implementation it serves is upgraded). Later-generation | ||
| /// beacon deploys on Base — the deterministic 0.1.1 Zoltu set among them — | ||
| /// exist on-chain but were never adopted by production and are deliberately | ||
| /// not represented here. | ||
| /// | ||
| /// No pasted addresses: the beacons reference the hand-pinned V1 constants | ||
| /// in `LibProdDeployV1`, and the implementations reference the generated | ||
| /// `0_1_1` impl pins (deterministic Zoltu deploys, the SAME addresses on | ||
| /// every chain) — the V4 upgrade pointed Base's V1-address beacons at those | ||
| /// 0.1.1 implementations. | ||
| library LibProdBeaconsBase { | ||
| /// @notice The three production beacons, in a fixed order (receipt, | ||
| /// receipt vault, wrapped token vault) — index-aligned with | ||
| /// `implementations()` and with `LibProdBeaconsEthereum.beacons()`. | ||
| /// @return The three Base beacon addresses. | ||
| function beacons() internal pure returns (address[3] memory) { | ||
| return [ | ||
| LibProdDeployV1.STOX_RECEIPT_BEACON_V1, | ||
| LibProdDeployV1.STOX_RECEIPT_VAULT_BEACON_V1, | ||
| LibProdDeployV1.STOX_WRAPPED_TOKEN_VAULT_BEACON_V1 | ||
| ]; | ||
| } | ||
|
|
||
| /// @notice The implementation each beacon points at, index-aligned with | ||
| /// `beacons()`. Referenced from the generated `0_1_1` impl pins — the | ||
| /// same deterministic addresses `LibProdBeaconsEthereum.implementations()` | ||
| /// resolves, because implementation parity across chains is the goal. | ||
| /// @return The three implementation addresses. | ||
| function implementations() internal pure returns (address[3] memory) { | ||
| return [ | ||
| LibProdDeployV4.STOX_RECEIPT_0_1_1, | ||
| LibProdDeployV4.STOX_RECEIPT_VAULT_0_1_1, | ||
| LibProdDeployV4.STOX_WRAPPED_TOKEN_VAULT_0_1_1 | ||
| ]; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.