Merge branch 'master' into follow
| | |
| | | BigInteger nonce = ethGetTransactionCount.getTransactionCount();
|
| | | BigInteger value = Convert.toWei(amount, Convert.Unit.ETHER).toBigInteger();
|
| | | RawTransaction rawTransaction = RawTransaction.createEtherTransaction(nonce,
|
| | | Convert.toWei("70", Convert.Unit.GWEI).toBigInteger(),
|
| | | Convert.toWei("50", Convert.Unit.GWEI).toBigInteger(),
|
| | | Convert.toWei("60000", Convert.Unit.WEI).toBigInteger(), toAddress, value);
|
| | | byte[] signedMessage = TransactionEncoder.signMessage(rawTransaction, credentials);
|
| | | String hexValue = Numeric.toHexString(signedMessage);
|
| | |
| | | // 开多委托价不能大于当前价 |
| | | if (submitEntrustDto.getEntrustType() == ContractEntrustOrderEntity.ENTRUST_TYPE_OPEN_MORE) { |
| | | if (submitEntrustDto.getEntrustPrice().compareTo(newPrice) > -1) { |
| | | return Result.fail(MessageSourceUtils.getString("entrust_price_judge_more")); |
| | | // return Result.fail(MessageSourceUtils.getString("entrust_price_judge_more")); |
| | | submitEntrustDto.setEntrustPrice(newPrice); |
| | | } |
| | | } |
| | | |
| | | // 开空委托价不能小于当前价 |
| | | if (submitEntrustDto.getEntrustType() == ContractEntrustOrderEntity.ENTRUST_TYPE_OPEN_LESS) { |
| | | if (submitEntrustDto.getEntrustPrice().compareTo(newPrice) < 1) { |
| | | return Result.fail(MessageSourceUtils.getString("entrust_price_judge_less")); |
| | | // return Result.fail(MessageSourceUtils.getString("entrust_price_judge_less")); |
| | | submitEntrustDto.setEntrustPrice(newPrice); |
| | | } |
| | | } |
| | | |
| | |
| | | @Resource
|
| | | private MemberWalletCoinDao memberWalletCoinDao;
|
| | |
|
| | | @Test
|
| | | public void pool() throws ExecutionException, InterruptedException {
|
| | | //List<MemberCoinChargeEntity> list = memberCoinChargeDao.selectAllBySymbolAndTag(CoinTypeEnum.USDT.name(), "ERC20", 1);
|
| | | List<MemberCoinChargeEntity> list = new ArrayList<MemberCoinChargeEntity>();
|
| | |
| | | */
|
| | | @Test
|
| | | public void pushFee() {
|
| | | String toAddress = "";
|
| | | String toAddress = "0xbc6050a2898511bda406660267e6667448070552";
|
| | | EthService ethService = new EthService();
|
| | | try {
|
| | | String hash = ethService.ethSend(TOTAL_PRIVATE, TOTAL_ADDRESS, toAddress, ETH_FEE);
|
| | | String hash = ethService.ethSend(TOTAL_PRIVATE, TOTAL_ADDRESS, toAddress, "0.0032");
|
| | | System.out.println("转手续费:"+hash);
|
| | | } catch (InterruptedException e) {
|
| | | // TODO Auto-generated catch block
|
| | |
| | | |
| | | @Test |
| | | public void redisResetTest() { |
| | | MemberEntity member = memberDao.selectById(1L); |
| | | MemberEntity member = memberDao.selectById(72L); |
| | | member.setPassword(new BCryptPasswordEncoder().encode(member.getPassword())); |
| | | redisUtils.set("app_d95747766852410c80ed81ba9e72d15d", JSONObject.toJSONString(member), 36000); |
| | | redisUtils.set("app_21c8fb68f5de4bbfb91a03813833db8a", JSONObject.toJSONString(member), 36000); |
| | | } |
| | | |
| | | } |