Writing smart contracts in Solidity is hard !
If you use Remix, you will quickly get errors displayed in the IDE, which will make you unable to compile and test your contract.
Most errors related to Solidity are not self explanatory. Mostly because they relate directly to the inner working of the EVM, a Virtual Machine quite complex to understand.
To fix your errors, several options:
- Googling the error message
- Posting your code and ask on community forums
- Trial and errors
We need an universal registry to lookup our Solidity errors messages and debug them efficiently.
The Solidity Debugger List is a curated list of all the Errors and Warning messages from the Solidity Compiler, including explanations about each messages.
The errors messages are categorised by core components, or variable types from the Solidity language.
Each error messages is listed with two code examples::
- bad code example (to generate the error)
- good code example (to solve the error)
This aim to help Ethereum smart contract developers to debug their Solidity code, whether they are using the Remix IDE or the solc
CLI tool.
The list is based on the official C++ source code from the Solidity compiler. All the errors and warnings listed in this website are referenced to the original source file + line number for better analysis. Such files include those located in the folder libsolidity/analysis
. Some explanations and solutions are provided to help debugging.