diff --git a/kitchen_counter/Blockchain2/Conversion.py b/kitchen_counter/Blockchain2/Conversion.py index c9a9007..237c156 100755 --- a/kitchen_counter/Blockchain2/Conversion.py +++ b/kitchen_counter/Blockchain2/Conversion.py @@ -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) diff --git a/kitchen_counter/Blockchain2/scriptAudit.py b/kitchen_counter/Blockchain2/scriptAudit.py index c78e92b..2f6e44e 100755 --- a/kitchen_counter/Blockchain2/scriptAudit.py +++ b/kitchen_counter/Blockchain2/scriptAudit.py @@ -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) diff --git a/kitchen_counter/Blockchain2/scriptpad.py b/kitchen_counter/Blockchain2/scriptpad.py index 27b3905..35bd885 100755 --- a/kitchen_counter/Blockchain2/scriptpad.py +++ b/kitchen_counter/Blockchain2/scriptpad.py @@ -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)