I'm trying to implement lock and withdraw of an NFT, but when I tried to check the signer on-chain with the function:

signer :: PubKeyHash 
signer = case txInfoSignatories (scriptContextTxInfo ctx) of 
            [pkh] -> pkh 
            _ -> traceError "Signer could not be found."

It gets always signer could not be found. Why it is not found? It worked on playground until today, but I don't know if there were some updates on plutus.

1 Answer 1


Make sure the transaction has the correct required witness.

It worked on playground until today

It sounds like you had this working at some point but now you don't, what's changed? There have been no changes to that repo for a few days now. Try finding the exact commit that supposedly broke this.

when I tried to check the signer on-chain Blockquote

If you're using a real blockchain network then perhaps you're using cardano-cli? You need to build a transaction with required-signer flag.

  • Maybe there was some change in some days ago, I have to check . because now in the playground, when the script has a validation with error, the transaction appears between the wallet in the same way, and in the other version the transaction does not happen because it is not validated. I don't understand... it does not make sense to change a lot of things.
    – pprs
    Apr 19, 2022 at 14:18

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.