I have two values “red” and “blue” . I want to transparently be able to show people on chain that a script i’ve written is sometimes selecting red, sometimes selecting blue. I’m careful not to use the word Random since I don’t need it to be pure random. It’s ok if it use the transaction hash or current time etc to select Red or Blue. But I want it to be something I can share a transaction id to someone and show the selection.
In other words, I want to:
- Trigger a validator/script and have it somehow select red or blue (perhaps by looking at the last letter of the transaction id)
- then signal that on-chain somehow (perhaps by writing a datum or sending 2 ADA instead of 3 ADA to an address).
Is this even possible? I’m worried that if I have to predetermine the result when I create the transaction using cardano-cli, then it is no longer trustless. How can I show people that the Red or Blue result, on chain, in a trustless way? How would you go about this?