2

What is the txOutValue in reference to in a validator script? Is it the output value sent to the script by a wallet or is it the value sent by the script after compilation?

Also what does the txInInput refer to?

1
  • Can I see what yu were reading? Commented Jan 7, 2022 at 4:20

1 Answer 1

3

A transaction has inputs and outputs. When an input is from script address, the validator script is run to allow or disallow spending the UTxO protected by it in that transaction. While deciding whether to allow or disallow, it can see the whole transaction with its inputs and outputs. Let's say that one of the outputs is o :: TxOut. You can use txOutValue o to get the value (of type Value) of that output.

I'm not aware of txInInput. The closest I can think about is txInputs which is the set of inputs to the transaction being validated. Similarly, txOutputs is the set of outputs.

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.