Questions tagged [pancakeswap]
62 questions
0
votes
1 answer
Identifier not found or not unique
I made a contract with the below code, but get an error Identifier not found or not unique at IPancakeSwapV2Router02 in the constructor. What I am missing here?
Here is a snippet from my code:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;…

Hakikat41
- 172
- 3
- 9
0
votes
0 answers
PancakeSwap Response is encoded
I want to get the output amount of a Swap on PancakeSwap ( https://pancakeswap.finance/swap ) automatically.
For example:
Fist token = BNB
Second token = CAKE
When I fill out the BNB amount in the first field, in the second one I get the CAKE…

GPaul
- 35
- 6
0
votes
0 answers
How swap tokens in smart contract with PancakeRouter
I have this code to swap tokens in BSC testnet, but it fails.(https://testnet.bscscan.com/tx/0xe3eaedf680eaba297579984de3d84da78aeb47bdf31a85b4e9ad04b919096aca) What i'm doing wrong?
`
contract tokenSwap {
// address private constant WBNB =…

Altair
- 1
- 1
0
votes
0 answers
How to use fetcher with @pancakeswap-libs/sdk in node.js
I am developing pancakeswap trading script but faced getReserves() error.
So I am using @pancakeswap-libs/sdk npm package.
when I use Fetcher.fetchPairData(weth, token, provider), occur this error.
So I checked on pancakeswap interface but exist…

leopard
- 3
- 2
0
votes
0 answers
ERC20: swapExactTokensForETH function showing error in Pancakeswap
I deployed a token on bscscan(testnet) and created an LP in pancake(testing). but when I try to swap tokens for BNB it is showing an error. I think this error is related to isExcludedFromFee bcoz when I make user isExcludedFromFee(true) then it's…

Sumit Sharma
- 85
- 8
0
votes
0 answers
How to correctly format token's decimals when calling PancakeRouter's getAmountsOut function?
I would like to format the price data I get back from the getAmountsOut() function into the correct tokens decimals. Here's part of my code-
const urlRouter =…

Fox
- 25
- 3
0
votes
1 answer
How to restrict PancakeSwap users from adding new pair on my new token's LP?
Hi there
(I'm new to the world of crypto and I'm still a noob and confused so please help me with your answer)
As a note I have read this:
How to restrict pancakeswap users from adding initial liquidity for my issued token?
Let's look at this…

Allen S Hamilton
- 1
- 2
0
votes
0 answers
How can I get Pancakeswap Token Price and Liq Information API
I found this documentation for pancakeswap price. https://github.com/pancakeswap/pancake-info-api/blob/develop/v2-documentation.md
It works but I can't get a liqiudity for token.
GET https://api.pancakeswap.info/api/v2/tokens/0x
Its ok for price.…

pyssisia
- 1
0
votes
0 answers
Pancakeswap frontend change logo
I just cloned PCS's frontend and I'm trying to figure out how to change the logo of pancakeswap. How do I change it?
Tried to locate all SVG file but I couldn't find the PCS logo.
0
votes
0 answers
Error when verifying deployed factory smart contract on explorer with remix
I deployed the smart contract on the blockchain with remix ide, when i want to verify it on the blockchain explorer it throws this error "Bytecode does not match, please try again."
I am trying to verify the standard pancakeswap factory…

IonutV
- 31
- 4
0
votes
0 answers
PancakeSwapRouter and Uniswap Router same error , Can you help me?
I deploy the PancakeSwap Router contract on the remix and make transactions, but the transactions are deemed invalid. I am getting Execution Reverted error. Even though I enter Factory and WETH (WBNB), it does not create a new…
0
votes
1 answer
Calling PancakeSwap Pairs API with axios in NextJs application
I'm trying to get liquidity data from nasty nested panckaswap data, getting undefined or errors as value not he pairs is not matching data formats for axios/react
const lpPairs = await axios.get('https://api.pancakeswap.info/api/v2/pairs');
…

PiotrK
- 357
- 3
- 13
0
votes
1 answer
SwapExactTokensForTokensSupportingFeeOnTransferTokens gives error in smart contract
I would like to call SwapExactTokensForTokensSupportingFeeOnTransferTokens in my contract to swap tokens with a transfer fee, however, the transaction reverts with an error. I have enough balance in the contract when calling the function.
The…

user19820596
- 1
- 4
0
votes
1 answer
how to swap tokens on pancakeswap using web3 js
I am trying to use pancakeswap contract method to simply swap BUSD to WBNB token, from metamask wallet. pancakeswap contract method is:
var web3 = new Web3(new Web3.providers.HttpProvider('https://data-seed-prebsc-1-s1.binance.org:8545/'))
const…
0
votes
0 answers
Why does PancakeSwap API error in the manipulation of the object?
Good evening everyone I'm having a hard time manipulating an object of objects. Currently I am using the PancakeSwap API with this API data.
code:
import React, {useState, useEffect} from 'react';
import istancePriceBnb from './pricebnb';
import…

raziel90
- 15
- 6