Эх сурвалжийг харах

feat(pyth-lazer-agent): handle push_updates jrpc method (#3064)

Keyvan Khademi 2 сар өмнө
parent
commit
8979a0d3fe

+ 3 - 3
apps/pyth-lazer-agent/Cargo.toml

@@ -1,14 +1,14 @@
 [package]
 name = "pyth-lazer-agent"
-version = "0.5.0"
+version = "0.5.1"
 edition = "2024"
 description = "Pyth Lazer Agent"
 license = "Apache-2.0"
 repository = "https://github.com/pyth-network/pyth-crosschain"
 
 [dependencies]
-pyth-lazer-publisher-sdk = "0.10.0"
-pyth-lazer-protocol = "0.14.0"
+pyth-lazer-publisher-sdk = "0.12.1"
+pyth-lazer-protocol = "0.15.1"
 
 anyhow = "1.0.98"
 backoff = "0.4.0"

+ 6 - 0
apps/pyth-lazer-agent/src/jrpc_handle.rs

@@ -105,6 +105,12 @@ async fn handle_jrpc_inner<T: AsyncRead + AsyncWrite + Unpin>(
             JrpcCall::PushUpdate(request_params) => {
                 handle_push_update(sender, lazer_publisher, request_params, jrpc_request.id).await
             }
+            JrpcCall::PushUpdates(request_params) => {
+                for feed in request_params {
+                    handle_push_update(sender, lazer_publisher, feed, jrpc_request.id).await?;
+                }
+                Ok(())
+            }
             JrpcCall::GetMetadata(request_params) => {
                 if let Some(request_id) = jrpc_request.id {
                     handle_get_metadata(sender, config, request_params, request_id).await