Questions tagged [bep20]

68 questions
10
votes
1 answer

How to get the price of a BEP20 token?

I would like to calculate the price of a BEP20 token in BNB. I checked poocoin and pancakeswap how they calculate the price. As I see they call continously the bsc-dataseed through web3.js, but I didn't find the solution yet. The current status of…
Erik
  • 101
  • 1
  • 1
  • 4
9
votes
2 answers

How do I find the tax of a token programatically?

I'm trying to fetch the Buy or Sell Tax of a BSC token, but I haven't found a way yet. I query the DEX via router_contract.functions.getAmountsOut(web3.toWei(1, 'Ether'), [ buying_token_address, pair_token]).call() (in this case pancakeswap), but…
Crypto7
  • 91
  • 1
  • 2
2
votes
1 answer

nodejs web3 bsc bep20 token transfer no confirmation

I'm trying to transfer a BEP-20 token on BSC from one Wallet to Another. I actually had it at one point and somehow messed up while doing code cleanup. Anway, I need some help. When I send my transaction I never get a confirmation. I get a hash for…
Jim_M
  • 273
  • 1
  • 2
  • 10
2
votes
1 answer

TypeError on Remix for BSC Contract

I have this error "TypeError: Return argument type address is not implicitly convertible to expected type (type of first return variable) address payable. --> Driven.sol:233:16: | 233 | return msg.sender; | ^^^^^^^^^^" for the following…
user15809778
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

Error sending assets to Binance address with python/web3

I am trying to send BNB from a Trust-Wallet with a python script to my binance account. Simple function: def send_bnb(to_public, from_public, from_secret, amount): nonce = web3.eth.getTransactionCount(from_public) tx = { 'chainId':…
maufer
  • 23
  • 5
1
vote
1 answer

How to burn token of Smart contract from another Smart contract?

Let say there is a BEP20 token (tokenA)on the blockchain with an internal function _burn and a total supply of 100000000 token i want to write a new Smart contract that can burn token TokenA and substract from the supply how can i proceed? I've…
Rozales
  • 21
  • 1
  • 2
1
vote
0 answers

How to correctly use a BUSD liquidity pool

We're working on a BEP20 token and given the current market, we'd like to use a BUSD LP. The only problem is that the reflections and other functions aren't compatible. Transactions go through successfully, but the reflections and other functions…
1
vote
0 answers

How to bridge an existing eth token to bsc smart chain

I created an simple Erc 20 with basic mint and burn functions.I want to deploy it to bsc via a bridge.How do i implement a bridge for Eth-Bsc token?
Webdevmzf
  • 11
  • 3
1
vote
0 answers

PancakeSwap V2 functions called automatically after adding myToken to a new pool: safebuy(), swapExactETHForTokens(), swapExactTokensForTokens()

I've created my own BEP20 token on BinanceSmartChain. After token creation with myWallet I added liquidity on PancakeSwap to a new liquidity pool (myToken, WBNB -> myPool). There should be two transactions (token transfers) at the BSC explorer…
1
vote
0 answers

BEP20 token not showing any supply and details on bscscan

I have just cloned a bep20 token and deployed on bsc test net but after successfull deploy tokens are not allocated to the admin wallet even when I add token to metamask it shows 0 value of token even though I have deployed with same wallet also…
1
vote
1 answer

BEP-20/ERC20 - how to add Tax fees when token is transfer?

Full Source:https://github.com/laronlineworld/NewToken/blob/main/NewToken.sol This token only deduct tax when selling on dex and tax goes to specific address and the transfer doesn't take any fee. How to add fee when token was transfer? And fees…
1
vote
1 answer

Solidity BEP20 : transferFrom not (or not yet) declared or visible at this point

I'm trying to get into solidity and blockchain development. I've copied the IBEP20 template provided by Binance and pasted it into remix.ethereum.org. Now trying to create a function buyToken() which will hopefully allow me to call a simple version…
dutchsociety
  • 575
  • 4
  • 22
1
vote
1 answer

Returned error: transaction underpriced in BEP-20 Token transaction

I tried to transfer my BEP-20 token using web3.js I deployed new BEP-20 token and could send the tokens to another address using MetaMask. I tried to transfer in nodejs. I followed guide to send token. Below is my code const sendBEP20Transaction =…
sky god
  • 11
  • 1
  • 2
1
vote
0 answers

How to take snapshots of existing crypto holders for providing 1:1 airdrop

I am developing a new BEP-20 token which will replace an abandoned project. I want to give all current holders of the old token equal amount of the new token. My requirements are two How to take snapshot of all the existing holders How to airdrop…
1
2 3 4 5