What ability the Plutus on-chain code has? can it read transaction detail including metadata?

I was thinking somthing like this I have a draft on it.
Is this what you would like or do you require something different? I want to know if there is a separate CIP that needs writing.

1 Like