Skip to main content

Questions tagged [router]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
31 views

How does the contract handle tax deductions for simple buy and sell transactions when the token is listed on any decentralized exchange (DEX)?

Could anyone provide an example solidity smart contract code for how to implement tax deduction using a router in a smart contract when list on DEX ? I've noticed that when adding custom tax deduction ...
Awais Ahmad's user avatar
1 vote
1 answer
244 views

Transaction got reverted Uniswap Universal Router

I want to programmatically swap using Uniswap Universal Router, but the transaction always gets reverted Here is my code: const ethers = require("ethers"); const { abi: V3SwapRouterABI } = ...
duyanhhz's user avatar
0 votes
0 answers
123 views

How to swap one coin to another in Web3.py using Uniswap contracts?

I want to make an exchange from MATIC in order to get USDC. I'm using Infura web3-RpcUrl. I'm open to use any router contract like swap, 1inch, uniswap, sushiswap etc. My code partially works, as I'm ...
patifon's user avatar
  • 11
0 votes
0 answers
40 views

How to generate multi hop swap path with ethers.js?

everyone. I am beginner to blockchain development. Currently I have worked in a web3 project with ethers.js. Now I am going to use Uniswap's multi hop swap. I got SwapRoute instance. But the smart ...
Pavlo Posternak's user avatar
0 votes
0 answers
27 views

Can anyone figure out how this guy does arbitrage?

The owner of this tx record is constantly arbitraging for small amounts. It does these directly via pair. So it's not using a router. In my own testing I have always found that the amount of output is ...
Jack Suelman's user avatar
1 vote
0 answers
97 views

Trying to create a liquidity pool on local network using uniswap's contract's

I am trying to create a liquidity pool on my local network. Here is what I have done so far: I deploy a WETH token I deploy the uniswap factory I deploy the uniswap router using the factory address ...
guiflam's user avatar
  • 11
0 votes
0 answers
18 views

Can we send tokens to BSC pair address and receive tokens in return?

We're almost at war with ChatGPT :) For example, when we send 1 busd to a pair address, such as BUSD/WBNB, won't the pair address directly give us WBNB in return? Chatgpt says it gives one, it doesn't ...
Jack Suelman's user avatar
0 votes
0 answers
32 views

Unable to Add Liquidity using uni swap V2 front end clone

I’m having error from the Uniswapv2 clone that I cloned following the below website instructions: https://www.covalenthq.com/docs/unified-api/guides/how-to-clone-uniswapv2-frontend/ The problem I’m ...
bature's user avatar
  • 1
0 votes
0 answers
197 views

Is there a V2 Router for BaseSwap DEX on the Base Chain Testnet?

I am currently working with the BaseSwap decentralized exchange that runs on the Base Chain. I noticed that they have a router for facilitating transactions on mainnet, but I am particularly ...
Jenny From the Block's user avatar
0 votes
0 answers
52 views

Can you tell me, why addLiquidityETH is not working?

Can you tell me, why addLiquidityETH is not working? I'm trying to call her through etherscan. // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/...
user125862's user avatar
0 votes
1 answer
207 views

Custom V3 router (Is it a Universal router)

I came accross a concept i have no idea about. The concept of custom router. As per my research may be Uniswap V3 is offering Universal router. Is it possible to deploy instance of universal router as ...
Malik Mehmood's user avatar
1 vote
0 answers
188 views

web3.py is not routing properly as pancakeswap finance GUI

I have a script in python in order to execute a multicall using pancakeswap V3 router contract. Muticall sells some tokens using "swapExactTokensForTokens" from the contract. The path ...
jglrmm's user avatar
  • 11
0 votes
0 answers
86 views

ETH Sent to Uniswap V2 router after creating LP

Please help. I tried creating an LP on Uniswap V2 on Arbitrum. It turns out only v3 is available on arb one. On uniswap page, I chose v2 pool on Eth network, then on top right, I changed it to Arb one....
ven's user avatar
  • 1
0 votes
0 answers
26 views

Incorrect router address resulting in stuck liquidity

