Ethscriptions commited on
Commit
c77fc93
·
1 Parent(s): b38376b

Add application file

Browse files
data/.DS_Store CHANGED
Binary files a/data/.DS_Store and b/data/.DS_Store differ
 
data/eths_data.db CHANGED
Binary files a/data/eths_data.db and b/data/eths_data.db differ
 
data/ethscriptions_data.db CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7d7b2157915c2dfb62e7818ea065896ec9ba1e6c6695c99ab1014d7d7340f7af
3
- size 399220736
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2093b9daffb2237b803ae863eb6ad5ee6fd6b42421124e1ced4cdb00621fef9a
3
+ size 399704064
img/.DS_Store CHANGED
Binary files a/img/.DS_Store and b/img/.DS_Store differ
 
img/0x.svg ADDED
img/address.svg ADDED
img/discord.svg ADDED
img/etch-market.png ADDED
img/etherscan-logo.svg ADDED
img/etherscan_input_data.png ADDED
img/greater-than.svg ADDED
img/input_data.png ADDED
img/matamask-more.svg ADDED
img/metamask-gear.svg ADDED
img/metamask-line.svg ADDED
img/metamask.svg ADDED
img/send.svg ADDED
img/telegram.svg ADDED
img/x.svg ADDED
pages/1_🔍_批量查询铭文状态.py CHANGED
@@ -25,7 +25,7 @@ def text_to_hex(text):
25
 
26
 
27
  st.set_page_config(page_title="EthPen - 批量查询铭文状态", page_icon="🔍", layout='centered', initial_sidebar_state='auto')
28
- st.subheader('🔍 EthPen - 批量查询铭文状态', anchor=False, divider='rainbow')
29
 
30
  st.write("<style>div.row-widget.stRadio > div{background-color:white;border: 1px solid #e6e9ef;border-radius:8px;padding:10px;box-shadow: 2px 2px 10px #e6e9ef;}</style>", unsafe_allow_html=True)
31
  st.markdown(f'### 💖 查找你心仪的铭文')
@@ -233,7 +233,7 @@ if st.button('🔎 查询', key='🔎 查询'):
233
  result.append({"铭文": names[index], "状态": "未题写", "十六进制数据": all_items[index]})
234
  name_not_yet_total += 1
235
  show_unwritten_list.append(names[index])
236
- st.progress(1 - (name_not_yet_total / names_total), f'题写进度({(1 - (name_not_yet_total / names_total)) * 100:.0f}%):')
237
  if not result:
238
  st.markdown(f'### ☹️ 你来迟了~')
239
  else:
 
25
 
26
 
27
  st.set_page_config(page_title="EthPen - 批量查询铭文状态", page_icon="🔍", layout='centered', initial_sidebar_state='auto')
28
+ st.subheader(r'🔍 :rainbow[EthPen - 批量查询铭文状态]', anchor=False, divider='rainbow')
29
 
30
  st.write("<style>div.row-widget.stRadio > div{background-color:white;border: 1px solid #e6e9ef;border-radius:8px;padding:10px;box-shadow: 2px 2px 10px #e6e9ef;}</style>", unsafe_allow_html=True)
31
  st.markdown(f'### 💖 查找你心仪的铭文')
 
233
  result.append({"铭文": names[index], "状态": "未题写", "十六进制数据": all_items[index]})
234
  name_not_yet_total += 1
235
  show_unwritten_list.append(names[index])
236
+ st.progress(1 - (name_not_yet_total / names_total), f'题写进度 {names_total - name_not_yet_total}/{names_total} ({(1 - (name_not_yet_total / names_total)) * 100:.0f}%):')
237
  if not result:
238
  st.markdown(f'### ☹️ 你来迟了~')
239
  else:
