fix
wzy
2022-11-06 420efcecbc5b9b17f96b9c0a37d9bc3a5f1afccd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
package cc.mrbird.febs.dapp.chain;
 
import lombok.Data;
import lombok.Getter;
 
/**
 * 链类型
 */
@Getter
public enum ChainEnum {
 
    /**
     * 币安 usdt合约
     * 0x55d398326f99059fF775485246999027B3197955
     * 测试链 0x337610d27c682E347C9cD60BD4b3b107C9d34dDd
     */
    BSC_USDT("BSC", "0xc5CE0041B2C5a075003D3a631304D272572716cb",
            "0xa1dcc95f2ad7c8e27b0fd75308028bc2ab047553363c16e9742110be9ab96b99",
            "https://bsc-dataseed1.ninicoin.io",
            "0x55d398326f99059fF775485246999027B3197955",
            ""),
 
    /**
     * 币安链 代币合约
     * 测试链 0xdd92ea2f41d807a60b29004bf7db807d8ac09212
     * 正式 0xb27e44f98543e480dbd071b6605005e3d99b3dd4 https://bsc-dataseed1.ninicoin.io
     *
     */
    BSC_TFC("BSC", "0x8084Cf691B69c70De8A7c345E63CaA740B730FA5",
            "0x7bee8cf9441800655376ba95729c0807231367cf75702dd3b17fa5290196bb87",
            "https://bsc-dataseed1.ninicoin.io",
            "0xb27e44f98543e480dbd071b6605005e3d99b3dd4",
            ""),
 
    /**
     * 币安 usdt合约
     * 0x55d398326f99059fF775485246999027B3197955
     * 测试链 0x337610d27c682E347C9cD60BD4b3b107C9d34dDd
     */
    BSC_USDT_LISTENER("BSC", "0xc5CE0041B2C5a075003D3a631304D272572716cb",
            "0xa1dcc95f2ad7c8e27b0fd75308028bc2ab047553363c16e9742110be9ab96b99",
            "https://bsc-dataseed1.ninicoin.io",
            "0x55d398326f99059fF775485246999027B3197955",
            ""),
 
    /**
     * 币安链 代币合约
     * 测试链 0xdd92ea2f41d807a60b29004bf7db807d8ac09212
     * 正式 0xb27e44f98543e480dbd071b6605005e3d99b3dd4 https://bsc-dataseed1.ninicoin.io
     *
     */
    BSC_TFC_LISTENER("BSC", "0x8084Cf691B69c70De8A7c345E63CaA740B730FA5",
            "0x7bee8cf9441800655376ba95729c0807231367cf75702dd3b17fa5290196bb87",
            "https://bsc-dataseed1.ninicoin.io",
            "0xb27e44f98543e480dbd071b6605005e3d99b3dd4",
            "");
 
 
    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;
    }
}