When I try to call eos.transfer(..) I'm getting this error

{ message: 'assertion failure with message: unable to find key',
file: 'wasm_interface.cpp',
line_number: 930,
method: 'eosio_assert' }

That is the code:

Eos = require('eosjs')

config = {
    chainId: '038f4b0fc8ff18a4f0842a8f0564611f6e96e8535901dd45e43ac8691a1c4dca', 
    keyProvider: ['key1','key2'],
    httpEndpoint: 'http://dev.cryptolions.io:38888',
    expireInSeconds: 60,
    broadcast: true,
    verbose: false, 
    sign: true

eos = Eos(config)

eos.transfer('token', 'wallet', '1.0000 TKN', '', (error, result) => {console.log(result)})

Any Ideas ?

  • are you using correct keys? and also the keys are imported in your wallet? – Prashant Prabhakar Singh Aug 9 '18 at 12:13
  • Yes I'm using correct keys, keys are imported and account is broadcasted to jungle testnet. – iobeta123 Aug 9 '18 at 12:15
  • unable find key often means that the token or the user is not on the chain – Jimmy Guo Aug 9 '18 at 14:34

I found another solution. I guess that there is problem in EOSJS

   actions: [
       account: “tokencontract”,
       name: “transfer”,
       authorization: [
           actor: “senderaccount”,
           permission: “active”
       data: {
         from: “senderaccount”,
         to: “receiveraccount”,
         quantity: `5.0000 TKN`,
         memo: “some description of the transaction”
  • btw I haven't changed config file. – iobeta123 Aug 9 '18 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.