[−][src]Module casperlabs_contract_ffi::contract_api
Modules
argsparser | |
pointers |
Enums
PurseTransferResult | |
TransferResult |
Functions
add | Add the given value to the one currently under the key in the global state |
add_associated_key | Adds a public key with associated weight to an account. |
add_uref | Add the given key to the known_urefs map under the given name |
call_contract | Call the given contract, passing the given (serialized) arguments to
the host in order to have them available to the called contract during its
execution. The value returned from the contract call (see |
create_purse | |
fn_by_name | Returns the serialized bytes of a function which is exported in the current
module. Note that the function is wrapped up in a new module and re-exported
under the name "call". |
get_arg | Return the i-th argument passed to the host for the current module invocation. Note that this is only relevant to contracts stored on-chain since a contract deployed directly is not invoked with any arguments. |
get_balance | Gets the balance of a given purse |
get_blocktime | |
get_caller | Returns caller of current context. When in root context (not in the sub call) - returns None. When in the sub call - returns public key of the account that made the deploy. |
get_phase | |
get_uref | Return the unforgable reference known by the current module under the given name. This either comes from the known_urefs of the account or contract, depending on whether the current module is a sub-call or not. |
has_uref | Check if the given name corresponds to a known unforgable reference |
is_valid | Checks if all the keys contained in the given |
list_known_urefs | |
main_purse | |
new_uref | Returns a new unforgable pointer, where value is initialized to |
read | Read value under the key in the global state |
read_local | Reads the value at the given key in the context-local partition of global state |
remove_associated_key | Removes a public key from associated keys on an account |
remove_uref | Removes Key persisted under [name] in the current context's map. |
ret | Return |
revert | Stops execution of a contract and reverts execution effects with a given reason. |
set_action_threshold | |
store_function | Gets the serialized bytes of an exported function (see |
store_function_at | Finds function by the name and stores it at the unforgable name. |
transfer_from_purse_to_account | Transfers |
transfer_from_purse_to_purse | Transfers |
transfer_to_account | Transfers |
update_associated_key | Updates the value stored under a public key associated with an account |
write | Write the value under the key in the global state |
write_local | Writes the given value at the given key in the context-local partition of global state |