juanfranblanco on master
Update bug_report.md (compare)
juanfranblanco on master
Update README.md (compare)
juanfranblanco on master
Create2 contract address calcul… (compare)
juanfranblanco on master
More .net 5 Hd wallet .net 5 Hd wallet testing .net 5.0 (compare)
juanfranblanco on master
#655 adding cancellation token … (compare)
juanfranblanco on master
Rsk custom field now uses hex .Net5 initial migration, Abi de… Hd blazor test start migration … (compare)
juanfranblanco on master
Adding a seed to secure random … (compare)
juanfranblanco on master
#654 ManagedAccountTransactionM… Merge branch 'master' of https:… (compare)
juanfranblanco on master
Update bug_report.md (compare)
juanfranblanco on master
Update README.md (compare)
juanfranblanco on master
Signer adding overload DIDs initial commit Merge branch 'master' of https:… (compare)
juanfranblanco on master
Update README.md (compare)
juanfranblanco on master
Update README.md (compare)
juanfranblanco on master
Update README.md (compare)
juanfranblanco on master
#646 fix hdwallet added blazor … (compare)
juanfranblanco on master
Signing performance (start) + … Merge branch 'master' of https:… (compare)
juanfranblanco on master
boolean flag to get compressed … Merge pull request #642 from me… (compare)
juanfranblanco on master
Handling empty reponses eom, re… (compare)
juanfranblanco on master
Websocket client, allow to rece… Merge branch 'master' of https:… (compare)
juanfranblanco on master
Revert "JsonRpc/Logger: fix pos… Merge pull request #638 from Ne… (compare)
I'm using EthNewPendingTransactionObservableSubscription
but I'd like to filter on a contract address (Uniswap V2 Router 2). I've tried the following, but it results in no events at all, not even the Uniswap ones:
await subscription.SubscribeAsync(Event<TransferEventDto>.GetEventABI().CreateFilterInput("0x7a250d5630b4cf539739df2c5dacb4c659f2488d"));
Is it possible to do this? Or, even better, can I just subscribe to pending transactions on the Uniswap contract instead?
@juanfranblanco Do you see any problems in the below code?
var ethSwapHandler = web3.Eth.GetContractTransactionHandler<SwapExactETHForTokensFunction>();
var ethSwapDTO = new SwapExactETHForTokensFunction
{
AmountToSend = Web3.Convert.ToWei(wethToTrade), // wethToTrade = 1
AmountOutMin = Web3.Convert.ToWei(amountOutMin), // amountOutMin = 7.25
Path = path,
To = myWallet,
Deadline = ((DateTimeOffset)DateTime.Now).ToUnixTimeSeconds() + 1200,
GasPrice = Web3.Convert.ToWei(gasPriceToUse, UnitConversion.EthUnit.Gwei), // gasPriceToUse = 300 (taken from Etherscan + 200)
Gas = Web3.Convert.ToWei(400000)
};
var transactionEthSwapReceipt = await ethSwapHandler.SendRequestAndWaitForReceiptAsync(uniswapContractAddress, ethSwapDTO);
I wasn't converting the amountOutMin & Gas amounts to Wei before. Could that be the reason for getting the 'insufficient funds for gas * price' error?