The title sums it up ;-) I'd like to move EOS tokens (say EOSDAC for example but any token will do it for my education) using the eosjs API...
I've tried to use Scatter.js and did that but it's not working:
import ScatterJS from 'scatterjs-core';
const scatter = ScatterJS.scatter;
const account = scatter.identity.accounts.find(x => x.blockchain === 'eos');
const eos = scatter.eos(network, Eos, eosOptions);
const transactionOptions = { authorization:[`${account.name}@${account.authority}`] };
var res = await eos.transfer(account.name,'testacc','100.0000 EOSDAC','', transactionOptions);
When executing that code I get the following error:
{
"code":500,
"message":"Internal Service Error",
"error": {
"code":3050003,
"name":"eosio_assert_message_exception",
"what":"eosio_assert_message assertion failure",
"details":[
{
"message":"assertion failure with message: unable to find key",
"file":"wasm_interface.cpp",
"line_number":917,
"method":"eosio_assert"
},{
"message":"pending console output: ",
"file":"apply_context.cpp",
"line_number":72,
"method":"exec_one"
}
]
}
}
Can anybody help me figuring it out?
Many thanks in advance,