(This is not related to CIP-33.)
I want a validator to ensure another validator is also run.
Naively I could construct one, get the hash, and hard code it into the other. Presumably two validators can't mutually reference each other. How do people get around this/ What is the canonical way to handle this?
Same question with minting policies and validators.
The plutus API provide a forwardToValidator
minting policy.
I want a validator to then know its 'canonical' currency symbol,
but as far as I can see ownCurrencySymbol
is vacuous in the context of a validator.
This started by trying to establish how a state machine knows its state token is an NFT. As far as I can see, it doesn't. If an untrusted party initialized a machine, it would be down to a curious user to verify the statetoken is an NFT.
I'm surely not the first person to encounter this but trawling SE and discord didn't shed light on this.