ckb-script-error-codes

This is a wiki to collect documentations about error codes returned by various ckb scripts.

View the Project on GitHub

xUDT

This is a type script described in this RFC.

-1

ERROR_ARGUMENTS_LEN

The length in args is incorrect.

-2

ERROR_ENCODING

There is an error while parsing data structure in molecule format. Or the length of cell data is too small.

-21

ERROR_SCRIPT_TOO_LONG

The script is too long.

-22

ERROR_INVALID_ELF

The dynamic library to be loaded is invalid.

-23

ERROR_MEMORY_NOT_ENOUGH

There is an error while loading dynamic library.

-24

ERROR_OUT_OF_BOUND

There is an overflow error while loading dynamic library.

-25

ERROR_INVALID_ARGS

There is an error while loading dynamic library.

-26

ERROR_ELF_NOT_ALIGNED

There is an alignment error while loading dynamic library.

-51

ERROR_OVERFLOWING

An overflow occurs during the summation.

-52

ERROR_AMOUNT

The sum of token counts on the output side is larger than on the input side. Some non-authorized tokens have been issued.

1

MOL_ERR_TOTAL_SIZE

There is an error while parsing data structure in molecule format.

2

MOL_ERR_HEADER

There is an error while parsing data structure in molecule format.

3

MOL_ERR_OFFSET

There is an error while parsing data structure in molecule format.

4

MOL_ERR_UNKNOWN_ITEM

There is an error while parsing data structure in molecule format.

5

MOL_ERR_INDEX_OUT_OF_BOUNDS

There is an error while parsing data structure in molecule format.

6

MOL_ERR_FIELD_COUNT

There is an error while parsing data structure in molecule format.

7

MOL_ERR_DATA

There is an error while parsing data structure in molecule format.

40

ERROR_CANT_LOAD_LIB

Can’t load extension script via dynamic library.

41

ERROR_CANT_FIND_SYMBOL

Can’t find exported symbol from dynamic library.

44

ERROR_INVALID_FLAG

The format of script args is wrong.

45

ERROR_INVALID_ARGS_FORMAT

The format of script args is wrong.

47

ERROR_INVALID_MOL_FORMAT

There is an error while parsing data structure in molecule format.

48

ERROR_BLAKE2B_ERROR

There is an error while performing blake2b hashing.

49

ERROR_HASH_MISMATCHED

The hash of extension scripts does not match.