From 823aabb391a0cbd2eddf7c58c03b76e71967b964 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Fri, 22 Jul 2022 11:16:45 +0800
Subject: [PATCH] add contract listner exception
---
src/main/java/cc/mrbird/febs/dapp/chain/ChainEnum.java | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 115 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..104154e 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,121 @@
package cc.mrbird.febs.dapp.chain;
+import lombok.Data;
+import lombok.Getter;
+
/**
* 链类型
*/
+@Getter
public enum ChainEnum {
- ETH, TRX, BSC
-}
+
+ /**
+ * 币安 usdt合约
+ * 0x55d398326f99059fF775485246999027B3197955
+ * 测试链 0x337610d27c682E347C9cD60BD4b3b107C9d34dDd
+ */
+ BSC_USDT("BSC",
+ "0xFe7648513033782dE07010927686B97340661360",
+ "111",
+ "https://bsc-dataseed1.ninicoin.io",
+ "0x55d398326f99059fF775485246999027B3197955",
+ ""),
+
+ /**
+ * NFT
+ */
+ BSC_NFT_SDC("BSC",
+ "0x3afD1Bf0994214DBe5ccfA7d8643261B195532c2",
+ "0x07ee6de0ca4b289f8e69484f70d09988c6df6697f411dc623179930a3578994f",
+ "https://bsc-dataseed1.ninicoin.io",
+ "0xb7FDE337f2236F78B2823d9F97eAB03ce893CC3D",
+ ""),
+
+ /**
+ * 币安链 代币合约
+ * 测试链 0xdd92ea2f41d807a60b29004bf7db807d8ac09212
+ * 正式 0x6c6835e60e7dBaD7a60112a6371271e8eb79ee68 https://bsc-dataseed1.ninicoin.io
+ */
+ BSC_TFC("", "",
+ "",
+ "https://bsc-dataseed1.ninicoin.io",
+ "",
+ ""),
+
+ /**
+ * 源池币
+ */
+ BSC_TFC_SOURCE("", "",
+ "",
+ "https://bsc-dataseed1.ninicoin.io",
+ "",
+ ""),
+
+ /**
+ * 源池U
+ */
+ BSC_USDT_SOURCE("", "",
+ "",
+ "https://bsc-dataseed1.ninicoin.io",
+ "",
+ ""),
+
+ /**
+ * 铸池币
+ */
+ BSC_TFC_MAKE("", "",
+ "",
+ "https://bsc-dataseed1.ninicoin.io",
+ "",
+ ""),
+
+ /**
+ * 技术池
+ */
+ BSC_TFC_TECH("", "",
+ "",
+ "https://bsc-dataseed1.ninicoin.io",
+ "",
+ ""),
+
+ /**
+ * 奖励池
+ */
+ BSC_TFC_REWARD("", "",
+ "",
+ "https://bsc-dataseed1.ninicoin.io",
+ "",
+ "");
+
+ 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