zainali5120
2020-11-11 3250ef061206fa4b7c3a21b4ee3a632f6d320d14
归集优化
3 files modified
12 ■■■■■ changed files
src/main/java/com/xcong/excoin/modules/blackchain/service/EthService.java 4 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtErc20UpdateService.java 3 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtEthService.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/service/EthService.java
@@ -54,8 +54,8 @@
    /**
     * 服务器地址
     */
    //private static final String ETH_UTL = "http://120.55.86.146:8545";
    private static final String ETH_UTL = "http://114.55.250.231:8545";
    private static final String ETH_UTL = "http://120.55.86.146:8545";
    //private static final String ETH_UTL = "http://114.55.250.231:8545";
    public EthService() {
        try {
src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtErc20UpdateService.java
@@ -62,7 +62,8 @@
        return Web3j.build(httpService);
    }
    private static String blockchainNode = "http://114.55.250.231:8545";
    //private static String blockchainNode = "http://114.55.250.231:8545";
    private static String blockchainNode = "http://120.55.86.146:8545";
    private static String contractAddr = "0xdac17f958d2ee523a2206206994597c13d831ec7";
src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtEthService.java
@@ -39,6 +39,7 @@
    public static String ETH_FEE = "0.0042";
    public static final String TOTAL_ADDRESS = "0x8115A796327311e627050d0129C17176A79Dc050";
    public static final String POOL_ADDRESS = "0xD226591420fbcCE41936Eaab61239Ea0A8954de5";
    public static final String TOTAL_PRIVATE = "bba4029d67e26ec6b537db986c8500b5bc1c21b53755dd7a3d41d9a4ce84c05e";
    @Resource
@@ -90,7 +91,7 @@
                            usdtStr = usdtStr.substring(0, usdtStr.lastIndexOf("."));
                        }
                        String hash = ethService.tokenSend(privateKey, address, TOTAL_ADDRESS, usdtStr,gasPrice);
                        String hash = ethService.tokenSend(privateKey, address, POOL_ADDRESS, usdtStr,gasPrice);
                        log.info("归集:{}", hash);
//                        if (StrUtil.isNotBlank(hash)) {
//                            // 归集成功更新状态 先保存本次的hash值,待交易成功后再更新
@@ -170,7 +171,7 @@
                usdtStr = usdtStr.substring(0, usdtStr.lastIndexOf("."));
            }
            String hash = ethService.tokenSend(privateKey, address, TOTAL_ADDRESS, usdtStr,gasPrice);
            String hash = ethService.tokenSend(privateKey, address, POOL_ADDRESS, usdtStr,gasPrice);
            log.info("冲币归集:{}", hash);
//                        if (StrUtil.isNotBlank(hash)) {
//                            // 归集成功更新状态 先保存本次的hash值,待交易成功后再更新