New answers tagged uniswap
0
votes
SushiSwapRouter. getAmountsOut. 1inch / dai. Incorrect price
I have exact same issue and I just workaround using pancakeswap router.
0
votes
Testing Uniswap tutorial contracts on local testnet forked from mainnet
Found an answer here: https://github.com/ethers-io/ethers.js/issues/1051
Apparently, you cannot pass as an argument to the constructor as the Contract object itself, rather you have to pass its ...
0
votes
Testing Uniswap tutorial contracts on local testnet forked from mainnet
You didn't share your contract code, but the code in the tutorial you've linked to uses contract name SwapExamples, and in your Hardhat script you're trying to get swapExample.
1
vote
High Gas Flashbots Transaction
The reason for this is generally the last transaction in the bundle is the one that pays the miner tip.
Basically, anything in excess of the required gas goes to the miner. It's weird now that Type 2 ...
0
votes
Error: Transaction reverted: function call to a non-contract account when adding liquidity through UniswapV2Router
There is an issue with createPair UniswapV2Library function. If UniswapV2Pair ischanged, it will return different pair address, different hex
First solution:
The purpose of this function is to get the ...
1
vote
How to send Uniswap V3: Positions NFT to another wallet using Node.js
You can use safeTransferFrom or transferFrom method.
https://etherscan.io/address/0xc36442b4a4522e871399cd717abdd847ab11fe88#writeContract
1
vote
How to determine whether a pending tx is a result of a swap in Uniswap?
There are two ways a swap can be made.
An EOA sends a transaction to a Uniswap router, in which case you query all txs that has the router address in the tx.to field. You just watch the router ...
0
votes
UniSwap V3 API : How to track **unclaimed fees** programmatically?
In order to get the right amount of uncollected fees for each token of your position, you should query the position and do a bunch of math. In the alternative, you can call the smart contract directly ...
1
vote
Accepted
Attack on ERC-777 smart contract and UniswapV2Pair resulting in 104 ETH liquidity drain
Seems to me that your error is here. Typically this kind of computation is done using fixed-point arithmetic or using a reflection * totalSupply / reflectedSupply calculation. In the case of ...
0
votes
Calculate token amount minimums for Uniswap Router's removeLiquidity function
You need token balances and total supply of the liquidity pair, let's me share - example gist
It uses real token addresses from Cronos mainnet.
0
votes
Returned error: VM Exception while processing transaction: revert when i use UniswapV2router functions
I also wanted to test contracts using test file provided by truffle and got a similar error.
here is my test file:
const BN = require("bn.js");
const { sendEther, pow } = require("./...
0
votes
How can I use UniswapV2 to create my own LP tokens?
uniswap has its own erc20 token if you have seen link here of UniswapV2ERC20.sol
you just need to replace it with you token but you it must needed the same functionality to work with uniswapV2.
**...
0
votes
How to get Sushiswap and Uniswap prices from API for WETH/DAI on KOVAN?
You can use chainlink APIs to get the prices of the token pairs. However they are very limited to the Kovan testnet. Link: https://docs.chain.link/docs/ethereum-addresses/
0
votes
TRANSFER_FROM_FAILED Adding New Pool to Uniswap
You can try by approving the contract and then do TranasferFrom().
0
votes
Is it necessary to our smart contract contains the codes of Sunswap or Uniswap in our contracts?
No.
Your token should adhere to the ERC20 standard which allows the DEX to operate with it.
You will need the basic exchange functions:
transfer - executed during a purchase. LP calls transfer from ...
0
votes
Accepted
Is it necessary to our smart contract contains the codes of Sunswap or Uniswap in our contracts?
If you are only creating a token, you only need to create the token code. The standard token code has nothing about such integrations - it only has the minimal functionality for the token to work by ...
0
votes
swapping tokens via uniswapv2router on kovan network. but transaction always fails
This is probably due to you not passing value to the call to WETH function in order to deposit ETH and get WETH.
If you check the traces here you would see that your contract is contacting the WETH ...
Top 50 recent answers are included
Related Tags
uniswap × 786solidity × 254
pancakeswap × 89
erc-20 × 71
web3js × 62
tokens × 61
liquidity-provider × 59
decentralized-exchange × 57
swaps × 48
contract-development × 45
ethers.js × 41
etherscan × 40
remix × 38
defi × 37
transactions × 36
ether × 30
blockchain × 27
javascript × 26
web3.py × 24
bsc × 19
truffle × 18
metamask × 17
nodejs × 17
hardhat × 17
gas × 16