fix:chainEnum and ChainListenerJob
| | |
| | | */ |
| | | BSC_USDT("BSC", "0x4f5b6875d0d42f019ab6CdFB3054649b5B7b5472", |
| | | "0x86bd3ad3ffd055b27dd7685d494074982fe96d6cc9dde0e42e85a85036e8abe9", |
| | | "https://bsc-mainnet.blockvision.org/v1/2D3n5NXWVLnIBsdBKZDlDFAC76x", |
| | | "https://bsc-dataseed.binance.org", |
| | | "0x55d398326f99059fF775485246999027B3197955", |
| | | ""), |
| | | |
| | | /** |
| | | * 币安链 代币合约 |
| | | * 测试链 0xdd92ea2f41d807a60b29004bf7db807d8ac09212 |
| | | * 正式 0xb27e44f98543e480dbd071b6605005e3d99b3dd4 https://bsc-mainnet.blockvision.org/v1/2D3n5NXWVLnIBsdBKZDlDFAC76x |
| | | * 正式 0xb27e44f98543e480dbd071b6605005e3d99b3dd4 https://bsc-dataseed.binance.org |
| | | * |
| | | */ |
| | | BSC_TFC("BSC", "0x4f5b6875d0d42f019ab6CdFB3054649b5B7b5472", |
| | | "0x86bd3ad3ffd055b27dd7685d494074982fe96d6cc9dde0e42e85a85036e8abe9", |
| | | "https://bsc-mainnet.blockvision.org/v1/2D3n5NXWVLnIBsdBKZDlDFAC76x", |
| | | "https://bsc-dataseed.binance.org", |
| | | "0xb27e44f98543e480dbd071b6605005e3d99b3dd4", |
| | | ""), |
| | | |
| | |
| | | */ |
| | | BSC_TFC_SOURCE("BSC", "0x8cE9d2A8cA6eF9e05493e73C9b6479D100B94847", |
| | | "", |
| | | "https://bsc-mainnet.blockvision.org/v1/2D3n5NXWVLnIBsdBKZDlDFAC76x", |
| | | "https://bsc-dataseed.binance.org", |
| | | "0xb27e44f98543e480dbd071b6605005e3d99b3dd4", |
| | | ""), |
| | | |
| | |
| | | */ |
| | | BSC_USDT_SOURCE("BSC", "0x8cE9d2A8cA6eF9e05493e73C9b6479D100B94847", |
| | | "", |
| | | "https://bsc-mainnet.blockvision.org/v1/2D3n5NXWVLnIBsdBKZDlDFAC76x", |
| | | "https://bsc-dataseed.binance.org", |
| | | "0x55d398326f99059fF775485246999027B3197955", |
| | | ""), |
| | | |
| | |
| | | */ |
| | | // BSC_TFC_MAKE("BSC", "0xBae24dAa3aB94cfF8114a16A4267D769b3a651F8", |
| | | // "0xc0cabaf5f1fce227e5f1b8a7f83a5dc28972389ffc59559d7852ce8d27c3bec4", |
| | | // "https://bsc-mainnet.blockvision.org/v1/2D3n5NXWVLnIBsdBKZDlDFAC76x", |
| | | // "https://bsc-dataseed.binance.org", |
| | | // "0x46ac4921e58773ca22826df1640672b91b1db2b3", |
| | | // ""), |
| | | |
| | |
| | | */ |
| | | BSC_TFC_TECH("BSC", "0x8DB4d0E470e6cD206b774f5DAD2b5D0dD43C7688", |
| | | "", |
| | | "https://bsc-mainnet.blockvision.org/v1/2D3n5NXWVLnIBsdBKZDlDFAC76x", |
| | | "https://bsc-dataseed.binance.org", |
| | | "0xb27e44f98543e480dbd071b6605005e3d99b3dd4", |
| | | ""), |
| | | |
| | |
| | | */ |
| | | BSC_TFC_REWARD("BSC", "0x286DDA62A7171a6d6eA6558510834fE8afc0446C", |
| | | "0x3d35db460e2eead11fca7b6ce5a9c5c8a8e0866775008ef5e1721b9f17b57f4f", |
| | | "https://bsc-mainnet.blockvision.org/v1/2D3n5NXWVLnIBsdBKZDlDFAC76x", |
| | | "https://bsc-dataseed.binance.org", |
| | | "0xb27e44f98543e480dbd071b6605005e3d99b3dd4", |
| | | ""), |
| | | |
| | |
| | | */ |
| | | BSC_NFT_SDC("BSC", "0x3afD1Bf0994214DBe5ccfA7d8643261B195532c2", |
| | | "0x07ee6de0ca4b289f8e69484f70d09988c6df6697f411dc623179930a3578994f", |
| | | "https://bsc-mainnet.blockvision.org/v1/2D3n5NXWVLnIBsdBKZDlDFAC76x", |
| | | "https://bsc-dataseed.binance.org", |
| | | "0xb7FDE337f2236F78B2823d9F97eAB03ce893CC3D", |
| | | ""); |
| | | ""), |
| | | |
| | | /** |
| | | * 币安 usdt合约 |
| | | * 0x55d398326f99059fF775485246999027B3197955 |
| | | * 测试链 0x337610d27c682E347C9cD60BD4b3b107C9d34dDd |
| | | */ |
| | | BSC_USDT_LISTENER("BSC", "0x4f5b6875d0d42f019ab6CdFB3054649b5B7b5472", |
| | | "0x86bd3ad3ffd055b27dd7685d494074982fe96d6cc9dde0e42e85a85036e8abe9", |
| | | "https://bsc-mainnet.blockvision.org/v1/2D3n5NXWVLnIBsdBKZDlDFAC76x", |
| | | "0x55d398326f99059fF775485246999027B3197955", |
| | | ""), |
| | | |
| | | /** |
| | | * 币安链 代币合约 |
| | | * 测试链 0xdd92ea2f41d807a60b29004bf7db807d8ac09212 |
| | | * 正式 0xb27e44f98543e480dbd071b6605005e3d99b3dd4 https://bsc-dataseed.binance.org |
| | | * |
| | | */ |
| | | BSC_TFC_LISTENER("BSC", "0x4f5b6875d0d42f019ab6CdFB3054649b5B7b5472", |
| | | "0x86bd3ad3ffd055b27dd7685d494074982fe96d6cc9dde0e42e85a85036e8abe9", |
| | | "https://bsc-mainnet.blockvision.org/v1/2D3n5NXWVLnIBsdBKZDlDFAC76x", |
| | | "0xb27e44f98543e480dbd071b6605005e3d99b3dd4", |
| | | ""); |
| | | |
| | | private String chain; |
| | | |
| | |
| | | while (newest.subtract(block).compareTo(section) > -1) { |
| | | BigInteger end = block.add(section); |
| | | log.info("监听:[{} - {}]", block, end); |
| | | ChainService.contractEventListener(block, end, bscUsdtContractEvent, ChainEnum.BSC_USDT.name()); |
| | | ChainService.contractEventListener(block, end, bscCoinContractEvent, ChainEnum.BSC_TFC.name()); |
| | | ChainService.contractEventListener(block, end, bscUsdtContractEvent, ChainEnum.BSC_USDT_LISTENER.name()); |
| | | ChainService.contractEventListener(block, end, bscCoinContractEvent, ChainEnum.BSC_TFC_LISTENER.name()); |
| | | |
| | | block = block.add(section); |
| | | if (block.compareTo(newest) > 0) { |
| | | block = newest; |
| | | } |
| | | } |
| | | ChainService.contractEventListener(block, bscUsdtContractEvent, ChainEnum.BSC_USDT.name()); |
| | | ChainService.contractEventListener(block, bscCoinContractEvent, ChainEnum.BSC_TFC.name()); |
| | | ChainService.contractEventListener(block, bscUsdtContractEvent, ChainEnum.BSC_USDT_LISTENER.name()); |
| | | ChainService.contractEventListener(block, bscCoinContractEvent, ChainEnum.BSC_TFC_LISTENER.name()); |
| | | |
| | | long end = System.currentTimeMillis(); |
| | | log.info("区块链监听启动完成, 消耗时间{}", end - start); |
| | |
| | | datasource: |
| | | # 数据源-1,名称为 base |
| | | base: |
| | | username: db_tfc |
| | | password: tfc!@#123 |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://154.91.195.155:3306/db_tfc?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8 |
| | | # username: ct_test |
| | | # password: 123456 |
| | | # username: db_tfc |
| | | # password: tfc!@#123 |
| | | # driver-class-name: com.mysql.cj.jdbc.Driver |
| | | # url: jdbc:mysql://120.27.238.55:3306/db_tfc?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8 |
| | | # url: jdbc:mysql://154.91.195.155:3306/db_tfc?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8 |
| | | username: ct_test |
| | | password: 123456 |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://120.27.238.55:3306/db_tfc?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8 |
| | | |
| | | redis: |
| | | # Redis数据库索引(默认为 0) |
| | |
| | | # 连接超时时间(毫秒) |
| | | timeout: 5000 |
| | | rabbitmq: |
| | | host: 154.91.195.155 |
| | | port: 5672 |
| | | username: abc_user |
| | | password: abc123 |
| | | # host: 120.27.238.55 |
| | | # host: 154.91.195.155 |
| | | # port: 5672 |
| | | # username: ct_rabbit |
| | | # password: 123456 |
| | | # publisher-confirm-type: correlated |
| | | # username: abc_user |
| | | # password: abc123 |
| | | host: 120.27.238.55 |
| | | port: 5672 |
| | | username: ct_rabbit |
| | | password: 123456 |
| | | publisher-confirm-type: correlated |
| | | |
| | | system: |
| | | online-transfer: false |