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?
[link] [comments]
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