|
|
8 месяцев назад | |
|---|---|---|
| .. | ||
| src | 36fc8277da fix(keeper): replace price_ids with filtered_price_ids in request processing | 8 месяцев назад |
| .gitignore | 0188774ebf init argus | 8 месяцев назад |
| Cargo.lock | 757fa9477a refactor(tests): comment out test_price_updates for future fixes | 8 месяцев назад |
| Cargo.toml | ef2d9441e4 feat(hermes): integrate Hermes API for price updates and remove process_event module | 8 месяцев назад |
| Dockerfile | 0188774ebf init argus | 8 месяцев назад |
| README.md | ef2d9441e4 feat(hermes): integrate Hermes API for price updates and remove process_event module | 8 месяцев назад |
| config.sample.yaml | f474a7b323 refactor: remove unused secret field and state module for cleaner codebase | 8 месяцев назад |
| rust-toolchain | 0188774ebf init argus | 8 месяцев назад |
Argus is a webservice that serves price updates according to the Pulse protocol. The webservice processes and delivers price updates to callers when permitted by the protocol. The service operates a keeper task that performs callback transactions for user requests.
A single instance of this service can simultaneously serve price updates for several different blockchains.
Each blockchain is configured in config.yaml.
Argus uses Cargo for building and dependency management.
Simply run cargo build and cargo test to build and test the project.
The Argus binary has a command-line interface to perform useful operations on the contract, such as
registering a new price provider, or requesting price updates. To see the available commands, simply run cargo run.
Argus integrates with the Hermes API to fetch price updates for fulfilling requests. When a price update request is received, Argus:
/v2/updates/price/{publish_time} endpointThe Hermes client is implemented in the keeper/hermes.rs module and handles:
To start an instance of the webserver for local testing, you first need to perform a few setup steps:
config.yaml file to point to the desired blockchains and Pulse contracts. Copy the content in config.sample.yaml and follow the directions inside to generate the necessary private keys and secrets.cargo run -- setup-provider to register a price provider for this service. This command
will update the on-chain contracts such that the configured provider key is a price provider,
and its on-chain configuration matches config.yaml.Once you've completed the setup, simply run the following command to start the service:
RUST_LOG=INFO cargo run -- run
This command will start the webservice on localhost:34000.