Crate l1x_sdk

Source

Re-exports§

pub use l1x_sys as sys;

Modules§

contract_interaction
store
Collections and types used when interacting with storage.
types
Basic types
utils

Enums§

TransferError

Functions§

abort
Aborts the current contract execution without a custom message. To include a message, use crate::panic.
address_balance
Returns Balance of the given Address
block_hash
Returns the hash of the current block
block_number
Returns the number of the current block
block_timestamp
Returns the timestamp of the current block
call_contract
Calls another contract
caller_address
Returns the address of the account or the contract that called the current contract.
contract_code_address_of
Returns the address of the contract code that is used for the given contract instance
contract_code_owner_address_of
Returns the address of the account that owns the given contract code
contract_instance_address
Returns the address of the current contract’s instance.
contract_instance_balance
Returns Balance of the current contract’s instance.
contract_owner_address
Returns the address of the account that owns the current contract.
contract_owner_address_of
Returns the address of the account that owns the given contract instance
deposit
Returns the deposit
emit_event_experimental
Emits the event. This event is stored on chain.
gas_left
Returns the amount of available Gas
gas_limit
Returns the total amount of Gas that is allowed the contract to burn out
input
The input to the contract call serialized as bytes. If input is not provided returns None.
msg
output
Writes data to ‘output’ register
panic
Terminates the execution of the program with the message.
setup_panic_hook
Setups panic hook to expose error info to the blockchain.
storage_read
Reads the value stored under the given key.
storage_remove
Removes the value stored under the given key.
storage_write
Writes key-value into storage.
storage_write_perm
Returns true if the contract has write permissions and false if it doesn’t.
transfer_from_caller
Transfers amount of L1X tokens from caller_address to contract_instance_address
transfer_to
Transfers amount of L1X tokens from contract_instance_address to the specified address

Attribute Macros§

contract
Walks over public methods and generates wrappers for each method it finds.