You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.0 KiB
33 lines
1.0 KiB
// https://docs.soliditylang.org/en/v0.8.16/control-structures.html#panic-via-assert-and-error-via-require
|
|
export const panicReasons = {
|
|
1: 'An `assert` condition failed.',
|
|
17: 'Arithmetic operation resulted in underflow or overflow.',
|
|
18: 'Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).',
|
|
33: 'Attempted to convert to an invalid type.',
|
|
34: 'Attempted to access a storage byte array that is incorrectly encoded.',
|
|
49: 'Performed `.pop()` on an empty array',
|
|
50: 'Array index is out of bounds.',
|
|
65: 'Allocated too much memory or created an array which is too large.',
|
|
81: 'Attempted to call a zero-initialized variable of internal function type.',
|
|
};
|
|
export const solidityError = {
|
|
inputs: [
|
|
{
|
|
name: 'message',
|
|
type: 'string',
|
|
},
|
|
],
|
|
name: 'Error',
|
|
type: 'error',
|
|
};
|
|
export const solidityPanic = {
|
|
inputs: [
|
|
{
|
|
name: 'reason',
|
|
type: 'uint256',
|
|
},
|
|
],
|
|
name: 'Panic',
|
|
type: 'error',
|
|
};
|
|
//# sourceMappingURL=solidity.js.map
|