Module imports

Source
Expand description

Conveniently groups all framework imports required by a smart contract form the framework.

Re-exports§

pub use crate::abi::TypeAbi;
pub use crate::api::ErrorApiImpl;
pub use crate::api::ManagedTypeApi;
pub use crate::api::VMApi;
pub use crate::contract_base::ContractBase;
pub use crate::contract_base::ProxyObjBase;
pub use crate::contract_base::ProxyObjNew;
pub use crate::err_msg;
pub use crate::io::*;
pub use crate::non_zero_util::*;
pub use crate::storage::mappers::*;
pub use crate::types::*;

Macros§

non_zero_usize
Converts usize to NonZeroUsize or returns SCError.
require
Allows us to write Solidity style require!(<condition>, <error_msg>) and avoid if statements.
sc_format
sc_panic
sc_print

Structs§

ArrayVec
A vector with a fixed capacity.
DecodeError
ESDTSystemSCProxy
Proxy for the ESDT system smart contract.
ESDTSystemSCProxyMethods
Method container of the ESDT system smart contract proxy.
ESDTSystemSmartContractProxyDeprecated
Proxy for the ESDT system smart contract. Unlike other contract proxies, this one has a fixed address, so the proxy object doesn’t really contain any data, it is more of a placeholder.
Empty
Empty structure with an empty bytes representation. Equivalent to false, 0 or [u8; 0], but more explicit.
FungibleTokenProperties
IgnoreValue
Structure that allows taking a variable number of arguments, but does nothing with them, not even deserialization.
MetaTokenProperties
MultiValue2
MultiValue3
MultiValue4
MultiValue5
MultiValue6
MultiValue7
MultiValue8
MultiValue9
MultiValue10
MultiValue11
MultiValue12
MultiValue13
MultiValue14
MultiValue15
MultiValue16
MultiValueVec
Structure that allows taking a variable number of arguments or returning a variable number of results in a smart contract endpoint.
NonFungibleTokenProperties
PlaceholderInput
Temporary value used for any kind of templates.
PlaceholderOutput
Temporary value used for any kind of templates.
SemiFungibleTokenProperties
TokenProperties
TokenPropertyArguments
Represents property arguments to be sent to the system SC.
UserBuiltinProxy
Proxy describing the user builtin function signatures.
UserBuiltinProxyMethods

Enums§

OptionalValue
A smart contract argument or result that can be missing.

Traits§

Add
The addition operator +.
AddAssign
The addition assignment operator +=.
BitAnd
The bitwise AND operator &.
BitAndAssign
The bitwise AND assignment operator &=.
BitOr
The bitwise OR operator |.
BitOrAssign
The bitwise OR assignment operator |=.
BitXor
The bitwise XOR operator ^.
BitXorAssign
The bitwise XOR assignment operator ^=.
Div
The division operator /.
DivAssign
The division assignment operator /=.
IntoMultiValue
Defines conversion of a type to its multi-value representation.
Mul
The multiplication operator *.
MulAssign
The multiplication assignment operator *=.
NestedDecode
Trait that allows zero-copy read of value-references from slices in LE format.
NestedEncode
Trait that allows zero-copy write of value-references to slices in LE format.
Rem
The remainder operator %.
RemAssign
The remainder assignment operator %=.
Shl
The left shift operator <<. Note that because this trait is implemented for all integer types with multiple right-hand-side types, Rust’s type checker has special handling for _ << _, setting the result type for integer operations to the type of the left-hand-side operand. This means that though a << b and a.shl(b) are one and the same from an evaluation standpoint, they are different when it comes to type inference.
ShlAssign
The left shift assignment operator <<=.
Shr
The right shift operator >>. Note that because this trait is implemented for all integer types with multiple right-hand-side types, Rust’s type checker has special handling for _ >> _, setting the result type for integer operations to the type of the left-hand-side operand. This means that though a >> b and a.shr(b) are one and the same from an evaluation standpoint, they are different when it comes to type inference.
ShrAssign
The right shift assignment operator >>=.
Sub
The subtraction operator -.
SubAssign
The subtraction assignment operator -=.
TopDecode
Trait that allows zero-copy read of values from an underlying API in big endian format.
TopEncode

Type Aliases§

IssueCall
The specific Tx type produces by the issue operations of the ESDTSystemSCProxy.