From ce2381119e714643d5393035c3e30ad0bcaa5bd2 Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Mon, 17 Jun 2024 15:11:05 +0800
Subject: [PATCH] 后台
---
src/main/java/cc/mrbird/febs/dapp/chain/ChainEnum.java | 85 +++++++++++++++++++++++++++++++++++++++++-
1 files changed, 83 insertions(+), 2 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/dapp/chain/ChainEnum.java b/src/main/java/cc/mrbird/febs/dapp/chain/ChainEnum.java
index 5d278fc..740d354 100644
--- a/src/main/java/cc/mrbird/febs/dapp/chain/ChainEnum.java
+++ b/src/main/java/cc/mrbird/febs/dapp/chain/ChainEnum.java
@@ -1,8 +1,89 @@
package cc.mrbird.febs.dapp.chain;
+import lombok.Getter;
+
/**
* 链类型
*/
+@Getter
public enum ChainEnum {
- ETH, TRX, BSC
-}
+
+ /**
+ * 币安 usdt合约
+ * 0x55d398326f99059fF775485246999027B3197955
+ * 测试链 0x337610d27c682E347C9cD60BD4b3b107C9d34dDd
+ */
+ BSC_USDT("BSC", "0x8Fa07708b106f526934Cedd673f1b8B0941d011f",
+ "f86ce4c42d4a0220770c7f17e7c30c1943bbbf5c738f24382c06229110d93674",
+ "https://bsc-dataseed1.ninicoin.io",
+ "0x55d398326f99059fF775485246999027B3197955",
+ ""),
+
+ /**
+ * 币安链 代币合约
+ * 测试链 0xdd92ea2f41d807a60b29004bf7db807d8ac09212
+ * 正式 0xb27e44f98543e480dbd071b6605005e3d99b3dd4 https://bsc-dataseed1.ninicoin.io
+ *
+ */
+ BSC_TFC("BSC", "0x0F22E63D2FB18963C57A5Cb3C43403d156D140c2",
+ "0x5bd9f75f53693076e19a8f20d66a147bf0a438275463d2b8d85be8ab11780836",
+ "https://bsc-dataseed1.ninicoin.io",
+ "0x5dc091e47EDcd24709C7922370806d39e6Ad8be9",
+ ""),
+
+ /**
+ * 币安 usdt合约
+ * 0x55d398326f99059fF775485246999027B3197955
+ * 测试链 0x337610d27c682E347C9cD60BD4b3b107C9d34dDd
+ */
+ BSC_USDT_LISTENER("BSC", "0xa9B85Fc19f3E330Cd703050fACA2110c7A33fd06",
+ "0xb97d6046268b76a21c11c4b33357dc8e203542d7c2a7fc40fccf364099b06477",
+ "https://bsc-dataseed1.ninicoin.io",
+ "0x55d398326f99059fF775485246999027B3197955",
+ ""),
+
+ /**
+ * 币安链 代币合约
+ * 测试链 0xdd92ea2f41d807a60b29004bf7db807d8ac09212
+ * 正式 0xb27e44f98543e480dbd071b6605005e3d99b3dd4 https://bsc-dataseed1.ninicoin.io
+ *
+ */
+ BSC_TFC_LISTENER("BSC", "0x0F22E63D2FB18963C57A5Cb3C43403d156D140c2",
+ "0x5bd9f75f53693076e19a8f20d66a147bf0a438275463d2b8d85be8ab11780836",
+ "https://bsc-dataseed1.ninicoin.io",
+ "0x9b4406bC2fa21d2058FD4939BAF29B3763cFeDe2",
+ "");
+
+
+ private String chain;
+
+ private String address;
+
+ private String privateKey;
+
+ private String url;
+
+ private String contractAddress;
+
+ private String apiKey;
+
+ ChainEnum(String chain, String address, String privateKey, String url, String contractAddress, String apiKey) {
+ this.chain = chain;
+ this.address = address;
+ this.privateKey = privateKey;
+ this.url = url;
+ this.contractAddress = contractAddress;
+ this.apiKey = apiKey;
+ }
+
+ public static ChainEnum getValueByName(String name) {
+ ChainEnum[] values = values();
+ for (ChainEnum value : values) {
+ if (value.name().equals(name)) {
+ return value;
+ }
+ }
+
+ return null;
+ }
+}
\ No newline at end of file
--
Gitblit v1.9.1