I'm getting the following error while running a test in truffle:
Error: Returned error: VM Exception while processing transaction: revert
Now, the code is simply to big and complicated to run through Stackoverflow. So my question instead is,
-How can I debug this? (more specifically: how can I get the VM logs and see exactly what is ducking up the test)
After a lot of trial and error I know exactly what function is misbehaving, I just don't know exactly what's misbehaving about it: here is the code in case it provides any clarity:
function onOCTReceived
(
address operator,
address from,
uint256 amount,
bytes calldata data
)
external
returns
(
bytes4
)
{
bobAndAlice(data);
return (0x0);
}
important to note bobAndAlice(data)
is working like a charm independently of the onOCTReceived()
function so doubt the error is there, plus deleting it doesn't offer any more clarity on whats going on.
Edit: Additional testing shows that onOCTReceived()
works perfectly fine in remix too.
Any pointers or help is very much appreciated.
bobAndAlice()
reverts in this context. The raw data facilitates limitless possibilities. The function may haverequire()
conditions that aren't met in this context. Consider posting that code so someone might pinpoint the issue.bobAndAlice
as a stand alone function with the same data input, it works as expected. The same error is returned when I deletebobAndAlice
the exact same issue is returned, I suspect the error might be on the return, but might be completely misguided here. :shrug:bobAndAlice(data)
is working like a charm" with whatdata
???data
input is the same when executing as stand alone and when executing it within the function stated above, one works the other doesn't