Accelernate commited on
Commit
34176ed
·
verified ·
1 Parent(s): edbe8ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -3,11 +3,11 @@ import requests
3
 
4
  st.title("Verify 👻")
5
 
6
- # Fixed Token Mint Addresses
7
- TOKEN_MINT_ADDRESSES = [
8
- "PR9SDkf1SxrJqSXzQyoR17VdGZ1ZgWMiRcS5VtYmis1", # Original mint address
9
- "9yT1p7grHJh3uKw3sp9XrQwNtCtAKDa8mqpMW2Y9BLz5" # Additional mint address
10
- ]
11
 
12
  # Input field for the wallet address
13
  wallet_address = st.text_input("Enter your Solana wallet address:")
@@ -20,7 +20,8 @@ if st.button("Verify"):
20
 
21
  total_adjusted_amount = 0
22
 
23
- for token_mint_address in TOKEN_MINT_ADDRESSES:
 
24
  # Prepare the request payload
25
  payload = {
26
  "jsonrpc": "2.0",
@@ -55,10 +56,10 @@ if st.button("Verify"):
55
  # Add to total amount
56
  total_adjusted_amount += adjusted_amount
57
 
58
- # Display the amount the user holds for each token
59
- st.write(f"You hold {adjusted_amount:,.0f} tokens for mint address {token_mint_address}.")
60
  else:
61
- st.write(f"No tokens found for mint address {token_mint_address}.")
62
 
63
  # Compare the total adjusted amount to thresholds
64
  if total_adjusted_amount >= 333333:
 
3
 
4
  st.title("Verify 👻")
5
 
6
+ # Fixed Token Mint Addresses (hidden from user)
7
+ TOKEN_MINT_ADDRESSES = {
8
+ "TRICK": "PR9SDkf1SxrJqSXzQyoR17VdGZ1ZgWMiRcS5VtYmis1", # TRICK token mint address
9
+ "TREAT": "9yT1p7grHJh3uKw3sp9XrQwNtCtAKDa8mqpMW2Y9BLz5" # TREAT token mint address
10
+ }
11
 
12
  # Input field for the wallet address
13
  wallet_address = st.text_input("Enter your Solana wallet address:")
 
20
 
21
  total_adjusted_amount = 0
22
 
23
+ # Loop through token types (TRICK and TREAT)
24
+ for token_name, token_mint_address in TOKEN_MINT_ADDRESSES.items():
25
  # Prepare the request payload
26
  payload = {
27
  "jsonrpc": "2.0",
 
56
  # Add to total amount
57
  total_adjusted_amount += adjusted_amount
58
 
59
+ # Display the amount the user holds for each token (TRICK or TREAT)
60
+ st.write(f"You hold {adjusted_amount:,.0f} {token_name} tokens.")
61
  else:
62
+ st.write(f"No {token_name} tokens found.")
63
 
64
  # Compare the total adjusted amount to thresholds
65
  if total_adjusted_amount >= 333333: