xiaoyong931011
2023-07-31 e6d01c8312b6adb1db73cebea9e8293a44267ee8
src/main/java/cc/mrbird/febs/dapp/contract/andao/AndaoContractMain.java
@@ -82,6 +82,12 @@
        return Web3j.build(httpService);
    }
    private static Web3j getInstanceScopes() {
        HttpService httpService = new HttpService(blockchainNode);
        return Web3j.build(httpService);
    }
    // 区块链节点地址 TODO
//    private static String blockchainNode = "https://bsc-dataseed.binance.org";
    private static String blockchainNode = "https://bsc-dataseed1.ninicoin.io";
@@ -170,7 +176,7 @@
        System.out.println("启动投注监听事件");
        // 指定密钥文件并进行账号和密码的验证
        Credentials credentials = Credentials.create(privateKey);
        Abi contract = Abi.load(contractAddr, getInstanceScope(), credentials, new DefaultGasProvider());
        Abi contract = Abi.load(contractAddr, getInstanceScopes(), credentials, new DefaultGasProvider());
        EthFilter filter = getFilter(startBlock);
        contract.withdrawnEventFlowable(filter).subscribe(e->{
            try {