| | |
| | | package cc.mrbird.febs.dapp.chain; |
| | | |
| | | import cc.mrbird.febs.common.contants.AppContants; |
| | | import lombok.Data; |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * 链类型 |
| | | * -- todo |
| | | * 0x81cEAD4B1FaD71c97F77e286F864b95400Ff427B 已审计 |
| | | */ |
| | | @Getter |
| | | public enum ChainEnum { |
| | | ETH, TRX, BSC |
| | | } |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | BSC_USDT_W_POOL_CONTRACT("BSC", "0xCe74955CF5289E803EE518902076eF42BB09b7a8", |
| | | AppContants.FEE_ADDRESS_KEY.get("feeAddressKey").toString() , |
| | | "https://bsc-dataseed1.ninicoin.io", |
| | | "0xbE8470ff4cF69eb6F2923aE3A8B29f58Ea81cEb0", |
| | | ""), |
| | | |
| | | /** |
| | | * 提现USDT |
| | | */ |
| | | BSC_USDT_W_POOL("BSC", "0xCe74955CF5289E803EE518902076eF42BB09b7a8", |
| | | AppContants.FEE_ADDRESS_KEY.get("feeAddressKey").toString() , |
| | | "https://bsc-dataseed1.ninicoin.io", |
| | | "0x55d398326f99059fF775485246999027B3197955", |
| | | ""), |
| | | |
| | | /** |
| | | * A币入金的后进入A池,进入B池 |
| | | */ |
| | | BSC_USDT_A_POOL("BSC", "0xCe74955CF5289E803EE518902076eF42BB09b7a8", |
| | | AppContants.FEE_ADDRESS_KEY.get("feeAddressKey").toString() , |
| | | "https://bsc-dataseed1.ninicoin.io", |
| | | "0x55d398326f99059fF775485246999027B3197955", |
| | | ""), |
| | | |
| | | /** |
| | | * 币安 usdt合约 |
| | | * 0x55d398326f99059fF775485246999027B3197955 |
| | | * 测试链 0x337610d27c682E347C9cD60BD4b3b107C9d34dDd |
| | | */ |
| | | BSC_USDT("BSC", "0x891884eed30219DE39CCAE8b796F5fAE231A2Ea0", |
| | | AppContants.FEE_ADDRESS_KEY.get("feeAddressKey").toString(), |
| | | "https://bsc-dataseed1.ninicoin.io", |
| | | "0x55d398326f99059fF775485246999027B3197955", |
| | | // "0x532B0F9554D92b8BF1bdE85DD4E8b86E4228DE27", |
| | | ""), |
| | | BNB("BSC", "0xBa6206B3Be305278Ea65bA54C4E6188B252AEc4a", |
| | | "0x1bc264d17bd2b1f3c0480764272284b8e6c8b0a39a590c26940f84f7b090cc74", |
| | | "https://bsc-dataseed1.ninicoin.io", |
| | | "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", |
| | | ""), |
| | | |
| | | /** |
| | | * 币安链 代币合约 |
| | | * 测试链 0xdd92ea2f41d807a60b29004bf7db807d8ac09212 |
| | | * 正式 0xb27e44f98543e480dbd071b6605005e3d99b3dd4 https://bsc-dataseed1.ninicoin.io |
| | | * |
| | | */ |
| | | BSC_TFC("BSC", "0xa60aac0da34c76f3f60207ee09e9f75043319ab4", |
| | | AppContants.FEE_ADDRESS_KEY.get("feeAddressKey").toString(), |
| | | "https://bsc-dataseed1.ninicoin.io", |
| | | "0x55d398326f99059fF775485246999027B3197955", |
| | | ""), |
| | | |
| | | /** |
| | | * 币安 usdt合约 |
| | | * 0x55d398326f99059fF775485246999027B3197955 |
| | | * 测试链 0x337610d27c682E347C9cD60BD4b3b107C9d34dDd |
| | | */ |
| | | BSC_USDT_LISTENER("BSC", "0xBa6206B3Be305278Ea65bA54C4E6188B252AEc4a", |
| | | AppContants.FEE_ADDRESS_KEY.get("feeAddressKey").toString(), |
| | | "https://bsc-dataseed1.ninicoin.io", |
| | | "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", |
| | | ""), |
| | | |
| | | /** |
| | | * 币安链 代币合约 |
| | | * 测试链 0xdd92ea2f41d807a60b29004bf7db807d8ac09212 |
| | | * 正式 0xb27e44f98543e480dbd071b6605005e3d99b3dd4 https://bsc-dataseed1.ninicoin.io |
| | | * |
| | | */ |
| | | BSC_TFC_LISTENER("BSC", "0x0F22E63D2FB18963C57A5Cb3C43403d156D140c2+1", |
| | | AppContants.FEE_ADDRESS_KEY.get("feeAddressKey").toString(), |
| | | "https://bsc-dataseed1.ninicoin.io", |
| | | "0x9b4406bC2fa21d2058FD4939BAF29B3763cFeDe2+1", |
| | | ""); |
| | | |
| | | |
| | | 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; |
| | | } |
| | | } |