pub async fn update_nonce_values(&self, rpc_client: &RpcClient) -> Result<(), failure::Error> {
        // Update ETH nonce.
        let mut nonce = self.eth_nonce.lock().await;
        let v = self
            .eth_acc
            .main_contract_eth_client
            .pending_nonce()
            .await
            .map_err(|e| failure::format_err!("update_eth_nonce: {}", e))?;
        *nonce = v.as_u32();

        // Update ZKSync nonce.
        let resp = rpc_client
            .account_state_info(self.zk_acc.address)
            .await
            .expect("rpc error");
        self.zk_acc.set_nonce(resp.committed.nonce);
        Ok(())
    }
// Updates the current Ethereum and ZKSync account nonce values.
Updates the current Ethereum and ZKSync account nonce values.
Updates the current Ethereum and ZKSync account nonce values .
pub async fn update_nonce_values(&self, rpc_client: &RpcClient) -> Result<(), failure::Error> {
        // Update ETH nonce.
        let mut nonce = self.eth_nonce.lock().await;
        let v = self
            .eth_acc
            .main_contract_eth_client
            .pending_nonce()
            .await
            .map_err(|e| failure::format_err!("update_eth_nonce: {}", e))?;
        *nonce = v.as_u32();
        // Update ZKSync nonce.
        let resp = rpc_client
            .account_state_info(self.zk_acc.address)
            .await
            .expect("rpc error");
        self.zk_acc.set_nonce(resp.committed.nonce);
        Ok(())
    }
pub async fn update_nonce_values ( & self , rpc_client : & RpcClient ) -> Result < ( ) , failure :: Error > { // Update ETH nonce. let mut nonce = self . eth_nonce . lock ( ) . await ; let v = self . eth_acc . main_contract_eth_client . pending_nonce ( ) . await . map_err ( | e | failure :: format_err ! ( " " e ) ) ? ; * nonce = v . as_u32 ( ) ; // Update ZKSync nonce. let resp = rpc_client . account_state_info ( self . zk_acc . address ) . await . expect ( " " ) ; self . zk_acc . set_nonce ( resp . committed . nonce ) ; Ok ( ( ) ) }
Updates the current Ethereum and ZKSync account nonce values.
Updates the current Ethereum and ZKSync account nonce values .
&self
rpc_client
&RpcClient