f2091cc9d6
* rename nyxd-scraper to sqlite
wip: made storage mostly generic minus modules
changed error types to make modules dyn compatible
implemented traits for sqlite instance
using sqlite instance for rewarder and chain watcher
psql scaffolding
initial postgres support - missing some proto -> json parsing
use postgres in chain scraper
added message registry to block processor
message content parsing in psql
involved addresses
adding null value for logs
Revert "use postgres in chain scraper"
This reverts commit 83c84bfd2d.
using SignerInfo proto definitions for db serialisation
added ibc messages to MessageRegistry
* add the data observatory
* add the data observatory
* move message parsing and change webhook
* handle wasm messages in a module
* formatting and clippy
* copy shared migrations and add comments to ignore file to explain
* update offline queries
* change to clap args and use url::Url to parse args
* tidy up README, startup info, typos
* tidy up validator rewarder
* lock file
* change webhook module from msg to tx handler
* ignore profiler output
* add missing things and make clippy happy
* updated cosmrs version used by the nym wallet
* add glob to workspace dependencies
* rename migration files
* remove copying from shared migrations
* duplicate shared migrations to keep things simple
* add check for manual migration sync that will fail on `cargo build` in CI
* build.rs checks data observatory migrations have content of all shared scraper migrations and errors on changes or new files
* update runner
* add reset target to make file
* process events and logs
* migrations - remove unnecessary columns
* update offline queries
* chore: run cargo fmt
* fix up: inpsect_err instead of map_err
---------
Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
Co-authored-by: Mark Sinclair <mmsinclair@users.noreply.github.com>
Co-authored-by: benedettadavico <benedetta.davico@gmail.com>
48 lines
2.0 KiB
Rust
48 lines
2.0 KiB
Rust
// Copyright 2023 - Nym Technologies SA <contact@nymtech.net>
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
use const_format::concatcp;
|
|
|
|
// TODO: make those configurable via 'NymNetworkDetails'
|
|
|
|
// BECH32_PREFIX defines the main SDK Bech32 prefix of an account's address
|
|
pub const BECH32_PREFIX: &str = "n";
|
|
|
|
// ACCOUNT_PREFIX is the prefix for account keys
|
|
pub const ACCOUNT_PREFIX: &str = "acc";
|
|
// VALIDATOR_PREFIX is the prefix for validator keys
|
|
pub const VALIDATOR_PREFIX: &str = "val";
|
|
// CONSENSUS_PREFIX is the prefix for consensus keys
|
|
pub const CONSENSUS_PREFIX: &str = "cons";
|
|
// PUBKEY_PREFIX is the prefix for public keys
|
|
pub const PUBKEY_PREFIX: &str = "pub";
|
|
// OPERATOR_PREFIX is the prefix for operator keys
|
|
pub const OPERATOR_PREFIX: &str = "oper";
|
|
// ADDRESS_PREFIX is the prefix for addresses
|
|
pub const ADDRESS_PREFIX: &str = "addr";
|
|
|
|
// BECH32_ACCOUNT_ADDRESS_PREFIX defines the Bech32 prefix of an account's address
|
|
pub const BECH32_ACCOUNT_ADDRESS_PREFIX: &str = BECH32_PREFIX;
|
|
// BECH32_ACCOUNT_PUBKEY_PREFIX defines the Bech32 prefix of an account's public key
|
|
pub const BECH32_ACCOUNT_PUBKEY_PREFIX: &str = concatcp!(BECH32_PREFIX, PUBKEY_PREFIX);
|
|
// BECH32_VALIDATOR_ADDRESS_PREFIX defines the Bech32 prefix of a validator's operator address
|
|
pub const BECH32_VALIDATOR_ADDRESS_PREFIX: &str =
|
|
concatcp!(BECH32_PREFIX, VALIDATOR_PREFIX, OPERATOR_PREFIX);
|
|
// BECH32_VALIDATOR_PUBKEY_PREFIX defines the Bech32 prefix of a validator's operator public key
|
|
pub const BECH32_VALIDATOR_PUBKEY_PREFIX: &str = concatcp!(
|
|
BECH32_PREFIX,
|
|
VALIDATOR_PREFIX,
|
|
OPERATOR_PREFIX,
|
|
PUBKEY_PREFIX
|
|
);
|
|
// BECH32_CONSENSUS_ADDRESS_PREFIX defines the Bech32 prefix of a consensus node address
|
|
pub const BECH32_CONSENSUS_ADDRESS_PREFIX: &str =
|
|
concatcp!(BECH32_PREFIX, VALIDATOR_PREFIX, CONSENSUS_PREFIX);
|
|
// BECH32_CONESNSUS_PUBKEY_PREFIX defines the Bech32 prefix of a consensus node public key
|
|
pub const BECH32_CONESNSUS_PUBKEY_PREFIX: &str = concatcp!(
|
|
BECH32_PREFIX,
|
|
VALIDATOR_PREFIX,
|
|
CONSENSUS_PREFIX,
|
|
PUBKEY_PREFIX
|
|
);
|