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
0answers
5 views

Can i get step by step instructions to fork GETH [duplicate]

Can I get step-by-step instructions to fork GETH then make a public node with a private network RPC, chain id, and native coin?
0
votes
0answers
12 views

Contract in bsctestnet cannot be verified

I tried to deploy my tokens on BSC testnet using remix. But I always get an error when I verify. I tried a lot of methods, but still no solution. In fact the generated Bytecodes are not wrong, but I ...
0
votes
0answers
17 views

Is the rate limit of bsc rpc endpoint for single user or all users that are using it at the same time? [closed]

I'm trying to build a bot that gets all of the transactions that occur in the BSC mainnet, I leant that there is a rate limit for the json rpc endpoints: https://docs.binance.org/smart-chain/developer/...
0
votes
1answer
7 views

Subscribing to ERC20(BEP20) events, in BSC

I am trying to setup a node to be able to query all BEP20 transactions in real time. My eth.syncing stats are: > eth.syncing { currentBlock: 9489998, highestBlock: 9490087, knownStates: ...
0
votes
0answers
22 views

Got hacked via DEX? Funds are missing

Yesterday I bought some tokens using pancake swap in BSC. Today when i went to check them i had 0 funds in the BSC network. Transaction hx is ...
0
votes
0answers
16 views

Can I use a smart contract to receive payment from all users using BNB? [duplicate]

I have to receive payments from all users using my website by bnb only which I will receive in smart contract address. I am not using any token to receive payment so can I receive it.? Secondly please ...
0
votes
0answers
17 views

Crowdsale smart contract frontend creation

I wanted to make a front end webpage for buyflamecoin function in my crowdsale smart contract. Crowd sale contract link : https://bscscan.com/address/0x959a4c2980ee9541b7359a1ab67b3b963c33ab93 Can ...
0
votes
1answer
26 views

Please help me fix this. VM error: revert

//SPDX-License-Identifier: MIT pragma solidity ^0.7.4; /** * Standard SafeMath, stripped down to just add/sub/mul/div */ library SafeMath { function add(uint256 a, uint256 b) internal pure ...
0
votes
0answers
20 views

tx fee (5274661132.35 ether) exceeds the configured cap (1.00 ether) Web3 JS

New to web3 JS. using Binance Smart Chain (mainnet) :( I am getting this error: tx fee (5274661132.35 ether) exceeds the configured cap (1.00 ether) Below are my parameters (done on php for some ...
0
votes
0answers
13 views

Switching between different networks in Metamask using web3 or any other automated way

I have two different smartchains in Metamask wallet ETH BSC Now I want to transfer money from one network to the other in the same wallet address either using web3.js or any other possible ...
0
votes
1answer
57 views

Verify BEP20 token created by another smart contract

I am making Factory contract to automatically create a BEP20 token for my users. It can normally create a BEP20 token but I am not able to verify it through BSCscan. My contract code is below: // SPDX-...
0
votes
0answers
8 views

Error 'ds-math-sub-underflow' when trying to use pancakeswap router contract

I'm coding a simple app in node.js to retrieve token prices. I am using router contract '0x10ED43C718714eb63d5aA57B78B54704E256024E' and ethers.js library Most addresses seem to work correctly, but ...
0
votes
1answer
26 views

Smart contract to exchange old bep20 tokens for new ones

I've created two Bep20 tokens (old/new) and I was wondering if I could write a smart contract that exchanges/swaps old tokens for new ones. Is there a simple way to exchange two Bep20 tokens using a ...
0
votes
0answers
19 views

Retrieve APR data from Pancakeswap Finance [BSC]

Is there an API by Pancakeswap Finance (BSC) to receive the APR for each farm and pools? I personally don't wan't to calculate all APR individually by hand.
0
votes
1answer
20 views

Failed transaction uses up all the gas instead of a small part needed to revert the execution

On BSC, usually when your transaction to a contract fails such a tx uses about 30k gas when you do it through a wallet. But when a transaction made with an ethers.js script fails, it uses all the gas ...
1
vote
1answer
55 views

Binance Smart Chain RPC Rate Limit

In the BSC documentation, it says that we can make 10K/5mins RPC requests to their servers. Do you guys know if it's 10K per app or user?
0
votes
1answer
28 views

Is there a way to lower BEP20 smart contract function gas fee costs?

A BEP20 smart contract needs to have a function called periodically (At least once a day) to process some data. The gas fee required to do so is quite high (>0.1 BNB every call). What are some ways ...
2
votes
1answer
368 views

How do I get the implementation contract address from the proxy contract address?

I'm using web3.py to interact with multiple unknown contracts, where I don't know beforehand if a contract is a proxy contract or the actual contract. I'm getting the ABIs for the contracts on-the-fly ...
0
votes
0answers
7 views

Getting correct decimals in ethers.io library, using getAmountsOut() ABI

I am using the getAmountsOut() interface to get the current PancakeSwap price of a random BSC token that has 9 decimals in its smart contract, see https://bscscan.com/token/...
0
votes
1answer
46 views

How to deal with liquidity for a BEP-20 token?

I've released a few BEP-20 tokens so far and some of them have been quite successful at launch but then suffer from lack of perpetual marketing, my team and I are dealing with this challenge. However, ...
0
votes
1answer
70 views

Trying to get working wallectconnect/web3modal on safari/ios

I'm trying to get a React site work with web3modal and walletconnect. When in a Metamask browser, my dapp on BSC works, but on Safari (MacOs and iOS), I show the web3modal, user gives permissions to ...
0
votes
0answers
14 views

Is adding logo only once to the blockchain or is it specific to each exchange?

I have created a new token and I want to add a logo to it. If I add it to BSCScan or EtherScan (following the requirements like website,email,etc...), then I go to exchanges like Poocoin - does it ...
0
votes
0answers
11 views

Although one or more Error Occurred[execution reverted] [duplicate]

actualy i use justliquidity to place order token change to bnb in price 0.0002 but i cant cancel my order and trustwallet connect justliquidity and i cant how solve probleme and when click cancel ...
1
vote
1answer
53 views

Web3.js: account.signTransaction is too slow

I'm developing a swap bot to swap tokens on BSC using PancakeSwap router. so this is my code import {account, web3} from '../index.js'; const timeOut = Math.floor(new Date().getTime() / ...
0
votes
1answer
22 views

Can you directly port ETH mainnet contract to BSC?

Can you directly port ETH mainnet contract to BSC ? Also, does Infura work with BSC ? Does Web3 work with BSC ?
0
votes
1answer
16 views

How does CAKE get burnt since all the burn functions are internal in the source code

I am trying to study CAKE of Pancakeswap source code. I don't seem to grasp how does the owner or users burn the tokens(CAKE) since all burn functions in the source code are internal functions. on of ...
0
votes
0answers
10 views

Do we use Jager or Wei for BSC?

I am trying to prepare a transaction by using etherjs, but I can't find a trustable source to know which units to use, does ethersjs know what to do just by having the right provider URL ? Since Jager ...
0
votes
0answers
32 views

Retrieving APY from PancakeSwap CAKE auto-compounding pool

Looking at the contract from the CAKE auto-compounding pool (https://bscscan.com/address/0xa80240Eb5d7E05d3F250cF000eEc0891d00b51CC#code), it appears there is no direct call for calculating the ...
0
votes
1answer
206 views

Gas estimation errored with the following message (see below). i am trying to deploy in bsc testnet

i am trying to deploying a contract to bsc testnet but it getting this error : Gas estimation errored with the following message. The transaction execution will likely fail. Do you want to force ...
0
votes
0answers
17 views

tokens do not appear in wallet after contract creation

I'm doing the tests for creating a token. After compiling everything without any error, deploying and confirming it on the testnet network, the tokens do not appear in the wallet, and in testnet.bsc, ...
0
votes
1answer
98 views

Check valid slippage before sending transaction using web3

I have a web3 script that buys and sells the token on Binance Smart Chain (BSC). Now let's say there is a token that has mentioned a mandatory 10% fee in their contract but I don't know about that at ...
0
votes
0answers
36 views

How can I listen emitted events from BSC network

How can I noticed and get the results of events whenever events are emitted on BSC network. I have tried web3.on() method, but the on() method can work with WebSocketProvider and BSC network does not ...
0
votes
1answer
38 views

Creating complex transaction

I need help with understanding how this transaction was created. Link: https://bscscan.com/tx/0x02fa7264da976f01138b452b737350e4382e54fa60ee8b68b23b2efabb43c54a How it is possible to make a ...
0
votes
1answer
24 views

What are my constructor arguments ABI-Encoded (noob)

pragma solidity ^0.8.2; contract Token{ mapping(address => uint) public balances; mapping(address => mapping(address => uint)) public allowance; uint public totalSupply = ...
0
votes
1answer
161 views

What is the fastest way of continuously selling portions of my tokens using web3.py?

I am a beginner using web3py. I want to sell portions of my token holdings at a fast rate. Is it possible to do it without having to put in time.sleep() for the delay of waiting for approval? I tried ...
0
votes
0answers
65 views

Understand price impact and liquidity in pancakeswap

I am trying to understand how the price impact and liquidity was calculated in uniswap or pancakeswap through the router contract? UNI Router: https://etherscan.io/address/...
0
votes
0answers
73 views

Scam: Variation of the price of the token in 5 orders of magnitude in a second. How does it work?

When purchasing a token, the wrong price is displayed. Specifically, trade.minimumAmountOut (slippageTolerance).raw ('trade' object is from @pancakeswap-libs/sdk-v2) minimumAmountOut shows much less ...
1
vote
0answers
26 views

How does “migrate” function in PancakeSwap Staking Contract work?

I am discovering PancakeSwap Staking contract ! How exactly this below function works ? Here is address contract https://bscscan.com/address/0x73feaa1ee314f8c655e354234017be2193c9e24e#code // Migrate ...
0
votes
0answers
48 views

How “ migrate ” function on PanCake Masterchef Smart Contract work?

Hi folks, I am discovering PancakeSwap Staking contract ! How exactly this below function works ? Here is address contract : https://bscscan.com/address/0x73feaa1ee314f8c655e354234017be2193c9e24e#code ...
0
votes
0answers
242 views

Pancakeswap Error when trying to swap token to BNB using Web3.js and Python

I have written a Swap in python using web3.js. I can't seem to get it to work when I try to buy BNB for tokens. The transaction is created, but the Pancakeswap router gives me the following error: ...
0
votes
0answers
30 views

How to view staking rewards on blockchain? (Pancake Swap)

I recently staked CAKE in Pancake Swap's CAKE auto-compounding SYRUP pool. I get regular, auto-compounding rewards. No problem here. However, I need to see the individual transactions (i.e. have a ...
1
vote
0answers
28 views

Same contract can have different contract creation code?

Deploying a factory contract in Hardhat console and BSC testnet gives me different INIT_CODE_PAIR_HASH using the line of code below. Pair is a contract imported externally and should be the same in ...
0
votes
1answer
72 views

JSON-RPC Error - Exection Reverted (-32000) / Empty ABI

I am attempting to deploy a BEP20 contract on BSC testnet via Remix. I am using compiler v6.12 and am successfully compiling my Solidity. However, when I deploy the contract, I am receiving the ...
2
votes
0answers
36 views

What is the best way to accept either custom erc20 token or ether

I am working on marketplace smart contract where users can sell erc721 tokens. Everything seems to be working. I wanted to receive the erc20 token and ether both as payment methods. So what I do is to ...
0
votes
1answer
209 views

WalletConnect web3 provider issue with TrustWallet (Multi-coin wallet)

I am using walletconnect/web3-provider to try to connect to trustwallet ios APP. My config on walletconnect is listed below: try { console.log("Log in with connect wallet") const ...
0
votes
1answer
254 views

swapExactTokensForETHSupportingFeeOnTransferTokens fails for some tokens when called from script, but works when submitted from Pancakeswap

I have a simple code using web3.py that sells BEP20 tokens: deadline = int(time.time()) + 1200; nonce = w3.eth.get_transaction_count(w3.eth.default_account) sellTxn = self.web3Context.routerContract....
0
votes
1answer
31 views

Pancakeswaps Router 2.0 swapExactTokensForTokens fails. No errors

Please tell me why this tx is failed? https://bscscan.com/tx/0xa5d5df02bfd7ea6f69664f3f404973e572fca20b35e0c5d27fd74aea0fe3b5cf Tx Data: 0 amountIn uint256 66350193942313470867 1 amountOutMin ...
1
vote
2answers
621 views

Is there a way to convert Binance pegged tokens into Ethereum based tokens?

This is confusing me a lot. Basically if you have a metamask wallet and have some BNB there, and you use PancakeSwap for example, even if you convert the BNB into ETH or BTC, it won't be the real ...
3
votes
1answer
240 views

Web3: Get token address from pair address

I am studying all listed pairs on Pancakeswap. I get the pair address from PCS_FACTORY_ADDRESS="0xca143ce32fe78f1f7019d7d551a6402fc5350c73" PCS_FACTORY_ADDRESS = Web3.toChecksumAddress(...
0
votes
1answer
27 views

How can I Recover funds sent to a contract created with remix.etherum.org?

Trying to get experience on blockchain and smartcontracts, I created a contract on remix.etherum.org. I sent funds to that contract and now the funds are stagnant, in limbo. Since I am the contract ...