MultiversX Tracker is Live!

Ended up paying 45c on a binance smart chain transaction thru web3.py

Etherum Reddit

More / Etherum Reddit 242 Views

i'm new to web3 development with web3 python and was trying out the following script:

from web3 import Web3 key = "thisismyprivatekey" address = "0x8Aaca3e2a858c2d5c3ABA66a343A6F6DEA5017e9" w3 = Web3(Web3.HTTPProvider("https://bsc-dataseed1.binance.org:443")) nonce = w3.eth.getTransactionCount(address) tx = { "nonce" : nonce, "to" : recipient, "value" : w3.toWei(amount,'ether'), "gas" : 21000, "gasPrice": 50 } signed_tx = w3.eth.account.sign_transaction(tx,key) sent_tx = w3.eth.sendRawTransaction(signed_tx.rawTransaction) return w3.toHex(sent_tx) 

I've attempted to use a lower gas price, but it ends up with an error. every time i use my wallet (Metamask/Okex) I always pay less than 5c in transaction fees.

what went wrong?

submitted by /u/masterofdead4
[link] [comments]
Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments