Module ckb_std::syscalls

source ·

Re-exports

Structs

Functions

  • current_cyclesNon-simulator
    Current Cycles returns current cycle consumption just before executing this syscall. This syscall consumes 500 cycles.
  • debugNon-simulator
    Output debug message
  • execNon-simulator
    Exec runs an executable file from specified cell data in the context of an already existing machine, replacing the previous executable. The used cycles does not change, but the code, registers and memory of the vm are replaced by those of the new program. It’s cycles consumption consists of two parts:
  • exitNon-simulator
    Exit, this script will be terminated after the exit syscall. exit code 0 represents verification is success, others represent error code.
  • get_memory_limitNon-simulator and ckb2023
    Get memory limit. Note: available after ckb2023.
  • load_cellNon-simulator
    Load cell
  • load_cell_by_fieldNon-simulator
    Load cell by field
  • load_cell_codeNon-simulator
    Load cell code, read cell data as executable code
  • load_cell_dataNon-simulator
    Load cell data, read cell data
  • load_cell_data_rawNon-simulator
    Load cell data, read cell data
  • load_headerNon-simulator
    Load header
  • Load header by field
  • load_inputNon-simulator
    Load input
  • load_input_by_fieldNon-simulator
    Load input by field
  • load_scriptNon-simulator
    Load script
  • load_script_hashNon-simulator
    Load script hash
  • load_transactionNon-simulator
    Load transaction
  • load_tx_hashNon-simulator
    Load transaction hash
  • load_witnessNon-simulator
    Load witness
  • set_contentNon-simulator and ckb2023
    Set content. Note: available after ckb2023.
  • spawnNon-simulator and ckb2023
    The Spawn and the latter two syscalls: Get Memory Limit and Set Content together, implement a way to call another CKB Script in a CKB Script. Note: available after ckb2023.
  • vm_versionNon-simulator
    VM version syscall returns current running VM version, so far 2 values will be returned: