ckb-script-error-codes

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

View the Project on GitHub

RGB++ lock Script Error Codes

RGB++ lock script implements the RGB++ protocol

16

ConfigNotFound

Can’t find the config cell from the cell_deps, ensure the RGB++ and BtcTimeLock config cells are referenced in the cell_deps.

17

ConfigMalformed

The config cell is found, but its invalid.

32

SpvClientNotFound

Can’t find Bitcoin SPV client cell from cell_deps.

33

SpvClientMalformed

Bitcoin SPV client cell is invalid.

34

SpvProofIncorrect

SPV proof is incorrect, please check the proof.

35

SpvProofMalformed

SPV proof itself is invalid.

48

BadBtcTx

Invalid btc_tx, the btc_tx should be bytes that can calculate txid by applying double sha256 on it, for example duoble_sha256(btc_tx).

49

BadRGBPPLock

Can’t parse RGBPPLock from cell’s lock script args.

50

BadBTCTimeLock

Can’t parse BadBTCTimeLock from cells’ lock script args.

51

BadBtcCommitment

Failed to extract RGB++ commitment from btc_tx.

52

BadRGBPPUnlock

Invalid RGBPPUnlock.

53

BadBTCTimeUnlock

Invalid BTCTimeUnlock.

64

OutputCellMismatch

When unlocking BtcTimeLock cells, the corresponding output cells are required, with the following conditions:

  1. The lock value should be equal to BtcTimeLock#lock_script.
  2. The capacity, type_, and data fields must remain unchanged.

65

OutputCellWithUnknownLock

The output cells in a RGB++ unlocking transaction must satisfy one of the following conditions:

  1. type_ is none, which means this cell isn’t a RGB++ assets.
  2. lock is RGB++, which means this cell is a RGB++ cell.
  3. lock is BtcTimeLock, which means this cell is withdrawing RGB++ assets.

66

CommitmentMismatch

This error raised in the following situations:

  1. The calculated commitment does not match the btc_tx commitment.
  2. There are inputs or outputs that have a type_, but they are not covered by the commitment.

67

UnknownCommitmentVersion

The commitment version is unknown.

68

UtxoSealMismatch

Can’t find the UTXO seal from btc_tx.