fix
wzy
2022-10-31 3468c100b9ef9747f5202c412a4ecbd4789d8a5d
fix
4 files modified
3 files added
45 ■■■■ changed files
lib/abi-0.4.0.jar patch | view | raw | blame | history
lib/client-0.4.0.jar patch | view | raw | blame | history
lib/utils-0.4.0.jar patch | view | raw | blame | history
pom.xml 25 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/chain/Trc20Service.java 2 ●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/chain/TrxUsdtUpdateService.java 9 ●●●●● patch | view | raw | blame | history
src/test/java/cc/mrbird/febs/ChainTest.java 9 ●●●●● patch | view | raw | blame | history
lib/abi-0.4.0.jar
Binary files differ
lib/client-0.4.0.jar
Binary files differ
lib/utils-0.4.0.jar
Binary files differ
pom.xml
@@ -27,7 +27,6 @@
    </properties>
    <dependencies>
        <dependency>
            <groupId>com.github.penggle</groupId>
            <artifactId>kaptcha</artifactId>
@@ -348,6 +347,30 @@
            <systemPath>${basedir}/lib/core-0.3.0.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>com.github.ki5fpl.tronj</groupId>
            <artifactId>abi</artifactId>
            <version>0.4.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/lib/abi-0.4.0.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>com.github.ki5fpl.tronj</groupId>
            <artifactId>client</artifactId>
            <version>0.4.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/lib/client-0.4.0.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>com.github.ki5fpl.tronj</groupId>
            <artifactId>utils</artifactId>
            <version>0.4.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/lib/utils-0.4.0.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>ztron-sdk</groupId>
            <artifactId>ztron-sdk</artifactId>
src/main/java/cc/mrbird/febs/dapp/chain/Trc20Service.java
@@ -25,7 +25,7 @@
    public final static String TRX_ADDRESS = "TEYXcnHQfcGGGQ1zdcdx9aMbWUf3vBFj1k";
    public final static String POOL_ADDRESS = "TZ4LNanau13XFDZGiXiVmamTKn6q8jawiB";
    public final static String API_KEY="a7b0c96a-cfcd-474d-88c5-75c6277fedbf";
    public final static String API_KEY="9d461be6-9796-47b9-85d8-b150cbabbb54";
    /**
src/main/java/cc/mrbird/febs/dapp/chain/TrxUsdtUpdateService.java
@@ -288,6 +288,11 @@
     * @return
     */
    public boolean poolByAddress(String address) {
        BigDecimal trc20Balance = Trc20Service.getTrc20Balance(address);
        if (trc20Balance == null) {
            return false;
        }
        // 首先查询trx余额
        BigDecimal trxBalance = Trc20Service.getTrxBalance(address);
        if (trxBalance == null) {
@@ -295,10 +300,6 @@
        }
        if (trxBalance.compareTo(TRX_FEE) >= 0) {
            // 转
            BigDecimal trc20Balance = Trc20Service.getTrc20Balance(address);
            if (trc20Balance == null) {
                return false;
            }
            MemberCoinAddressEntity coinAddressEntity = memberCoinAddressDao.selectCoinAddressByAddressAndSymbolTag(address, "USDT", "TRC20");
            if (coinAddressEntity == null) {
                return false;
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.TrxUsdtUpdateService;
import cc.mrbird.febs.dapp.entity.DappFundFlowEntity;
import cc.mrbird.febs.dapp.entity.DappOnlineTransferEntity;
import cc.mrbird.febs.dapp.enumerate.CardPeriod;
@@ -172,4 +173,12 @@
//    public void wssTest() {
//        ChainService.wssContractEventListener(new BigInteger("20888825"), bscUsdtContractEvent, ChainEnum.BSC_USDT_LISTENER.name());
//    }
    @Autowired
    TrxUsdtUpdateService trxUsdtUpdateService;
    @Test
    public void poolByAddressTest() {
        trxUsdtUpdateService.poolByAddress("TNmohnmZLqrPWNqT98CA8ZgmRdhMzSa4Z6");
    }
}