From 8bcab114f9935c2f8477791490e2894e9b7ee708 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Fri, 22 Jul 2022 10:37:21 +0800
Subject: [PATCH] change web3j-core version for exception
---
src/test/java/cc/mrbird/febs/ChainTest.java | 9 ++++
src/main/resources/application-dev.yml | 6 ++
pom.xml | 58 ++++++++++++++++++++++++++---
3 files changed, 66 insertions(+), 7 deletions(-)
diff --git a/pom.xml b/pom.xml
index c53be90..4c5a0eb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -325,35 +325,81 @@
<systemPath>${basedir}/lib/tron-sdk.jar</systemPath>
</dependency>
+<!-- <dependency>-->
+<!-- <groupId>org.web3j</groupId>-->
+<!-- <artifactId>core</artifactId>-->
+<!-- <version>4.5.5</version>-->
+<!-- </dependency>-->
+
+ <!-- https://mvnrepository.com/artifact/org.web3j/core -->
<dependency>
<groupId>org.web3j</groupId>
<artifactId>core</artifactId>
- <version>4.5.5</version>
+ <version>5.0.0</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>okhttp</artifactId>
+ <groupId>com.squareup.okhttp3</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>logging-interceptor</artifactId>
+ <groupId>com.squareup.okhttp3</groupId>
+ </exclusion>
+ </exclusions>
</dependency>
-
+ <!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
- <version>3.6.0</version>
+ <version>4.3.1</version>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <artifactId>okio</artifactId>
+ <groupId>com.squareup.okio</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>com.squareup.okio</groupId>
+ <artifactId>okio</artifactId>
+ <version>2.4.1</version>
+ <scope>compile</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/logging-interceptor -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>logging-interceptor</artifactId>
- <version>3.6.0</version>
+ <version>4.3.1</version>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <artifactId>okhttp</artifactId>
+ <groupId>com.squareup.okhttp3</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp-bom -->
+ <dependency>
+ <groupId>com.squareup.okhttp3</groupId>
+ <artifactId>okhttp-bom</artifactId>
+ <version>4.4.0</version>
+ <type>pom</type>
</dependency>
<!-- https://mvnrepository.com/artifact/org.web3j/parity -->
<dependency>
<groupId>org.web3j</groupId>
<artifactId>parity</artifactId>
- <version>4.5.10</version>
+ <version>5.0.0</version>
<exclusions>
<exclusion>
- <artifactId>core</artifactId>
<groupId>org.web3j</groupId>
+ <artifactId>core</artifactId>
</exclusion>
</exclusions>
</dependency>
diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml
index 0fed63c..37cc7b7 100644
--- a/src/main/resources/application-dev.yml
+++ b/src/main/resources/application-dev.yml
@@ -19,6 +19,10 @@
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://120.27.238.55:3306/db_sdc?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8
+# username: db_sdp
+# password: sdp!@#123
+# driver-class-name: com.mysql.cj.jdbc.Driver
+# url: jdbc:mysql://154.91.195.155:3306/db_sdp?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8
redis:
# Redis数据库索引(默认为 0)
@@ -50,5 +54,5 @@
system:
online-transfer: false
- chain-listener: false
+ chain-listener: true
trade-job: false
\ No newline at end of file
diff --git a/src/test/java/cc/mrbird/febs/ChainTest.java b/src/test/java/cc/mrbird/febs/ChainTest.java
index b81c4cc..092e4fc 100644
--- a/src/test/java/cc/mrbird/febs/ChainTest.java
+++ b/src/test/java/cc/mrbird/febs/ChainTest.java
@@ -3,6 +3,7 @@
import cc.mrbird.febs.dapp.chain.ChainEnum;
import cc.mrbird.febs.dapp.chain.ChainService;
import cc.mrbird.febs.dapp.chain.ContractChainService;
+import cc.mrbird.febs.dapp.chain.ContractEventService;
import cc.mrbird.febs.dapp.entity.DappFundFlowEntity;
import cc.mrbird.febs.dapp.entity.DappOnlineTransferEntity;
import cc.mrbird.febs.dapp.mapper.DappFundFlowDao;
@@ -118,4 +119,12 @@
public void safeMintTest() {
ChainService.getInstance(ChainEnum.BSC_NFT_SDC.name()).safeMintNFT("0x4EbDCA102623b46a47042D580dddAdE2a53D057F");
}
+
+ @Autowired
+ private ContractEventService bscUsdtContractEvent;
+
+ @Test
+ public void chainFilterTest() {
+ ChainService.contractEventListener(new BigInteger(String.valueOf(19721571)), new BigInteger(String.valueOf(19721571)), bscUsdtContractEvent, ChainEnum.BSC_USDT.name());
+ }
}
--
Gitblit v1.9.1