3

Im confused if a eUTXO can only be interacted with and used up once how can you do a NFT sale? If I were to make a smart contract to distribute NFT's from a wallet can that be interacted with by multiple people?

1
  • 1
    I think I understood the context of your question, but could you add more details to what you mean by "if a eUTXO can only be used once how can you do a NFT sale?" Others might not have as much context and there are many ways to implement an "NFT sale." Dec 20, 2021 at 1:05

2 Answers 2

4

You can require a new datum be created as part of the validation.

Validator scripts simply validate transactions that spend UTxOs at the script address. They are able to look at the entire context of the transaction, including the outputs. It is true that a EUTxO can only be spent once, but you can add the requirement that an updated datum be returned to the script address after the old datum is spent, thus allowing the next person to interact with the script.

1

Additionally, CIP-33 (Reference Scripts) is currently being worked on by Cardano Foundation.

In a nutshell, it would establish a standard for attaching commonly used scripts to outputs that will never be spent; allowing all subsequent transactions to reference said outputs instead of resubmitting the same script every time. This would drastically reduce TX size for such commonly used scripts, making them cheaper and mitigating chain bloat.

2
  • 1
    CIP-31 is also worth calling out. It would allow read-only UTxOs, where you wouldn’t need to consume the datum on read. Dec 21, 2021 at 9:30
  • Yes, I believe CIP-33 actually relies on CIP-31,as the former is more of a standard whereas the latter is an actual protocol.
    – zhekson
    Dec 21, 2021 at 13:13

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.