-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathFVMErrors.sol
More file actions
41 lines (36 loc) · 1.69 KB
/
FVMErrors.sol
File metadata and controls
41 lines (36 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// SPDX-License-Identifier: Apache-2.0 OR MIT
pragma solidity ^0.8.30;
// See filecoin-project/ref-fvm shared/src/error/mod.rs
int256 constant EXIT_SUCCESS = 0;
// Syscall error numbers (negative exit codes, ErrorNumber in ref-fvm)
// @dev A syscall parameters was invalid.
int256 constant ILLEGAL_ARGUMENT = -1;
// @dev The actor is not in the correct state to perform the requested operation.
int256 constant ILLEGAL_OPERATION = -2;
// @dev This syscall would exceed some system limit (memory, lookback, call depth, etc.).
int256 constant LIMIT_EXCEEDED = -3;
// @dev A system-level assertion has failed.
int256 constant ASSERTION_FAILED = -4;
// @dev There were insufficient funds to complete the requested operation.
int256 constant INSUFFICIENT_FUNDS = -5;
// @dev A resource was not found.
int256 constant NOT_FOUND = -6;
// @dev The specified IPLD block handle was invalid.
int256 constant INVALID_HANDLE = -7;
// @dev The requested CID shape (multihash codec, multihash length) isn't supported.
int256 constant ILLEGAL_CID = -8;
// @dev The requested IPLD codec isn't supported.
int256 constant ILLEGAL_CODEC = -9;
// @dev The IPLD block did not match the specified IPLD codec.
int256 constant SERIALIZATION = -10;
// @dev The operation is forbidden.
int256 constant FORBIDDEN = -11;
// @dev The passed buffer is too small.
int256 constant BUFFER_TOO_SMALL = -12;
// @dev The actor is executing in a read-only context.
int256 constant READ_ONLY = -13;
// Actor user exit codes (positive, ExitCode in fvm_shared::error)
// See https://docs.rs/fvm_shared/latest/fvm_shared/error/struct.ExitCode.html
uint32 constant USR_NOT_FOUND = 14;
uint32 constant USR_ILLEGAL_ARGUMENT = 16;
uint32 constant USR_UNHANDLED_MESSAGE = 22;