1

I'm currently doing some tests using 1inch smart contract in order to be able to swap currency to another.

But I'm facing multiple errors that I didn't understand.

Scenario (on Polygon):

That is the list of the different error I facing :

callBytes failed: Error(External call failed: Error(BAL#508))
callBytes failed: Error(External call failed: Error(External call failed: Error(Deadline not met)))
callBytes failed: Error(External call failed: Error(External call failed: Error(LOP: taking > remaining)))
callBytes failed: Error(External call failed: Error(External call failed: Error(timeout)))
callBytes failed: Error(External call failed: Error(LOP: predicate returned false))

Every error is related to callBytes.

My investigation: The contract I call is this one : 0x11111112542d85b3ef69ae05771c2dccff4faa26. This contract call the method callBytes from this contract : 0x11431a89893025d2a48dca4eddc396f8c8117187 but this one isn't verified and I didn't find any documentation...

If anyone has an idea of what these errors mean it would be a great help to me.

Thanks.

Exemple transaction :

BAL#508 : 0xf2c219d6f42ac3f47c1bb9212af26512aa6d574a80d0bff982bacf808d2d5446

Deadline not met : 0x98e8c5b45391ec7ae4f4ce5e452500d0a25378385b4b0ea342858a38a5cfc7f7

LOP: predicate returned false : 0x77470ea196cf0dde29e6582981e30dfdcd098109bdb039ab1cadf5144d066e8f

LOP: taking > remaining : 0x2563267b3cee277fc6a57e063c7706c054411bb307f987c5df6f297798153917

Timeout : 0x395e96eb144e2fd6cd4bbbff693a8658afb83e0fcaac81f5f6e4dc32c7b55a77

Not that the error is not the same on polygonscan, for getting the error I use npm package eth-revert-reason

2
  • Do you have a failed transaction hash?
    – Ismael
    Sep 5, 2021 at 18:35
  • For sure, I've add this in the main post Sep 6, 2021 at 22:46

1 Answer 1

1

The error occurs because the callBytes you passed isn't properly parsed by the function you are calling. One way this error happens is if you call the swap function in AggregationRouterV3 contract. So instead of calling the swap call the address(0x11111112542d85b3ef69ae05771c2dccff4faa26).call({'data':...data from swap api call)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.