Skip to content

Move FakeProvider to eth-json-rpc-provider (as FakeInternalProvider) - #10099

Draft
mcmire wants to merge 1 commit into
mainfrom
move-fake-provider-to-eth-json-rpc-provider
Draft

Move FakeProvider to eth-json-rpc-provider (as FakeInternalProvider)#10099
mcmire wants to merge 1 commit into
mainfrom
move-fake-provider-to-eth-json-rpc-provider

Conversation

@mcmire

@mcmire mcmire commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Explanation

FakeProvider is a class defined in a top-level test helper file which provides a mock implementation of the InternalProvider class in eth-json-rpc-provider. Because this file uses types from both eth-json-rpc-provider and network-controller, these dependencies need to be added to any packages that want to use FakeProvider — including controller-utils. That creates a strange situation, because controller-utils really ought not to depend on anything else.

To address this, then, we move FakeProvider — now MockInternalProvider — into eth-json-rpc-provider, and we change all callsites to match. We also remove the dependency on network-controller.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

@mcmire
mcmire force-pushed the move-fake-provider-to-eth-json-rpc-provider branch from 9605aa6 to 1c19f47 Compare September 3, 2026 18:53
@mcmire mcmire changed the title Move FakeProvider to eth-json-rpc-provider Move FakeProvider to eth-json-rpc-provider (as FakeInternalProvider) Sep 3, 2026
@mcmire
mcmire force-pushed the move-fake-provider-to-eth-json-rpc-provider branch 2 times, most recently from f5fb794 to d016f8a Compare September 3, 2026 19:49
`FakeProvider` is a class defined in a top-level test helper file which
provides a mock implementation of the `InternalProvider` class in
`eth-json-rpc-provider`. Because this file uses types from both
`eth-json-rpc-provider` and `network-controller`, these dependencies
need to be added to any packages that want to use `FakeProvider` —
including `controller-utils`. That creates a strange situation, because
`controller-utils` really ought not to depend on anything else.

To address this, then, we move `FakeProvider` — now
`MockInternalProvider` — into `eth-json-rpc-provider`, and we change all
callsites to match. We also remove the dependency on
`network-controller`.
@mcmire
mcmire force-pushed the move-fake-provider-to-eth-json-rpc-provider branch from d016f8a to 33756b5 Compare September 3, 2026 21:10
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.

1 participant