Questions tagged [bsc]

86 questions
1
vote
1 answer

Getting error when trying to run Ganache (forking BSC chain)

I have installed Ganache following instructions from https://github.com/trufflesuite/ganache#documentation I am trying to fork BSC chain for which I have a node running locally which is fully synced (I want to fork this for which I have provided the…
1
vote
1 answer

How can I combine 2 smart contract functions in one transaction?

I am building two smart contracts, one is casino contract and the other one is lottery contract(planning to deploy it separately). I want to combine both the placebet(casino) function and buyticket(lottery) function in one call. Once user would call…
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

Why are all ethersjs & web3js calls to BSC network failing?

All calls using "wss://bsc-ws-node.nariox.org:443" and other RPC/WSS endpoints have been failing throughout this week. It just hangs and doesn’t return anything. This is happening in BSC network, but is okay in Polygon network. On BSC network it…
akeem
  • 117
  • 1
  • 12
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

When I use golang call the contract method,how can I confirm this trx status?

I mint the token to my account and it return transaction hash ,but I wnat to now this hash status .Like js can use callback function to wait this trx finished var promise = await token.mint("my account",1) …
Mr.c
  • 23
  • 5
1
vote
2 answers

buildTransaction from web3 python too slow

I'm trying to build transaction from web3 python library. swap_transaction = transaction.buildTransaction( { "from": Address, "gas": 300000, "gasPrice": w3.eth.gas_price, "nonce": nonce, } ) I met a problem…
Sergey Ko
  • 11
  • 2
1
vote
1 answer

Filter any Event using ethers.js and local node (Ganache-cli)

anyone can help me? I am using ganache-cli with fork bsc mainnet. When I use queryFilter, javascript show me this error: "Number can only safely store up to 53 bits" In bsc mainnet it works perfectly How can I solve this? this is the code : const…
1
vote
1 answer

Obtain source code from uncompiled contract with bytecode and ABI?

Theres a contract on BSC that isnt verified and I am really keen to get the code behind it. I have both the full bytecode and ABI. Is it possible to obtain readable source code using this? Thanks!
James
  • 101
  • 2
  • 10
1
vote
1 answer

How to set an icon for a coin using truffle framework

Hello I am currently developing a cryptocurrency on the BSC (it is for fun.) I am using BSC Studio and truffle. I was wondering how I can set and icon for my coin I am assuming it is somewhere in Coin.json but I cant seem to find any option that…
Wemmons
  • 42
  • 5
1
vote
1 answer

Sell Function on Pancakeswap with Ether Library on Node.js

I am trying to swap my busd tokens for bnb (wbnb) by using pancakeswap router v2 on testnet. Though I am having CALL_EXCEPTION. Before I dive into code, I have the same issue on bscscan. I don't know if it's related but, even though I successfully…
starkm
  • 859
  • 1
  • 10
  • 21
1
vote
2 answers

Crypto tradingbot (Pancakeswap) using node.js

I am using node.js in VSCode. I know another programming language decently enough that I could find relevant code snippets and create the below code. However, my JavaScript knowledge is very limited. The below code crashes at line 52, but states "No…
LDK
  • 51
  • 1
  • 2
1
vote
1 answer

In Solidity smart contracts, what variables can be made dynamic?

I understand that Smart Contracts are immutable once deployed. But how do you make changes to things like minting prices, gas prices afterward? Are there variables that can be written as dynamic for updates to be implemented through an admin panel?
0
votes
1 answer

Axelar "Transaction Underpriced" Error On Token Deployment For BSC

I am getting this error when am trying to deploy token on axelar error come from BSC '{"jsonrpc":"2.0","id":56,"error":{"code":-32000,"message":"transaction underpriced"}}\n'
benjamin852
  • 509
  • 7
  • 19
0
votes
1 answer

How to send BNB in BSC mainnet using Web3

I am going to send BNB using web3 on BSC main net. BSC mainnet is as follow. MAINNET=https://bsc-dataseed1.binance.org:443 const web3 = new Web3(process.env.MAINNET); const BNBcontract = await new web3.eth.Contract(BNBabi,…
blue water
  • 11
  • 4