| 1 | // SPDX-License-Identifier: MIT |
| 2 | // Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test |
| 3 | pragma solidity >=0.6.2 <0.9.0; |
| 4 | |
| 5 | library stdError { |
| 6 | bytes public constant assertionError = abi.encodeWithSignature("Panic(uint256)", 0x01); |
| 7 | bytes public constant arithmeticError = abi.encodeWithSignature("Panic(uint256)", 0x11); |
| 8 | bytes public constant divisionError = abi.encodeWithSignature("Panic(uint256)", 0x12); |
| 9 | bytes public constant enumConversionError = abi.encodeWithSignature("Panic(uint256)", 0x21); |
| 10 | bytes public constant encodeStorageError = abi.encodeWithSignature("Panic(uint256)", 0x22); |
| 11 | bytes public constant popError = abi.encodeWithSignature("Panic(uint256)", 0x31); |
| 12 | bytes public constant indexOOBError = abi.encodeWithSignature("Panic(uint256)", 0x32); |
| 13 | bytes public constant memOverflowError = abi.encodeWithSignature("Panic(uint256)", 0x41); |
| 14 | bytes public constant zeroVarError = abi.encodeWithSignature("Panic(uint256)", 0x51); |
| 15 | } |