For example here is my example function in smart contract:
function adoptCreeptomas(uint256 beastQuantity, address referrer
) public payable whenNotPaused {
msg.sender.transfer(50);
}
And then I try to test this contract:
describe("adopted creeptoma", async function() {
it('adopted', async function() {
let instance = await CreeptomaPresale.deployed();
let pre = convertEther(getBalance(investor));
await instance.adoptCreeptomas.call(beastQuantity, 0 {from: investor, value: ether(100)});
let after = convertEther(getBalance(investor));
console.log("before: " + pre + "--after: " + after);
});
});
The printing log is: before: 100--after: 100
Here is my getBalance
method:
export function getBalance(address) {
return web3.eth.getBalance(address)
}
I don't know why balance of account doesn't decrease. Please help me.
Thanks