| | |
| | | return new EthFilter(startParameterName, endParameterName, contractAddress); |
| | | } |
| | | |
| | | /** |
| | | * --todo 替换 |
| | | * @param args |
| | | */ |
| | | public static void main(String[] args) { |
| | | // ChainEnum chain = ChainEnum.getValueByName(ChainEnum.BSC_TFC.name()); |
| | | // assert chain != null; |
| | | // |
| | | // EthUsdtContract contract = contract(chain.getPrivateKey(), chain.getContractAddress(), chain.getUrl()); |
| | | // EthFilter filter = getFilter(new BigInteger("18097238"), chain.getContractAddress()); |
| | | // |
| | | // contract.transferEventFlowable(filter).subscribe(e -> { |
| | | // System.out.println(1); |
| | | // }, error -> { |
| | | // log.error("--->", error); |
| | | // }); |
| | | /** |
| | | * 替换两个合约的地址 |
| | | */ |
| | | String contractAddress = ChainEnum.BSC_USDT.getContractAddress(); |
| | | String contractAddress1 = ChainEnum.BSC_GFA.getContractAddress(); |
| | | |
| | | System.out.println(ChainService.getInstance(ChainEnum.BSC_TFC.name()).totalSupply()); |
| | | /** |
| | | * 滑点接收钱包 |
| | | * GiveMeMoneyJob |
| | | * mineJob |
| | | * address参数 |
| | | */ |
| | | BigDecimal coinCnt = ChainService.getInstance(ChainEnum.BSC_GFA.name()).balanceOf("0xF6b06A30196aA5E318232a3b61319eab0FD4A3bF").setScale(8,BigDecimal.ROUND_DOWN); |
| | | BigDecimal coinPrice = ChainService.getInstance(ChainEnum.BSC_GFA.name()).getPrice("0xF6b06A30196aA5E318232a3b61319eab0FD4A3bF").setScale(8,BigDecimal.ROUND_DOWN); |
| | | |
| | | /** |
| | | * 批量转账的钱包地址 |
| | | * 注意钱包地址和私钥一起替换 |
| | | */ |
| | | |
| | | String address = ChainEnum.BSC_USDT.getAddress(); |
| | | String address1 = ChainEnum.BSC_GFA.getAddress(); |
| | | } |
| | | |
| | | } |