From 4f6cb16763f217b9e8897657ef5689345ac89c02 Mon Sep 17 00:00:00 2001 From: Stanislav Eliseev Date: Thu, 23 Jan 2025 17:43:22 +0100 Subject: [PATCH] fix: update rpc.proto --- nekoton-proto/src/protos/rpc.proto | 12 ++++++++++++ nekoton-proto/src/protos/rpc.rs | 28 ++++++++++++++-------------- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/nekoton-proto/src/protos/rpc.proto b/nekoton-proto/src/protos/rpc.proto index b04f39ce2..a77e3a358 100644 --- a/nekoton-proto/src/protos/rpc.proto +++ b/nekoton-proto/src/protos/rpc.proto @@ -6,6 +6,11 @@ import "google/protobuf/struct.proto"; package rpc; message Request { + + message GetLibraryCell { + bytes hash = 1; + } + message GetContractState { bytes address = 1; optional uint64 last_transaction_lt = 2; @@ -48,6 +53,8 @@ message Request { GetTransactionsList get_transactions_list = 9; GetAccountsByCodeHash get_accounts_by_code_hash = 10; SendMessage send_message = 11; + + GetLibraryCell get_library_cell = 12; } } @@ -91,6 +98,10 @@ message Response { repeated bytes account= 1; } + message GetLibraryCell { + optional bytes cell = 1; + } + message GetContractState { message Timings { uint64 gen_lt = 1; @@ -141,6 +152,7 @@ message Response { GetAccountsByCodeHash get_accounts = 8; GetContractState get_contract_state = 9; google.protobuf.Empty send_message = 10; + GetLibraryCell get_library_cell = 11; } } diff --git a/nekoton-proto/src/protos/rpc.rs b/nekoton-proto/src/protos/rpc.rs index d7c3006ec..ec57e1200 100644 --- a/nekoton-proto/src/protos/rpc.rs +++ b/nekoton-proto/src/protos/rpc.rs @@ -1,11 +1,17 @@ #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Request { - #[prost(oneof = "request::Call", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11")] + #[prost(oneof = "request::Call", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12")] pub call: ::core::option::Option, } /// Nested message and enum types in `Request`. pub mod request { + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct GetLibraryCell { + #[prost(bytes = "bytes", tag = "1")] + pub hash: ::prost::bytes::Bytes, + } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetContractState { @@ -52,13 +58,6 @@ pub mod request { #[prost(bytes = "bytes", tag = "1")] pub message: ::prost::bytes::Bytes, } - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct GetLibraryCell { - #[prost(bytes = "bytes", tag = "1")] - pub hash: ::prost::bytes::Bytes, - } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Call { @@ -161,15 +160,16 @@ pub mod response { } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] - pub struct GetContractState { - #[prost(oneof = "get_contract_state::State", tags = "1, 2, 3")] - pub state: ::core::option::Option, - } - #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetLibraryCell { #[prost(bytes = "bytes", optional, tag = "1")] pub cell: ::core::option::Option<::prost::bytes::Bytes>, } + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct GetContractState { + #[prost(oneof = "get_contract_state::State", tags = "1, 2, 3")] + pub state: ::core::option::Option, + } /// Nested message and enum types in `GetContractState`. pub mod get_contract_state { #[allow(clippy::derive_partial_eq_without_eq)] @@ -267,7 +267,7 @@ pub mod response { #[prost(message, tag = "10")] SendMessage(()), #[prost(message, tag = "11")] - GetLibraryCell(GetLibraryCell) + GetLibraryCell(GetLibraryCell), } } #[allow(clippy::derive_partial_eq_without_eq)]