Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Solidity Contract FlattenerNew to Visual Studio Code? Get it now.
Solidity Contract Flattener

Solidity Contract Flattener

tintinweb

|
142,183 installs
| (1) | Free
Flatten Solidity Contracts using truffle-flattener
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

get in touch with Consensys Diligence
[ 🌐 📩 🔥 ]

VSCode Solidity Contract Flattener

truffle-flattener context menu integration for vscode.

Adds a context menu to flatten solidity contracts from truffle projects:

  • NOTE/REQUIRED: Make sure you've installed truffle and the project's dependencies (npm install).
  • select files, right-click -> Solidity: flatten selected file(s)
  • or cmd + shift + p -> Solidity Flattener - flatten current file.
context-menu

Developers

truffle-flattener.contextMenu.flatten can be called by any other extension as following:

  • files .. an array of files to flatten
  • callback .. function to be called as callback(string:filepath, string:truffle-path, string:flattened_contract) on flatten success
  • showErrors .. enable or suppress vscode info/error notifications

 vscode.commands.executeCommand("vscode-solidity-flattener.flatten", {files: files, callback:callback, showErrors:showErrors})
        .catch(error =>{
            // command not available
            vscode.window.showWarningMessage("Error running `tintinweb.vscode-solidity-flattener`. Please make sure the extension is installed.\n" + error)
        })

Credits

  • truffle-flattener

Release Notes

see CHANGELOG


  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft