Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
13 views

I have issues buying Base Coins. Error: Fail with error 'TransferHelper: TRANSFER_FROM_FAILED'

web3= Web3(Web3.HTTPProvider(alchemy)) #print(web3.is_connected()) #Instancia contrato uniswap uniswap_router_contract = web3.eth.contract(address=botuni, abi=abiBot) # Crear instancia del contrato ...
Enzo's user avatar
  • 1
0 votes
2 answers
46 views

reserve0/reserve1 price is different compared to boughtTokensAmount/requiredWeiAmount

I would start with a sample on exact UniswapV2 pair SHIB/WETH (SushiSwap). I use local hardhat node and there's no possibility of 3-rd party effect on LP. I have this toSwapTokensAmount = ...
dvcr's user avatar
  • 3
0 votes
1 answer
207 views

Trouble making UniV2 swap on Sepolia with web3py

I'm using the below code to try and make a swap on Sepolia. I've got ETH in my wallet and have found a token that has had liquidity added. Depending what I set the minOutput to I get 'Fail with error '...
stooks's user avatar
  • 11
4 votes
2 answers
4k views

Getting Uniswap v2 latest price and interpreting values using Python

When interacting with functions price0CumulativeLast and price1CumulativeLast of any smart contract on Uniswap V2 I keep getting incomprehensive values. I am not able to figure out how to extract the ...
Aniss Itaoui's user avatar