You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that plutus compiler removes the logs for optimization in compiled contract.
It is evident from the use of check' function instead of builitin check with same code.
Steps to reproduce the behavior
No response
Actual Result
Case 1:
check' :: Bool -> BuiltinUnit
check' b = if b then BI.unitval else traceError "MINT5"
{-# INLINEABLE mintValidator #-}
mintValidator :: TxOutRef -> CurrencySymbol -> Value -> BuiltinUnit
mintValidator nftOutRef ownCS mint =
check' ...
Message
CekError : An error has occurred:\nThe machine terminated because of an error,
either from a built-in function or from an explicit use of 'error'. : []
Case 2:
{-# INLINEABLE mintValidator #-}
mintValidator' :: TxOutRef -> CurrencySymbol -> Value -> BuiltinUnit
mintValidator' nftOutRef ownCS mint =
check ...
Message
CekError : An error has occurred:\nThe machine terminated because of an error,
either from a built-in function or from an explicit use of 'error'. : [\"PT5\"]
Expected Result
check' should also show the Cek error with the MINT5 text when evaluating.
Describe the approach you would take to fix this
Have a way to enable the trace logging somewhere
System info
No response
The text was updated successfully, but these errors were encountered:
Hi @mesudip, have a look at this and see if it helps.
It really should, so I'm closing the issue, given that it's been two weeks. If the fix doesn't help, please reopen the issue, we'll look into it further.
Summary
It appears that plutus compiler removes the logs for optimization in compiled contract.
It is evident from the use of
check'
function instead of builitincheck
with same code.Steps to reproduce the behavior
No response
Actual Result
Case 1:
Message
Case 2:
Message
Expected Result
check'
should also show theCek
error with theMINT5
text when evaluating.Describe the approach you would take to fix this
Have a way to enable the trace logging somewhere
System info
No response
The text was updated successfully, but these errors were encountered: