10
10
import ast
11
11
from ChainForge .compare_images import main as compare_images
12
12
from ChainForge .add_watermark import add_watermark
13
+ from ChainForge .send_email import send_email
13
14
14
15
# forms
15
16
from ChainForge .forms import (
66
67
67
68
# from web3.auto import w3
68
69
contract_mi = w3 .eth .contract (
69
- abi = abi , bytecode = bytecode , address = "0x1C5Fd8e7a2D0adf27074f2f7D7BEDFfb6eaa3564 "
70
+ abi = abi , bytecode = bytecode , address = "0x376d9d672Ff90bf84265907419DE42A25CB2cC49 "
70
71
)
71
72
72
73
# # private_keys = {
83
84
84
85
Account .enable_unaudited_hdwallet_features ()
85
86
86
- mnemonic_phrase = "keen inquiry empty impose tourist grit ivory control reunion filter hello nothing "
87
+ mnemonic_phrase = "wealth horn guard program degree correct parrot weather forget front void pistol "
87
88
88
89
accounts = w3 .eth .accounts
89
90
for i in range (len (accounts )):
@@ -652,6 +653,10 @@ def dispute():
652
653
)
653
654
signed_txn = account .sign_transaction (transaction )
654
655
try :
656
+ receiver = None
657
+ title = None
658
+ id = None
659
+
655
660
tx_hash = w3 .eth .send_raw_transaction (signed_txn .rawTransaction )
656
661
print (f"Transaction sent: { tx_hash .hex ()} " )
657
662
@@ -669,11 +674,20 @@ def dispute():
669
674
db .session .commit ()
670
675
flash (f"Dispute Resolve similarity:{ similarity_index } " , "success" )
671
676
flash (f"Their post got deleted" , "success" )
677
+ receiver = User .query .filter_by (id = their_art .user_id ).first ().email
678
+ title = their_art .title
679
+ id = their_art .id
672
680
else :
673
681
db .session .delete (your_art )
674
682
db .session .commit ()
675
683
flash (f"Dispute Resolve similarity:{ similarity_index } " , "success" )
676
684
flash (f"Your post got deleted as if was uploaded later" , "danger" )
685
+ receiver = User .query .filter_by (id = your_art .user_id ).first ().email
686
+
687
+ title = your_art .title
688
+ id = your_art .id
689
+
690
+ send_email (receiver ,title ,id )
677
691
# for log in logs:
678
692
# print(f"Project created with ID: {log.args.projectId}")
679
693
# print(f"Project Name: {log.args.name}, Description: {log.args.description}, Price: {log.args.price}")
0 commit comments