Questions tagged [bsc]

Binance Smart Chain (BSC) is a blockchain network built for running smart contract-based applications.

Filter by
Sorted by
Tagged with
0 votes
1 answer
24 views

We sometimes refer to ETH as `0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee` on Ethereum, what's the equivalence of BNB on BSC?

I see lots of contracts refer to ETH as 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee on Ethereum, since there's not a token contract for ETH itself. So I wonder if the equivalence on BNB Smart Chain, ...
user avatar
  • 101
0 votes
1 answer
20 views

Wallet mobile app that allows sending transactions with data to smart contracts on BSC?

I have tried about a dozen crypto wallet apps on Android, including Metamask, and I haven't found a single one that: supports BSC (BNB Smart Chain) allows me to manually initiate and send a ...
user avatar
  • 103
0 votes
1 answer
13 views

Where are contract functions implemented on bscscan verified contract

The following functions are defined on a contract posted on BSC scan; however, the implementations don't seem to be available. contract Acc { function acc_Transfer(address from, address to, ...
user avatar
0 votes
1 answer
44 views

How fast are liquidation bots?

Wondering how liquidation bots work in general in terms of looking for possible liquidations. Was trying to monitor some unhealthy addresses on Venus BSC with Comptroller.getAccountLiquidity() ...
user avatar
  • 1
0 votes
0 answers
16 views

My contract is not getting paid with TETHER. (Cannot transfer)

I am creating a Smart contract that produces X Coins. If they send 1 USDT to the contract, I want to give 1 X Coin, which they can withdraw whenever they want. The reason why I want to use ...
user avatar
  • 1
0 votes
1 answer
39 views

Why my transaction failed : error -3200

I'm trying to developp my first smart contract to make some arbitrage between DEX. I started by using the code from : https://github.com/pugzly/token_swap/blob/main/token_swap.sol But when I execute ...
user avatar
5 votes
1 answer
91 views

Why chi token save 50% and not more?

