i have a contract that i would like to utilize the zeroEx protocol with

i am calling the qoute endpoint like this


this is the API qoute URL

i then call my contract with the bytes data returned from this endpoint

const I = await axios.get(url, {
  timeout: 10000,
  headers: optionsCreateZeroEx.headers


const swapDataI: any = I.data;


I Then Utilize the response.data and call my contract method as part of the callData params to my contract method

once all tokens are transfered to my contract


I perfrom the following call

 (success, result) = 0xContract.call(sData.data);

where sData.data being the data returned from zeroEx endpoint

but no matter what i cannot get pass my require

require(success, "AGG Swap Fail");

Any Help Would be appreciated Thank You Team.

1 Answer 1


I Have Resolved the issue One needs to make sure we have in your contract the following

    receive() external payable {}

very simple oversight on my behalf but hope this can help someone in the future

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.