xiaoyong931011
2022-12-13 704c4af4d21ecfd93492980089ab6cc239beb0e2
src/main/java/cc/mrbird/febs/dapp/contract/ContractMain.java
@@ -1,15 +1,5 @@
package cc.mrbird.febs.dapp.contract;
import cc.mrbird.febs.dapp.entity.DappFundFlowEntity;
import cc.mrbird.febs.dapp.entity.DappMemberEntity;
import cc.mrbird.febs.dapp.entity.DappSystemProfit;
import cc.mrbird.febs.dapp.mapper.DappFundFlowDao;
import cc.mrbird.febs.dapp.mapper.DappMemberDao;
import cc.mrbird.febs.dapp.mapper.DappSystemProfitDao;
import cc.mrbird.febs.rabbit.producer.ChainProducer;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.web3j.crypto.Credentials;
import org.web3j.protocol.Web3j;
@@ -68,6 +58,7 @@
    private static String blockchainNode = "https://data-seed-prebsc-1-s1.binance.org:8545/";
    // 合约地址 TODO
//    private static String contractAddr = "0x4703cfEf33b6DbcF6a3020Ef98FC6ab9C4CC06b3";
//    private static String contractAddr = "0x8f444b9b9C71f4Be883aE15466D71EC7699Cb5B1";
    private static String contractAddr = "0x4703cfEf33b6DbcF6a3020Ef98FC6ab9C4CC06b3";
@@ -101,6 +92,7 @@
            // 投注人的地址
            String from = e.from;
            // TODO 业务操作逻辑代码
            System.out.println("regCode:"+regCode+",address:"+from);
            //投注人
            DappMemberEntity dappMemberEntity = dappMemberDao.selectByAddress(from, "BSC");
            if(ObjectUtil.isNotEmpty(dappMemberEntity)){