I am running unit tests on REMIX and would like to confirm what the unit is for the #value: X when sending msg.value?

/// #sender: account-7
/// #value: 2
function buyToken () public payable {
    Assert.notEqual(msg.sender, TestsAccounts.getAccount(0), "Owner cannot purchase");
    buyToken ();
    Assert.equal(balanceOf(msg.sender), 10000, "Purchased amount does not match the rate");

From my testing, it would seem as though this is a decimal or an actual unit of whatever token. If that is the case, is there a way to make it such that I can send a fractional value? eg. 0.5


Your Answer

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

Browse other questions tagged or ask your own question.