| | |
| | | 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; |
| | | |
| | |
| | | private ContractMain contractMain; |
| | | |
| | | @Autowired |
| | | private DataDictionaryCustomMapper dataDictionaryCustomMapper; |
| | | |
| | | @Autowired |
| | | private RedisService redisService; |
| | | |
| | | |
| | |
| | | if(bnb_block_number !=null){ |
| | | start = BigInteger.valueOf(Long.valueOf(bnb_block_number.toString())); |
| | | } |
| | | DataDictionaryCustom feeAddressKey = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.FEE_ADDRESS_KEY.getType(), DataDictionaryEnum.FEE_ADDRESS_KEY.getCode()); |
| | | AppContants.FEE_ADDRESS_KEY.put("feeAddressKey",feeAddressKey.getValue()); |
| | | feeAddressKey.setValue("已初始化"); |
| | | dataDictionaryCustomMapper.updateById(feeAddressKey); |
| | | System.out.println("启动区块事件监听,监听起始:"+start); |
| | | contractMain.listenBetting(start); |
| | | } |