eos icon indicating copy to clipboard operation
eos copied to clipboard

Three days after I undelegatebw, why can't tokens be redeemed automatically? I also need to make a manual refund action

Open yhc166188 opened this issue 8 years ago • 9 comments

after the 3 days of undelegatebw,I needn't explicitly push refund action,Token is automatically sent to my account.How do I want this scenario to be implemented

yhc166188 avatar Sep 26 '18 02:09 yhc166188

you can send an deferred_transaction in you contract.

eosio::transaction out;
out.actions.emplace_back( permission_level{ account, N(active) }, _self, N(action_name)
    , std::make_tuple(arg1,arg2) );
out.delay_sec = delay_sec;
out.send(sender_id, _self, false);

firesWu avatar Sep 26 '18 03:09 firesWu

you can send an deferred_transaction in you contract.

eosio::transaction out;
out.actions.emplace_back( permission_level{ account, N(active) }, _self, N(action_name)
    , std::make_tuple(arg1,arg2) );
out.delay_sec = delay_sec;
out.send(sender_id, _self, false);

I tried it and it still doesn't work.why?

yhc166188 avatar Sep 26 '18 03:09 yhc166188

Can you post your code?

firesWu avatar Sep 26 '18 04:09 firesWu

Can you post your code?

I use the latest eos code,You can have a look

yhc166188 avatar Sep 26 '18 05:09 yhc166188

Maybe lack of resources,so that refund action exec failed. deferred_transaction(refund exec after three days ) consume cpu and net when it was exec, so you should ensure adequate resources.

firesWu avatar Sep 26 '18 05:09 firesWu

I can make sure that I have enough resources, and I can do the manual refund action

yhc166188 avatar Sep 26 '18 05:09 yhc166188

Is it all the hand-operated refund action?

yhc166188 avatar Sep 26 '18 05:09 yhc166188

Did you do another undelegatebw in the middle?

taokayan avatar Sep 27 '18 09:09 taokayan

The automatically generated deferred transaction generated by an undelegatebw instruction frequently fails on mainnet. It could be that it would be more reliable with a longer expiration time, but this would require all mainnet producers to vote in a new system contract. Unless and until that happens, use the manual refund workaround.

jgiszczak avatar Oct 05 '18 20:10 jgiszczak