Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpdl-bloxberg
cert-api
Commits
5dbdefaa
Commit
5dbdefaa
authored
Jul 23, 2021
by
James Lawton
Browse files
moved parity api lookup
parent
35f25d3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
cert_issuer/blockchain_handlers/ethereum_sc/connectors.py
View file @
5dbdefaa
...
...
@@ -70,11 +70,6 @@ class EthereumSCServiceProviderConnector(ServiceProviderConnector):
def
create_transaction
(
self
,
method
,
recipient_address
,
token_uri
,
blockchain_bytes
,
attempt_number
):
try
:
currentNonce
=
self
.
get_current_nonce
()
except
Exception
:
raise
print
(
'Couldnt get current nonce'
)
gas_limit
=
self
.
cost_constants
.
get_gas_limit
()
estimated_gas
=
self
.
_contract_obj
.
functions
[
method
](
recipient_address
,
token_uri
,
blockchain_bytes
).
estimateGas
()
*
5
if
estimated_gas
>
gas_limit
:
...
...
@@ -95,6 +90,12 @@ class EthereumSCServiceProviderConnector(ServiceProviderConnector):
#Consistent nonce with incremental, doesnt work with concurrency
nonceIncremental
=
self
.
_w3
.
eth
.
getTransactionCount
(
self
.
_w3
.
eth
.
defaultAccount
)
try
:
currentNonce
=
self
.
get_current_nonce
()
except
Exception
:
raise
print
(
'Couldnt get current nonce'
)
print
(
"current Nonce: "
,
currentNonce
)
#Using request to parity node for current nonce.
...
...
Iosif Peterfi
@ipet
mentioned in commit
e6084cee
·
Sep 12, 2021
mentioned in commit
e6084cee
mentioned in commit e6084ceed8109a0e33b472d13d432de0739209ad
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment