Skip to content

Commit

Permalink
tests for poseidon
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcardon committed Nov 21, 2023
1 parent d1fff46 commit 94c22e0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/Chainweb/Test/Pact/PactMultiChainTest.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1116,6 +1116,11 @@ pact410UpgradeTest = do
"WebAuthn prefixed keys should not yet be supported in signatures"
[ prefixedSigned
]
runBlockTest [
PactTxTest poseidonTx $
assertTxFailure "Should not resolve new pact native: poseidon-hash-hack-a-chain"
"Cannot resolve poseidon-hash-hack-a-chain"
]

runToHeight 120
runBlockTest
Expand Down Expand Up @@ -1159,9 +1164,13 @@ pact410UpgradeTest = do
"Invalid WebAuthn prefixed keys should throw an error when read"
"Invalid keyset"

, PactTxTest poseidonTx $
assertTxSuccess "Should resolve new pact native: poseidon-hash-hack-a-chain"
(pDecimal 18586133768512220936620570745912940619677854269274689475585506675881198879027)
]

where
poseidonTx = buiildBasic $ mkExec' "(poseidon-hash-hack-a-chain 1)"
prefixedSigned = buildBasicGasWebAuthnPrefixedSigner 1000 $ mkExec' "1"

prefixedSignerBareKey = buildBasicGasWebAuthnPrefixedSigner 1000 $ mkExec
Expand Down

0 comments on commit 94c22e0

Please sign in to comment.