Justin Goro
1 min readJun 17, 2019

--

Double check that your function call has the same parameters as the function definition in solidity. If your function is using msg.value then you must not pass in a parameter for the ether amount. Instead use the optional options object. Eg.

function hello(string name) public {
someName = name;
require(msg.value>10);
}
///web3hello({from:accounts[0],value:100}).then(()=>{})

If that’s not the problem AND you’re using truffle then your build files are stale. Delete everything in your build folder manually and then migrate again. Whenever you add or remove functions in your solidity, do this step.

--

--

Justin Goro
Justin Goro

Written by Justin Goro

Creator of WeiDai and 92 times emperor of Tsuranuanni

No responses yet