|
|
|
|
|
|
|
|
import streamlit as st |
|
|
import requests |
|
|
|
|
|
st.title("Solana Wallet Verifier") |
|
|
|
|
|
|
|
|
wallet_address = st.text_input("Enter your Solana wallet address:") |
|
|
token_mint_address = st.text_input("Enter the token mint address:") |
|
|
|
|
|
if st.button("Verify"): |
|
|
if wallet_address and token_mint_address: |
|
|
try: |
|
|
|
|
|
rpc_endpoint = "https://api.mainnet-beta.solana.com" |
|
|
|
|
|
|
|
|
payload = { |
|
|
"jsonrpc": "2.0", |
|
|
"id": 1, |
|
|
"method": "getTokenAccountsByOwner", |
|
|
"params": [ |
|
|
wallet_address, |
|
|
{"mint": token_mint_address}, |
|
|
{"encoding": "jsonParsed"} |
|
|
] |
|
|
} |
|
|
|
|
|
|
|
|
response = requests.post(rpc_endpoint, json=payload) |
|
|
result = response.json() |
|
|
|
|
|
|
|
|
if 'result' in result and 'value' in result['result'] and len(result['result']['value']) > 0: |
|
|
|
|
|
token_account = result['result']['value'][0] |
|
|
balance_info = token_account['account']['data']['parsed']['info']['tokenAmount'] |
|
|
amount = int(balance_info['amount']) |
|
|
|
|
|
|
|
|
decimals = balance_info['decimals'] |
|
|
adjusted_amount = amount / (10 ** decimals) |
|
|
|
|
|
|
|
|
if adjusted_amount >= 3333333: |
|
|
st.success("β
Guaranteed OG Status") |
|
|
elif adjusted_amount >= 333333: |
|
|
st.success("β
Guaranteed WLT Status") |
|
|
elif adjusted_amount >= 33333: |
|
|
st.success("β
Guaranteed WLR Status") |
|
|
else: |
|
|
st.error("You do not meet any status requirements.") |
|
|
else: |
|
|
st.error("Token account not found or zero balance.") |
|
|
except Exception as e: |
|
|
st.error(f"An error occurred: {e}") |
|
|
else: |
|
|
st.warning("Please enter both wallet address and token mint address.") |
|
|
|