CadenceHelper is a VS Code extension that automatically updates all Cadence import addresses (import ContractName from 0x...) across your project using the address aliases defined in your project's flow.json.
This makes switching between emulator, testnet, mainnet, or any other configured network fast and error-free.
Select a network (emulator, testnet, mainnet, etc.) and CadenceHelper updates all relevant import statements across your workspace.
Example:
import ContractX from 0xf8d6e05860000000After switching to testnet:
import HeroManager from 0xc6e616f1e5000000CadenceHelper parses your project's flow.json and extracts:
contracts[*].aliasesdependencies[*].aliases- fallback formats like
network://address.ContractName
Example:
"contracts": {
"ContractX": {
"aliases": {
"emulator": "f8d6e05860000000",
"testnet": "c6e616f1e5000000"
}
}
}All Cadence files in your project are updated automatically. By default, CadenceHelper scans:
**/*.cdc
**/*.cadence
Before import updates are finalized, you can choose:
- Apply now
- Preview changes
- Cancel
Preview mode shows all modified files and lets you decide whether to keep or revert the changes.
If a contract import does not have an alias for the chosen network:
- The original import is left unchanged.
- A report is shown listing all contracts missing address mappings.
The VS Code status bar displays the currently selected network. Clicking it reopens the network switch dialog.
CadenceHelper stores the last active network and uses it automatically when switching again.
When multiple workspace folders are open, CadenceHelper prompts the user to select which folder to apply updates to.
- A Flow project containing a
flow.jsonfile in the workspace root. - Cadence files that use import syntax of the form:
import ContractName from 0x1234567890abcdefCadenceHelper contributes the following settings:
Glob patterns used to discover Cadence files.
Default:
["**/*.cdc", "**/*.cadence"]Path or name of the Flow configuration file.
Default:
"flow.json"- Multi-import syntax such as
import A, B from 0x...is not currently supported. - Unusual or non-standard address formats in
flow.jsonmay not parse correctly.