Crate veles_casper_ffi_shim

Crate veles_casper_ffi_shim 

Source
Expand description

FFI shim for Casper host functions.

This module provides a Foreign Function Interface (FFI) layer that allows smart contract code to run under any host target architecture. It defines the necessary set of functions to avoid undefined symbol when (for example) trying to run unit tests within your smart contract code.

There is some support for stubbing the host i.e. put_key/get_key/remove_key/has_key does implement a simple in-memory key-value store. However, most functions are just stubs that log their invocation and return default values.

Importing this makes rust-analyzer happy.

Structs§

Env
EnvBuilder
EnvImpl
RevertError

Enums§

HostFunction

Functions§

casper_add
casper_add_associated_key
casper_add_contract_version
casper_add_contract_version_with_message_topics
casper_add_package_version_with_message_topics
casper_blake2bDeprecated
casper_call_contract
casper_call_package_version
casper_call_versioned_contract
casper_create_contract_package_at_hash
casper_create_contract_user_group
casper_create_purse
casper_dictionary_get
casper_dictionary_put
Inserts a key-value pair into the specified dictionary.
casper_dictionary_read
casper_disable_contract_version
casper_emit_message
casper_enable_contract_version
casper_generic_hash
casper_get_balance
casper_get_block_info
casper_get_blocktime
casper_get_caller
casper_get_key
casper_get_main_purse
casper_get_named_arg
casper_get_named_arg_size
casper_get_phase
casper_get_system_contract
casper_has_key
casper_is_valid_uref
casper_load_authorization_keys
casper_load_call_stackDeprecated
casper_load_caller_information
casper_load_named_keys
casper_manage_message_topic
casper_new_dictionary
Creates a new dictionary and returns its URef in the host buffer.
casper_new_uref
casper_print
casper_provision_contract_user_group_uref
casper_put_key
casper_random_bytes
casper_read_host_buffer
casper_read_value
casper_recover_secp256k1
casper_remove_associated_key
casper_remove_contract_user_group
casper_remove_contract_user_group_urefs
casper_remove_key
casper_ret
casper_revert
casper_set_action_threshold
casper_transfer_from_purse_to_account
casper_transfer_from_purse_to_purse
casper_transfer_to_account
casper_update_associated_key
casper_verify_signature
casper_write
check_revert
Check if a revert occurred and return the error if it did
clear_revert
Clear any pending revert error
dispatch_with