package com.m2pool.pool.enums;

import java.math.BigDecimal;

/**
 * @Description 矿池 相关的
 * @Date 2022/5/20 11:15
 * @Author 杜懿
 */
public enum NodeConstant {

    GRS("grs", BigDecimal.valueOf(Math.pow(2,32)).divide(BigDecimal.valueOf(60),2,BigDecimal.ROUND_HALF_UP)),
    MONA("mona", BigDecimal.valueOf(Math.pow(2,32)).divide(BigDecimal.valueOf(90),2,BigDecimal.ROUND_HALF_UP)),
    DGBS("dgbs", BigDecimal.valueOf(Math.pow(2,32)).divide(BigDecimal.valueOf(73.2),2,BigDecimal.ROUND_HALF_UP)),
    DGBQ("dgbq", BigDecimal.valueOf(Math.pow(2,32)).divide(BigDecimal.valueOf(73.2),2,BigDecimal.ROUND_HALF_UP)),
    DGBO("dgbo", BigDecimal.valueOf(Math.pow(2,32)).divide(BigDecimal.valueOf(73.2),2,BigDecimal.ROUND_HALF_UP)),
    DGB_QUBIT_A10("dgb_qubit_a10", BigDecimal.valueOf(Math.pow(2,32)).divide(BigDecimal.valueOf(120),2,BigDecimal.ROUND_HALF_UP)),
    DGB_SKEIN_A10("dgb_skein_a10", BigDecimal.valueOf(Math.pow(2,32)).divide(BigDecimal.valueOf(120),2,BigDecimal.ROUND_HALF_UP)),
    DGB_ODO_B20("dgb_odo_b20", BigDecimal.valueOf(Math.pow(2,32)).divide(BigDecimal.valueOf(120),2,BigDecimal.ROUND_HALF_UP)),
    NEXA("nexa", BigDecimal.valueOf(Math.pow(2,32)).subtract(BigDecimal.ONE).divide(BigDecimal.valueOf(120),2,BigDecimal.ROUND_HALF_UP)),
    RXD("rxd", BigDecimal.valueOf(Math.pow(2,32)).subtract(BigDecimal.ONE).divide(BigDecimal.valueOf(300),2,BigDecimal.ROUND_HALF_UP)),
    ALPH("alph", BigDecimal.valueOf(Math.pow(2,32)).subtract(BigDecimal.ONE).divide(BigDecimal.valueOf(16),2,BigDecimal.ROUND_HALF_UP)),
    ENX("enx", BigDecimal.valueOf(Math.pow(2,32)).subtract(BigDecimal.ONE).divide(BigDecimal.valueOf(1),2,BigDecimal.ROUND_HALF_UP));

    /** 币种参数名 */
    private final String coin;
    /** 换算系数 */
    private final BigDecimal factor;



    NodeConstant(String coin, BigDecimal factor) {
        this.coin = coin;
        this.factor = factor;
    }

    public String getCoin() {
        return coin;
    }

    public BigDecimal getFactor() {
        return factor;
    }

}
