Spaces:
Sleeping
Sleeping
Commit
·
ea0e23c
1
Parent(s):
d0f0ba9
Update app.py
Browse files
app.py
CHANGED
|
@@ -121,36 +121,16 @@ if approved_use:
|
|
| 121 |
# 使用字典来跟踪每个地址的nonce
|
| 122 |
nonces = {}
|
| 123 |
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
if
|
| 127 |
-
#
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
current_nonce = w3.eth.get_transaction_count(address) # 获取地址的 nonce
|
| 135 |
-
nonces[address] = current_nonce # 记录地址的 nonce
|
| 136 |
-
accounts.append((address.strip(), key.strip())) # 保存地址和私钥还有 nonce
|
| 137 |
-
else:
|
| 138 |
-
st.error(f"地址 {address} 或私钥 {key} 无效,请检查!")
|
| 139 |
-
st.stop()
|
| 140 |
-
else:
|
| 141 |
-
st.error(f"输入格式错误,请确保每行包含一个地址和一个私钥,并使用英文逗号分隔(,)。错误行:**{line}**")
|
| 142 |
-
st.stop()
|
| 143 |
-
else:
|
| 144 |
-
account_address = st.text_input('填写你的 **ETH 地址**:')
|
| 145 |
-
private_key = st.text_input('填写你的 **ETH 地址对应的私钥**:', type="password")
|
| 146 |
-
if account_address and private_key: # 如果地址和私钥有内容
|
| 147 |
-
if is_valid_eth_address(account_address) and is_valid_eth_private_key(private_key): # 验证地址和私钥
|
| 148 |
-
current_nonce = w3.eth.get_transaction_count(account_address) # 获取地址的 nonce
|
| 149 |
-
nonces[account_address] = current_nonce # 记录地址的 nonce
|
| 150 |
-
accounts.append((account_address.strip(), private_key.strip())) # 保存地址和私钥还有 nonce
|
| 151 |
-
else:
|
| 152 |
-
st.error("地址或私钥无效,请检查!")
|
| 153 |
-
st.stop()
|
| 154 |
|
| 155 |
# 配置铭文文本
|
| 156 |
input_data = st.text_input('填写需要题写代币铭文文本', 'data:,{"p":"prc-20","op":"mint","tick":"pols","amt":"100000000"}')
|
|
|
|
| 121 |
# 使用字典来跟踪每个地址的nonce
|
| 122 |
nonces = {}
|
| 123 |
|
| 124 |
+
account_address = st.text_input('填写你的 **ETH 地址**:')
|
| 125 |
+
private_key = st.text_input('填写你的 **ETH 地址对应的私钥**:', type="password")
|
| 126 |
+
if account_address and private_key: # 如果地址和私钥有内容
|
| 127 |
+
if is_valid_eth_address(account_address) and is_valid_eth_private_key(private_key): # 验证地址和私钥
|
| 128 |
+
current_nonce = w3.eth.get_transaction_count(account_address) # 获取地址的 nonce
|
| 129 |
+
nonces[account_address] = current_nonce # 记录地址的 nonce
|
| 130 |
+
accounts.append((account_address.strip(), private_key.strip())) # 保存地址和私钥还有 nonce
|
| 131 |
+
else:
|
| 132 |
+
st.error("地址或私钥无效,请检查!")
|
| 133 |
+
st.stop()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
|
| 135 |
# 配置铭文文本
|
| 136 |
input_data = st.text_input('填写需要题写代币铭文文本', 'data:,{"p":"prc-20","op":"mint","tick":"pols","amt":"100000000"}')
|