xiaoyong931011
2023-08-07 2eebadc490b460a3e97666ce33d46397e3fdfdd2
src/main/java/cc/mrbird/febs/dapp/contract/andao/AndaoContractMain.java
@@ -29,7 +29,7 @@
@Component
@ConditionalOnProperty(prefix = "system", name = "quartz-job", havingValue = "true")
@ConditionalOnProperty(prefix = "system", name = "chain-listener", havingValue = "true")
public class AndaoContractMain {
    @Autowired
@@ -77,6 +77,12 @@
    }
    private static Web3j getInstanceScope() {
        HttpService httpService = new HttpService(blockchainNode);
        return Web3j.build(httpService);
    }
    private static Web3j getInstanceScopes() {
        HttpService httpService = new HttpService(blockchainNode);
        return Web3j.build(httpService);
@@ -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 {