I would like to use the 0x protocol to post orders through the backend of a protocol that uses 0x.
The biggest challenge here for me is to correctly sign an order with python web3 library.
order = { "erc1155Token": "",
"erc1155TokenId": ,
"erc1155TokenAmount": 1000000000000000000,
"direction": 1,
"erc20Token": "",
"erc20TokenAmount": 1000000000000000000,
"maker": "",
"erc1155TokenProperties": [],
"fees": [],
"expiry":,
"nonce":,
"taker": "0x0000000000000000000000000000000000000000"}
This is how the message looks like.
I do not understand if I am missing some knowledge in between.
The order to be valid needs to have a valid signature. I send the order signed to the API endpoint, and the latter should be able to match my transaction.
Is that correct? or should I verify my order on-chain executing some smart-contract functions?
Ps. I tried reverse engineering. I signed a transaction with the UI (metamask) and I tried to sign the message with different methods to get to the same signature. But I can't...
Does someone have a guide on how to make a correct order for 0x ERC1155 in python?
Thank you so much in advance