Uniswap is a decentralized finance protocol that is used to exchange cryptocurrencies. Questions should relate to programming. General questions about Uniswap should be asked on https://ethereum.stackexchange.com
Questions tagged [uniswap]
255 questions
2
votes
0 answers
PancackeswapV2Router swapExactETHForTokensSupportingFeeOnTransferTokens: 'Pancake: TRANSFER_FAILED' when "from" equals to "pancackeSwapV2pair"
PancakeSwap is driving me crazy!
I have this simple contract: when the token are transferred from someone different from the owner, instead of making the transer, swap the reveiced tokens with Bnb.
function _swapAsBnb(address from, address to,…

xyz
- 21
- 1
2
votes
1 answer
How to check your wallet's share of the liquidity pool (uniswap or quickswap) using web3
How can i check my wallet's share of the uniswap/quickswap liquidity pool using web3py ?
The objective is to check what is my indirect token A and token B position and also if possible the rewards pending for my wallet ? While debank can help, I…

Danny D
- 23
- 2
2
votes
1 answer
Trying to add liquidity on uniswap v3 via web3py
I'm trying this code on Ropsten, it but keeps failing:
contract_instance = w3.eth.contract(address="0xC36442b4a4522E871399CD717aBDD847Ab11FE88", abi=liq_ABI)
tx_hash = contract_instance.functions.mint(
(
…

Kujokaren
- 21
- 2
2
votes
1 answer
Uniswap V2 ERC20 token solidity code: Are token names hard coded?
I was reimplementing the Uniswap v2 contracts and I just could not figure this out.
https://github.com/Uniswap/v2-core/blob/master/contracts/UniswapV2Pair.sol
So, from what I understand :
If a pair exchange / liquidity pool doesn't exist upon adding…

pentatonictritones
- 43
- 4
2
votes
2 answers
Uniswap v3 Deploy Hardhat Plugin fails - uniswap-v3-deploy-plugin
I have followed along with the deployment steps in https://www.youtube.com/watch?v=cZ7QMmm7hJc for the Hardhat-based Uniswap v3 dev setup.
https://github.com/Uniswap/hardhat-plugin-deploy-v3
In creating a new project:
npm init
npm add --save-dev…

ElHaix
- 12,846
- 27
- 115
- 203
2
votes
2 answers
Compute uniswap pair address via python
I`m trying to compute (off-line, i.e. without an http requests) address of an Uniswap pair,
with python, web3 and eth-abi libraries, based on this solidity
example.
address factory = 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f;
address token0 =…

freeearth
- 91
- 1
- 10
1
vote
0 answers
Is there a way to interact with smart contracts of reactorfusion on zksync network?
I am writing javascript code for depositing my usdc to reactorfusion platform.
But I cann't find contracts' Abis of reactorfusion protocol or examples.
Could you help me?
These are related…

zenith
- 98
- 1
- 7
1
vote
0 answers
_pickle.PicklingError: Can't pickle
I got this error _pickle.PicklingError: Can't pickle : it's not the same object as scripts.getAllTokensList.fetchTokensWithIndex. I know this is one of the most repetitive question but to be honest…

Saikat Karmakar
- 31
- 7
1
vote
0 answers
Uniswap mint() transaction fails in Goerli
I want to use a python library to mint liquidity in the Goerli testnet.
Using a forked mainnet, uniswap-python works, with command uniswap.mint_liquidity().
That fails when I switch to Goerli.
So, I try web3.py.
First, I approve like so. This…

ashertob
- 11
- 2
1
vote
1 answer
Conflicting transactions on same block, which goes first?
Relating to a single uniswap pool, if I have a sell transaction on the same block as a remove liquidity transaction. Would I still be able to swap if they are removing all the liquidity? Which transaction would go first? If I have a higher…

Kai Chan
- 11
- 1
- 1
1
vote
0 answers
Unable to execute token swap on Uniswap using custom tokens on Mumbai Network
I'm currently working on a project that involves creating two custom tokens on the Mumbai testnet and performing a swap operation for these tokens on Uniswap. However, I'm encountering an issue when trying to execute the trade.
I've already managed…

Shivam Yadav
- 11
- 3
1
vote
1 answer
@uniswap/smart-order-router throws TypeError: n.BigInt is not a function in production nuxt 3
I am implementing @uniswap to a nuxt 3 project I am working on. Everything is working fine locally and this is my code:
import JSBI from 'jsbi'; //v3.2.5
import { CurrencyAmount, Percent, ChainId as SupportedChainId, Token, TradeType } from…

Michael Kamara
- 11
- 1
1
vote
1 answer
Ethereum JSON-RPC error: {"jsonrpc":"2.0","error":"execution reverted"}
I am trying to perform multiple transactions where I call executeMultitrading and it uses ETH to buy TokenX, then sell TokenX for ETh, then use ETH to buy Token X, then Sell TokenX for ETH.
when i deploy and fund my fund my contract with Eth, I run…

RedRum
- 902
- 1
- 13
- 26
1
vote
1 answer
Error adding liquidity to UniswapV2Pair during construction
I'm concerning about why I'm getting an error trying to add liquidity using the addLiquidityETH to a UniswapV2Pair during construction. It seems that it reverts when the router calls the IUniswapV2Pair(pair).mint(to); method.
If I, instead, call the…

vittominacori
- 11
- 3
1
vote
0 answers
Is it possible to use uniswap sdk with other than mainnet networks
Is it possible to use uniswap sdk with arbitrum, polygon, avalanche and other networks where uniswap contract is running or should I use ethers directly? Second question is it possible to interact with uniswap contract on not evm based networks like…

RomanKovalev
- 852
- 3
- 10
- 29