EOS-Q&A
Could NOT find WASM (missing: WASM_CLANG WASM_LLC WASM_LLVM_LINK)
brew update |
安装binaryen
git clone https://github.com/WebAssembly/binaryen.git |
编译llvm支持WASM
mkdir ~/wasm-compiler |
echo “export WASM_LLVM_CONFIG=/opt/wasm/bin/llvm-config” >> ~/.bash_profile/opt/wasm” >> ~/.bash_profile
echo “export WASM_ROOT=
echo “export LLVM_DIR=/usr/local/Cellar/llvm@4/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)
在编译阶段把 base32 编码的字符串转换为 uint64_t 数值 |
封装 uint64_t 数值,去掉数学计算,打印输出 base32 字符串 |
contracts/eosiolib/types.h |