Skip to content

Commit 8030aec

Browse files
committed
fix return type of verify
1 parent c4367fd commit 8030aec

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Juvix/Compiler/Builtins/Anoma.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,10 @@ checkSecp256k1Verify f = do
141141
let ftype = f ^. axiomType
142142
l = getLoc f
143143
nat_ <- getBuiltinNameScoper l BuiltinNat
144+
bool_ <- getBuiltinNameScoper l BuiltinBool
144145
unless
145-
(ftype === (nat_ --> nat_ --> nat_ --> nat_))
146-
$ builtinsErrorText l (prettyText BuiltinAnomaSecp256k1Verify <> " must be of type (msg signature pubKey : Nat) -> Nat")
146+
(ftype === (nat_ --> nat_ --> nat_ --> bool_))
147+
$ builtinsErrorText l (prettyText BuiltinAnomaSecp256k1Verify <> " must be of type (msg signature pubKey : Nat) -> Bool")
147148

148149
checkKeccak256 ::
149150
(Members '[Reader BuiltinsTable, Error ScoperError, NameIdGen] r) =>

tests/Anoma/Compilation/positive/test090.juvix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ builtin secp256k1-sign-compact
5454
axiom sign (msg privKey : Nat) : PrimitiveSignature;
5555

5656
builtin secp256k1-verify
57-
axiom verify (msg signature pubKey : Nat) : Nat;
57+
axiom verify (msg signature pubKey : Nat) : Bool;
5858

5959
universal : ByteArray :=
6060
mkByteArray

0 commit comments

Comments
 (0)