Blockchain changes
This commit is contained in:
parent
7040284d39
commit
aa94152b31
kitchen_counter/Blockchain2
|
@ -29,7 +29,7 @@ def UploadConversionData(privatekey,pubkey, user_id,project,data):
|
|||
nonce = web3.eth.get_transaction_count(acc1)
|
||||
gas = 300000
|
||||
uploadData = contractInst.functions.UploadConversionData(pubkey,user_id,project,data).build_transaction({
|
||||
'gas': gas ,'gasPrice': web3.eth.gas_price, 'chainId': CHAIN_ID, 'from': acc1, 'nonce': nonce})
|
||||
'gasPrice': web3.eth.gas_price, 'chainId': CHAIN_ID, 'from': acc1, 'nonce': nonce})
|
||||
signed_transaction = web3.eth.account.sign_transaction(uploadData, private_key=privatekey)
|
||||
transaction_hash = web3.eth.send_raw_transaction(signed_transaction.rawTransaction)
|
||||
print("transaction hash",transaction_hash)
|
||||
|
|
|
@ -23,9 +23,8 @@ def UploadScriptAuditData(privatekey,pubkey,user_id,project,data):
|
|||
acc1 = web3.eth.account.from_key(privatekey).address
|
||||
def send_transaction():
|
||||
nonce = web3.eth.get_transaction_count(acc1)
|
||||
gas = 300000
|
||||
uploadData = contractInst.functions.UploadScriptAuditData(pubkey,user_id,project,data).build_transaction({
|
||||
'gas': gas,'gasPrice': web3.eth.gas_price, 'chainId': CHAIN_ID, 'from': acc1, 'nonce': nonce})
|
||||
'gasPrice': web3.eth.gas_price, 'chainId': CHAIN_ID, 'from': acc1, 'nonce': nonce})
|
||||
signed_transaction = web3.eth.account.sign_transaction(uploadData, private_key=privatekey)
|
||||
transaction_hash = web3.eth.send_raw_transaction(signed_transaction.rawTransaction)
|
||||
print("transaction hash",transaction_hash)
|
||||
|
|
|
@ -29,7 +29,7 @@ def UploadScriptPadData(privatekey,pubkey,user_id,project,data):
|
|||
nonce = web3.eth.get_transaction_count(acc1)
|
||||
gas = 300000
|
||||
uploadData = contractInst.functions.UploadScriptPadData(pubkey,user_id,project,data).build_transaction({
|
||||
'gas': gas , 'gasPrice': web3.eth.gas_price, 'chainId': CHAIN_ID, 'from': acc1, 'nonce': nonce})
|
||||
'gasPrice': web3.eth.gas_price, 'chainId': CHAIN_ID, 'from': acc1, 'nonce': nonce})
|
||||
signed_transaction = web3.eth.account.sign_transaction(uploadData, private_key=privatekey)
|
||||
transaction_hash = web3.eth.send_raw_transaction(signed_transaction.rawTransaction)
|
||||
print(web3.eth.gas_price)
|
||||
|
|
Loading…
Reference in New Issue