TARAXA
taraxa::util::EncodingSolidity Class Reference

#include <encoding_solidity.hpp>

Collaboration diagram for taraxa::util::EncodingSolidity:

Static Public Member Functions

template<typename... Params>
static bytes packFunctionCall (const std::string &function, const Params &... args)
 PACKING ///. More...
 
template<typename... Params>
static bytes pack (const Params &... args)
 
template<unsigned N, std::enable_if_t<(N<=32)> * = nullptr>
static bytes packElemement (dev::FixedHash< N > hash)
 
template<typename T , std::enable_if_t< std::numeric_limits< T >::is_integer > * = nullptr>
static bytes packElemement (T num)
 
static bytes packElemement (bool flag)
 
static bytes packElemement (const bytes &value)
 
template<typename... Params>
static void staticUnpack (const bytes &input, Params &... args)
 PACKING ///. More...
 
static void unpackElement (const bytes &input, u256 &out)
 
template<typename T , std::enable_if_t< std::numeric_limits< T >::is_integer > * = nullptr>
static void unpackElement (const bytes &input, T &out)
 
template<unsigned N, std::enable_if_t<(N<=32)> * = nullptr>
static void unpackElement (const bytes &input, dev::FixedHash< N > &hash)
 
static bytes getFunction (const std::string &function)
 UNPACKING ///. More...
 

Static Public Attributes

static constexpr uint8_t kStartPrefix = 32
 
static constexpr uint8_t kStartPrefixSize = 1
 
static const size_t kWordSize = 32
 

Member Function Documentation

◆ getFunction()

static bytes taraxa::util::EncodingSolidity::getFunction ( const std::string &  function)
inlinestatic

UNPACKING ///.

◆ pack()

template<typename... Params>
static bytes taraxa::util::EncodingSolidity::pack ( const Params &...  args)
inlinestatic

◆ packElemement() [1/4]

static bytes taraxa::util::EncodingSolidity::packElemement ( bool  flag)
inlinestatic

◆ packElemement() [2/4]

static bytes taraxa::util::EncodingSolidity::packElemement ( const bytes value)
inlinestatic

◆ packElemement() [3/4]

template<unsigned N, std::enable_if_t<(N<=32)> * = nullptr>
static bytes taraxa::util::EncodingSolidity::packElemement ( dev::FixedHash< N >  hash)
inlinestatic

◆ packElemement() [4/4]

template<typename T , std::enable_if_t< std::numeric_limits< T >::is_integer > * = nullptr>
static bytes taraxa::util::EncodingSolidity::packElemement ( num)
inlinestatic

◆ packFunctionCall()

template<typename... Params>
static bytes taraxa::util::EncodingSolidity::packFunctionCall ( const std::string &  function,
const Params &...  args 
)
inlinestatic

PACKING ///.

◆ staticUnpack()

template<typename... Params>
static void taraxa::util::EncodingSolidity::staticUnpack ( const bytes input,
Params &...  args 
)
inlinestatic

PACKING ///.

UNPACKING ///

◆ unpackElement() [1/3]

template<unsigned N, std::enable_if_t<(N<=32)> * = nullptr>
static void taraxa::util::EncodingSolidity::unpackElement ( const bytes input,
dev::FixedHash< N > &  hash 
)
inlinestatic

◆ unpackElement() [2/3]

template<typename T , std::enable_if_t< std::numeric_limits< T >::is_integer > * = nullptr>
static void taraxa::util::EncodingSolidity::unpackElement ( const bytes input,
T &  out 
)
inlinestatic

◆ unpackElement() [3/3]

static void taraxa::util::EncodingSolidity::unpackElement ( const bytes input,
u256 out 
)
inlinestatic

Member Data Documentation

◆ kStartPrefix

constexpr uint8_t taraxa::util::EncodingSolidity::kStartPrefix = 32
staticconstexpr

◆ kStartPrefixSize

constexpr uint8_t taraxa::util::EncodingSolidity::kStartPrefixSize = 1
staticconstexpr

◆ kWordSize

const size_t taraxa::util::EncodingSolidity::kWordSize = 32
static

The documentation for this class was generated from the following file: