DragandDropGroup commited on
Commit
5417733
·
verified ·
1 Parent(s): ed9d354

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -44,6 +44,11 @@ def upload_to_blockchain(hash):
44
  # create an instance of our contract
45
  contract = w3.eth.contract(address=st.secrets["ContractAddress"], abi = abi)
46
 
 
 
 
 
 
47
  # Call your function: 11155111 is Sepolia's id
48
  call_function = contract.functions.storeHash(hash).build_transaction({"chainId": 11155111,
49
  "from": st.secrets["EthWallet"],
@@ -52,10 +57,6 @@ def upload_to_blockchain(hash):
52
  # Sign transaction
53
  signed_tx = w3.eth.account.sign_transaction(call_function, private_key=st.secrets["pk"])
54
 
55
- print("Sending from:", st.secrets["EthWallet"])
56
- print("To contract:", st.secrets["ContractAddress"])
57
- print("Function input (IPFS hash):", hash)
58
- print("Nonce:", w3.eth.get_transaction_count(st.secrets["EthWallet"]))
59
 
60
 
61
 
 
44
  # create an instance of our contract
45
  contract = w3.eth.contract(address=st.secrets["ContractAddress"], abi = abi)
46
 
47
+ print("Sending from:", st.secrets["EthWallet"])
48
+ print("To contract:", st.secrets["ContractAddress"])
49
+ print("Function input (IPFS hash):", hash)
50
+ print("Nonce:", w3.eth.get_transaction_count(st.secrets["EthWallet"]))
51
+
52
  # Call your function: 11155111 is Sepolia's id
53
  call_function = contract.functions.storeHash(hash).build_transaction({"chainId": 11155111,
54
  "from": st.secrets["EthWallet"],
 
57
  # Sign transaction
58
  signed_tx = w3.eth.account.sign_transaction(call_function, private_key=st.secrets["pk"])
59
 
 
 
 
 
60
 
61
 
62