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'.
Caused by: [ (force (builtin headList)) (con list (data) []) ]
Script debugging logs:
1 Answer
It appears you ended up calling head
on an empty list []
? That can not work as there is no element to take from an empty list. head
only works on lists with at least one element, and fails for the empty list.