I have seached and seen this syntax as the correct one to convert eth to wei and send while calling a function in my truffle console: await engine.convertETHToDAI({value: web3.utils.toWei("0.1", "ether")}) When I use it, this is the error I get I've included the code of function I'm calling for clarity. Can anyone look through it and tell me what I am doing wrong? Been clueless since yesterday
?? Anyone?
Which line from the convertETHToDAI function is it failing on?
How do I know that? I run the command, it fails with the error I showed here
add revert('pof'); after a line. run. if it reverts with message "pof" then you haven't found your point of failure yet, i.e., all code up to that point is working. When it fails and it doesn't say "pof", then you know the code is not reaching your revert and you can assume the line before that is your point of failure.
Обсуждают сегодня