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