xiaoyong931011
2022-12-31 218df35e1e8b89447fe7d3c1ca6f3a29f8f89755
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
package cc.mrbird.febs.mall.chain.enums;
 
import lombok.Getter;
 
/**
 * 链类型
 */
@Getter
public enum ChainEnum {
 
    /**
     * 币安 usdt合约
     * 0x55d398326f99059fF775485246999027B3197955
     * 测试链 0x337610d27c682E347C9cD60BD4b3b107C9d34dDd
     */
    BSC_USDT("BSC", "0x7FC948E091C4b71fC063cE59B8Dad1062B1c5065",
            "0xbf6f11f5689961d5351375bebbae751de0d0d5c2e2095c1017368485dc909ff8",
            "https://bsc-dataseed1.ninicoin.io",
            "0x55d398326f99059fF775485246999027B3197955",
            "");
 
 
    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;
    }
}