-
Notifications
You must be signed in to change notification settings - Fork 78
Improvements for Mainnet Forking Docs #1596
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
docs/blockchain-development-tutorials/cadence/emulator-fork-testing/index.md
Outdated
Show resolved
Hide resolved
docs/blockchain-development-tutorials/cadence/emulator-fork-testing/index.md
Show resolved
Hide resolved
docs/blockchain-development-tutorials/cadence/emulator-fork-testing/index.md
Outdated
Show resolved
Hide resolved
docs/blockchain-development-tutorials/cadence/emulator-fork-testing/index.md
Outdated
Show resolved
Hide resolved
docs/blockchain-development-tutorials/cadence/emulator-fork-testing/index.md
Outdated
Show resolved
Hide resolved
docs/blockchain-development-tutorials/cadence/emulator-fork-testing/index.md
Outdated
Show resolved
Hide resolved
docs/blockchain-development-tutorials/cadence/emulator-fork-testing/index.md
Outdated
Show resolved
Hide resolved
docs/blockchain-development-tutorials/cadence/emulator-fork-testing/index.md
Outdated
Show resolved
Hide resolved
docs/blockchain-development-tutorials/cadence/emulator-fork-testing/index.md
Show resolved
Hide resolved
docs/blockchain-development-tutorials/cadence/emulator-fork-testing/index.md
Show resolved
Hide resolved
docs/blockchain-development-tutorials/cadence/emulator-fork-testing/index.md
Show resolved
Hide resolved
docs/blockchain-development-tutorials/cadence/emulator-fork-testing/index.md
Outdated
Show resolved
Hide resolved
docs/blockchain-development-tutorials/cadence/emulator-fork-testing/index.md
Show resolved
Hide resolved
|
|
||
| Just like mocking dependencies in unit tests, you can **mock real mainnet contracts** by deploying modified versions—perfect for testing upgrades, bug fixes, or alternative implementations against real production state. | ||
|
|
||
| Configure the mock in `flow.json`, then deploy to the forked emulator. Your mock takes precedence while other contracts use real mainnet versions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we overriding FlowToken in this example? Can we provide the code for the mock contract and run it?
It can be simple.
docs/blockchain-development-tutorials/cadence/emulator-fork-testing/index.md
Outdated
Show resolved
Hide resolved
docs/blockchain-development-tutorials/cadence/emulator-fork-testing/index.md
Show resolved
Hide resolved
docs/blockchain-development-tutorials/cadence/emulator-fork-testing/index.md
Outdated
Show resolved
Hide resolved
briandoyle81
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great overall, requested some changes inline!
|
|
||
| # Interactive Testing with Forked Emulator | ||
|
|
||
| This tutorial teaches you how to run your app, E2E tests, and manual explorations against a snapshot of Flow mainnet using `flow emulator --fork`. You'll learn how to connect your frontend to production-like state, test user flows with real contracts and data, and debug issues interactively—all without deploying to a live network. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would explain the why forking here more
|
follow up PR here, still working on it but these comments have not been forgotten |
Closes #1595
Closes #1611