Closed anlebcoder closed 5 years ago
Hello Master:
Why do I ask this question, because I want to get the historical version of ABI.
I know th original value of ABI can be obtained through HTTP request. For Example: getAbi.
getAbi
Now how do I get the ABI binary to the original ABI?
Example:
"data": { "account": "silver123451", "abi": "0e656f7....more" }
In C++ code:
static bool to_abi(const Vec& abi_vec, abi_def& abi) { if( !is_empty_abi(abi_vec) ) { /// 4 == packsize of empty Abi fc::datastream<const char*> ds( abi_vec.data(), abi_vec.size() ); fc::raw::unpack( ds, abi ); return true; } return false; }
Now, how to use eosjs ?
eosjs
resloved:
eos.modules.Fcbuffer.fromBuffer(ctx.fc.structs.abi_def, Buffer.from(abi, 'hex'));
Hello Master:
Why do I ask this question, because I want to get the historical version of ABI.
I know th original value of ABI can be obtained through HTTP request. For Example:
getAbi
.Now how do I get the ABI binary to the original ABI?
Example:
In C++ code:
Now, how to use
eosjs
?