KKSU
2024-04-28 0b0ddfe67b1744b10d2e2d56b115075682a634c7
测试环境新版
3 files modified
14 ■■■■ changed files
src/main/java/cc/mrbird/febs/dapp/chain/ChainEnum.java 4 ●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/job/ChainListenerJob.java 8 ●●●● patch | view | raw | blame | history
src/main/resources/application-dev.yml 2 ●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/chain/ChainEnum.java
@@ -32,7 +32,7 @@
    BSC_USDT("BSC", "0x8Afd8Bfd8be3cCEB47A6A997DD1b3Fb0046d5124",
            "0x24a2b437f5d6b1212960fe6b0bff7dabae731a3e1fb32da6e4b50fc96623d05d",
            "https://bsc-dataseed1.ninicoin.io",
            "0x55d398326f99059fF775485246999027B3197955",
            "0xd76C00A49Feb8b8512744557322BBF5F66899386",
            ""),
    /**
@@ -50,7 +50,7 @@
    BSC_GFA("BSC", "0x8Afd8Bfd8be3cCEB47A6A997DD1b3Fb0046d5124",
            "0x24a2b437f5d6b1212960fe6b0bff7dabae731a3e1fb32da6e4b50fc96623d05d",
            "https://bsc-dataseed1.ninicoin.io",
            "0xaC97ff8173c41b83111b411A3Fa62D7C6ff385be",
            "0xF13dDf25bF0763A905b487CC886e7781dA669476",
            ""),
    /**
src/main/java/cc/mrbird/febs/job/ChainListenerJob.java
@@ -34,7 +34,7 @@
    @Scheduled(cron = "0 0/5 * * * ? ")
    public void chainBlockUpdate() {
        log.info("最新区块更新");
        BigInteger blockNumber = ChainService.getInstance(ChainEnum.BSC_TFC.name()).blockNumber();
        BigInteger blockNumber = ChainService.getInstance(ChainEnum.BSC_GFA.name()).blockNumber();
        redisUtils.set(AppContants.REDIS_KEY_BLOCK_ETH_NEWEST_NUM, blockNumber);
    }
@@ -44,7 +44,7 @@
        Object newestBlockObj = redisUtils.get(AppContants.REDIS_KEY_BLOCK_ETH_NEWEST_NUM);
        BigInteger newestBlock;
        if (newestBlockObj == null) {
            newestBlock = ChainService.getInstance(ChainEnum.BSC_TFC.name()).blockNumber();
            newestBlock = ChainService.getInstance(ChainEnum.BSC_GFA.name()).blockNumber();
        } else {
            newestBlock = (BigInteger) newestBlockObj;
        }
@@ -109,7 +109,7 @@
        log.info("区块链监听开始启动");
        Object incrementObj = redisUtils.get(AppContants.REDIS_KEY_BLOCK_ETH_INCREMENT_NUM);
        BigInteger newest = ChainService.getInstance(ChainEnum.BSC_TFC.name()).blockNumber();
        BigInteger newest = ChainService.getInstance(ChainEnum.BSC_GFA.name()).blockNumber();
//        Object incrementObj = BigInteger.valueOf(39780699);
//        BigInteger newest = BigInteger.valueOf(39780739);
        BigInteger block;
@@ -129,7 +129,7 @@
             * 监控A钱包,
             */
//            ChainService.contractEventListener(block, end, bscCoinContractEvent, ChainEnum.BSC_TFC.name());
            ChainService.coinRewardEventListener(block, end, bscCoinContractEvent, ChainEnum.BSC_TFC.name());
            ChainService.coinRewardEventListener(block, end, bscCoinContractEvent, ChainEnum.BSC_GFA.name());
            block = block.add(section);
            if (block.compareTo(newest) > 0) {
src/main/resources/application-dev.yml
@@ -58,4 +58,4 @@
static:
  resource:
    url: http://120.27.238.55:8187/uploadeFile/
    path: /home/javaweb/webresource/gfa/h5/uploadeFile/
    path: /home/javaweb/webresource/gfadapp/h5/uploadeFile/