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§
Enums§
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_
blake2b ⚠Deprecated - 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_ stack Deprecated - 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