Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Builtins] Make 'BuiltinSuccess' the first constructor #5885

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' of https://github.com/input-output-hk/plutus in…
…to effectfully/builtins/make-BuiltinFailure-the-last-constructor
  • Loading branch information
effectfully committed Apr 25, 2024
commit 0c652fbfa222c56f941752e07f1b441e5ff90031
8 changes: 4 additions & 4 deletions plutus-tx/src/PlutusTx/Builtins/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ verifyEd25519Signature (BuiltinByteString vk) (BuiltinByteString msg) (BuiltinBy
BuiltinSuccess b -> BuiltinBool b
BuiltinSuccessWithLogs logs b -> traceAll logs $ BuiltinBool b
BuiltinFailure logs err -> traceAll (logs <> pure (display err)) $
mustBeReplaced "Ed25519 signature verification errored."
Haskell.error "Ed25519 signature verification errored."

{-# NOINLINE verifyEcdsaSecp256k1Signature #-}
verifyEcdsaSecp256k1Signature ::
Expand All @@ -274,7 +274,7 @@ verifyEcdsaSecp256k1Signature (BuiltinByteString vk) (BuiltinByteString msg) (Bu
BuiltinSuccess b -> BuiltinBool b
BuiltinSuccessWithLogs logs b -> traceAll logs $ BuiltinBool b
BuiltinFailure logs err -> traceAll (logs <> pure (display err)) $
mustBeReplaced "ECDSA SECP256k1 signature verification errored."
Haskell.error "ECDSA SECP256k1 signature verification errored."

{-# NOINLINE verifySchnorrSecp256k1Signature #-}
verifySchnorrSecp256k1Signature ::
Expand All @@ -287,7 +287,7 @@ verifySchnorrSecp256k1Signature (BuiltinByteString vk) (BuiltinByteString msg) (
BuiltinSuccess b -> BuiltinBool b
BuiltinSuccessWithLogs logs b -> traceAll logs $ BuiltinBool b
BuiltinFailure logs err -> traceAll (logs <> pure (display err)) $
mustBeReplaced "Schnorr SECP256k1 signature verification errored."
Haskell.error "Schnorr SECP256k1 signature verification errored."

traceAll :: forall (a :: Type) (f :: Type -> Type) .
(Foldable f) => f Text -> a -> a
Expand Down Expand Up @@ -697,7 +697,7 @@ integerToByteString (BuiltinBool endiannessArg) paddingArg input =
BuiltinSuccess bs -> BuiltinByteString bs
BuiltinSuccessWithLogs logs bs -> traceAll logs $ BuiltinByteString bs
BuiltinFailure logs err -> traceAll (logs <> pure (display err)) $
mustBeReplaced "Integer to ByteString conversion errored."
Haskell.error "Integer to ByteString conversion errored."

{-# NOINLINE byteStringToInteger #-}
byteStringToInteger
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.