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§
Functions§
- abort
- Aborts the current contract execution without a custom message.
To include a message, use
crate::panic. - address_
balance - Returns
Balanceof the givenAddress - 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
Balanceof 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
eventis stored on chain. - gas_
left - Returns the amount of available
Gas - gas_
limit - Returns the total amount of
Gasthat 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
datato ‘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
trueif the contract has write permissions andfalseif it doesn’t. - transfer_
from_ caller - Transfers
amountof L1X tokens fromcaller_addresstocontract_instance_address - transfer_
to - Transfers
amountof L1X tokens fromcontract_instance_addressto the specified address
Attribute Macros§
- contract
- Walks over public methods and generates wrappers for each method it finds.