async fn send_tx(
        &self,
        tx: evm::Transaction,
        meta_keys: HashSet<Pubkey>,
    ) -> EvmResult<Hex<H256>> {
        let (sender, mut receiver) = mpsc::channel::<EvmResult<Hex<H256>>>(1);

        if tx.gas_price < self.min_gas_price {
            return Err(Error::GasPriceTooLow {
                need: self.min_gas_price,
            });
        }

        let tx = PooledTransaction::new(tx, meta_keys, sender)
            .map_err(|source| evm_rpc::Error::EvmStateError { source })?;

        match self.pool.import(tx) {
            // tx was already processed on this bridge, return hash.
            Err(txpool::Error::AlreadyImported(h)) => return Ok(Hex(h)),
            Ok(tx) => tx,
            Err(source) => {
                warn!("Could not import tx to the pool");
                return Err(evm_rpc::Error::RuntimeError {
                    details: format!("Mempool error: {:?}", source),
                });
            }
        };

        receiver.recv().await.unwrap()
    }
/// Wrap evm tx into solana, optionally add meta keys, to solana signature.
Wrap evm tx into solana, optionally add meta keys, to solana signature.
Wrap evm tx into solana optionally add meta keys to solana signature .
async fn send_tx(
        &self,
        tx: evm::Transaction,
        meta_keys: HashSet<Pubkey>,
    ) -> EvmResult<Hex<H256>> {
        let (sender, mut receiver) = mpsc::channel::<EvmResult<Hex<H256>>>(1);
        if tx.gas_price < self.min_gas_price {
            return Err(Error::GasPriceTooLow {
                need: self.min_gas_price,
            });
        }
        let tx = PooledTransaction::new(tx, meta_keys, sender)
            .map_err(|source| evm_rpc::Error::EvmStateError { source })?;
        match self.pool.import(tx) {
            // tx was already processed on this bridge, return hash.
            Err(txpool::Error::AlreadyImported(h)) => return Ok(Hex(h)),
            Ok(tx) => tx,
            Err(source) => {
                warn!("Could not import tx to the pool");
                return Err(evm_rpc::Error::RuntimeError {
                    details: format!("Mempool error: {:?}", source),
                });
            }
        };
        receiver.recv().await.unwrap()
    }
async fn send_tx ( & self , tx : evm :: Transaction , meta_keys : HashSet < Pubkey > , ) -> EvmResult < Hex < H256 > > { let ( sender , mut receiver ) = mpsc :: channel :: < EvmResult < Hex < H256 > > > ( 1 ) ; if tx . gas_price < self . min_gas_price { return Err ( Error :: GasPriceTooLow { need : self . min_gas_price , } ) ; } let tx = PooledTransaction :: new ( tx , meta_keys , sender ) . map_err ( | source | evm_rpc :: Error :: EvmStateError { source } ) ? ; match self . pool . import ( tx ) { // tx was already processed on this bridge, return hash. Err ( txpool :: Error :: AlreadyImported ( h ) ) => return Ok ( Hex ( h ) ) , Ok ( tx ) => tx , Err ( source ) => { warn ! ( " " ) ; return Err ( evm_rpc :: Error :: RuntimeError { details : format ! ( " " source ) , } ) ; } } ; receiver . recv ( ) . await . unwrap ( ) }
Wrap evm tx into solana, optionally add meta keys, to solana signature.
Wrap evm tx into solana optionally add meta keys to solana signature .
&self
tx
evm::Transaction
meta_keys
HashSet<Pubkey>
&self
tx
evm::Transaction
meta_keys
HashSet<Pubkey>