Hot answers tagged

1

Proper approach to the unit testing is test contract with external calls, in this way you can see the call parameters and return values then decide what structure you should be using. If you want to test internal/private functions, make them public just for unit testing, after verifying your code make them internal/private. I think you'll create confusion ...


1

It seems to be a problem with the deadline, maybe the timestamp you are running the function on your computer is higher than the time you are setting as deadline. Print the block.timestamp to know its value and get an idea of the possible error.


Only top voted, non community-wiki answers of a minimum length are eligible