-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
- Version: 5.10.0
- Python: 3.7.7
- OS: osx
pip freeze
output
appnope==0.1.0
attrs==19.3.0
backcall==0.1.0
base58==2.0.0
bitarray==1.2.2
bleach==3.1.5
certifi==2020.4.5.1
chardet==3.0.4
cytoolz==0.10.1
decorator==4.4.2
defusedxml==0.6.0
entrypoints==0.3
eth-abi==2.1.1
eth-account==0.5.2
eth-hash==0.2.0
eth-keyfile==0.5.1
eth-keys==0.3.3
eth-rlp==0.1.2
eth-typing==2.2.1
eth-utils==1.9.0
hexbytes==0.2.0
idna==2.9
importlib-metadata==1.6.0
ipfshttpclient==0.4.13.2
ipykernel==5.3.0
ipython==7.14.0
ipython-genutils==0.2.0
ipywidgets==7.5.1
jedi==0.17.0
Jinja2==2.11.2
jsonschema==3.2.0
jupyter==1.0.0
jupyter-client==6.1.3
jupyter-console==6.1.0
jupyter-core==4.6.3
lru-dict==1.1.6
MarkupSafe==1.1.1
mistune==0.8.4
multiaddr==0.0.9
nbconvert==5.6.1
nbformat==5.0.6
netaddr==0.7.19
notebook==6.0.3
numpy==1.18.4
packaging==20.4
pandas==1.0.3
pandocfilters==1.4.2
parsimonious==0.8.1
parso==0.7.0
pexpect==4.8.0
pickleshare==0.7.5
prometheus-client==0.7.1
prompt-toolkit==3.0.5
protobuf==3.12.1
ptyprocess==0.6.0
pycryptodome==3.9.7
Pygments==2.6.1
pyparsing==2.4.7
pyrsistent==0.16.0
python-dateutil==2.8.1
pytz==2020.1
pyzmq==19.0.1
qtconsole==4.7.4
QtPy==1.9.0
requests==2.23.0
rlp==1.2.0
Send2Trash==1.5.0
six==1.14.0
terminado==0.8.3
testpath==0.4.4
toolz==0.10.0
tornado==6.0.4
traitlets==4.3.3
typing-extensions==3.7.4.2
urllib3==1.25.9
varint==1.0.2
wcwidth==0.1.9
web3==5.10.0
webencodings==0.5.1
websockets==8.1
widgetsnbextension==3.5.1
zipp==3.1.0
What was wrong?
from web3.auto.infura import w3
transaction = {
'to': '0x465DCa9995D6c2a81A9Be80fBCeD5a770dEE3daE',
'value': 1000,
'gas': 2000000,
'gasPrice': 20000000000,
'nonce': 0,
'chainId': 1,
}
signed_tx = w3.eth.account.sign_transaction(transaction, priv_key)
w3.eth.sendRawTransaction(signed_tx.rawTransaction)
and then I get this
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-126-a30720cb9cc3> in <module>
----> 1 w3.eth.sendRawTransaction(signed_tx.rawTransaction)
~/v/ecc/lib/python3.7/site-packages/web3/eth.py in sendRawTransaction(self, raw_transaction)
390 return self.web3.manager.request_blocking(
391 RPC.eth_sendRawTransaction,
--> 392 [raw_transaction],
393 )
394
~/v/ecc/lib/python3.7/site-packages/web3/manager.py in request_blocking(self, method, params, error_formatters)
151 if "error" in response:
152 apply_error_formatters(error_formatters, response)
--> 153 raise ValueError(response["error"])
154
155 return response['result']
ValueError: {'code': -32000, 'message': 'insufficient funds for gas * price + value'}
w3.eth.getBalance("0xd93800B7290B37a3ac36e4cDd3F881a929acD4A3")
is the address from which I am sending, and it has enough ether on it. Very perplexed about this
How can it be fixed?
??
Metadata
Metadata
Assignees
Labels
No labels