public Task <ResultWrapper <Keccak> > eth_sendTransaction(TransactionForRpc rpcTx) { Transaction tx = rpcTx.ToTransactionWithDefaults(_blockchainBridge.GetChainId()); TxHandlingOptions options = rpcTx.Nonce == null ? TxHandlingOptions.ManagedNonce : TxHandlingOptions.None; return(SendTx(tx, options)); }
public async Task <ResultWrapper <Keccak> > eth_sendTransaction(TransactionForRpc rpcTx) { Transaction transaction = rpcTx.ToTransactionWithDefaults(); if (transaction.Signature is null) { RpcResult <UInt256> chainIdResult = await _proxy.eth_chainId(); ulong chainId = chainIdResult?.IsValid == true ? (ulong)chainIdResult.Result : 0; RpcResult <UInt256?> nonceResult = await _proxy.eth_getTransactionCount(transaction.SenderAddress, BlockParameterModel.Pending); transaction.Nonce = nonceResult?.IsValid == true ? nonceResult.Result ?? UInt256.Zero : UInt256.Zero; _wallet.Sign(transaction, chainId); } return(ResultWrapper <Keccak> .From(await _proxy.eth_sendRawTransaction(Rlp.Encode(transaction).Bytes))); }
public Task <ResultWrapper <Keccak> > eth_sendTransaction(TransactionForRpc transactionForRpc) { Transaction tx = transactionForRpc.ToTransactionWithDefaults(); return(SendTx(tx)); }