From 2de710d7bc20abbe51423dba1dcdcd6aa71d6337 Mon Sep 17 00:00:00 2001 From: nickwest Date: Thu, 30 Nov 2023 00:42:39 -0800 Subject: [PATCH 1/2] add deposit confirmation in ChainResp --- provider/src/response.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/provider/src/response.rs b/provider/src/response.rs index 851a8335..854562cc 100644 --- a/provider/src/response.rs +++ b/provider/src/response.rs @@ -30,6 +30,7 @@ pub struct ChainResp { pub main_contract: ZkLinkAddress, pub layer_zero_contract: ZkLinkAddress, pub gas_token_id: TokenId, + pub deposit_confirmation: u64, } #[derive(Debug, Serialize, Deserialize, Clone)] From 71fddf476e7aadc46f2f701e8c5f44f515b340c5 Mon Sep 17 00:00:00 2001 From: nickwest Date: Thu, 30 Nov 2023 21:29:29 -0800 Subject: [PATCH 2/2] rename getFastWithdrawTxs to getWithdrawTxs;remove layer_zero_address in ChainResp; --- provider/src/response.rs | 3 +-- provider/src/rpc.rs | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/provider/src/response.rs b/provider/src/response.rs index 854562cc..db120916 100644 --- a/provider/src/response.rs +++ b/provider/src/response.rs @@ -28,7 +28,6 @@ pub struct ChainResp { pub chain_type: u8, pub layer_one_chain_id: U256, pub main_contract: ZkLinkAddress, - pub layer_zero_contract: ZkLinkAddress, pub gas_token_id: TokenId, pub deposit_confirmation: u64, } @@ -402,7 +401,7 @@ pub struct BlockTxResp { #[derive(Debug, Serialize, Deserialize, Clone)] #[serde(rename_all = "camelCase")] -pub struct FastWithdrawTxResp { +pub struct WithdrawTxResp { pub tx_hash: TxHash, pub tx: ZkLinkTx, #[serde(with = "ts_microseconds")] diff --git a/provider/src/rpc.rs b/provider/src/rpc.rs index 920e72e0..2e00a034 100644 --- a/provider/src/rpc.rs +++ b/provider/src/rpc.rs @@ -86,12 +86,12 @@ pub trait ZkLinkRpc { page_size: u32, ) -> RpcResult>; - #[method(name = "getFastWithdrawTxs")] - async fn tx_fast_withdraw( + #[method(name = "getWithdrawTxs")] + async fn tx_withdraw( &self, last_tx_timestamp: u64, max_txs: u32, - ) -> RpcResult>; + ) -> RpcResult>; #[method(name = "getChangePubkeyChainId")] async fn get_change_pubkey_chain_id(&self) -> RpcResult;