未验证 提交 345b66ae 编写于 作者: K Kevin Heifner 提交者: GitHub

Merge pull request #680 from EOSIO/mongo-json-native-abi-677

Add nonce as native type for cleaner support. STAT-159 #677
......@@ -62,6 +62,7 @@ types::abi native_contract_chain_initializer::eos_contract_abi()
// eos_abi.types.push_back( types::type_def{"account_name","name"} );
eos_abi.types.push_back( types::type_def{"share_type","int64"} );
eos_abi.actions.push_back( types::action{name("transfer"), "transfer"} );
eos_abi.actions.push_back( types::action{name("nonce"), "nonce"} );
eos_abi.actions.push_back( types::action{name("lock"), "lock"} );
eos_abi.actions.push_back( types::action{name("unlock"), "unlock"} );
eos_abi.actions.push_back( types::action{name("claim"), "claim"} );
......@@ -75,6 +76,7 @@ types::abi native_contract_chain_initializer::eos_contract_abi()
eos_abi.actions.push_back( types::action{name("deleteauth"), "deleteauth"} );
eos_abi.actions.push_back( types::action{name("newaccount"), "newaccount"} );
eos_abi.structs.push_back( eosio::types::get_struct<eosio::types::transfer>::type() );
eos_abi.structs.push_back( eosio::types::get_struct<eosio::types::nonce>::type() );
eos_abi.structs.push_back( eosio::types::get_struct<eosio::types::lock>::type() );
eos_abi.structs.push_back( eosio::types::get_struct<eosio::types::unlock>::type() );
eos_abi.structs.push_back( eosio::types::get_struct<eosio::types::claim>::type() );
......
......@@ -81,6 +81,9 @@ struct transfer
amount uint64
memo string
struct nonce # used to make a transaction unique
value string
struct lock
from account_name
to account_name
......
......@@ -224,7 +224,7 @@ std::string generate_nonce_string() {
}
types::message generate_nonce() {
return message(N(eos),{}, N(nonce), generate_nonce_string());
return message(N(eos),{}, N(nonce), types::nonce{generate_nonce_string()});
}
vector<types::account_permission> get_account_permissions(const vector<string>& permissions) {
......
......@@ -222,7 +222,7 @@ if [ $count == 0 ]; then
fi
# transfer
TRANSFER_INFO="$(programs/eosc/eosc --wallet-port 8899 transfer inita testera 975321 "test transfer")"
TRANSFER_INFO="$(programs/eosc/eosc --wallet-port 8899 transfer -f inita testera 975321 "test transfer")"
verifyErrorCode "eosc transfer"
waitForNextTransaction
......@@ -461,6 +461,12 @@ while [ "$NEXT_BLOCK_NUM" -le "$HEAD_BLOCK_NUM" ]; do
NEXT_BLOCK_NUM=$((NEXT_BLOCK_NUM+1))
done
ASSERT_ERRORS="$(grep Assert tn_data_0/stderr.txt)"
count=`grep -c Assert tn_data_0/stderr.txt`
if [ $count != 0 ]; then
error "FAILURE - Assert in tn_data_0/stderr.txt"
fi
killAll
cleanup
echo SUCCESS!
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册