I have a smart contract on bsc network and I want to reduce my gas used. I use chi gas token based on this code: modifier discountCHI { uint256 gasStart = gasleft(); _; uint256 gasSpent = ...
user avatar
0 votes
1 answer
17 views

return struct in a mapping

Hi, Im studing about mapping functions with structs. Have this: struct Persona{ string Nombre; uint Edad; } mapping (uint => Persona) RelacionID; function GuardarID(uint ID, string memory ...
user avatar
  • 3
0 votes
1 answer
131 views

How to send BNB from my wallet to another wallet using web3?

I am sending BNB from one to another wallet but I a getting an error when I execute my code while I have 0.009 BNB in my wallet : Error: Returned error: insufficient funds for gas * price + value Here ...
user avatar
0 votes
0 answers
23 views

pendingTransactions not working properly on BSC

Using Web3.js to subscribe pendingTransactions events from local go-ethereum nodes, works correctly on Ethereum and Polygon, but not so on BSC. web3.eth.subscribe('pendingTransactions', (error, header)...
user avatar
  • 2,435
0 votes
1 answer
78 views

swapTokensForExactETH, execution reverted: null

I m trying to estimate gas for a swapTokensForExactETH transaction with pancakeswap contract (similar to uniswap one) When i do, i get the following error: Error: Returned error: execution reverted ...
user avatar
  • 113
0 votes
1 answer
15 views

Solidity 0.8.7, warning on compiler

how do I debug this so the compiler isn't showing any warnings? or is there nothing wrong with it from solidity: Warning: Function state mutability can be restricted to view --> FireworkToken.sol:...
user avatar
2 votes
1 answer
47 views

How can I download the latest BSC block using python?

I've tried looking for API's to download that latest block but I can't find anything for BSC. So far the best I can do is browsing to BSCscan.com/blocks, and maybe using curl but I'm sure someone ...
user avatar
  • 131
0 votes
2 answers
21 views

What happens to stakers' rewards when initial supply of coins are ended?

I was just reading about staking. Came to know that stakers stake their coins in the blockchain, validate the blocks and earn rewards. These rewards are from the initial supply of coins that is being ...
user avatar
0 votes
0 answers
17 views

Returned error: replacement transaction underpriced and Returned error: exceeds block gas limit

I'm trying to send a Web3JS transaction for a SmartContract (BSC) but it always returns Returned error: replacement transaction underpriced and if I increase the Gas it generates Returned error: ...
user avatar
0 votes
0 answers
7 views

Easiest way to find top holders of token from past blocks

I forked the binance smart chain mainnet at block X. I want to interact with other contracts. The issue is I need to find an address (whale) that has a large amount of particular BEP-20 token (SAT ...
user avatar
  • 925
0 votes
0 answers
14 views

Error when calling factory.methods.getPair with PancakePair (BSC)

After doublechecking all addresses over and over; I'm still running into this error trying to instantiate a contract for CELT_USDT: Error: Returned values aren't valid, did it run Out of Gas? You ...
user avatar
  • 1
0 votes
1 answer
38 views

What is the purpose of static and trusted nodes on BNB Smart Chain (BSC)?

I would like to create my own BSC node, therefore I am learning about nodes. I understand the main part of the concept, but in the BSC node docs I found mentions to static and trusted nodes. The ...
user avatar
  • 186
0 votes
1 answer
47 views

Getting coin prices from pancakeswap using different LP's (BUSD, USDT)

Trying to obtain coin prices on the BSC with pancakefactory2 using other LPs besides BNB(BUSD, USDT). Right now this is my code and the prices its getting is off by 5-15%. Any ideas on whats wrong? ...
user avatar
0 votes
0 answers
51 views

effectiveGasPrice doesn't exist on BSC network

I'm trying to calculate in ethers.js the cost of a transaction on BSC. I found on another thread the following snippet of code: getTxCost = async (txHash) => { let receipt = await provider....
user avatar
0 votes
0 answers
37 views

Implementing custom taxes on pancake swap

I wanted to implement a custom tax for pancake swap. currently, iam using pancake swap testnet ones. iam stucking at these points. how to add custom tax for on swapping or at time of creating ...
user avatar
0 votes
1 answer
149 views

I accidentally sent BUSD oken to a random token contract. Can I get it back?

On Binance Smart Chain - Instead of transferring my BUSD token to my wallet, I accidentally sent it to 'CougarSwap: CGS Token' contract itself (the contract, with source code, is https://bscscan.com/...
user avatar
  • 1
0 votes
1 answer
321 views

Add Liquidity failed: Internal JSON-RPC error

I am trying to add liquidity to pancake swap and keep getting the following error: Add Liquidity failed: Internal JSON-RPC error. Has anyone experienced this before, and if so can you help? We are ...
user avatar
0 votes
2 answers
71 views

Block Gas Limit calculation

[ Working on BSC ] I'm trying to better understand the block gasLimit field, As I know, it places an upper limit on the gas limit of transactions Gas Limit in a block, therefore a validator cannot ...
user avatar
  • 124
0 votes
1 answer
186 views

How to send USDT transaction in BSC (using web3)

I just learned how to send BNB from one wallet to another in Binance Smart Chain. It looks like const account = web3.eth.accounts.privateKeyToAccount('xxxxxxx') web3.eth.accounts.wallet.add(account); ...
user avatar
  • 1
0 votes
1 answer
40 views

0x Protocol - Can I use for selling an NFT and get back an ERC-20 token example BUSD on BSC?

I'm using 0x Protocol for my project. And I want to use BUSD as asset that taker must pay to maker. In 0x's document describes we can use native token BNB or WBNB, but not clear about if we can use ...
user avatar
0 votes
0 answers
27 views

freeze and unfreeze

We want to create our project token and ico it on the platform we designed for this purpose.But we want every token buyer not to be able to transfer for up to a year from the time they receive the ...
user avatar
  • 1
0 votes
0 answers
9 views

Processing withdrawals on web app

I'm coding a web game that uses a BSC coin as the in game currency. I'm using web3 for transactions. The game allows people to transfer tokens to their game account, which is handled by sending those ...
user avatar
0 votes
1 answer
54 views

ganache-cli functions.balanceOf web3.exceptions.BadFunctionCallOutput

I have forked BSC testnet using Ganache v7.04 and I am able to swap BNB for a token using the PancakeSwap contract and check the native balance without issue, but now when I am working on a script to ...
user avatar
0 votes
1 answer
95 views

How to set slippage in web3js

I'm trying to buy a token through web3js, I can buy tokens with low slippage, however any token that has slippage is failing. this what I got: let amountOutMin = '1'; let router = new web3.eth....
user avatar
0 votes
2 answers
68 views

How can I configure Index position of Transaction in the block?

How can I configure Index position of Transaction in the block? web3.py
user avatar
0 votes
1 answer
116 views

Verify Nonce Signature in the backend Golang

I am trying to implement a metamask user authentication flow on BSC. I managed to get it working on ethereum. The flow is like this. I've found the code for ethereum on some gist however I am unable ...
user avatar
0 votes
1 answer
28 views

Why (balance == wei) return false, when I use ethers.js

I'm begin learn ethers.js. I wrote like this const balance = await provider.getBalance("0x862...99"); const ether = ethers.utils.formatEther(balance); const wei = ethers.utils....
user avatar
0 votes
0 answers
113 views

BSC Node Slow but synced, how to find out reason?

I'm a full private BSC node user and I'm using the node I built by my own follow the instruction of BSC official guide. Here's some basic detail of my case: I'm running my BSC node on a high I/O ...
user avatar
  • 1
1 vote
1 answer
87 views

Can I run a bsc full node with this configuration?

I would like to run a bsc full node, as this is this takes time and is also my first time, could you please tell me if this configuration is enough: 1x Intel Xeon E5 1650 6 Cores / 12 Threads - 3,2 ...
user avatar
0 votes
0 answers
70 views

What is swapTokensAtAmount do in Pancakeswap based token?

I was studying the tokens who are using pancakeswap methodology like Safemoon, Brise etc.They have this variable swapTokensAtAmount which I don't know what does it deal with.I couldn't able to find ...
user avatar
  • 1
0 votes
1 answer
31 views

WETH on Uniswap forks on other chains

I was wondering what WETH() does on Uniswap forks on other chains, for example if I want to create a liquidity pair on Pancakeswap it might be something like this: address lpPair = IPancakeFactory(...
user avatar
  • 41
0 votes
2 answers
24 views

Accessing contract address

We have created a smart contract token on Ethereum , this contract address has received BNB funds , is there any way to access the balance ?
user avatar
0 votes
1 answer
55 views

Staking contract

I started learning solidty and the contract is ready. Now I want to use web3 js, but unfortunately an error occurs. contract Staking is Ownable { struct User { uint256 depositAmount; uint256 ...
user avatar
2 votes
0 answers
250 views

React/Web3Modal Doesn't Work on Mobile Browsers

This is my first question that I haven't seen asked before. I am creating a DApp that allows a user to connect via Metamask or WalletConnect using the Web3Modal package in React. Everything works ...
user avatar
0 votes
0 answers
76 views

How to know the current liquidity of a token in BNB using web3py

How can I know the current liquidity pool value in BNB, My idea to do this is get the total amount of tokens available in the pancakeswap reserve and then equate that amount to BNB. Any help to ...
user avatar
0 votes
0 answers
16 views

Web3js accounts array not getting populated after switching to different Node

I've got a simple metamask initializer here. Everything works fine on the default Ethereum provider but once I switch to the BSC provider the accounts array doesn't get populated anymore upon ...
user avatar
0 votes
0 answers
80 views

Issue sending tokens to the contract address BEP-20 Token Transfer Error (Unable to locate corresponding Transfer Event Logs), Check with Sender

When I try to send the tokens from my wallet to the token contract address, I am getting the following error. Warning! Error encountered during contract execution [execution reverted] BEP-20 Token ...
user avatar
0 votes
0 answers
34 views

Transfer ethereum programmatically in a web application

I wish to transfer coins from ethereum/bsc account to users of a web application programmatically. I need: Check for bsc/eth valid address Sign transactions in order to send bnb/eth and/or tokens to ...
user avatar
0 votes
0 answers
79 views

How to calculate and write rewardsperblock correctly

Hello I am trying to figure out how to write the rewardsPerBlock in this smartchef contract correctly, I can't figure out how many additional 0's I need to append at the end of rewardsperblock! As far ...
user avatar
0 votes
0 answers
23 views

Get path for swapExactTokensForETHSupportingFeeOnTransferTokens sell transaction

When calling the swapExactTokensForETHSupportingFeeOnTransferTokens function of the PCS V2 router contract you have to give it a list of values for the path. But when I try to sell certain BEP20 ...
user avatar
0 votes
1 answer
86 views

How to buy specific amount of a token

I wrote a script that buys with the specified amount of BNB, but now I want to buy with the specific amount of the token I wish to buy. Here is my code def Buy(): #tokenAddress =input("\n ...
user avatar
0 votes
0 answers
173 views

Tips to improve the speed of full node

I am seeing on the last days, my node isn't fast enought to be the first, second or the third person to buy in launch token on bsc, my bot is contract and I think isn't the problem, I have pretty sure ...
user avatar
  • 1
1 vote
1 answer
37 views

Make sure transaction will be in block x

I am currently building a frontrunning bot for the Binance Smart Chain. The problem: Sometimes my transaction is getting into the block I want, sometimes I miss the block by some ms I guess My ...
user avatar
0 votes
0 answers
58 views

Modifying Uniswap code to work on BSC

I have smart contract code that is designed to work on Uniswap, it swaps tokens basically. I want modify to work on the BSC. So firstly it defines an ERC20 interface such as , 'interface IERC20 {' and ...
user avatar

1
2 3 4 5
9