0
truffle(development)> app.waterTree(0, {value: .0000000000001})
Error: sender doesn't have enough funds to send tx. The upfront cost is: 1188468318377797839569896498995073351059306341883237633081 and the sender's account only has: 99909466300000000000

I've tried two different functions and got the same result:

function waterTree(uint id) public payable {
    trees[id].ethValue += msg.value;
    //valueOfTree[id] += msg.value;
}

I have gas price set to 1 wei on Ganache and the gas limit is sitting at 7m.

1

The value is in wei, not ether, so value must be an integer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.