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 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.