What is the redeemer?

Can someone give me an example of the redeemer.
An output has address (with scripts), value & custom data attached to it.
These custom data is not the redeemer right? What is the redeemer provided by the transaction in every input?

My understanding is at best flawed but I can try and offer my vague understanding. The redeemer is like a key that helps unlock the utxos locked in a script. With the correct datum and redeemer values the utxo can then be unlocked to be spent. You can lookup redeemer examples sitting in script addresses using blockfrost and other APIs to get a better feel -

a typical redeemer file can be fairly simple (I think I grabbed this from the minswap testnet)
{“fields”: [], “constructor”: 0}

using the correct redeemer file along with the correct datum (data file) and the script file you can build a transaction which will allow the locked utxos to be spent - depending on the specific parameters set by the script file you are interacting with.

You can also use the cardano-cli to check the redeemer or datum hash and verify it against those listed at contract addresses using the file in question and
cardano-cli transaction hash-script-data --script-data-file

Hopefully that provides some avenues for investigation and perhaps someone with more nuanced understanding can correct any errors.

1 Like

Hope this doc will help you https://docs.cardano.org/plutus/datums-redeemers