1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-25 16:45:20 +03:00
juvix/test/Anoma.hs
Paul Cadman 8272ee32c1
Add RPC call and dev command for Anoma.Protobuf.IndexerService.ListUnrevealedCommits (#3239)
This PR adds support for
`Anoma.Protobuf.IndexerService.ListUnrevealedCommits` via the CLI:

```
$ juvix dev anoma indexer list-unrevealed-commits --help
Usage: juvix dev anoma indexer list-unrevealed-commits [-o|--output OUTPUT_FILE]

  Call the Anoma.Protobuf.IndexerService.ListUnrevealedCommits endpoint

Available options:
  -o,--output OUTPUT_FILE  Path to output file
  -h,--help                Show this help text
```

It also adds a test suite for Anoma client transaction submissions /
verification.

The Swap example using the Resource Machine API is tested with the
following flow:

1. Compile the Swap example
2. Submit the compiled output to the prove endpoint - capture the
expected commitment in a trace
3. Submit the proved output to add-transaction
4. Poll ListUnrevealedCommits until a commit appears and compare it with
the commitment we captured in 2.
2024-12-07 17:51:10 +01:00

14 lines
241 B
Haskell

module Anoma where
import Anoma.Client qualified as Client
import Anoma.Compilation qualified as Compilation
import Base
allTests :: TestTree
allTests =
testGroup
"Anoma tests"
[ Compilation.allTests,
Client.allTests
]