pages/2_🆔_ 批量题写域名铭文.py CHANGED
@@ -104,7 +104,7 @@ def send_transaction(w3, account_address, private_key, chain_id, gas_price, inpu
104
  st.set_page_config(page_title="EthPen - 批量题写域名铭文", page_icon="🆔", layout='centered', initial_sidebar_state='auto')
105
  # 网页前端显示
106
  # 网页标题
107
- st.subheader('🆔 EthPen - 域名铭文批量题写', anchor=False, divider='rainbow')
108
 
109
  # 提醒
110
  st.info('''##### 在使用之前,敬请仔细阅读说明,感谢您的配合。
 
104
  st.set_page_config(page_title="EthPen - 批量题写域名铭文", page_icon="🆔", layout='centered', initial_sidebar_state='auto')
105
  # 网页前端显示
106
  # 网页标题
107
+ st.subheader(r'🆔 :rainbow[EthPen - 域名铭文批量题写]', anchor=False, divider='rainbow')
108
 
109
  # 提醒
110
  st.info('''##### 在使用之前,敬请仔细阅读说明,感谢您的配合。
pages/3_🪙_ 批量题写代币铭文.py CHANGED
@@ -87,7 +87,7 @@ def send_transaction(w3, account_address, private_key, chain_id, gas_price, inpu
87
  st.set_page_config(page_title="EthPen - 批量题写代币铭文", page_icon="🪙", layout='centered', initial_sidebar_state='auto')
88
  # 网页前端显示
89
  # 网页标题
90
- st.subheader('🪙 EthPen - 代币铭文批量题写', anchor=False, divider='rainbow')
91
  # 提醒
92
  st.info('''##### 在使用之前,敬请仔细阅读说明,感谢您的配合。
93
  - 我们的网站已经全部开源,此页面的代码为:[4_🪙_批量题写代币铭文.py](https://huggingface.co/spaces/Ethscriptions/eths/tree/main/pages)
 
87
  st.set_page_config(page_title="EthPen - 批量题写代币铭文", page_icon="🪙", layout='centered', initial_sidebar_state='auto')
88
  # 网页前端显示
89
  # 网页标题
90
+ st.subheader(r'🪙 :rainbow[EthPen - 代币铭文批量题写]', anchor=False, divider='rainbow')
91
  # 提醒
92
  st.info('''##### 在使用之前,敬请仔细阅读说明,感谢您的配合。
93
  - 我们的网站已经全部开源,此页面的代码为:[4_🪙_批量题写代币铭文.py](https://huggingface.co/spaces/Ethscriptions/eths/tree/main/pages)
pages/4_💹️_铭文数据分析.py CHANGED
@@ -8,6 +8,9 @@ from datetime import datetime, timezone
8
  import threading
9
  import base64
10
  import configparser
 
 
 
11
 
12
  # 使用你的Ethereum节点的RPC地址
13
  w3 = Web3(Web3.HTTPProvider("https://mainnet.infura.io/v3/9bbc614b8a1d49d59869e97d0ee3bf61"))
@@ -20,7 +23,6 @@ eths_db_file = os.path.join(parent_dir, 'data', 'eths_data.db')
20
  ethscrptions_db_file = os.path.join(parent_dir, 'data', 'ethscriptions_data.db')
21
  config_ini_file = os.path.join(parent_dir, 'data', 'config.ini')
22
 
23
-
24
  ethscriptions_con = sqlite3.connect(ethscrptions_db_file)
25
  ethscriptions_cur = ethscriptions_con.cursor()
26
 
@@ -147,19 +149,9 @@ def get_ethscriptions_data():
147
  time.sleep(15)
148
 
149
 
150
- # def get_index_status(index_status):
151
- # while True:
152
- # ethscriptions_cur.execute("SELECT block_number FROM process_blocks")
153
- # result = ethscriptions_cur.fetchone()
154
- # processed_block = result[0]
155
- # latest_block_number = w3.eth.block_number
156
- # with index_status:
157
- # st.markdown(f'*EthPen Ethscriptions Index Status: {processed_block}/{latest_block_number}*')
158
- # time.sleep(15)
159
-
160
  # Streamlit app layout
161
  st.set_page_config(page_title="EthPen - 铭文数据分析", page_icon="💹", layout='centered', initial_sidebar_state='auto')
162
- st.subheader('💹 EthPen - 铭文数据分析', anchor=False, divider='rainbow')
163
 
164
  st.markdown(f'### eths 数据总揽')
165
  eths_conn = sqlite3.connect(eths_db_file)
@@ -188,11 +180,23 @@ if eths_data:
188
  eths_stakers = st.metric(label='ETHS TVL', value=f'${eths_data[0][8]:,.0f}')
189
 
190
 
191
- # with st.expander('🆕新铭文题写', expanded=True):
192
- #
193
- #
194
-
195
-
 
 
 
 
 
 
 
 
 
 
 
 
196
  ethscriptions_cur.execute("SELECT block_number FROM process_blocks")
197
  index_result = ethscriptions_cur.fetchone()
198
  index_processed_block = index_result[0]
 
8
  import threading
9
  import base64
10
  import configparser
11
+ import pandas as pd
12
+ import pytz
13
+
14
 
15
  # 使用你的Ethereum节点的RPC地址
16
  w3 = Web3(Web3.HTTPProvider("https://mainnet.infura.io/v3/9bbc614b8a1d49d59869e97d0ee3bf61"))
 
23
  ethscrptions_db_file = os.path.join(parent_dir, 'data', 'ethscriptions_data.db')
24
  config_ini_file = os.path.join(parent_dir, 'data', 'config.ini')
25
 
 
26
  ethscriptions_con = sqlite3.connect(ethscrptions_db_file)
27
  ethscriptions_cur = ethscriptions_con.cursor()
28
 
 
149
  time.sleep(15)
150
 
151
 
 
 
 
 
 
 
 
 
 
 
152
  # Streamlit app layout
153
  st.set_page_config(page_title="EthPen - 铭文数据分析", page_icon="💹", layout='centered', initial_sidebar_state='auto')
154
+ st.subheader(r'💹 :rainbow[EthPen - 铭文数据分析]', anchor=False, divider='rainbow')
155
 
156
  st.markdown(f'### eths 数据总揽')
157
  eths_conn = sqlite3.connect(eths_db_file)
 
180
  eths_stakers = st.metric(label='ETHS TVL', value=f'${eths_data[0][8]:,.0f}')
181
 
182
 
183
+ st.markdown(f'### 新铭文题写')
184
+ ethscriptions_cur.execute('''
185
+ SELECT block_time, data
186
+ FROM data
187
+ ORDER BY block_time DESC
188
+ LIMIT 1000;
189
+ ''')
190
+ new_100_results_temp = ethscriptions_cur.fetchall()
191
+ new_100_results = []
192
+
193
+ for item in new_100_results_temp:
194
+ utc_dt = datetime.strptime(item[0], "%Y-%m-%d %H:%M:%S%z")
195
+ utc_dt = utc_dt.replace(tzinfo=pytz.UTC)
196
+ utc_plus_8_dt = utc_dt.astimezone(pytz.timezone("Asia/Shanghai"))
197
+ new_100_results.append({'时间 UTC +8': utc_plus_8_dt.strftime("%Y-%m-%d %H:%M:%S (UTC +8)")[:-8], '铭文 data:,': bytes.fromhex(item[1][2:]).decode('utf-8')[6:]})
198
+ result_df = pd.DataFrame(new_100_results)
199
+ st.dataframe(result_df, use_container_width=True, hide_index=True)
200
  ethscriptions_cur.execute("SELECT block_number FROM process_blocks")
201
  index_result = ethscriptions_cur.fetchone()
202
  index_processed_block = index_result[0]
pages/5_🏫_教程中心.py CHANGED
@@ -4,9 +4,11 @@ import os
4
  import sqlite3
5
  import pandas as pd
6
  import time
7
-
8
 
9
  # Streamlit app layout
10
  st.set_page_config(page_title="EthPen - 教程中心", page_icon="🏫", layout='centered', initial_sidebar_state='auto')
11
- st.subheader('🏫 EthPen - 教程中心', anchor=False, divider='rainbow')
12
  st.error('开发中,仅供参考...')
 
 
 
4
  import sqlite3
5
  import pandas as pd
6
  import time
7
+ import pandas as pd
8
 
9
  # Streamlit app layout
10
  st.set_page_config(page_title="EthPen - 教程中心", page_icon="🏫", layout='centered', initial_sidebar_state='auto')
11
+ st.subheader(r'🏫 :rainbow[EthPen - 教程中心]', anchor=False, divider='rainbow')
12
  st.error('开发中,仅供参考...')
13
+ st.error('如果你有更好的想法,可以联系我。')
14
+
pages/6_📢_推送通知服务.py CHANGED
@@ -8,5 +8,6 @@ import time
8
 
9
  # Streamlit app layout
10
  st.set_page_config(page_title="EthPen - 推送通知服务", page_icon="📢", layout='centered', initial_sidebar_state='auto')
11
- st.subheader('📢 EthPen - 推送通知服务', anchor=False, divider='rainbow')
12
  st.error('开发中,仅供参考...')
 
 
8
 
9
  # Streamlit app layout
10
  st.set_page_config(page_title="EthPen - 推送通知服务", page_icon="📢", layout='centered', initial_sidebar_state='auto')
11
+ st.subheader(r'📢 :rainbow[EthPen - 推送通知服务]', anchor=False, divider='rainbow')
12
  st.error('开发中,仅供参考...')
13
+ st.error('如果你有更好的想法,可以联系我。')
pages/7_ℹ️️_关于 EthPen.com.py ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import base64
3
+ import os
4
+
5
+
6
+ my_style = '''
7
+ <style>
8
+ .tag {
9
+ display: inline-block;
10
+ padding: 2px 6px;
11
+ background-color: #f2f2f2; /* 默认的背景颜色 */
12
+ border-radius: 5px; /* 圆角效果 */
13
+ margin: 0 2px;
14
+ transition: background-color 0.3s; /* 平滑的颜色过渡效果 */
15
+ }
16
+
17
+ .tag:hover {
18
+ background-color: #cffd51; /* 鼠标经过时的背景颜色 */
19
+ }
20
+
21
+ .tag:active {
22
+ background-color: #cffd51; /* 鼠标按下时的背景颜色 */
23
+ }
24
+ </style>
25
+ '''
26
+
27
+
28
+ # 图片Base64
29
+ def image_to_base64(img_path):
30
+ with open(img_path, "rb") as image_file:
31
+ return base64.b64encode(image_file.read()).decode()
32
+
33
+
34
+ # Streamlit app layout
35
+ st.set_page_config(page_title="EthPen - 关于 EthPen.com", page_icon="ℹ️", layout='centered', initial_sidebar_state='auto')
36
+ st.subheader(r'📢 :rainbow[EthPen - 关于 EthPen.com]', anchor=False, divider='rainbow')
37
+
38
+ st.markdown(
39
+ f'欢迎踏足 EthPen - 以太之笔!这里汇聚了一系列关于 Ethscriptions 的精细工具集,无论是单一查询、铭文题写,还是批量检索、编码题写,乃至深入的教程导引,以太之笔都将助您铭文题写如飞。我们立志推广 Ethscriptions 的宏大理念,期望 $eths 翱翔于星空,与月相伴!若您携手建议或创意,我们热切期待您的声音。',
40
+ unsafe_allow_html=True)
41
+ st.markdown(r'## :rainbow[EthPen 题写铭文的好帮手!]')
42
+ st.markdown('')
43
+ st.markdown('对了,我叫 pztuya,期待你们和我更多的商业交流 😊~')
44
+
45
+ st.markdown(f'''{my_style}<span class="tag"><a href="https://twitter.com/pztuya" target="_blank" style="text-decoration: none;"><img src="data:image/svg+xml;base64,{image_to_base64(os.path.join("img", "x.svg"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;" /> @pztuya</span></a>
46
+ <span class="tag"><a href="https://t.me/NervosCKB" target="_blank" style="text-decoration: none;"><img src="data:image/svg+xml;base64,{image_to_base64(os.path.join("img", "telegram.svg"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;" /> @NervosCKB</span></a>
47
+ ''', unsafe_allow_html=True)
🖊️EthPen-以太之笔.py CHANGED
@@ -72,12 +72,12 @@ python_token_code = r"""
72
  # ethpen.com
73
  # 最后更新日期:2023 年 8 月 18 日
74
 
75
- # 在使用之前,敬请仔细阅读说明,感谢您的配合。
76
- # 请务必访问 ethpen.com 官方网站。您可以确保这里的代码无恶意,安全地复制。
77
  # 你只需要掌握一些 python 相关的基础。
78
  # 在使用过程中,请根据规定准确填写信息,以确保程序顺畅运行。
79
- # 我们建议您使用备用账号,并避免在账号中存放大额资金。
80
- # 若您对此代码存有疑虑,建议您利用如 ChetGPT、Bard 或 Claude 等知名 AI 平台进行查询,以判断是否含有恶意代码。
81
  # 如果你在使用的过程中发现 BUG 或者有什么想法和建议,欢迎与我联系。
82
 
83
  # 导入运行代码所需要的库
@@ -262,12 +262,12 @@ python_name_code = r"""
262
  # ethpen.com
263
  # 最后更新日期:2023 年 8 月 18 日
264
 
265
- # 在使用之前,敬请仔细阅读说明,感谢您的配合。
266
- # 请务必访问 ethpen.com 官方网站。您可以确保这里的代码无恶意,安全地复制。
267
  # 你只需要掌握一些 python 相关的基础。
268
  # 在使用过程中,请根据规定准确填写信息,以确保程序顺畅运行。
269
- # 我们建议您使用备用账号,并避免在账号中存放大额资金。
270
- # 若您对此代码存有疑虑,建议您利用如 ChetGPT、Bard 或 Claude 等知名 AI 平台进行查询,以判断是否含有恶意代码。
271
  # 如果你在使用的过程中发现 BUG 或者有什么想法和建议,欢迎与我联系。
272
 
273
  # 导入运行代码所需要的库
@@ -464,12 +464,12 @@ hf_token_code = r"""
464
  # ethpen.com
465
  # 最后更新日期:2023 年 8 月 18 日
466
 
467
- # 在使用之前,敬请仔细阅读说明,感谢您的配合。
468
- # 请务必访问 ethpen.com 官方网站。您可以确保这里的代码无恶意,安全地复制。
469
  # 你只需要拥有一个 HuggingFace.co 账户。
470
  # 在使用过程中,请根据规定准确填写信息,以确保程序顺畅运行。
471
- # 我们建议您使用备用账号,并避免在账号中存放大额资金。
472
- # 若您对此代码存有疑虑,建议您利用如 ChetGPT、Bard 或 Claude 等知名 AI 平台进行查询,以判断是否含有恶意代码。
473
  # 请查看我们的例子 https://ethscriptions-name.hf.space。
474
 
475
  # 导入运行代码所需要的库
@@ -551,11 +551,11 @@ def send_transaction(w3, account_address, private_key, chain_id, gas_price, inpu
551
  # 网页标题
552
  st.markdown('# [ethpen.com](https://ethpen.com) 代币铭文批量题写')
553
  # 提醒
554
- st.info('''在使用之前,敬请仔细阅读说明,感谢您的配合。
555
- - 请务必访问 **[ethpen.com](https://ethpen.com)** 官方网站。您可以确保这里的代码无恶意,安全地复制。
556
  - 在使用过程中,请根据规定准确填写信息,以确保程序顺畅运行。
557
- - 我们建议您使用备用账号,并避免在账号中存放大额资金。
558
- - 若您对此代码存有疑虑,建议您利用如 [ChetGPT](https://chat.openai.com/)、[Bard](https://bard.google.com/) 或 [Claude](https://claude.ai/) 等知名 AI 平台进行查询,以判断是否含有恶意代码。
559
  ''')
560
 
561
  # 连接的网络 ID。比如说,1 代表 Mainnet,5 代表 Goerli 测试网络,11155111 代表 Sepolia 测试网络,如果你不放心,可以先用测试网试试。
@@ -701,12 +701,12 @@ hf_name_code = r"""
701
  # ethpen.com
702
  # 最后更新日期:2023 年 8 月 18 日
703
 
704
- # 在使用之前,敬请仔细阅读说明,感谢您的配合。
705
- # 请务必访问 ethpen.com 官方网站。您可以确保这里的代码无恶意,安全地复制。
706
  # 你只需要拥有一个 HuggingFace.co 账户。
707
  # 在使用过程中,请根据规定准确填写信息,以确保程序顺畅运行。
708
- # 我们建议您使用备用账号,并避免在账号中存放大额资金。
709
- # 若您对此代码存有疑虑,建议您利用如 ChetGPT、Bard 或 Claude 等知名 AI 平台进行查询,以判断是否含有恶意代码。
710
  # 请查看我们的例子 https://ethscriptions-name.hf.space。
711
 
712
  # 导入运行代码所需要的库
@@ -805,11 +805,11 @@ def send_transaction(w3, account_address, private_key, chain_id, gas_price, inpu
805
  # 网页标题
806
  st.markdown('# [ethpen.com](https://ethpen.com) 域名铭文批量题写')
807
  # 提醒
808
- st.info('''在使用之前,敬请仔细阅读说明,感谢您的配合。
809
- - 请务必访问 **[ethpen.com](https://ethpen.com)** 官方网站。您可以确保这里的代码无恶意,安全地复制。
810
  - 在使用过程中,请根据规定准确填写信息,以确保程序顺畅运行。
811
- - 我们建议您使用备用账号,并避免在账号中存放大额资金。
812
- - 若您对此代码存有疑虑,建议您利用如 [ChetGPT](https://chat.openai.com/)、[Bard](https://bard.google.com/) 或 [Claude](https://claude.ai/) 等知名 AI 平台进行查询,以判断是否含有恶意代码。
813
  ''')
814
 
815
  # 连接的网络 ID。比如说,1 代表主网络,5 代表 Goerli 测试网络,11155111 代表 Sepolia 测试网络,如果你不放心,可以先用测试网试试。
@@ -1135,28 +1135,72 @@ st.markdown(
1135
  st.subheader('', anchor=False, divider='rainbow')
1136
 
1137
  # 最近新闻
1138
- st.markdown(f'### 最近新闻')
1139
  st.markdown(
1140
  f'<a href="https://twitter.com/dumbnamenumbers/status/1696989307871826137" target="_blank"><img src="data:image/jpeg;base64,{image_to_base64(os.path.join("img", "news.jpeg"))}" alt="Image" style="max-width: 100%; width: 100%; height: auto; border-radius: 10px; display: block;"/></a>',
1141
  unsafe_allow_html=True)
1142
  st.markdown(f'> 3 周前,我们提出了 Ethscriptions 虚拟机的构想——一种通过将其解释为计算机指令来显著增强 Ethscriptions 功能的方法。今天,我们宣布了该虚拟机的首个实现。已在 Goerli 网络上线,并已在 GitHub 上完全开源!👆')
1143
 
1144
  # 广告位图片
1145
- st.markdown(f'### 广告位')
1146
  st.markdown(
1147
  f'<a href="https://twitter.com/EtchMarket/status/1694024108672245953" target="_blank"><img src="data:image/jpeg;base64,{image_to_base64(os.path.join("img", "ad.jpg"))}" alt="Image" style="max-width: 100%; width: 100%; height: auto; border-radius: 10px; display: block;"/></a>',
1148
  unsafe_allow_html=True)
1149
  st.markdown(f'> 拆分方案现在面向所有人推出!让我们一起加入权益挖矿的浪潮,并分享50%的月度服务费。')
1150
- st.markdown("### 功能专区")
1151
 
1152
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1153
  # st.expander
1154
  search_rune_expander = st.expander("查询 Ethscriptions")
1155
  create_rune_expander = st.expander("题写 Ethscriptions")
1156
  token_no_code_expander = st.expander("一键式铭文批量题写,无需编码知识!")
1157
- trend_expander = st.expander("潮流动态")
1158
- help_expander = st.expander("教程帮助")
1159
- st.markdown("🎉 更多功能尽在菜单栏,请点击左上角的 >")
1160
  # 查询铭文页面
1161
  search_rune_expander.info(
1162
  f"铭文数据来自 [Ethscriptions](https://ethscriptions.com/) 官方网站,当前索引器状态落后: {get_block_status()['blocks_behind']} 个区块。")
@@ -1261,50 +1305,6 @@ if search_rune_expander.button('🔍 查询', key='批量查询铭文'):
1261
 
1262
  # 删除辅助排序列
1263
  table_data.drop(columns=['sort_helper'], inplace=True)
1264
-
1265
- # 定义样式和生成带有专门类名的HTML表格
1266
- # table_style = """
1267
- # <style>
1268
- # .styled_table {
1269
- # width: 100%;
1270
- # border-collapse: collapse;
1271
- # border-radius: 8px;
1272
- # overflow: hidden; /* Ensures border-radius applies to table */
1273
- # }
1274
- # .styled_table th, .styled_table td {
1275
- # border: 1px solid #ddd;
1276
- # padding: 8px;
1277
- # text-align: left;
1278
- # }
1279
- # .styled_table th {
1280
- # background-color: #f2f2f2;
1281
- # color: black;
1282
- # }
1283
- # .styled_table tr:hover {
1284
- # background-color: #f5f5f5;
1285
- # }
1286
- # .styled_table td[status="已题写"] {
1287
- # background-color: #f2dede; /* Reddish */
1288
- # }
1289
- # .styled_table td[status="未题写"] {
1290
- # background-color: #dff0d8; /* Greenish */
1291
- # }
1292
- # </style>
1293
- # """
1294
- # search_rune_expander.markdown(table_style, unsafe_allow_html=True)
1295
- # table_html = table_data.to_html(index=False, classes='styled_table', border=0, escape=False,
1296
- # formatters=dict(状态=lambda x: f'<td status="{x}">{x}</td>'))
1297
- #
1298
- # # 生成HTML表格但不为状态列添加特殊格式
1299
- # table_html = table_data.to_html(index=False, classes='styled_table', border=0, escape=False)
1300
- #
1301
- # # 使用字符串替换为状态列添加特定属性
1302
- # table_html = table_html.replace('<td>已题写</td>', '<td status="已题写">已题写</td>')
1303
- # table_html = table_html.replace('<td>未题写</td>', '<td status="未题写">未题写</td>')
1304
- #
1305
- # # 使用st.write输出带样式的HTML表格
1306
- # search_rune_expander.write(table_html, unsafe_allow_html=True)
1307
- # search_rune_expander.markdown('')
1308
  result_df = pd.DataFrame(table_data)
1309
  search_rune_expander.dataframe(result_df, use_container_width=True, hide_index=True)
1310
  # Convert DataFrame to CSV with proper encoding
@@ -1342,12 +1342,12 @@ if create_rune_expander.button('🔁 转换', key='文本转换到十六进制')
1342
  create_rune_expander.markdown(f'###### :green[{input_ethscriptions_str}] 铭文还没被题写!快前去题写吧。')
1343
 
1344
  create_rune_expander.markdown("##### 批量自动题写铭文")
1345
- create_rune_expander.info("""在使用之前,敬请仔细阅读说明,感谢您的配合。
1346
- 1. 请务必访问 **[ethpen.com](https://ethpen.com)** 官方网站。您可以确保这里的代码无恶意,安全地复制。
1347
  2. 你只需要掌握一些 python 相关的基础。
1348
  3. 在使用过程中,请根据规定准确填写信息,以确保程序顺畅运行。
1349
- 4. 我们建议您使用备用账号,并避免在账号中存放大额资金。
1350
- 5. 若您对此代码存有疑虑,建议您利用如 [ChetGPT](https://chat.openai.com/)、[Bard](https://bard.google.com/) 或 [Claude](https://claude.ai/) 等知名 AI 平台进行查询,以判断是否含有恶意代码。
1351
  6. 如果你在使用的过程中发现 BUG 或者有什么想法和建议,欢迎与我联系。
1352
  """)
1353
  if create_rune_expander.button('🖨 打印代币代码', key='输出代币铭文 Python 代码'):
@@ -1357,12 +1357,12 @@ if create_rune_expander.button('🖨 打印域名代码', key='输出域名铭
1357
 
1358
  # 全新不用懂代码的铭文批量题写页面
1359
  token_no_code_expander.markdown("##### 安全的简易的批量自动题写铭文")
1360
- token_no_code_expander.info("""在使用之前,敬请仔细阅读说明,感谢您的配合。
1361
- 1. 请务必访问 **[ethpen.com](https://ethpen.com)** 官方网站。您可以确保这里的代码无恶意,安全地复制。
1362
  2. 你只需要拥有一个 [HuggingFace.co](https://huggingface.co) 账户。
1363
  3. 在使用过程中,请根据规定准确填写信息,以确保程序顺畅运行。
1364
- 4. 我们建议您使用备用账号,并避免在账号中存放大额资金。
1365
- 5. 若您对此代码存有疑虑,建议您利用如 [ChetGPT](https://chat.openai.com/)、[Bard](https://bard.google.com/) 或 [Claude](https://claude.ai/) 等知名 AI 平台进行查询,以判断是否含有恶意代码。
1366
  6. 请查看我们的例子 [token-example](https://huggingface.co/spaces/Ethscriptions/token) / [name-example](https://huggingface.co/spaces/Ethscriptions/name)。
1367
  """)
1368
  if token_no_code_expander.button('🖨️ 打印代币代码', key='输出 Token 铭文 Python 代码'):
@@ -1386,54 +1386,10 @@ streamlit
1386
  web3
1387
  ''')
1388
 
1389
- # 潮流动态页面
1390
- trend_expander.markdown("##### 开发中...")
1391
-
1392
- # 教程帮助页面
1393
- help_expander.markdown('##### 我不懂代码,怎么做到批量题写铭文?')
1394
- # help_expander.markdown('##### 如何用 Metamask 题写 Ethscriptions 铭文?')
1395
- # help_expander.markdown('##### 如何用 Metamask 在 etch.market 上购买 $eths?')
1396
- # help_expander.markdown('##### 如何运行批量自动题写铭文 python 代码?')
1397
- # help_expander.markdown(f'<iframe src="//player.bilibili.com/player.html?aid=787389115&bvid=BV1J14y1i7ap&cid=1237586207&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe>', unsafe_allow_html=True)
1398
 
1399
-
1400
- # 嵌入式SVG文本(以下只是示例,替换为你的SVG文本)
1401
- twitter_svg = """
1402
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M8 2H1l8.26 11.014L1.45 22H4.1l6.388-7.349L16 22h7l-8.608-11.478L21.8 2h-2.65l-5.986 6.886L8 2Zm9 18L5 4h2l12 16h-2Z"/></svg>
1403
- """
1404
- twitter_encoded_svg = base64.b64encode(twitter_svg.encode('utf-8')).decode('utf-8')
1405
- telegram_svg = """
1406
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 256 256"><defs><linearGradient id="logosTelegram0" x1="50%" x2="50%" y1="0%" y2="100%"><stop offset="0%" stop-color="#2AABEE"/><stop offset="100%" stop-color="#229ED9"/></linearGradient></defs><path fill="url(#logosTelegram0)" d="M128 0C94.06 0 61.48 13.494 37.5 37.49A128.038 128.038 0 0 0 0 128c0 33.934 13.5 66.514 37.5 90.51C61.48 242.506 94.06 256 128 256s66.52-13.494 90.5-37.49c24-23.996 37.5-56.576 37.5-90.51c0-33.934-13.5-66.514-37.5-90.51C194.52 13.494 161.94 0 128 0Z"/><path fill="#FFF" d="M57.94 126.648c37.32-16.256 62.2-26.974 74.64-32.152c35.56-14.786 42.94-17.354 47.76-17.441c1.06-.017 3.42.245 4.96 1.49c1.28 1.05 1.64 2.47 1.82 3.467c.16.996.38 3.266.2 5.038c-1.92 20.24-10.26 69.356-14.5 92.026c-1.78 9.592-5.32 12.808-8.74 13.122c-7.44.684-13.08-4.912-20.28-9.63c-11.26-7.386-17.62-11.982-28.56-19.188c-12.64-8.328-4.44-12.906 2.76-20.386c1.88-1.958 34.64-31.748 35.26-34.45c.08-.338.16-1.598-.6-2.262c-.74-.666-1.84-.438-2.64-.258c-1.14.256-19.12 12.152-54 35.686c-5.1 3.508-9.72 5.218-13.88 5.128c-4.56-.098-13.36-2.584-19.9-4.708c-8-2.606-14.38-3.984-13.82-8.41c.28-2.304 3.46-4.662 9.52-7.072Z"/></svg>
1407
- """
1408
- telegram_encoded_svg = base64.b64encode(telegram_svg.encode('utf-8')).decode('utf-8')
1409
- discord_svg = """
1410
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 256 256"><g fill="none"><rect width="256" height="256" fill="#5865F2" rx="60"/><g clip-path="url(#skillIconsDiscord0)"><path fill="#fff" d="M197.308 64.797a164.918 164.918 0 0 0-40.709-12.627a.618.618 0 0 0-.654.31c-1.758 3.126-3.706 7.206-5.069 10.412c-15.373-2.302-30.666-2.302-45.723 0c-1.364-3.278-3.382-7.286-5.148-10.412a.643.643 0 0 0-.655-.31a164.472 164.472 0 0 0-40.709 12.627a.583.583 0 0 0-.268.23c-25.928 38.736-33.03 76.52-29.546 113.836a.685.685 0 0 0 .26.468c17.106 12.563 33.677 20.19 49.94 25.245a.648.648 0 0 0 .702-.23c3.847-5.254 7.276-10.793 10.217-16.618a.633.633 0 0 0-.347-.881c-5.44-2.064-10.619-4.579-15.601-7.436a.642.642 0 0 1-.063-1.064a86.364 86.364 0 0 0 3.098-2.428a.618.618 0 0 1 .646-.088c32.732 14.944 68.167 14.944 100.512 0a.617.617 0 0 1 .655.08a79.613 79.613 0 0 0 3.106 2.436a.642.642 0 0 1-.055 1.064a102.622 102.622 0 0 1-15.609 7.428a.638.638 0 0 0-.339.889a133.075 133.075 0 0 0 10.208 16.61a.636.636 0 0 0 .702.238c16.342-5.055 32.913-12.682 50.02-25.245a.646.646 0 0 0 .26-.46c4.17-43.141-6.985-80.616-29.571-113.836a.506.506 0 0 0-.26-.238ZM94.834 156.142c-9.855 0-17.975-9.047-17.975-20.158s7.963-20.158 17.975-20.158c10.09 0 18.131 9.127 17.973 20.158c0 11.111-7.962 20.158-17.974 20.158Zm66.456 0c-9.855 0-17.974-9.047-17.974-20.158s7.962-20.158 17.974-20.158c10.09 0 18.131 9.127 17.974 20.158c0 11.111-7.884 20.158-17.974 20.158Z"/></g><defs><clipPath id="skillIconsDiscord0"><path fill="#fff" d="M28 51h200v154.93H28z"/></clipPath></defs></g></svg>
1411
- """
1412
- discord_encoded_svg = base64.b64encode(discord_svg.encode('utf-8')).decode('utf-8')
1413
-
1414
- # 实际的社交链接
1415
- twitter_link = "https://twitter.com/pztuya"
1416
- telegram_link = "https://t.me/NervosCKB"
1417
- discord_link = "https://discord.gg/ethscriptions"
1418
-
1419
- # 关于页面
1420
- eths_price_data = get_eths_price()
1421
- st.markdown("### 关于")
1422
- st.markdown(f'##### 什么是 Ethscriptions?', unsafe_allow_html=True)
1423
- st.markdown(
1424
- f'{my_style}<span class="tag"><a href="https://ethscriptions.com/" target="_blank" style="text-decoration: none;"><img src="data:image/jpeg;base64,{image_to_base64(os.path.join("img", "ethscriptions_logo_litto.png"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;"/> Ethscriptions </span></a>是一种新的在以太坊上创建和分享数字资产的方法,它通过使用交易 calldata 存储数据而不是智能合约来实现,这使其比 NFT 更为经济。它们是完全在链上、无需许可、抗审查的,并且其成本只是 NFT 的一小部分。',
1425
- unsafe_allow_html=True)
1426
- st.markdown('')
1427
- st.markdown('##### 谁创造了 Ethscriptions?')
1428
  st.markdown(
1429
- f'首个 [Ethscription](https://ethscriptions.com/ethscriptions/0) 是在 2016 年创建的,但正式的协议是由 Tom Lehman,又名 <span class="tag"><a href="https://twitter.com/dumbnamenumbers" target="_blank" style="text-decoration: none;"><img src="data:image/jpeg;base64,{image_to_base64(os.path.join("img", "Middlemarch.jpg"))}" alt="Image" width="20px" height="20px" style="border-radius: 10px;"/> @Middlemarch</span></a> 开发的。除了比特币的铭文,他还受到了来自 Poly Network 黑客的著名的 “原型 - Ethscription” 的启发,你可以在[这笔交易](https://etherscan.io/tx/0x0ae3d3ce3630b5162484db5f3bdfacdfba33724ffb195ea92a6056beaa169490)中看到它。',
1430
- unsafe_allow_html=True)
1431
- st.markdown(
1432
- f'- 快来加入 <span class="tag"><a href="https://discord.gg/ethscriptions" target="_blank" style="text-decoration: none;"><img src="data:image/svg+xml;base64,{discord_encoded_svg}" /> @ethscriptions</span></a>,与 Ethscriptions 一起成长!',
1433
- unsafe_allow_html=True)
1434
- st.markdown('##### Ethscriptions 上的龙头代币是?')
1435
- st.markdown(
1436
- f'毫无疑问,当自无愧,她必须是 Ethscriptions 上第一个代币 👉 <span class="tag"><a href="https://www.etch.market/market/token?category=token&collectionName=erc-20%20eths" target="_blank" style="text-decoration: none;"><img src="data:image/jpeg;base64,{image_to_base64(os.path.join("img", "eths_logo.png"))}" alt="Image" width="20px" height="20px"/> **eths**</span></a>',
1437
  unsafe_allow_html=True)
1438
 
1439
  # 查询eths_data表中所有数据
@@ -1495,6 +1451,7 @@ eths_card_content = f"""
1495
  <p>市值:<span class="tag">${eths_data[0][3]:,.0f}</span></p>
1496
  <p>总量:<span class="tag">21,000,000</span></p>
1497
  <p>24h 交易量:<span class="tag">${eths_data[0][5]:,.0f}</span></p>
 
1498
  <h5>INFO</h5>
1499
  <p>官网:None</p>
1500
  <p>浏览器:<span class="tag"><a href="https://ethscriptions.com/" target="_blank" style="text-decoration: none;"><img src="data:image/jpeg;base64,{image_to_base64(os.path.join("img", "ethscriptions_logo_litto.png"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;"/> Ethscriptions</a></span></p>
@@ -1502,7 +1459,7 @@ eths_card_content = f"""
1502
  <p>部署时间:<span class="tag">2023/06/18 05:46:11</span></p>
1503
  <p>公链:<span class="tag">Ethereum Ethscriptions</span></p>
1504
  <p>持有人数:<span class="tag">{eths_data[0][4]:,.0f}</span></p>
1505
- <p>社交:<span class="tag"><a href="https://twitter.com/ethscriptions" target="_blank" style="text-decoration: none;"><img src="data:image/svg+xml;base64,{twitter_encoded_svg}" /> @ethscriptions</a></span><span class="tag"><a href="https://discord.gg/ethscriptions" target="_blank" style="text-decoration: none";><img src="data:image/svg+xml;base64,{discord_encoded_svg}" /> @ethscriptions</a></span></p>
1506
  <h5>Staking</h5>
1507
  <p>质押总量:<span class="tag">{eths_data[0][6]:,.0f} $eths</span></p>
1508
  <p>质押人数:<span class="tag">{eths_data[0][7]:,.0f}</span></p>
@@ -1511,15 +1468,3 @@ eths_card_content = f"""
1511
  </div>
1512
  """
1513
  st.markdown(eths_card_content, unsafe_allow_html=True)
1514
-
1515
- st.markdown('')
1516
- st.markdown('##### 关于 ethpen.com')
1517
- st.markdown(
1518
- f'欢迎踏足 EthPen - 以太之笔!这里汇聚了一系列关于 Ethscriptions 的精细工具集,无论是单一查询、铭文题写,还是批量检索、编码题写,乃至深入的教程导引,以太之笔都将助您铭文题写如飞。我们立志推广 Ethscriptions 的宏大理念,期望 $eths 翱翔于星空,与月相伴!若您携手建议或创意,我们热切期待您的声音。',
1519
- unsafe_allow_html=True)
1520
- st.markdown('对了,我叫 Pztuya,期待你们和我多多交流😊~')
1521
-
1522
- st.markdown(f'''
1523
- <span class="tag"><a href="https://twitter.com/pztuya" target="_blank" style="text-decoration: none;"><img src="data:image/svg+xml;base64,{twitter_encoded_svg}" /> @pztuya</a></span>
1524
- <span class="tag"><a href="https://t.me/NervosCKB" target="_blank" style="text-decoration: none;"><img src="data:image/svg+xml;base64,{telegram_encoded_svg}" /> @NervosCKB</a></span>
1525
- ''', unsafe_allow_html=True)
 
72
  # ethpen.com
73
  # 最后更新日期:2023 年 8 月 18 日
74
 
75
+ # 在使用之前,敬请仔细阅读说明,感谢你的配合。
76
+ # 请务必访问 ethpen.com 官方网站。你可以确保这里的代码无恶意,安全地复制。
77
  # 你只需要掌握一些 python 相关的基础。
78
  # 在使用过程中,请根据规定准确填写信息,以确保程序顺畅运行。
79
+ # 我们建议你使用备用账号,并避免在账号中存放大额资金。
80
+ # 若你对此代码存有疑虑,建议你利用如 ChetGPT、Bard 或 Claude 等知名 AI 平台进行查询,以判断是否含有恶意代码。
81
  # 如果你在使用的过程中发现 BUG 或者有什么想法和建议,欢迎与我联系。
82
 
83
  # 导入运行代码所需要的库
 
262
  # ethpen.com
263
  # 最后更新日期:2023 年 8 月 18 日
264
 
265
+ # 在使用之前,敬请仔细阅读说明,感谢你的配合。
266
+ # 请务必访问 ethpen.com 官方网站。你可以确保这里的代码无恶意,安全地复制。
267
  # 你只需要掌握一些 python 相关的基础。
268
  # 在使用过程中,请根据规定准确填写信息,以确保程序顺畅运行。
269
+ # 我们建议你使用备用账号,并避免在账号中存放大额资金。
270
+ # 若你对此代码存有疑虑,建议你利用如 ChetGPT、Bard 或 Claude 等知名 AI 平台进行查询,以判断是否含有恶意代码。
271
  # 如果你在使用的过程中发现 BUG 或者有什么想法和建议,欢迎与我联系。
272
 
273
  # 导入运行代码所需要的库
 
464
  # ethpen.com
465
  # 最后更新日期:2023 年 8 月 18 日
466
 
467
+ # 在使用之前,敬请仔细阅读说明,感谢你的配合。
468
+ # 请务必访问 ethpen.com 官方网站。你可以确保这里的代码无恶意,安全地复制。
469
  # 你只需要拥有一个 HuggingFace.co 账户。
470
  # 在使用过程中,请根据规定准确填写信息,以确保程序顺畅运行。
471
+ # 我们建议你使用备用账号,并避免在账号中存放大额资金。
472
+ # 若你对此代码存有疑虑,建议你利用如 ChetGPT、Bard 或 Claude 等知名 AI 平台进行查询,以判断是否含有恶意代码。
473
  # 请查看我们的例子 https://ethscriptions-name.hf.space。
474
 
475
  # 导入运行代码所需要的库
 
551
  # 网页标题
552
  st.markdown('# [ethpen.com](https://ethpen.com) 代币铭文批量题写')
553
  # 提醒
554
+ st.info('''在使用之前,敬请仔细阅读说明,感谢你的配合。
555
+ - 请务必访问 **[ethpen.com](https://ethpen.com)** 官方网站。你可以确保这里的代码无恶意,安全地复制。
556
  - 在使用过程中,请根据规定准确填写信息,以确保程序顺畅运行。
557
+ - 我们建议你使用备用账号,并避免在账号中存放大额资金。
558
+ - 若你对此代码存有疑虑,建议你利用如 [ChetGPT](https://chat.openai.com/)、[Bard](https://bard.google.com/) 或 [Claude](https://claude.ai/) 等知名 AI 平台进行查询,以判断是否含有恶意代码。
559
  ''')
560
 
561
  # 连接的网络 ID。比如说,1 代表 Mainnet,5 代表 Goerli 测试网络,11155111 代表 Sepolia 测试网络,如果你不放心,可以先用测试网试试。
 
701
  # ethpen.com
702
  # 最后更新日期:2023 年 8 月 18 日
703
 
704
+ # 在使用之前,敬请仔细阅读说明,感谢你的配合。
705
+ # 请务必访问 ethpen.com 官方网站。你可以确保这里的代码无恶意,安全地复制。
706
  # 你只需要拥有一个 HuggingFace.co 账户。
707
  # 在使用过程中,请根据规定准确填写信息,以确保程序顺畅运行。
708
+ # 我们建议你使用备用账号,并避免在账号中存放大额资金。
709
+ # 若你对此代码存有疑虑,建议你利用如 ChetGPT、Bard 或 Claude 等知名 AI 平台进行查询,以判断是否含有恶意代码。
710
  # 请查看我们的例子 https://ethscriptions-name.hf.space。
711
 
712
  # 导入运行代码所需要的库
 
805
  # 网页标题
806
  st.markdown('# [ethpen.com](https://ethpen.com) 域名铭文批量题写')
807
  # 提醒
808
+ st.info('''在使用之前,敬请仔细阅读说明,感谢你的配合。
809
+ - 请务必访问 **[ethpen.com](https://ethpen.com)** 官方网站。你可以确保这里的代码无恶意,安全地复制。
810
  - 在使用过程中,请根据规定准确填写信息,以确保程序顺畅运行。
811
+ - 我们建议你使用备用账号,并避免在账号中存放大额资金。
812
+ - 若你对此代码存有疑虑,建议你利用如 [ChetGPT](https://chat.openai.com/)、[Bard](https://bard.google.com/) 或 [Claude](https://claude.ai/) 等知名 AI 平台进行查询,以判断是否含有恶意代码。
813
  ''')
814
 
815
  # 连接的网络 ID。比如说,1 代表主网络,5 代表 Goerli 测试网络,11155111 代表 Sepolia 测试网络,如果你不放心,可以先用测试网试试。
 
1135
  st.subheader('', anchor=False, divider='rainbow')
1136
 
1137
  # 最近新闻
1138
+ st.markdown(f'#### 最近新闻')
1139
  st.markdown(
1140
  f'<a href="https://twitter.com/dumbnamenumbers/status/1696989307871826137" target="_blank"><img src="data:image/jpeg;base64,{image_to_base64(os.path.join("img", "news.jpeg"))}" alt="Image" style="max-width: 100%; width: 100%; height: auto; border-radius: 10px; display: block;"/></a>',
1141
  unsafe_allow_html=True)
1142
  st.markdown(f'> 3 周前,我们提出了 Ethscriptions 虚拟机的构想——一种通过将其解释为计算机指令来显著增强 Ethscriptions 功能的方法。今天,我们宣布了该虚拟机的首个实现。已在 Goerli 网络上线,并已在 GitHub 上完全开源!👆')
1143
 
1144
  # 广告位图片
1145
+ st.markdown(f'#### 广告位')
1146
  st.markdown(
1147
  f'<a href="https://twitter.com/EtchMarket/status/1694024108672245953" target="_blank"><img src="data:image/jpeg;base64,{image_to_base64(os.path.join("img", "ad.jpg"))}" alt="Image" style="max-width: 100%; width: 100%; height: auto; border-radius: 10px; display: block;"/></a>',
1148
  unsafe_allow_html=True)
1149
  st.markdown(f'> 拆分方案现在面向所有人推出!让我们一起加入权益挖矿的浪潮,并分享50%的月度服务费。')
 
1150
 
1151
 
1152
+ st.markdown(f'#### 什么是 Ethscriptions?', unsafe_allow_html=True)
1153
+ st.markdown(f'{my_style}<span class="tag"><a href="https://ethscriptions.com/" target="_blank" style="text-decoration: none;"><img src="data:image/jpeg;base64,{image_to_base64(os.path.join("img", "ethscriptions_logo_litto.png"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;"/> Ethscriptions</span></a> 是一种新的在以太坊上创建和分享数字资产的方法,它通过使用交易 calldata 存储数据而不是智能合约来实现,这使其比 NFT 更为经济。它们是完全在链上、无需许可、抗审查的,并且其成本只是 NFT 的一小部分。', unsafe_allow_html=True)
1154
+ st.markdown(f'<img src="data:image/jpeg;base64,{image_to_base64(os.path.join("img", "input_data.png"))}" alt="Image" style="max-width: 100%; width: 100%; height: auto; border-radius: 10px; display: block;"/>', unsafe_allow_html=True)
1155
+ st.markdown('#### 谁创造了 Ethscriptions?')
1156
+ st.markdown(f'首个 [Ethscription](https://ethscriptions.com/ethscriptions/0) 是在 2016 年创建的,但正式的协议是由 Tom Lehman,又名 <span class="tag"><a href="https://twitter.com/dumbnamenumbers" target="_blank" style="text-decoration: none;"><img src="data:image/jpeg;base64,{image_to_base64(os.path.join("img", "Middlemarch.jpg"))}" alt="Image" width="20px" height="20px" style="border-radius: 10px;"/> @Middlemarch</span></a> 开发的。除了比特币的铭文,他还受到了来自 Poly Network 黑客的著名的 “原型 - Ethscription” 的启发,你可以在[这笔交易](https://etherscan.io/tx/0x0ae3d3ce3630b5162484db5f3bdfacdfba33724ffb195ea92a6056beaa169490)中看到它。', unsafe_allow_html=True)
1157
+ st.markdown(f'- 快来加入 <span class="tag"><a href="https://discord.gg/ethscriptions" target="_blank" style="text-decoration: none;"><img src="data:image/svg+xml;base64,{image_to_base64(os.path.join("img", "discord.svg"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;" /> @ethscriptions</span></a>,一起讨论 Ethscriptions 的未来!', unsafe_allow_html=True)
1158
+ st.markdown(f'- 快来关注 <span class="tag"><a href="https://twitter.com/ethscriptions" target="_blank" style="text-decoration: none;"><img src="data:image/svg+xml;base64,{image_to_base64(os.path.join("img", "x.svg"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;" /> @ethscriptions</span></a>,掌握 Ethscriptions 的最新动态!', unsafe_allow_html=True)
1159
+ st.markdown('#### 如何题写 Ethscriptions?')
1160
+ st.markdown(f'题写 Ethscriptions 是十分简单的,相当于在发送 ETH 交易时附带一些转账备注,我们就以使用人数最多的 MetaMask 钱包来举例,我们首先打开<span class="tag"><img src="data:image/svg+xml;base64,{image_to_base64(os.path.join("img", "0x.svg"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;" /> 显示十六进制数据</span>。', unsafe_allow_html=True)
1161
+ st.markdown(f'1. 打开 <span class="tag"><a href="https://matamask.io" target="_blank" style="text-decoration: none;"><img src="data:image/svg+xml;base64,{image_to_base64(os.path.join("img", "metamask.svg"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;" /> Metamask</span></a> 钱包(如果已安装);', unsafe_allow_html=True)
1162
+ st.markdown(f'2. 在右上角点击打开 <span class="tag"><img src="data:image/svg+xml;base64,{image_to_base64(os.path.join("img", "matamask-more.svg"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;" /> 菜单栏</span>;', unsafe_allow_html=True)
1163
+ st.markdown(f'3. 点击打开 <span class="tag"><img src="data:image/svg+xml;base64,{image_to_base64(os.path.join("img", "metamask-gear.svg"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;" /> 设置项</span>;', unsafe_allow_html=True)
1164
+ st.markdown(f'4. 点击打开 <span class="tag"><img src="data:image/svg+xml;base64,{image_to_base64(os.path.join("img", "metamask-line.svg"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;" /> 高级设置</span>;', unsafe_allow_html=True)
1165
+ st.markdown(f'5. 点击打开 <span class="tag"><img src="data:image/svg+xml;base64,{image_to_base64(os.path.join("img", "0x.svg"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;" /> 显示十六进制数据</span>。', unsafe_allow_html=True)
1166
+ st.markdown(f'然后让我们构思一下我们心仪的铭文,我们需要把铭文的文本转换成十六进制形式的数据,在下方文本框输入。', unsafe_allow_html=True)
1167
+
1168
+ input_ethscriptions_str = st.text_input('默认以 "data:," 开头,输入需要转换的文本:', key='输入需要转换的文本')
1169
+ if st.button('转换', key='文本转换到十六进制形式'):
1170
+ if not input_ethscriptions_str.startswith('data:,'):
1171
+ input_ethscriptions_str = f'data:,{input_ethscriptions_str}'
1172
+ input_ethscriptions_hex = text_to_hex(input_ethscriptions_str)
1173
+ input_ethscriptions_sha = sha256(input_ethscriptions_str)
1174
+ ethscriptions_data = check_content_exists(input_ethscriptions_sha)
1175
+ if ethscriptions_data['result']:
1176
+ st.markdown(f'☹️ :green[{input_ethscriptions_str}] 已经被题写!相关信息如下:')
1177
+ selected_data = {
1178
+ '当前拥有者': ethscriptions_data["ethscription"]["current_owner"],
1179
+ '题写时间': ethscriptions_data["ethscription"]["creation_timestamp"],
1180
+ '铭文编号': f'#{ethscriptions_data["ethscription"]["ethscription_number"]}',
1181
+ '铭文完整内容': ethscriptions_data["ethscription"]["content_uri"],
1182
+ }
1183
+ st.json(selected_data)
1184
+ else:
1185
+
1186
+ st.markdown(f'😄 :green[{input_ethscriptions_str}] 还没被题写!快复制下方文本前去题写吧。')
1187
+ st.code(input_ethscriptions_hex, line_numbers=False)
1188
+
1189
+ st.markdown(f'好,让我们发送一笔交易吧,这笔交易是自己给自己发送 0ETH 的交易。', unsafe_allow_html=True)
1190
+ st.markdown(f'1. 点击发送 <span class="tag"><img src="data:image/svg+xml;base64,{image_to_base64(os.path.join("img", "send.svg"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;" /> 发送交易</span>;', unsafe_allow_html=True)
1191
+ st.markdown(f'2. 接收地址填写 <span class="tag"><img src="data:image/svg+xml;base64,{image_to_base64(os.path.join("img", "address.svg"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;" /> 自己的地址</span> ,这是铭文接收的地址,然后金额填写为 0ETH;', unsafe_allow_html=True)
1192
+ st.markdown(f'3. 填写 <span class="tag"><img src="data:image/svg+xml;base64,{image_to_base64(os.path.join("img", "0x.svg"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;" /> 十六进制数据</span> ,也就是我们刚才复制的文本;', unsafe_allow_html=True)
1193
+ st.markdown(f'4. 检查确认无误后发送交易。', unsafe_allow_html=True)
1194
+ st.markdown(f'稍等片刻,我们就可以在 <span class="tag"><a href="https://etherscan.io" target="_blank" style="text-decoration: none;"><img src="data:image/svg+xml;base64,{image_to_base64(os.path.join("img", "etherscan-logo.svg"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;" /> Etherscan</span></a> 区块浏览器看到成功的交易。', unsafe_allow_html=True)
1195
+ st.markdown(f'<img src="data:image/jpeg;base64,{image_to_base64(os.path.join("img", "etherscan_input_data.png"))}" alt="Image" style="max-width: 100%; width: 100%; height: auto; border-radius: 10px; display: block;"/>', unsafe_allow_html=True)
1196
+ st.markdown(f'同时我们也可以前往 <span class="tag"><a href="https://ethscriptions.com/" target="_blank" style="text-decoration: none;"><img src="data:image/jpeg;base64,{image_to_base64(os.path.join("img", "ethscriptions_logo_litto.png"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;"/> Ethscriptions</span></a> 官方网站查看我们的铭文。', unsafe_allow_html=True)
1197
+ st.markdown(f'如果你觉得上述的方法步骤繁琐,我们建议你使用 Ethscriptions 官方推荐的 [EthScriber](https://ethscriber.xyz/) 还有 [Etherscan IDM](https://etherscan.io/idm),其他题写工具须在你确保安全的情况下使用,因为你不能确定它要发送什么铭文的交易。', unsafe_allow_html=True)
1198
+ st.markdown(f'EthPen.com 不仅为你提供优质的工具,还有详尽的教程供你参考。欢迎你前来探索!', unsafe_allow_html=True)
1199
  # st.expander
1200
  search_rune_expander = st.expander("查询 Ethscriptions")
1201
  create_rune_expander = st.expander("题写 Ethscriptions")
1202
  token_no_code_expander = st.expander("一键式铭文批量题写,无需编码知识!")
1203
+ st.markdown(f'🎉 更多功能尽在左上角的 <span class="tag"><img src="data:image/svg+xml;base64,{image_to_base64(os.path.join("img", "greater-than.svg"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;" /> 菜单栏</span>', unsafe_allow_html=True)
 
 
1204
  # 查询铭文页面
1205
  search_rune_expander.info(
1206
  f"铭文数据来自 [Ethscriptions](https://ethscriptions.com/) 官方网站,当前索引器状态落后: {get_block_status()['blocks_behind']} 个区块。")
 
1305
 
1306
  # 删除辅助排序列
1307
  table_data.drop(columns=['sort_helper'], inplace=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1308
  result_df = pd.DataFrame(table_data)
1309
  search_rune_expander.dataframe(result_df, use_container_width=True, hide_index=True)
1310
  # Convert DataFrame to CSV with proper encoding
 
1342
  create_rune_expander.markdown(f'###### :green[{input_ethscriptions_str}] 铭文还没被题写!快前去题写吧。')
1343
 
1344
  create_rune_expander.markdown("##### 批量自动题写铭文")
1345
+ create_rune_expander.info("""在使用之前,敬请仔细阅读说明,感谢你的配合。
1346
+ 1. 请务必访问 **[ethpen.com](https://ethpen.com)** 官方网站。你可以确保这里的代码无恶意,安全地复制。
1347
  2. 你只需要掌握一些 python 相关的基础。
1348
  3. 在使用过程中,请根据规定准确填写信息,以确保程序顺畅运行。
1349
+ 4. 我们建议你使用备用账号,并避免在账号中存放大额资金。
1350
+ 5. 若你对此代码存有疑虑,建议你利用如 [ChetGPT](https://chat.openai.com/)、[Bard](https://bard.google.com/) 或 [Claude](https://claude.ai/) 等知名 AI 平台进行查询,以判断是否含有恶意代码。
1351
  6. 如果你在使用的过程中发现 BUG 或者有什么想法和建议,欢迎与我联系。
1352
  """)
1353
  if create_rune_expander.button('🖨 打印代币代码', key='输出代币铭文 Python 代码'):
 
1357
 
1358
  # 全新不用懂代码的铭文批量题写页面
1359
  token_no_code_expander.markdown("##### 安全的简易的批量自动题写铭文")
1360
+ token_no_code_expander.info("""在使用之前,敬请仔细阅读说明,感谢你的配合。
1361
+ 1. 请务必访问 **[ethpen.com](https://ethpen.com)** 官方网站。你可以确保这里的代码无恶意,安全地复制。
1362
  2. 你只需要拥有一个 [HuggingFace.co](https://huggingface.co) 账户。
1363
  3. 在使用过程中,请根据规定准确填写信息,以确保程序顺畅运行。
1364
+ 4. 我们建议你使用备用账号,并避免在账号中存放大额资金。
1365
+ 5. 若你对此代码存有疑虑,建议你利用如 [ChetGPT](https://chat.openai.com/)、[Bard](https://bard.google.com/) 或 [Claude](https://claude.ai/) 等知名 AI 平台进行查询,以判断是否含有恶意代码。
1366
  6. 请查看我们的例子 [token-example](https://huggingface.co/spaces/Ethscriptions/token) / [name-example](https://huggingface.co/spaces/Ethscriptions/name)。
1367
  """)
1368
  if token_no_code_expander.button('🖨️ 打印代币代码', key='输出 Token 铭文 Python 代码'):
 
1386
  web3
1387
  ''')
1388
 
 
 
 
 
 
 
 
 
 
1389
 
1390
+ st.markdown('#### Ethscriptions 上的龙头代币是?')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1391
  st.markdown(
1392
+ f'毫无疑问,当之无愧,它必须是 Ethscriptions 上第一个代币 <span class="tag"><a href="https://www.etch.market/market/token?category=token&collectionName=erc-20%20eths" target="_blank" style="text-decoration: none;"><img src="data:image/jpeg;base64,{image_to_base64(os.path.join("img", "eths_logo.png"))}" alt="Image" width="20px" height="20px"/> $eths</span></a>',
 
 
 
 
 
 
 
1393
  unsafe_allow_html=True)
1394
 
1395
  # 查询eths_data表中所有数据
 
1451
  <p>市值:<span class="tag">${eths_data[0][3]:,.0f}</span></p>
1452
  <p>总量:<span class="tag">21,000,000</span></p>
1453
  <p>24h 交易量:<span class="tag">${eths_data[0][5]:,.0f}</span></p>
1454
+ <p>24h 交易所:<span class="tag"><a href="https://www.etch.market/market/token?category=token&collectionName=erc-20%20eths" target="_blank" style="text-decoration: none;"><img src="data:image/jpeg;base64,{image_to_base64(os.path.join("img", "etch-market.png"))}" alt="Image" width="20px" height="20px"/> Etch Market</span></a></p>
1455
  <h5>INFO</h5>
1456
  <p>官网:None</p>
1457
  <p>浏览器:<span class="tag"><a href="https://ethscriptions.com/" target="_blank" style="text-decoration: none;"><img src="data:image/jpeg;base64,{image_to_base64(os.path.join("img", "ethscriptions_logo_litto.png"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;"/> Ethscriptions</a></span></p>
 
1459
  <p>部署时间:<span class="tag">2023/06/18 05:46:11</span></p>
1460
  <p>公链:<span class="tag">Ethereum Ethscriptions</span></p>
1461
  <p>持有人数:<span class="tag">{eths_data[0][4]:,.0f}</span></p>
1462
+ <p>社交:<span class="tag"><a href="https://twitter.com/ethscriptions" target="_blank" style="text-decoration: none;"><img src="data:image/svg+xml;base64,{image_to_base64(os.path.join("img", "x.svg"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;" /> @ethscriptions</span></a> <span class="tag"><a href="https://discord.gg/ethscriptions" target="_blank" style="text-decoration: none;"><img src="data:image/svg+xml;base64,{image_to_base64(os.path.join("img", "discord.svg"))}" alt="Image" width="20px" height="20px" style="border-radius: 3px;" /> @ethscriptions</span></a></p>
1463
  <h5>Staking</h5>
1464
  <p>质押总量:<span class="tag">{eths_data[0][6]:,.0f} $eths</span></p>
1465
  <p>质押人数:<span class="tag">{eths_data[0][7]:,.0f}</span></p>
 
1468
  </div>
1469
  """
1470
  st.markdown(eths_card_content, unsafe_allow_html=True)