Last active
February 21, 2025 06:56
-
-
Save donma/e2e14184f63347efa7dbd1a05dcf7167 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Safe Address | |
| Console.WriteLine("Check Normal Address - TS2m5A15VDnzrJxWyz3njexzKQPzshmUBq"); | |
| Console.WriteLine("Result:" + CheckTRC20WalletInIssue("TS2m5A15VDnzrJxWyz3njexzKQPzshmUBq")); | |
| // Issue Address | |
| Console.WriteLine("Check Normal Address - TKyPzHiXW4Zms4txUxfWjXBidGzZpiCchn"); | |
| Console.WriteLine("Result:" + CheckTRC20WalletInIssue("TKyPzHiXW4Zms4txUxfWjXBidGzZpiCchn")); | |
| /// <summary> | |
| /// 判斷 tronscan 上面某錢包是不是被標示有問題 | |
| /// </summary> | |
| /// <param name="walletAddress">檢測地址</param> | |
| /// <returns>空的才是正常其他都不正常</returns> | |
| static string CheckTRC20WalletInIssue(string walletAddress) | |
| { | |
| string apiUrl = $"https://apilist.tronscanapi.com/api/multiple/chain/query?address={walletAddress}"; | |
| var client = new RestClient(apiUrl); | |
| var request = new RestRequest("", Method.Get); | |
| request.AddHeader("accept", "application/json"); | |
| var response = client.Execute(request); | |
| if (response.IsSuccessful) | |
| { | |
| var resObj = JsonConvert.DeserializeObject<WalletIssueResponse>(response.Content); | |
| if (resObj == null) | |
| { | |
| return "response parse error"; | |
| } | |
| //只有空的才是正常的 | |
| if (string.IsNullOrEmpty(resObj.redTag)) | |
| { | |
| return ""; | |
| } | |
| else | |
| { | |
| return resObj.redTag; | |
| } | |
| } | |
| else | |
| { | |
| return "query error"; | |
| } | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class WalletIssueResponse | |
| { | |
| public bool isToken { get; set; } | |
| public bool isContract { get; set; } | |
| public string tronLogo { get; set; } | |
| public string tronAddress { get; set; } | |
| public List<object> multipleChain { get; set; } | |
| /// <summary> | |
| /// 如果這個值有東西就是代表 "可能" 有問題 | |
| /// </summary> | |
| public string redTag { get; set; } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment