title: Trying to use code for sending Harmony ONE coin to send HRC20 tokens. I made few changes but getting error
body: <p>Harmony One SDK [enter link description here][1]</p>
  <p>I have used the code for sending Harmony one token to another Harmony one address.
  Like ethereum, I have included transfer method to transfer HRC20 token.
  But its not working.</p>
  <p>In the reference the code for signing transaction in case we are sending tokens is not provided.</p>
  <pre><code>let encodedABI = transfer.encodeABI();
  
  async function transferTokens() {
  
  await setSharding(); //cross shard transaction
  
  const txn = hmy.transactions.newTx({
  
  to: '0x9fac0935f055882969bE6f68671B4F5673573e60', //token contract address
  value: 0x0, // One coin
  gasLimit: '210000',
  shardID: 0,
  toShardID: 0,
  gasPrice: new hmy.utils.Unit('100').asGwei().toWei(),
  data: encodedABI,
  });
  
  // sign the transaction
  const signedTxn = await hmy.wallet.signTransaction(txn);
  
  console.log(&quot;\n \n signed TXN:::::::::::::::::::::&quot;, signedTxn)
  
  // to listen events
  signedTxn
  .observed()
  .on('transactionHash', (txnHash) =&gt; {
  console.log('');
  console.log('--- hash ---');
  console.log('');
  console.log(txnHash);
  console.log('');
  })
  .on('receipt', (receipt) =&gt; {
  console.log('');
  console.log('--- receipt ---');
  console.log('');
  console.log(receipt);
  console.log('');
  })
  .on('cxReceipt', (receipt) =&gt; {
  console.log('');
  console.log('--- cxReceipt ---');
  console.log('');
  console.log(receipt);
  console.log('');
  })
  .on('error', (error) =&gt; {
  console.log('');
  console.log('--- error ---');
  console.log('');
  console.log(error);
  console.log('');
  });
  
  // send the txn, get [Transaction, transactionHash] as result
  
  const [sentTxn, txnHash] = await signedTxn.sendTransaction();
  
  // to confirm the result if it is already there
  
  const confiremdTxn = await sentTxn.confirm(txnHash);
  console.log(&quot;\n\nConfirmed TXN :::::::::::::::::::;&quot;, confiremdTxn )
  
  // if the transactino is cross-shard transaction
  if (!confiremdTxn.isCrossShard()) {
  if (confiremdTxn.isConfirmed()) {
  console.log('--- Result ---');
  console.log('');
  console.log('Normal transaction');
  console.log(`${txnHash} is confirmed`);
  console.log('');
  process.exit();
  }
  }
  if (confiremdTxn.isConfirmed() &amp;&amp; confiremdTxn.isCxConfirmed()) {
  console.log('--- Result ---');
  console.log('');
  console.log('Cross-Shard transaction');
  console.log(`${txnHash} is confirmed`);
  console.log('');
  process.exit();
  }
  }
  
  transferTokens();```
  
  
    [1]: https://github.com/harmony-one/sdk/tree/master/packages/harmony-transaction
  </code></pre>