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
2
votes
1 answer
How to create new Binance Smart Chain wallet, for every registered user and server side?
I'm starting by saying I'm new to developing on blockchains, but I have the need to add some features to my business platform.
What I'm trying to achieve now is to create a new Binance Smart Chain wallet address for all the users on my platform.…

SebaSbs
- 343
- 1
- 2
- 11
2
votes
1 answer
ethers.js swapExactETHForTokens and swapExactTokensForTokens on pancake swap
I'm having trouble with the following code and I can't buy on pancake swap. I get the following errors depending on which function i call swapExactETHForTokens or…

TheDayIsDone
- 323
- 5
- 11
2
votes
1 answer
Calling BSC contract function with Nethereum keeps producing the same (incorrect) result
I'm new to using Nethereum and I'm trying to call a function owner() in a BSC smart contract, which returns the owner's address. My code:
string url = String.Format("https://api.bscscan.com/api?module=contract&action=getabi&address={0}&apikey={1}",…

T. Baer
- 69
- 14
2
votes
2 answers
How to connect BSC wesocket provider with Web3J or Web3js
I`ve tried to connect to the websocket api over getblock.io but it always fails. Here below is JS code. But HttpProvider works fine on "https://bsc-mainnet.web3api.com/v1/API_KEY".
web3ws = new Web3(new…

mathew sada
- 77
- 1
- 6
2
votes
2 answers
Solidity - TypeError: Overriding function is missing "override" specifier
I am creating a Smart Contract (BEP20 token) based on the BEP20Token template (https://github.com/binance-chain/bsc-genesis-contract/blob/master/contracts/bep20_template/BEP20Token.template).
The public contructor was modified to add some token…

BlockChain Learner
- 125
- 1
- 10
- 18
2
votes
2 answers
How can I get all coins in USD parity to the Binance API?
I need binance data to build a mobile app. Only USDT pairs are sufficient. In the link below it takes all trading pairs, but I only want USDT pairs. Which link should I use for this?
https://api.binance.com/api/v3/ticker/price

furkanbicak
- 33
- 1
- 7
2
votes
1 answer
ehtereum smart contract approve spender from another contract
I have a erc20 token and in another contract I want to create a token swap function.
So very easily, one send a usdc token and swap my erc20 token in 1:1 ratio.
Problem is how to approve to spend my erc20 token. I tried several times but can't find…

sung chul
- 39
- 1
- 7
2
votes
1 answer
How to deploy a contract from BSCScan onto the Binance Smart Chain?
as most of the BEP20-Tokens-Contracts are online available on GitHub or BSCScan you should be able to just copy the code and paste it into remix.ethereum.org and deploy it. I did that and the contract deployed successfully to the BSC but the token…

Nordic Guy
- 301
- 5
- 13
2
votes
1 answer
Query account balance on Binance Smart Chain - decoding bech32 failed
I am trying to get the balance of a public address via Binance Chain API
account_id = "0x1f5ff990d661a4DFDC0Ff7D63Ae6A7E995475b95"
response = requests.get("https://dex.binance.org/api/v1/account/" + account_id.lower())
account = response.json()
But…

Chris
- 3,581
- 8
- 30
- 51
2
votes
0 answers
How to swap eth and btc to bsc using binance bridge api and transfer bsc to another account using binance api?
For eth swap I used
POST api.binance.org/bridge/api/v2/swaps
with body
{
"amount": 0.2,
"direction": "IN",
"fromNetwork": "ETH",
"source":"",
"symbol":"ETH",
"toAddress":"my wallet address",
"toAddressLabel":"",
…

a_k
- 84
- 4
1
vote
1 answer
Fastest way to emit a transaction on BSC node
I have a node setup running on bsc network.
I need to create a transaction in a specific point and it has to be very fast because it's very time-sensitive.
I used sendTransaction function like below:
wallet.sendTransaction({to: to, value: value,…

Achilles
- 21
- 2
1
vote
2 answers
Can we have an account with multiple receiving addresses(public address) in BSC or Tron?
Can we have an account with multiple receiving addresses (public key) in the Binance Smart Chain or Tron? How are exchange wallets defined for users in these two networks (I think they don't have a custodial wallet for each user)?

softweng
- 173
- 2
- 9
1
vote
0 answers
How use a Bep20 token and not BNB to pay in a solidity contract?
I am new, so far I have a few hours of learning but I am very interested in continuing to learn, I was able to find a solidity contract on Github that uses the Base BNB currency as a means of payment, I would like to be able to make the contract…

CrDiego
- 11
- 3
1
vote
1 answer
Ethers.js: How to send BEP20 Token Transaction
I'm new to Ethers.js and I'm trying to send a transaction from a signer account (on MetaMask) to another account.
This code allows me to send 0.001 BNB through BSC normally:
const provider = new ethers.providers.Web3Provider(window.ethereum);
const…

Jalil
- 91
- 9
1
vote
1 answer
Parsing Input Data of a txhash with Web3
if you look these two transactions up on https://www.bscscan.com/
Example 1:0x7c49fbaf186d266fd61da47681ff328d0b1718e29b0fb88338de6c933082b0cd
Example 2:0x77c5949df82ce8625d9e578fc696bc7264c99dbea4f763ce1fcdbe59dac5f029
They are identical on the…

Soma Juice
- 369
- 1
- 11