0

i am trying to hash my order like this

import { orderHashUtils } from '@0x/order-utils';
orderHashUtils.getOrderHash(order,1,"0x080bf510FCbF18b91105470639e9561022937712")

but i am getting validation errors . but i cant view those errors cause they look like this

Error: Expected order to conform to schema /orderSchema
Validation errors: [object Object], [object Object], [object Object]

i have tried catching the error as "e" but how do i log the validation errors in readable forms

what is the correct orderSchema to use as all versions have different schema ? does the 3rd argument in getOrderHash specify the exchange address thus decide what scheme is correct ?

1

1 Answer 1

0

It seems like you're trying to create Exchange v2.1 orders. The current @0x/order-utils package is for exchange v3. I believe the last version that supported v2.1 of the Exchange was @0x/[email protected].

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.