1

The Michelson documentation for the Edo protocol mentions four new operations for tickets and this blog post has an example of how tickets are used. I see that the contract in that example can take a ticket type as a parameter, but I am still confused as to how tickets are actually passed into the contract.

When a ticket is created, is there a unique identifier that is created and the contract caller has to pass that in manually? Or what is the exact process?

1 Answer 1

1

Internally, tickets are represented as triples (the address of ticketer, the wrapped piece of data, and the amount) but Michelson type system guarantees that tickets can only be produced by smart contracts. The instruction to create a ticket is TICKET.

4
  • That's interesting but it still doesn't resolve the main problem, if I am calling the entrypoint that has a ticket type as a parameter, how do I pass that in. What is the literal value that the tezos-client will look for?
    – MCH
    Jan 17, 2021 at 17:19
  • The important part in my answer was "tickets can only be produced by smart contracts". You cannot send a ticket from an implicit account. In Edo, the only way to send a ticket as a parameter to a smart contract is to do it from a smart contract by using the TRANSFER_TOKEN instruction. Jan 18, 2021 at 20:16
  • In the blog post you cite, Alice and Bob don't call the auction contract directly, they use their NFT wallet contracts to interact with it. Jan 18, 2021 at 20:21
  • I read it again and I think I had misunderstood part of how tickets work. For some reason I assumed that the TRANSFER_TOKENS operation would not be involved. Now it seems like tickets mostly live in the contracts. With an implicit account or contract it exposes an address that can be passed off chain and on chain, whereas with tickets it seems to be just on chain in the contracts, you wouldn't be passing a ticket id off and on chain).
    – MCH
    Jan 20, 2021 at 9:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.