package cc.mrbird.febs.dapp.chain; import cc.mrbird.febs.common.contants.AppContants; import lombok.Getter; /** * 链类型 */ @Getter public enum ChainEnum { /** * 币安 usdt合约 * 0x55d398326f99059fF775485246999027B3197955 * 测试链 0x337610d27c682E347C9cD60BD4b3b107C9d34dDd */ BSC_USDT("BSC", AppContants.FEE_ADDRESS.get("feeAddress").toString(), AppContants.FEE_ADDRESS_KEY.get("feeAddressKey").toString(), "https://bsc-dataseed1.ninicoin.io", "0x2c44b726ADF1963cA47Af88B284C06f30380fC78", ""), /** * 币安链 代币合约 * 测试链 0xdd92ea2f41d807a60b29004bf7db807d8ac09212 * 正式 0xb27e44f98543e480dbd071b6605005e3d99b3dd4 https://bsc-dataseed1.ninicoin.io * */ // BSC_TFC("BSC", "0xCEBfd36e03BD80c7015Cbad17eFfBc33d2923FF3", // "592cd2f7e57f94cad7eddc6019a9ed8a36ff05cf37037f74cebe1ffacfaabe77", // "https://data-seed-prebsc-1-s1.bnbchain.org:8545", // "0x389D47A029a3A1088B42D800aEc97b5a381ab187", // ""), BSC_TFC("BSC", "0xCEBfd36e03BD80c7015Cbad17eFfBc33d2923FF3", "592cd2f7e57f94cad7eddc6019a9ed8a36ff05cf37037f74cebe1ffacfaabe77", "https://bsc-dataseed1.ninicoin.io", "0xA2c912550743f6bD93f592B9F2F929cDf817Aae0", "") ; 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; } }