I have the following test script to do a value transfer...
contract("MyTOKEN", (accounts) => {
let [alice, bob, cain] = accounts;
let contractInstance;
beforeEach(async () => {
coin = await MyTOKEN.new();
console.log("ADDRESS "+coin.address);
let transfer = await coin.transfer(cain, 300.00);
let totalAlice = await coin.balanceOf(alice);
let totalBob = await coin.balanceOf(bob);
let totalCain = await coin.balanceOf(cain);
console.log("TOTAL ALICE "+web3.utils.fromWei(totalAlice.toString()));
console.log("TOTAL BOB "+web3.utils.fromWei(totalBob.toString()));
console.log("TOTAL CAIN "+web3.utils.fromWei(totalCain.toString()));
});
My output is:
ADDRESS 0x23ce5a55313D6d55DC1e6F4182fb0F918B7F3E8e
TOTAL ALICE 99999.9999999999999997
TOTAL BOB 0
TOTAL CAIN 0.0000000000000003
TOTAL CREATE ALICE 99999.9999999999999997
Why is the CAIN value only 3? shouldn't it be 300?