1 |
brew update |
安装binaryen
1 |
git clone https://github.com/WebAssembly/binaryen.git |
编译llvm支持WASM
1 |
mkdir ~/wasm-compiler |
echo “export WASM_LLVM_CONFIG=~/opt/wasm/bin/llvm-config” >> ~/.bash_profile
echo “export WASM_ROOT=~/opt/wasm” >> ~/.bash_profile
echo “export LLVM_DIR=/usr/local/Cellar/[email protected]/4.0.1_1/lib/cmake/llvm” >> ~/.bash_profile
source ~/.bash_profile
N() and _n
N(active) and “active”_n.value is the same, it converts string into base32 string representation of unsigned 64-bit integer. However, the former is deprecated now and the latter is the new standard in the latest eosio.cdt. “active”_n is a little bit different, it is converting string into a name object.
INLINE_ACTION_SENDER
#define INLINE_ACTION_SENDER(…) BOOST_PP_OVERLOAD(INLINE_ACTION_SENDER,VA_ARGS)(VA_ARGS)
1 |
在编译阶段把 base32 编码的字符串转换为 uint64_t 数值 |
1 |
封装 uint64_t 数值,去掉数学计算,打印输出 base32 字符串 |
1 |
contracts/eosiolib/types.h |
近期评论