Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nucleo
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Santiago
nucleo
Commits
6aa05372
Commit
6aa05372
authored
4 years ago
by
Robert Martin-Legene
Browse files
Options
Downloads
Patches
Plain Diff
parches
parent
615b3d66
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/libbfa/__init__.py
+5
-5
5 additions, 5 deletions
bin/libbfa/__init__.py
bin/libbfa/requirements.txt
+1
-0
1 addition, 0 deletions
bin/libbfa/requirements.txt
with
6 additions
and
5 deletions
bin/libbfa/__init__.py
+
5
−
5
View file @
6aa05372
...
...
@@ -181,20 +181,20 @@ class Account:
signed
=
web3
.
Web3
().
eth
.
account
.
sign_transaction
(
tx
,
self
.
key
)
return
signed
# if kwargs has extragas=50000 then we add that number to the amount
# of gas for the transaction
def
calculate_tx_details
(
self
,
w3
:
web3
.
Web3
,
*
args
,
**
kwargs
)
->
dict
:
# Nonce may have increase on the network without us noticing
# if kwargs has extragas=50000 then we add that number to the amount
# of gas for the transaction
afunction
=
kwargs
.
get
(
'
function
'
)
# Nonce may have increased on the network without us noticing
# or past transactions may not yet have been mined (and a flooded
# txpool).
# This is a resonable fix (try not to send too many transactions)
# If you use waitForTransactionReceipt() between each transaction
# you will not have problems because of this.
afunction
=
kwargs
.
get
(
'
function
'
)
self
.
nonce
=
max
(
self
.
nonce
,
w3
.
eth
.
getTransactionCount
(
self
.
address
))
# Set minimum gasPrice to 1 Gwei, but allow more if the network says so.
details
=
{
'
chainId
'
:
w3
.
eth
.
chain_id
()
,
'
chainId
'
:
w3
.
eth
.
chain_id
,
'
gasPrice
'
:
min
(
w3
.
toWei
(
'
1
'
,
'
gwei
'
),
w3
.
eth
.
gasPrice
),
'
nonce
'
:
self
.
nonce
,
'
from
'
:
self
.
address
,
...
...
This diff is collapsed.
Click to expand it.
bin/libbfa/requirements.txt
+
1
−
0
View file @
6aa05372
...
...
@@ -2,3 +2,4 @@ web3
rusty-rlp
ecdsa
Crypto
dnspython
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment