juanfranblanco / vscode-solidity

Visual Studio Code language support extension for Solidity smart contracts in Ethereum https://marketplace.visualstudio.com/items?itemName=JuanBlanco.solidity
MIT License
892 stars 191 forks source link

Feature Request: Display event/function/error 4-byte signatures #415

Open RyanRHall opened 1 year ago

RyanRHall commented 1 year ago

This happens to me all the time, I have to manually figure out what one of the 4 byte signatures is for one of my functions/events/errors. This is an absolute pita, but I usually do something like this...

// some ts script using ethers and typechain
console.log(
  ethers.utils.id(
    myContract.interface.functions['myFunction(uint,bytes)'].format('sighash'),
  )
)

I would find it absolutely amazing if the popup that the extension displays when hovering over a function/event/error would display the 4 byte signature. Thanks you for considering!!! <3

Screenshot_20230808_145718