Code examples of a smart contract creating a Take Order then matching two orders #30
-
Question Posted: 10 July 2021, in Discord
Hey, I was wonder if you had any code examples of a smart contract creating a Take Order and then matching two orders.
+1(to the reply above) @eugene Nacu | Rarible If a Contract wants to buy an NFT for a fixed price, it will call the matchOrders() method only of the ExchangeV2 contract but how do we get all the params needed? Is this even likely to be done using a SC?
up i can help. let me find some code snippets you can use the rarible api endpoints to help prepare the transaction before submitting to exchangev2 contract
Yeah I imagine we would have to hit some rarible endpoints to grab the signature for the make order. Which means we might not be able to do this on chain fully
right it's a mashup of api calls and contract calls here's a starter app which shows how to do that from an EOA https://github.com/austintgriffith/scaffold-eth/tree/rarible-starter-app but to confirm, you want to interact via a contract? i also have that, but less polished there's some good info in here https://hackmd.io/3XO0B2xOR6uWZOD5OacLSQ?view#Rarible-Protocol-Overview |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Since we need to group and filter the discussions page, I'll be adding this reply as an answer since these kinds of threads(from discord) won't have activity any time soon. |
Beta Was this translation helpful? Give feedback.
Since we need to group and filter the discussions page, I'll be adding this reply as an answer since these kinds of threads(from discord) won't have activity any time soon.