Binance Smart Chain is a blockchain with a public ledger that supports Ethereum applications (EVM). This tag should only be used for programming questions related to Binance Smart Chain. Use [binance-chain] for questions about writing code that interacts with the original, non-smart Binance Chain.
Questions tagged [binance-smart-chain]
235 questions
12
votes
2 answers
PancakeSwap API / Swaping BNB with Binance Smart Chain's API
I was wondering if there's a PancakeSwap API, that allows me to swap BNB for a token, and if it isn't possible, can I do it with Binance Smart Chain's API?

Blaschuko
- 123
- 1
- 1
- 6
12
votes
4 answers
API to get price of Binance Smart Chain token on PancakeSwap
I have address of a token and I need to get its price in BUSD or BNB.
It's not a problem to use paid API, if there is no other way. This token may not be listed on popular listings so it would be nice to get price somehow directly from PancakeSwap.

dps
- 764
- 3
- 7
- 16
8
votes
3 answers
transaction underpriced in BEP-20 Token transaction
I had do some transaction in Binance Smart Chain in Binance-Peg BUSD-T and it worked successfully. But after 5 transactions. I face to a problem that said Returned error: transaction underpriced ! This is my code:
const web3 = new…

Erfan Poursina
- 119
- 1
- 4
- 8
7
votes
1 answer
Wallet Connect configuration with Binance smart chain not working
I'm trying to link BSC chain with wallet connect in my react DAPP.
const walletConnectProvider = await new WalletConnectProvider({
rpc: {
56: "https://bsc-dataseed.binance.org",
},
});
await walletConnectProvider.enable();
…

junaid2012
- 121
- 2
- 4
7
votes
3 answers
how to get the full token balance of an address BSCSCAN API
I'm working on BSCSCAN API. My goal is to get full balance for a given address as you can see on this page:
https://bscscan.com/tokenholdings?a=0x1c82bdb6a93f50a564155ddbcb9cf1b1a244d169
I checked the documentation on BscScan Website, and it seems…

giacomomaraglino
- 177
- 2
- 14
7
votes
3 answers
Using local private key with Web3.js
How can I interact with smart contracts and send transactions with Web3.js by having a local private key? The private key is either hardcoded or comes from an environment (.env) file?
This is needed for Node.js and server-side interaction or batch…

Mikko Ohtamaa
- 82,057
- 50
- 264
- 435
6
votes
1 answer
Can we deploy same ERC20-token on different blockchains?
I want to deploy my own ERC-20 token on different blockchains, so is there any possibility to deploy the same token contract on different blockchains. If we do that we can't give the same name and symbol for three blockchains. can anybody tell me…

Gopal Gurram
- 61
- 1
- 4
6
votes
5 answers
BSC Testnet: Truffle Migrate ETIMEDOUT
I need to deploy my smart contract to BSC Testnet
I always got this :
Error: PollingBlockTracker - encountered an error while attempting to update latest block:
Error: ETIMEDOUT
I tried to change the RPC specified here…

Lyn
- 507
- 3
- 15
4
votes
1 answer
Metamask (web3) connect wallet and send transaction - how to change blockchain to Bianance smart chain (BEP-20) network instead of Ethereum?
there is simple source code in HTML and JS about button to connecting wallet as a web3 and loading ETH transaction in Metamask.
javascript
const ethereumButton = document.querySelector('.enableEthereumButton');
const sendEthButton =…

Davidcz
- 375
- 1
- 2
- 11
4
votes
2 answers
Web3 ExtraDataLength Error on the Binance Smart Chain using python
I'm trying to pull the transactions that took place on a specific block, and I get stuck here:
from web3 import Web3
bsc = "https://bsc-dataseed.binance.org/"
web3 = Web3(Web3.HTTPProvider(bsc))
block =…

swaggy pete
- 61
- 1
- 3
4
votes
1 answer
PancakeSwap Contract / Swaping token for another token
I want to swap some testnet bep20 tokens to busd(bep20) with pancakeswap testnet contarct through web3.
I looked into the contract but I can't get what "amountOutMin" and "path" mean.
How can I swap them with this contract?
Pancakeswap testnet…

hiro
- 41
- 4
3
votes
2 answers
How to check or know that a wallet has tokens in web3 python
I am trying to find out if its possible to know or check in python web3 if a certain bsc address has tokens or transactions.
I can check if an address has bnb or bsc transactions using nonce = web3.eth.getTransactionCount(address) but what I want to…

rbutrnz
- 383
- 4
- 20
3
votes
3 answers
How to get dex transaction data like dextools or dexscreener
I want to implement a product, similar to DexTools/Dexscreener
https://dexscreener.com/
https://dextools.io/
Tracking and charting your DEX in realtime.
How should I obtain transaction data?
Where do you get the data source?

Mysayoshi
- 39
- 1
- 3
3
votes
5 answers
Compute the LP Address of a token pair using web3.py
I managed to have this code run after few hours of searches but unfortunately, this does not produce the output I wanted which is to get the LP Pool Address in (TOKEN/BNB LP).
Given the Token Address: 0xe56842ed550ff2794f010738554db45e60730371
I…

rbutrnz
- 383
- 4
- 20
3
votes
0 answers
How to add infinite allowance with web3?
I am making a dex using 0x API. I did the swap and allow token spend with web3 But I am facing an issue. Whenever I am swapping tokens I need to allow token spend every time but when you look at PancakeSwap they ask for spending only once, I want to…

Mohit Chandel
- 1,838
- 10
- 31