'Sending erc20 tokens using Web3js

I have tried to send erc20 (Bela) from one address to another got tx id in a result, but this transaction is not appearing in any tx check services and no funds sent from my address. code at the moment looks like this:

web3 = new Web3(new Web3.providers.HttpProvider('https://mainnet.infura.io/PKEY'));


var myAddress = "0x4d0...";
var toAddress = "0xce6...";
var amount = web3.utils.toHex(5);

var count = web3.eth.getTransactionCount(myAddress).then(function(v){console.log(v); count = v});

var privateKey = new Buffer('pkey', 'hex');

//got from https://etherscan.io/address/0x2e98a6804e4b6c832ed0ca876a943abd3400b224#code
var abiArray = '';

var contractAddress = '0x2e98a6804e4b6c832ed0ca876a943abd3400b224';
var contract = new web3.eth.Contract(abiArray, contractAddress, {from: myAddress});

var rawTransaction = {
    "from":myAddress,
    "gasPrice":"0x098bca5a00",
    "gasLimit":"0xcb05",
    "to":contractAddress,
    "value":"0x0",
    "data":contract.methods.transfer(toAddress, amount).encodeABI(),
    "nonce":web3.utils.toHex(count)
};
var transaction = new Tx(rawTransaction);
transaction.sign(privateKey);

web3.eth.sendSignedTransaction('0x' + transaction.serialize().toString('hex'), function (err, hash) {
    console.log(err, hash);
});


Solution 1:[1]

Update the "to" address within the transaction object using contract._address

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 HARNIX