eos
eos copied to clipboard
how to get authority of some one when push action?
mycontract .cpp code as below:
void test_transaction::send_deferred_transaction_oct() {
using namespace eosio;
auto trx = transaction();
transfer trans = unpack_action_data<transfer>();
test_action_action<N(currency), N(transfer)> transferaction;
copy_data((char*)&trans, sizeof(trans), transferaction.data);
trx.actions.emplace_back(vector<permission_level>{{trans.from, N(active)}}, transferaction);
trx.send( 0xffffffffffffffff, now()+2 );
}
exec commad:
cleos push action mycontract transfer '{"from":"chenlian", "to":"oct", "quantity":"10 CUR", "memo":""}' -p chenlian@owner
then i get error as below:
3030001 tx_missing_auth: missing required authority
missing authority of chenlian
{"account":"chenlian"}
thread-0 apply_context.cpp:122 require_authorization
{"_pending_console_output.str()":""}
thread-0 apply_context.cpp:29 exec_one
{}
thread-0 chain_controller.cpp:1662 __apply_transaction
but how i get the authority of chenlian??
你解决了吗?我现在用内联action也出现类似的错误
I saw you also posted the similar issue beforehand (#2083), I have added a comment there, please create a new issue if you still encounter the problem! Thanks