Skip to content

Commit

Permalink
minor bugfix and web3 api call updates
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenghaven committed Jul 1, 2024
1 parent b91acff commit 667a0d9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion PyEthHelper/EthContractHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def _DoTransaction(
# need to sign
tx = executable.build_transaction(msg)
signedTx = _SignTx(w3, tx, privKey, confirmPrompt)
txHash = w3.eth.send_raw_transaction(signedTx.rawTransaction)
txHash = w3.eth.send_raw_transaction(signedTx.raw_transaction)

receipt = w3.eth.wait_for_transaction_receipt(txHash)

Expand Down
3 changes: 2 additions & 1 deletion PyEthHelper/GethNodeGuard.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def __init__(
super(GethDevNodeGuard, self).__init__(cmd=cmd, termTimeout=termTimeout)

self.httpPort = httpPort
self.connTimeout = connTimeout

self.w3 = None
self.devAccount = None
Expand All @@ -114,7 +115,7 @@ def Start(self) -> None:
web3.HTTPProvider(f'http://127.0.0.1:{self.httpPort}')
)
while not self.w3.is_connected():
if time.time() - startTime >= self.termTimeout:
if time.time() - startTime >= self.connTimeout:
raise RuntimeError('failed to connect to the Geth node')
time.sleep(connInterval)

Expand Down
2 changes: 1 addition & 1 deletion PyEthHelper/_Meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@



__version__ = '0.1.3'
__version__ = '0.1.4'

PKG_AUTHOR = 'Languages, Systems, and Data Lab at UC Santa Cruz'
PKG_NAME = 'PyEthHelper'
Expand Down

0 comments on commit 667a0d9

Please sign in to comment.