I accidentally added liquidity to a swap using the incorrect router address. Is there a way to retrieve the liquidity? I appreciate any help - even if you tell me it's impossible! This is the token: ...
Olly's user avatar
  • 1
0 votes
1 answer
305 views

AttributeError: 'exactInputSingle' object has no attribute 'buildTransaction'

I want to swap tokenA to tokenB. Thequestion heppened: File "E:\Code\pythonProject\infura_API_test\3_swap_by_web3_py.py", line 76, in <module> tx_swap = router.functions....
Zysman's user avatar
  • 1
0 votes
1 answer
72 views

Token allowance of router address

Pretty much every coin with taxes has an allowance function to give the router allowance over max uint to be able to sell the tokens. However, I always see the allowance given to 'router', which ...
Andy's user avatar
  • 185
0 votes
1 answer
33 views

Invalid BigNumber error when converting number fetched from NextRouter

I'm fetching a listing number for an item listed on a marketplace contract and then formatting it to ethers BigNumber. I'm getting error: invalid BigNumber value (argument="value", value=...
Miles Donald's user avatar
1 vote
0 answers
487 views

How to find all router contract addresses

I would like to get all router contract adresses deployed on ETH and BSC? Is there a way search for contract or anotherway?
mathew sada's user avatar
0 votes
2 answers
866 views

ethers.js swapExactTokensForTokens not happening (no errors)

Been stuck on swapping tokens using ethers js, here's the code I'm using: const https_provider = new ethers.providers.JsonRpcProvider(https_provider_addres) const wallet = new ethers.Wallet....
soundcake's user avatar
0 votes
2 answers
74 views

Reserves are not changed after swap tokens

I forked Fantom network. And I use UniswapV2Router02, WrappedFtm, Btc contracts deployed on Fantom network in my test scripts. This is test scripits. beforeEach(async () => { [owner, ...
bindle bisu's user avatar
0 votes
1 answer
456 views

HardhatError: HH700: Artifact for contract "UniswapV2Router02" not found

I wanna get UniswapV2Router02 deployed on Fantom network. UniswapRouter = await ethers.getContractAt( "UniswapV2Router02", "0xf491e7b69e4244ad4002bc14e878a34207e38c29" )...
bindle bisu's user avatar
0 votes
1 answer
360 views

Uniswap Router Remove Liquidity from one side of LP

With the Uniswap Router is it possible to remove liquidity from one side of an LP? I know there is a function for providing liquidity to one side, but haven't been able to find a function for removing ...
Kyle Kingsberry's user avatar
2 votes
1 answer
1k views

Get all Swap Transactions from Pool Contract

I am trying to monitor my investment in a QuickSwap liquidity pool. So far, everything works fine tracking my LP-Token Value and calculating the impermanent loss etc. However, I would like to track ...
friend1's user avatar
  • 31
2 votes
1 answer
687 views

Not able to decode Metamask input data

How can I decode metamask's swap input data? I am using the python web3/etherscan api and I am not able to decode the input data from the metamask swaps. I read that metamask uses the erc20 standard, ...
Jorge's user avatar
  • 133
1 vote
2 answers
916 views

How come this tx appears as "private" in etherscan but is also a uniswap v2 swap?

I am trying to decode the inputs of some transactions and came across this one: https://etherscan.io/tx/0xf12371347f409ea7e5e674bd435ee1ad269af5d82cb74d4998ad57b3ab673609 It appears as a private ...
Jorge's user avatar
  • 133
1 vote
2 answers
589 views

How to proxy for a DEX router in ganache (development)?

I am testing a smart contract that uses a Pancake Swap as DEX exchange/router. For learning purposes, I am trying to setup everything in local environment. I have successfully setup ganache in the ...
shiv chawla's user avatar
0 votes
1 answer
126 views

Integration of 0X (payments and router)

Two questions for the team of 0x.org Can we connect our own router to your system? (same as apeswap and cafeswap did) Can we somehow take payment for the transactions in our coin, not in yours? (...
LewisRobert's user avatar
0 votes
1 answer
637 views

What is the purpose of declaring router address on a constructor

Sometimes when people create a new token they declare a constructor: constructor () public { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = ...
qubitz's user avatar
  • 296