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
.
truffle-flattener.contextMenu.flatten
can be called by any other extension as following:
files
.. an array of files to flattencallback
.. function to be called ascallback(string:filepath, string:truffle-path, string:flattened_contract)
on flatten successshowErrors
.. 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)
})
see CHANGELOG