diff --git a/proto/raydium.proto b/proto/raydium.proto index 62f4190..7156fb9 100644 --- a/proto/raydium.proto +++ b/proto/raydium.proto @@ -12,47 +12,53 @@ message RaydiumTransactionEvents { } message RaydiumEvent { - string amm = 1; - string user = 2; - oneof data { - InitializeData initialize = 3; - DepositData deposit = 4; - WithdrawData withdraw = 5; - SwapData swap = 6; + oneof event { + InitializeEvent initialize = 1; + DepositEvent deposit = 2; + WithdrawEvent withdraw = 3; + SwapEvent swap = 4; } } -message InitializeData { - uint64 pcInitAmount = 1; - uint64 coinInitAmount = 2; - uint64 lpInitAmount = 3; - string pcMint = 4; - string coinMint = 5; - string lpMint = 6; - uint32 nonce = 7; +message InitializeEvent { + string amm = 1; + string user = 2; + uint64 pcInitAmount = 3; + uint64 coinInitAmount = 4; + uint64 lpInitAmount = 5; + string pcMint = 6; + string coinMint = 7; + string lpMint = 8; + uint32 nonce = 9; } -message DepositData { - uint64 pcAmount = 1; - uint64 coinAmount = 2; - uint64 lpAmount = 3; - string pcMint = 4; - string coinMint = 5; - string lpMint = 6; +message DepositEvent { + string amm = 1; + string user = 2; + uint64 pcAmount = 3; + uint64 coinAmount = 4; + uint64 lpAmount = 5; + string pcMint = 6; + string coinMint = 7; + string lpMint = 8; } -message WithdrawData { - uint64 pcAmount = 1; - uint64 coinAmount = 2; - uint64 lpAmount = 3; - string pcMint = 4; - string coinMint = 5; - string lpMint = 6; +message WithdrawEvent { + string amm = 1; + string user = 2; + uint64 pcAmount = 3; + uint64 coinAmount = 4; + uint64 lpAmount = 5; + string pcMint = 6; + string coinMint = 7; + string lpMint = 8; } -message SwapData { - string mintIn = 1; - string mintOut = 2; - uint64 amountIn = 3; - uint64 amountOut = 4; +message SwapEvent { + string amm = 1; + string user = 2; + string mintIn = 3; + string mintOut = 4; + uint64 amountIn = 5; + uint64 amountOut = 6; } diff --git a/src/pb/raydium.rs b/src/pb/raydium.rs index 873fdfa..c9950c5 100644 --- a/src/pb/raydium.rs +++ b/src/pb/raydium.rs @@ -16,88 +16,100 @@ pub struct RaydiumTransactionEvents { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RaydiumEvent { - #[prost(string, tag="1")] - pub amm: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub user: ::prost::alloc::string::String, - #[prost(oneof="raydium_event::Data", tags="3, 4, 5, 6")] - pub data: ::core::option::Option, + #[prost(oneof="raydium_event::Event", tags="1, 2, 3, 4")] + pub event: ::core::option::Option, } /// Nested message and enum types in `RaydiumEvent`. pub mod raydium_event { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Data { + pub enum Event { + #[prost(message, tag="1")] + Initialize(super::InitializeEvent), + #[prost(message, tag="2")] + Deposit(super::DepositEvent), #[prost(message, tag="3")] - Initialize(super::InitializeData), + Withdraw(super::WithdrawEvent), #[prost(message, tag="4")] - Deposit(super::DepositData), - #[prost(message, tag="5")] - Withdraw(super::WithdrawData), - #[prost(message, tag="6")] - Swap(super::SwapData), + Swap(super::SwapEvent), } } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct InitializeData { - #[prost(uint64, tag="1")] +pub struct InitializeEvent { + #[prost(string, tag="1")] + pub amm: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub user: ::prost::alloc::string::String, + #[prost(uint64, tag="3")] pub pc_init_amount: u64, - #[prost(uint64, tag="2")] + #[prost(uint64, tag="4")] pub coin_init_amount: u64, - #[prost(uint64, tag="3")] + #[prost(uint64, tag="5")] pub lp_init_amount: u64, - #[prost(string, tag="4")] + #[prost(string, tag="6")] pub pc_mint: ::prost::alloc::string::String, - #[prost(string, tag="5")] + #[prost(string, tag="7")] pub coin_mint: ::prost::alloc::string::String, - #[prost(string, tag="6")] + #[prost(string, tag="8")] pub lp_mint: ::prost::alloc::string::String, - #[prost(uint32, tag="7")] + #[prost(uint32, tag="9")] pub nonce: u32, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct DepositData { - #[prost(uint64, tag="1")] +pub struct DepositEvent { + #[prost(string, tag="1")] + pub amm: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub user: ::prost::alloc::string::String, + #[prost(uint64, tag="3")] pub pc_amount: u64, - #[prost(uint64, tag="2")] + #[prost(uint64, tag="4")] pub coin_amount: u64, - #[prost(uint64, tag="3")] + #[prost(uint64, tag="5")] pub lp_amount: u64, - #[prost(string, tag="4")] + #[prost(string, tag="6")] pub pc_mint: ::prost::alloc::string::String, - #[prost(string, tag="5")] + #[prost(string, tag="7")] pub coin_mint: ::prost::alloc::string::String, - #[prost(string, tag="6")] + #[prost(string, tag="8")] pub lp_mint: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct WithdrawData { - #[prost(uint64, tag="1")] +pub struct WithdrawEvent { + #[prost(string, tag="1")] + pub amm: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub user: ::prost::alloc::string::String, + #[prost(uint64, tag="3")] pub pc_amount: u64, - #[prost(uint64, tag="2")] + #[prost(uint64, tag="4")] pub coin_amount: u64, - #[prost(uint64, tag="3")] + #[prost(uint64, tag="5")] pub lp_amount: u64, - #[prost(string, tag="4")] + #[prost(string, tag="6")] pub pc_mint: ::prost::alloc::string::String, - #[prost(string, tag="5")] + #[prost(string, tag="7")] pub coin_mint: ::prost::alloc::string::String, - #[prost(string, tag="6")] + #[prost(string, tag="8")] pub lp_mint: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct SwapData { +pub struct SwapEvent { #[prost(string, tag="1")] - pub mint_in: ::prost::alloc::string::String, + pub amm: ::prost::alloc::string::String, #[prost(string, tag="2")] + pub user: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub mint_in: ::prost::alloc::string::String, + #[prost(string, tag="4")] pub mint_out: ::prost::alloc::string::String, - #[prost(uint64, tag="3")] + #[prost(uint64, tag="5")] pub amount_in: u64, - #[prost(uint64, tag="4")] + #[prost(uint64, tag="6")] pub amount_out: u64, } // @@protoc_insertion_point(module)