I'm attempting to construct a contract which maintains the state associated with a given NFT. I would like this to be done on-chain as there are ways for the user to attempt to save invalid (manipulated) states and the states are small enough.

When a user wants to change the state, the new accepted state is stored as datum of the output utxo. Successive changes would involve creating a new transaction with the new state as input and redeeming the output of the previous state.

The problem is with my understanding of the how the utxo system works. Would all outputs reside at the same 'address'? Would this mean that if there were 1000 different NFT owners using this contract, there would be a minimum of 1000 utxos sitting at the 'script address' at any given time? Assuming this, would the wallet software attempt to spend all the 1000 utxos before it finds the one valid for a given owner?

1 Answer 1


Your reasoning is correct - if you don't have a compile time parametrized contract it hashes to the same address and the uTXOs will all reside at the same address.

This should not be an issue though, since you control the creation of the transactions on users behalf or in case of Plutus PAB - you specify constraints that the transaction should satisfy (i.e. must spend specific uTXO). PAB can then construct and submit a transaction satisfying these or export the requirements/constraints for users wallet to resolve.

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.