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
| //轉換成 TRC20 | |
| static string ConvertHexToBase58Check(string hexAddress) | |
| { | |
| byte[] addressBytes = HexToBytes(hexAddress); | |
| // 計算雙重 SHA-256 校驗碼 | |
| using (SHA256 sha256 = SHA256.Create()) | |
| { |
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
| protected void Page_Load(object sender, EventArgs e) | |
| { | |
| var product_id = ""; | |
| product_id = Request["id"]; | |
| if (string.IsNullOrEmpty(id)) |
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
| //add using | |
| using System.Web.Routing; | |
| public class Global : System.Web.HttpApplication | |
| { | |
| protected void Application_Start(object sender, EventArgs e) |
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
| /// <summary> | |
| /// 取得錢包資訊 | |
| /// </summary> | |
| /// <param name="targetAddress"></param> | |
| /// <returns></returns> | |
| static GetAccountResponse GetAcccountResponse(string targetAddress) | |
| { |
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
| options.AddPolicy("SecurePolicy", | |
| policy => policy.WithOrigins("https://yourdomain.com") // 限制特定網域 | |
| .AllowMethods("GET", "POST") // 只允許 GET 和 POST | |
| .AllowHeaders("Content-Type", "Authorization")); // 只允許特定標頭 | |
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 Program | |
| { | |
| public static void Main(string[] args) | |
| { | |
| var builder = WebApplication.CreateBuilder(args); |
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 string Result { get; set; } | |
| public void OnGet() | |
| { | |
| var queryParams = Request.Query.ToDictionary(q => q.Key, q => q.Value.ToString()); | |
| foreach (var p in queryParams) | |
| { |
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
| <script async src="https://telegram.org/js/telegram-widget.js?22" | |
| data-telegram-login="YOUR_BOT" data-size="large" | |
| data-auth-url="https://YOUR_DOMAIN/tgauth" data-request-access="write"> | |
| </script> | |
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 GetTransactionByIdResponse | |
| { | |
| public List<Ret> ret { get; set; } | |
| public List<string> signature { get; set; } | |
| public string txID { get; set; } | |
| public RawData raw_data { get; set; } | |
| public string raw_data_hex { get; set; } |
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
| { | |
| "ret":[ | |
| { | |
| "contractRet":"SUCCESS" | |
| } | |
| ], | |
| "signature":[ | |
| "3d936cb99f0ee5f9b58bbf60d4c49c37df62af18fa0cbe38e10b6c84ed574bb26ccb94d5e5103d55cf53f77f48ea7bd59a4fa80051f377eecf2ed1f68ac960a91c" |