mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-07-23 21:13:14 +00:00
* move rln specific procs and types * Renaming and restructuring RLN module * Rename waku_rln_relay to waku_rln * rename rln-relay types to rln * Fix linting * update logScope topics to match new rln module name * Rename waku_rln module to rln * Rename WakuRln type to Rln, rename FFI raw type to RlnRaw to avoid collision * Apply nph formatting * Rename local rlnRelay to rln in mountRlnRelay
27 lines
1.1 KiB
Nim
27 lines
1.1 KiB
Nim
{.used.}
|
|
|
|
{.push raises: [].}
|
|
|
|
import std/[options, os], results, testutils/unittests, chronos, web3
|
|
|
|
import
|
|
logos_delivery/waku/
|
|
[rln, rln/conversion_utils, rln/group_manager/on_chain/group_manager],
|
|
./utils_onchain
|
|
|
|
suite "Token and RLN Contract Deployment":
|
|
test "anvil should dump state to file on exit":
|
|
# git will ignore this file, if the contract has been updated and the state file needs to be regenerated then this file can be renamed to replace the one in the repo (tests/waku_rln_relay/anvil_state/tests/waku_rln_relay/anvil_state/state-deployed-contracts-mint-and-approved.json)
|
|
let testStateFile = some("tests/waku_rln_relay/anvil_state/anvil_state.ignore.json")
|
|
let anvilProc = runAnvil(stateFile = testStateFile, dumpStateOnExit = true)
|
|
let manager = waitFor setupOnchainGroupManager(deployContracts = true)
|
|
|
|
stopAnvil(anvilProc)
|
|
|
|
check:
|
|
fileExists(testStateFile.get())
|
|
|
|
#The test should still pass even if thie compression fails
|
|
compressGzipFile(testStateFile.get(), testStateFile.get() & ".gz").isOkOr:
|
|
error "Failed to compress state file", error = error
|