Skip to content

Commit f150074

Browse files
copyright email
1 parent dd8a46d commit f150074

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

ChainForge/routes.py

+16-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import ast
1111
from ChainForge.compare_images import main as compare_images
1212
from ChainForge.add_watermark import add_watermark
13+
from ChainForge.send_email import send_email
1314

1415
# forms
1516
from ChainForge.forms import (
@@ -66,7 +67,7 @@
6667

6768
# from web3.auto import w3
6869
contract_mi = w3.eth.contract(
69-
abi=abi, bytecode=bytecode, address="0x1C5Fd8e7a2D0adf27074f2f7D7BEDFfb6eaa3564"
70+
abi=abi, bytecode=bytecode, address="0x376d9d672Ff90bf84265907419DE42A25CB2cC49"
7071
)
7172

7273
# # private_keys = {
@@ -83,7 +84,7 @@
8384

8485
Account.enable_unaudited_hdwallet_features()
8586

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"
8788

8889
accounts = w3.eth.accounts
8990
for i in range(len(accounts)):
@@ -652,6 +653,10 @@ def dispute():
652653
)
653654
signed_txn = account.sign_transaction(transaction)
654655
try:
656+
receiver = None
657+
title = None
658+
id = None
659+
655660
tx_hash = w3.eth.send_raw_transaction(signed_txn.rawTransaction)
656661
print(f"Transaction sent: {tx_hash.hex()}")
657662

@@ -669,11 +674,20 @@ def dispute():
669674
db.session.commit()
670675
flash(f"Dispute Resolve similarity:{similarity_index}", "success")
671676
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
672680
else:
673681
db.session.delete(your_art)
674682
db.session.commit()
675683
flash(f"Dispute Resolve similarity:{similarity_index}", "success")
676684
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)
677691
# for log in logs:
678692
# print(f"Project created with ID: {log.args.projectId}")
679693
# print(f"Project Name: {log.args.name}, Description: {log.args.description}, Price: {log.args.price}")

requirements.txt

+8-1
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,22 @@ grpcio-status==1.60.1
5353
hexbytes==0.3.1
5454
httplib2==0.22.0
5555
idna==3.6
56+
imageio==2.33.1
5657
itsdangerous==2.1.2
5758
Jinja2==3.1.3
5859
jsonschema==4.21.1
5960
jsonschema-specifications==2023.12.1
6061
kiwisolver==1.4.5
62+
lazy_loader==0.3
6163
lru-dict==1.2.0
6264
MarkupSafe==2.1.5
6365
matplotlib==3.8.2
6466
msgpack==1.0.7
6567
multidict==6.0.5
68+
networkx==3.2.1
6669
numpy==1.26.3
6770
oauthlib==3.2.2
71+
opencv-python==4.9.0.80
6872
packaging==23.2
6973
parsimonious==0.9.0
7074
pillow==10.2.0
@@ -96,11 +100,14 @@ requests-oauthlib==1.3.1
96100
rlp==4.0.0
97101
rpds-py==0.17.1
98102
rsa==4.9
103+
scikit-image==0.22.0
104+
scipy==1.12.0
99105
secure-smtplib==0.1.1
100106
shell==1.0.1
101107
six==1.16.0
102108
SQLAlchemy==2.0.25
103109
sqlparse==0.4.4
110+
tifffile==2024.1.30
104111
toolz==0.12.1
105112
typing_extensions==4.9.0
106113
tzdata==2023.4
@@ -111,4 +118,4 @@ websockets==12.0
111118
Werkzeug==3.0.1
112119
whitenoise==6.6.0
113120
WTForms==3.1.2
114-
yarl==1.9.4
121+
yarl==1.9.4

0 commit comments

Comments
 (0)