fix: use install_with_observer for B20Factory/PolicyRegistry precompiles#53
Open
stephancill wants to merge 1 commit into
Open
fix: use install_with_observer for B20Factory/PolicyRegistry precompiles#53stephancill wants to merge 1 commit into
stephancill wants to merge 1 commit into
Conversation
base/base dropped the plain install() shims for B20Factory and PolicyRegistryPrecompile in favour of the observed variants (only install_with_observer remains). Our inject_precompiles still called the removed B20Factory::install / PolicyRegistryPrecompile::install, so the patched base-anvil build failed with E0599 on base/base's fork-test CI. Switch both to install_with_observer with a no-op observer (metrics are scoped to the B-20 token call path, which anvil doesn't wire up), matching provider.rs. B20Factory::install_with_observer also takes the BaseUpgrade, so thread Beryl through like the lookup. Bump the base/base pin to current main (cc8ee38) so this compiles against the observer-only API. Co-authored-by: OpenCode <opencode-noreply@coinbase.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
base/base's fork-test CI (
base-std-fork-tests.yml) patches the local precompile crates into the pinned base-anvil and rebuildsanvil/forge. It now fails to compile on every base/base PR:base/base dropped the plain
install()shims forB20FactoryandPolicyRegistryPrecompilein favour of the observed variants (onlyinstall_with_observerremains). Ourinject_precompilesstill called the removedB20Factory::install/PolicyRegistryPrecompile::install.Solution
install_with_observerwith aNoopPrecompileCallObserver, matchingprovider.rs. Observation is scoped to the B-20 token call path (which anvil doesn't wire up), so a no-op observer is correct.B20Factory::install_with_observer(precompiles, upgrade, observer)also takes aBaseUpgrade, so threadBerylthrough like the lookup (ActivationRegistry::installandBerylLookup::installare unchanged and kept).401ffe4d → cc8ee38(currentmain) so this crate compiles against the observer-only API.Verified:
cargo check -p foundry-evm-networkscompiles clean againstmain.Context
Follows #50 (which threaded
BaseUpgradeinto the B-20 lookup). This is the same class of base/base API drift; addresses the newer removal of the plaininstallshims.PR Checklist