ckb-script-error-codes

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

View the Project on GitHub

Omnilock Script Error Codes

This is a lock script described in this RFC.

-1

ERROR_IDENTITY_ARGUMENTS_LEN

The length of signature or pubkey hash are incorrect.

-2

ERROR_ENCODING

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

-3

ERROR_IDENTITY_SYSCALL

There is an error when calling the syscall, specifically with ckb_load_witness.

-11

ERROR_IDENTITY_SECP_RECOVER_PUBKEY

There is an error while recovering pubkey from secp256k1 signature.

-14

ERROR_IDENTITY_SECP_PARSE_SIGNATURE

There is an error while parsing secp256k1 signature.

-15

ERROR_IDENTITY_SECP_SERIALIZE_PUBKEY

There is an error while serializing secp256k1 pubkey.

-22

ERROR_WITNESS_SIZE ERROR_INVALID_ELF

-23

ERROR_INCORRECT_SINCE_FLAGS ERROR_MEMORY_NOT_ENOUGH

-24

ERROR_INCORRECT_SINCE_VALUE ERROR_OUT_OF_BOUND

-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.

-31

ERROR_IDENTITY_PUBKEY_BLAKE160_HASH

While validating the secp256k1 signature against the message and pubkey hash, it doesn’t match. There are several possibilities for this issue:

-41

ERROR_INVALID_RESERVE_FIELD

There is an error in multisig: reserved field is incorrect.

-42

ERROR_INVALID_PUBKEYS_CNT

There is an error in multisig. The count of pubkey is zero.

-43

ERROR_INVALID_THRESHOLD

There is an error in multisig: count of threshold is incorrect.

-44

ERROR_INVALID_REQUIRE_FIRST_N

There is an error in multisig: count of first n is incorrect.

-51

ERROR_MULTSIG_SCRIPT_HASH

There is an error in multisig: the hash of the multisig_script does not match.

-52

ERROR_VERIFICATION

There is an error in multisig: a signature doesn’t match any of the provided public key.

-101

CKB_SECP256K1_HELPER_ERROR_LOADING_DATA

Can’t load precomputed secp256k1 table data from cell. Right now secp256k1’s code and data sections are separated in different cells, if a transaction doesn’t include the cell dep used to reference secp256k1’s data section, this would be returned.

-102

CKB_SECP256K1_HELPER_ERROR_ILLEGAL_CALLBACK

Illegal callback in secp256k1.

-103

CKB_SECP256K1_HELPER_ERROR_ERROR_CALLBACK

Error callback in secp256k1.

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 CKB_INVALID_DATA

There are several possibilities:

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.

46

ERROR_INVALID_MOL_FORMAT

In administrator mode, there is a molecule format error.

47

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

50

ERROR_RCRULES_TOO_DEEP

In administrator mode, too many nested rules are found.

51

ERROR_TOO_MANY_RCRULES

In administrator mode, too many rules are found.

52

ERROR_RCRULES_PROOFS_MISMATCHED

In administrator mode, the count of proof is not mismatched.

53

ERROR_SMT_VERIFY_FAILED

In administrator mode, the SMT verification fails.

54

ERROR_RCE_EMERGENCY_HALT

In administrator mode, the emergency halt occurs. It halts all transactions.

57

ERROR_ON_BLACK_LIST

In administrator mode, the address is on black list.

59

ERROR_NOT_ON_WHITE_LIST

In administrator mode, the address is not on white list.

70

ERROR_IDENTITY_LOCK_SCRIPT_HASH_NOT_FOUND

Unable to find the owner lock script hash while the owner lock is being used.

71

ERROR_IDENTITY_WRONG_ARGS

The signature length is incorrect.

72

ERROR_INVALID_PREIMAGE

The preimage length is incorrect.

74

ERROR_INVALID_ARG

The recovery ID in the BTC secp256k1 signature is invalid. It should be a value between 27 and 42.

75

ERROR_WRONG_STATE

There is a general error while recovering or serializing the public key in secp256k1.

80

ERROR_PROOF_LENGTH_MISMATCHED

In administrator mode, the proof length is mismatched.

82

ERROR_NO_OMNIRULE

In administrator mode, there is no rule.

83

ERROR_NO_WHITE_LIST

In administrator mode, there is no white list.

87

ERROR_ARGS_FORMAT

The format of script args is invalid.

90

ERROR_EXCEED_SUPPLY

In supply mode, the current supply exceeds the maximum supply.

91

ERROR_SUPPLY_AMOUNT

In supply mode, the issued UDT amount is larger than the supply amount delta.

92

ERROR_BURN

In supply mode, it’s not allowed to burn UDT.

93

ERROR_NO_INFO_CELL

In supply mode, either no valid info cell was found or more than one info cell was found.