0

To learn Pytezos I am trying to buy NFT - from Tezzardz collection on objkt.com using Pytezos. How can I specify which Tezzard # I want to buy in a code? Is there anything else I need to know?

test = pytezos.using('mainnet').contract('KT1LHHLso8zQWQWg1HUukajdxxbkGfNoHjh6')
initial_storage = {}
pytezos.origination(script = test.script(initial_storage), balance = 200).autofill().sign().inject()

Where do I specify that i want: Tezzard #3890

1 Answer 1

1

The contract you're originating is the tezzard's FA2 contract. This contract is where NFT's data is stored, and where ownership of the NFTs is recorded (the ledger). This contract does not handle the actual sale of the NFTs. If you want to simulate an actual sale of an NFT, you should look at the objkt marketplace contract. Finding this contract is pretty easy once you look at the contract you have - look at the operators in the contract's storage, which keeps track of which third party has permission to handle the NFTs transfers. I never played around with objkt's contracts, but after I looked at the first operator in the operators field, it seems to me that the entrypoints handling sales are primarily ask which seems like the entrypoint in charge of listing a token on the marketplace, and fulfill_ask to buy the listed token. I might be wrong, because I just looked at the entrypoint's names and parameters to try to guess what they do, but this contract should be the place to start exploring how sales are done. KT1WvzYHCNBvDSdwafTHv7nJ1dWmZ8GCYuuC

2
  • Thank you very much for your help! By any chance do you know how could I specify which token "id" I want ( I know the token ID, lets say it 1360837. "destination": "KT1WvzYHCNBvDSdwafTHv7nJ1dWmZ8GCYuuC", "parameters": { "entrypoint": "fulfill_ask", "value": { "prim": "Pair", "args": [ { "int": "**1360837**" }, { "prim": "None" I am not sure how to add in using Pytezos.
    – Aron
    Commented Apr 25, 2022 at 12:09
  • 1
    I'm not sure I unterstand your question correctly. If you know a NFT token_id and want to know the ask_id of the objkt.com marketplace contract here would be some ideas. 1. I don't know how pytezos interacts with bigmaps, but the info you need is stored in the "asks" bigmap tzkt.io/KT1WvzYHCNBvDSdwafTHv7nJ1dWmZ8GCYuuC/storage/103258 2. Use an indexer/api like api.tzkt.io to get the ID from the bigmap above 3. Use the objkt.com indexer data.objkt.com
    – ping_
    Commented Apr 28, 2022 at 9:45

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.