Header Files¶
symbol.hpp¶
#include <eosio/symbol.hpp>
-
class
eosio
::
symbol_code
¶
[source] Information about a token symbol, the symbol can be up to 7 characters long.
Example:
auto symbol_code = eosio::symbol_code("EOS");
-
symbol_code
(std::string_view str)¶ Construct a new
symbol_code
initialising value withstr
-
symbol_code
(uint64_t raw)¶ Construct a new
symbol_code
initialising value withraw
-
std::string
to_string
()¶ Returns the symbol name as a string
-
uint64_t
raw
()¶ Returns the raw
uint64_t
value for the symbol
-
friend bool
operator==
(const symbol_code &a, const symbol_code &b)¶
-
friend bool
operator!=
(const symbol_code &a, const symbol_code &b)¶
-
friend bool
operator<
(const symbol_code &a, const symbol_code &b)¶
-
private uint64_t
value
¶ Stores the symbol code as a
uint64_t
value
-
-
class
eosio
::
symbol
¶
[source] Used to define a token’s
symbol_code
andprecision
(digits after the decimal).Example:
auto symbol = eosio::asset("10.0000 EOS").symbol; symbol.code(); // eosio::symbol_code("EOS") symbol.precision(); // 4
For example,
10.0000 EOS
has symbol_code EOS and precision 4. Asymbol
can be written as{precision},{symbol}
(in above example,4,EOS
).-
symbol
(eosio::symbol_code sc, uint8_t precision)¶
-
symbol
(std::string_view sc, uint8_t precision)¶
-
eosio::symbol_code
code
()¶
-
uint8_t
precision
()¶
-
-
class
eosio
::
extended_symbol
¶
[source] A type of token is created by the
token::create()
action. The same contract account cannotcreate
two types of tokens with the samesymbol
, but two different accounts deployed with the sameeosio.token
contract can create separate tokens with identicalsymbol
.To prevent such vulnerability, a
extended_symbol
s could be equal but represent two different tokens.-
int64_t
amount
= 0¶
-
int64_t
asset.hpp¶
#include <eosio/asset.hpp>
name.hpp¶
#include <eosio/name.hpp>
-
struct
eosio
::
name
¶
[source] Mainly used to represent an EOSIO account name. Name string can only have small letters a-z, digits 1-5 or dot, and max 12 characters. The name is saved as a
uint64_t
.-
name
(std::string_view str)¶ Construct a new
name
initialising value withstr
-
name
(uint64_t raw)¶ Construct a new
name
initialising value withraw
-
std::string
to_string
()¶ Returns the name as a string
-
uint64_t
raw
()¶ Returns the raw
uint64_t
value for the name
-
private uint64_t
value
¶ Stores the name as a
uint64_t
value
-
time.hpp¶
#include <eosio/time.hpp>
-
class
eosio
::
microseconds
¶
[source] Microseconds.
-
microseconds
(int64_t count = 0)¶
-
static microseconds
maximum
()¶ Maximum
0x7fffffffffffffffll
-
int64_t
count
()¶
-
int64_t
to_seconds
()¶
-
int64_t
_count
¶ The value used in serialization
-
-
inline microseconds
eosio
::
milliseconds
(int64_t ms)¶
[source]
-
inline microseconds
eosio
::
seconds
(int64_t s)¶
[source]
-
inline microseconds
eosio
::
minutes
(int64_t m)¶
[source]
-
inline microseconds
eosio
::
hours
(int64_t h)¶
[source]
-
inline microseconds
eosio
::
days
(int64_t d)¶
[source]
-
class
eosio
::
time_point
¶
[source] High resolution time point in microseconds.
-
time_point
(microseconds elapsed = microseconds())¶
-
microseconds &
time_since_epoch
()¶
-
uint32_t
sec_since_epoch
()¶
-
microseconds
elapsed
¶ The value used in serialization
-
-
class
eosio
::
time_point_sec
¶
[source] A lower resolution time_point accurate only to seconds from 1970.
-
time_point_sec
()¶
-
explicit
time_point_sec
(uint32_t seconds)¶
-
time_point_sec
(const time_point &t)¶
-
time_point_sec
maximum
()¶ Maximum
time_point_sec(0xffffffff)
-
time_point_sec
min
()¶ Minimum
time_point_sec(0)
-
uint32_t
sec_since_epoch
()¶ Returns
utc_seconds
-
uint32_t
utc_seconds
¶ The value used in serialization
-