olekon / justsmartcontracts

justsmartcontracts.dev source code
MIT License
62 stars 48 forks source link

Operation not listed when no outputs and ABI is missing "constant" key #6

Open TuxPaper opened 2 years ago

TuxPaper commented 2 years ago

ABIs with "Operation" functions that have no output ("outputs": []) do not show up in Operations tab. Possibly bug applies to only "nonpayable" stateMutability, but might include other states ("view" state shows the function, haven't checked others)

Workaround: Add "constant" : false to the ABI's functions that do not show up in "Operations" tab. JustSmartContracts will now show the operation in the Operations tab

The "constant" key in the ABI spec is now deprecated and removed since Solidity v0.6. See https://docs.soliditylang.org/en/v0.5.14/abi-spec.html under "Warning" section.