xiaoyong931011
2023-05-18 2cac4da22c22cea0525981ccb553822c7124f410
src/main/java/cc/mrbird/febs/dapp/contract/ContractInit.java
@@ -1,6 +1,10 @@
package cc.mrbird.febs.dapp.contract;
import cc.mrbird.febs.common.contants.AppContants;
import cc.mrbird.febs.common.service.RedisService;
import cc.mrbird.febs.dapp.entity.DataDictionaryCustom;
import cc.mrbird.febs.dapp.enumerate.DataDictionaryEnum;
import cc.mrbird.febs.dapp.mapper.DataDictionaryCustomMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -15,13 +19,16 @@
    private ContractMain contractMain;
    @Autowired
    private DataDictionaryCustomMapper dataDictionaryCustomMapper;
    @Autowired
    private RedisService redisService;
    @PostConstruct
    public void init(){
        // 设置起始区块编号 TODO
        BigInteger start = new BigInteger("23886625");
        BigInteger start = new BigInteger("28282373");
        // 需要打开 获取最新区块编号
        Object bnb_block_number = redisService.get("BNB_BLOCK_NUMBER");
        if(bnb_block_number !=null){