Skip to content

Commit

Permalink
actual gas cost estimate
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbcannell committed Apr 7, 2020
1 parent 9d2e715 commit 4b69391
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tst-ethereum/distributor/distribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ def update(rec, idx, beg, end, amt, amt_sent, funder_pubkey, funder_privkey, non

def distribute_partial(N, funder_pubkey, funder_privkey, nonce):

gas = 32000 + 40000*N;
txn = distributor_main.functions.distribute_partial(N
).buildTransaction({'chainId': 1, 'from': funder_pubkey, 'gas': 250000, 'gasPrice': w3.toWei('8', 'gwei'), 'nonce':nonce, }
).buildTransaction({'chainId': 1, 'from': funder_pubkey, 'gas': gas, 'gasPrice': w3.toWei('1', 'gwei'), 'nonce':nonce, }
)

print(f"Funder signed transaction:");
Expand Down

0 comments on commit 4b69391

Please sign in to comment.