-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: (code: -32000, message: transaction underpriced, data: None) #6
Comments
@DiMiTriFrog could you use the |
No explorer found for chain id 80001 |
|
No... it's 100% necessary? I want to use private anon RPC Has any way to use own RPC? I'm executing from source so i can modify it. |
You can use any RPC you want but it seems like on their end the transaction is ignored as it's considered "underpriced". Increasing the value of the transaction or switching RPC might do the trick for you. Please let me know. |
You are fully right, thank you very much, Now the issue i'm having is that in testnet there isn't a pool for the tokens I want to swap. I thought that the uniswap router was the one to do it. |
From what I can see at 0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD (Uniswap V3 Router on Mumbai), WETH and WMATIC can be swapped together. |
Same result... :( The run: The output: Inside main.rs:
Thank you very much for your help @azerpas |
Could you modify your comment with the full logs please? 😃 |
No more logs... |
@DiMiTriFrog as you're building the project from source, could you try to increasing the gas for the // Line 117
let approve_tx: TransactionReceipt = token_in_contract
.approve(router_address, amount_to_approve)
+ .gas(300000000)
.send()
.await?
.await?
.expect("Approve transaction failed"); |
I tried before but the method is not implemented. Thanks very much for your help. |
I tried before but the method is not implemented. Thanks very much for your help. Mind it's need to be before the |
Su I tried before but the method is not implemented. Thanks very much for your help. Sure, sorry. Now i have this output:_
😭😭 |
Is there anything else I can try? |
@DiMiTriFrog Playing with the Something that you could try that I haven't tried is use the // Approve the router to spend USDT
let approve_tx = token_in_contract
.approve(router_address, amount_to_approve);
let approve_tx_gas = approve_tx.estimate_gas().await?;
if args.verbose {
println!("Approve transaction gas estimate: {}", approve_tx_gas);
}
let approve_tx: TransactionReceipt = approve_tx
.gas(approve_tx_gas)
.send()
.await?
.await?
.expect("Approve transaction failed"); |
I appreciate too very much your help, these function is so useful for me, but is still not working. I change my tests to Sepolia and now I have a new error output. I'm using as input token wETH 0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14 I swapped previously using Uniswap UI and when i tried to do the same using the CLI using this command ->
But after executing it, i have this output ->
Maybe I'm using wrong Uniswap Router or Quoter addresses -> |
@DiMiTriFrog from their docs it says Uniswap contracts are deployed on Sepolia but I can't find the Quoter and Router adresses. FYI I'm using Goerli for my tests which has the contracts deployed at the same addresses. |
I think i'm so near, but now i'm having this output:
There is some. way to force to push the transaction to check it failure transaction on explorer?, like allow_revert Thanks! |
@DiMiTriFrog please add the whole logs with the params used in the command. I suspect that the contract reverts because of insufficient funds. You should be able to see the error details easily with Alchemy RPC requests logs. |
Here the full LOGS ->
And the Goerli address i'm using -> 0x518766536b70187c48a99d2020725799dc3b8193 |
Could you show me an example with command that how to swap ETH to other contract in Goerli? |
I clean all packages and now is working, the command for goerli i'm using to swap WETH to UNI:
Thank you very much. |
Nice to know @DiMiTriFrog 😃 |
I'm trying to make swap in mumbai and I'm having this issue:
Error: (code: -32000, message: transaction underpriced, data: None)
The text was updated successfully, but these errors were encountered: