Whenever I attempt to send a token from one address to another, I keep encountering the error mentioned in the title. Below is the relevant snippet of my JavaScript code:
tokenContract.transfer($("#targetAddr").val().toString(), $("#amt").val())
I am utilizing a smart contract that bears a strong resemblance to OpenZepplin's ERC20. The transfer function within this contract behaves similarly to ERC20's transfer function. Can someone please point out what mistake I might be making?
Here is the portion of my JavaScript code where the token contract is defined:
var tokenContractAddress = token_contract_address;
//coinABI represents the ABI specified in my smart contract.
var tokenContract = web3.eth.contract(coinABI).at(tokenContractAddress);
The inputted address belongs to one of the addresses within my Metamask account (essentially a valid address).