plutus icon indicating copy to clipboard operation
plutus copied to clipboard

Unspecific error when data value does not match datum type

Open tdiesler opened this issue 2 years ago • 3 comments

Area

[] Plutus Foundation Related to the GHC plugin, Haskell-to-Plutus compiler, on-chain code

Summary

With a validator signature like this ...

Integer -> Integer -> ScriptContext -> Bool

I passed in ...

  --tx-in-datum-value '{"bytes":"4173746f72"}' \

which doesn't match the Integer datum type.

The error that I got was rather unspecific

Command failed: transaction build  Error: The following scripts have execution failures:
the script for transaction input 1 (in the order of the TxIds) failed with The Plutus script evaluation failed: An error has occurred:  User error: The provided Plutus code called 'error'.

This could perhaps be more descriptive of the root cause.

tdiesler avatar Sep 16 '21 07:09 tdiesler

Could you please test it against dd41fd3cfb58874c58fbeb47bf5d20915fe6ea02?

ak3n avatar Sep 21 '21 11:09 ak3n

Sure, will do. It might take a while though - currently busy with other stuff

tdiesler avatar Sep 24 '21 06:09 tdiesler

I have a similar problem, see https://github.com/input-output-hk/plutus/issues/3991#issue-1005782758 and just built against master (f363c44bc96498ab8bb1dbdeff45bebc86037c4c), rebuilt the plutus script and tried again: Still getting User error: The provided Plutus code called 'error'.

hasufell avatar Sep 24 '21 12:09 hasufell

out-of-date

tdiesler avatar Dec 09 '22 14:12 tdiesler