├── LICENSE
├── README.md
├── doc
├── allclasses-frame.html
├── allclasses-noframe.html
├── com
│ └── theforceprotocol
│ │ ├── blockchainrpc
│ │ ├── BigDecimalUtil.html
│ │ ├── BitcoinClient.html
│ │ ├── Configuration.html
│ │ ├── EOS.html
│ │ ├── TransactionRecord.html
│ │ ├── USDTClient.html
│ │ ├── ethclient
│ │ │ ├── AccountHelper.html
│ │ │ ├── EthTransferClient.html
│ │ │ ├── Web3JClient.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── package-frame.html
│ │ ├── package-summary.html
│ │ └── package-tree.html
│ │ └── util
│ │ ├── CommonUtils.html
│ │ ├── package-frame.html
│ │ ├── package-summary.html
│ │ └── package-tree.html
├── constant-values.html
├── deprecated-list.html
├── help-doc.html
├── index-files
│ ├── index-1.html
│ ├── index-10.html
│ ├── index-11.html
│ ├── index-12.html
│ ├── index-13.html
│ ├── index-14.html
│ ├── index-15.html
│ ├── index-16.html
│ ├── index-17.html
│ ├── index-2.html
│ ├── index-3.html
│ ├── index-4.html
│ ├── index-5.html
│ ├── index-6.html
│ ├── index-7.html
│ ├── index-8.html
│ └── index-9.html
├── index.html
├── overview-frame.html
├── overview-summary.html
├── overview-tree.html
├── package-list
├── script.js
└── stylesheet.css
├── pom.xml
└── src
├── main
├── java
│ └── com
│ │ └── theforceprotocol
│ │ ├── DemoApplication.java
│ │ ├── blockchainrpc
│ │ ├── BitcoinClient.java
│ │ ├── TransactionRecord.java
│ │ ├── USDTClient.java
│ │ └── ethclient
│ │ │ ├── AccountHelper.java
│ │ │ ├── EthTransferClient.java
│ │ │ └── Web3JClient.java
│ │ ├── config
│ │ └── BeanConfig.java
│ │ ├── controller
│ │ ├── AirdropController.java
│ │ ├── BTCController.java
│ │ ├── EthController.java
│ │ └── UsdtController.java
│ │ ├── repository
│ │ ├── AirdropRepository.java
│ │ ├── AirdropResultRepository.java
│ │ ├── Forairdrop.java
│ │ ├── ForairdropResult.java
│ │ ├── TxInfo.java
│ │ └── TxInfoRepository.java
│ │ └── util
│ │ └── CommonUtils.java
└── resources
│ ├── application.properties
│ └── help.md
└── test
└── java
└── com
└── theforceprotocol
└── DemoApplicationTests.java
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 theforceprotocol
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ### 授权许可
2 | 本项目采用 MIT 开源授权许可证,完整的授权说明已放置在 LICENSE 文件中。
3 |
4 | ### 功能介绍
5 | 本部分模块主要是对接公链,其中包括BTC/ETH/OMNI,其代码能够实现签名、广播等功能。
6 |
--------------------------------------------------------------------------------
/doc/allclasses-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 所有类
8 |
9 |
10 |
11 |
12 |
13 | 所有类
14 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/doc/allclasses-noframe.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 所有类
8 |
9 |
10 |
11 |
12 |
13 | 所有类
14 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/doc/com/theforceprotocol/blockchainrpc/ethclient/package-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | com.theforceprotocol.blockchainrpc.ethclient
8 |
9 |
10 |
11 |
12 |
13 |
14 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/doc/com/theforceprotocol/blockchainrpc/ethclient/package-summary.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | com.theforceprotocol.blockchainrpc.ethclient
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 |
75 |
104 |
105 |
122 |
149 |
150 |
151 |
152 |
--------------------------------------------------------------------------------
/doc/com/theforceprotocol/blockchainrpc/ethclient/package-tree.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | com.theforceprotocol.blockchainrpc.ethclient 类分层结构
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 |
79 |
80 |
类分层结构
81 |
82 | - java.lang.Object
83 |
88 |
89 |
90 |
91 |
92 |
109 |
136 |
137 |
138 |
139 |
--------------------------------------------------------------------------------
/doc/com/theforceprotocol/blockchainrpc/package-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | com.theforceprotocol.blockchainrpc
8 |
9 |
10 |
11 |
12 |
13 |
14 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/doc/com/theforceprotocol/blockchainrpc/package-summary.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | com.theforceprotocol.blockchainrpc
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 |
75 |
118 |
119 |
136 |
137 |
138 | - 上一个程序包
139 | - 下一个程序包
140 |
141 |
145 |
148 |
149 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
--------------------------------------------------------------------------------
/doc/com/theforceprotocol/blockchainrpc/package-tree.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | com.theforceprotocol.blockchainrpc 类分层结构
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 |
79 |
80 |
类分层结构
81 |
82 | - java.lang.Object
83 |
91 |
92 |
93 |
94 |
95 |
112 |
113 |
114 | - 上一个
115 | - 下一个
116 |
117 |
121 |
124 |
125 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
--------------------------------------------------------------------------------
/doc/com/theforceprotocol/util/package-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | com.theforceprotocol.util
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/doc/com/theforceprotocol/util/package-summary.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | com.theforceprotocol.util
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 |
75 |
76 |
77 | -
78 |
79 | 类概要
80 |
81 | 类 |
82 | 说明 |
83 |
84 |
85 |
86 | CommonUtils |
87 | |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
112 |
113 |
114 | - 上一个程序包
115 | - 下一个程序包
116 |
117 |
121 |
124 |
125 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
--------------------------------------------------------------------------------
/doc/com/theforceprotocol/util/package-tree.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | com.theforceprotocol.util 类分层结构
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 |
79 |
80 |
类分层结构
81 |
82 | - java.lang.Object
83 |
86 |
87 |
88 |
89 |
90 |
107 |
108 |
109 | - 上一个
110 | - 下一个
111 |
112 |
116 |
119 |
120 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
--------------------------------------------------------------------------------
/doc/constant-values.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 常量字段值
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 |
79 |
80 |
81 |
82 |
com.theforceprotocol.*
83 |
118 |
119 |
120 |
137 |
138 |
139 | - 上一个
140 | - 下一个
141 |
142 |
146 |
149 |
150 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
--------------------------------------------------------------------------------
/doc/deprecated-list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 已过时的列表
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 |
76 |
77 |
94 |
121 |
122 |
123 |
124 |
--------------------------------------------------------------------------------
/doc/help-doc.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | API 帮助
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 |
76 |
77 |
78 | -
79 |
概览
80 | 概览 页面是此 API 文档的首页, 提供了所有程序包的列表及其概要。此页面也可能包含这些程序包的总体说明。
81 |
82 | -
83 |
程序包
84 | 每个程序包都有一个页面, 其中包含它的类和接口的列表及其概要。此页面可以包含六个类别:
85 |
86 | - 接口 (斜体)
87 | - 类
88 | - 枚举
89 | - 异常错误
90 | - 错误
91 | - 注释类型
92 |
93 |
94 | -
95 |
类/接口
96 | 每个类, 接口, 嵌套类和嵌套接口都有各自的页面。其中每个页面都由三部分 (类/接口说明, 概要表, 以及详细的成员说明) 组成:
97 |
98 | - 类继承图
99 | - 直接子类
100 | - 所有已知子接口
101 | - 所有已知实现类
102 | - 类/接口声明
103 | - 类/接口说明
104 |
105 |
106 | - 嵌套类概要
107 | - 字段概要
108 | - 构造器概要
109 | - 方法概要
110 |
111 |
112 | - 字段详细资料
113 | - 构造器详细资料
114 | - 方法详细资料
115 |
116 | 每个概要条目都包含该项目的详细说明的第一句。概要条目按字母顺序排列, 而详细说明则按其在源代码中出现的顺序排列。这样保持了程序员所建立的逻辑分组。
117 |
118 | -
119 |
注释类型
120 | 每个注释类型都有各自的页面, 其中包含以下部分:
121 |
122 | - 注释类型声明
123 | - 注释类型说明
124 | - 必需元素概要
125 | - 可选元素概要
126 | - 元素详细资料
127 |
128 |
129 | -
130 |
枚举
131 | 每个枚举都有各自的页面, 其中包含以下部分:
132 |
133 | - 枚举声明
134 | - 枚举说明
135 | - 枚举常量概要
136 | - 枚举常量详细资料
137 |
138 |
139 | -
140 |
树 (类分层结构)
141 | 对于所有程序包, 有一个类分层结构页面, 以及每个程序包的分层结构。每个分层结构页面都包含类的列表和接口的列表。从java.lang.Object
开始, 按继承结构对类进行排列。接口不从java.lang.Object
继承。
142 |
143 | - 查看“概览”页面时, 单击 "树" 将显示所有程序包的分层结构。
144 | - 查看特定程序包, 类或接口页面时, 单击 "树" 将仅显示该程序包的分层结构。
145 |
146 |
147 | -
148 |
已过时的 API
149 | 已过时的 API 页面列出了所有已过时的 API。一般由于进行了改进并且通常提供了替代的 API, 所以建议不要使用已过时的 API。在将来的实现过程中, 可能会删除已过时的 API。
150 |
151 | -
152 |
索引
153 | 索引 包含按字母顺序排列的所有类, 接口, 构造器, 方法和字段的列表。
154 |
155 | -
156 |
上一个/下一个
157 | 这些链接使您可以转至下一个或上一个类, 接口, 程序包或相关页面。
158 |
159 | -
160 |
框架/无框架
161 | 这些链接用于显示和隐藏 HTML 框架。所有页面均具有有框架和无框架两种显示方式。
162 |
163 | -
164 |
所有类
165 | 所有类链接显示所有类和接口 (除了非静态嵌套类型)。
166 |
167 | -
168 |
序列化表格
169 | 每个可序列化或可外部化的类都有其序列化字段和方法的说明。此信息对重新实现者有用, 而对使用 API 的开发者则没有什么用处。尽管导航栏中没有链接, 但您可以通过下列方式获取此信息: 转至任何序列化类, 然后单击类说明的 "另请参阅" 部分中的 "序列化表格"。
170 |
171 | -
172 |
常量字段值
173 | 常量字段值页面列出了静态最终字段及其值。
174 |
175 |
176 |
此帮助文件适用于使用标准 doclet 生成的 API 文档。
177 |
178 |
195 |
196 |
197 | - 上一个
198 | - 下一个
199 |
200 |
204 |
207 |
208 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
--------------------------------------------------------------------------------
/doc/index-files/index-1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | A - 索引
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
45 |
46 | - 上一个字母
47 | - 下一个字母
48 |
49 |
53 |
56 |
57 |
67 |
68 |
69 |
70 |
71 |
72 | A B C E F G I L M N R S T U W
73 |
74 |
75 |
A
76 |
77 | - AccountHelper - com.theforceprotocol.blockchainrpc.ethclient中的类
78 | -
79 | - AccountHelper() - 类 的构造器com.theforceprotocol.blockchainrpc.ethclient.AccountHelper
80 | -
81 |
82 |
A B C E F G I L M N R S T U W
83 |
84 |
101 |
102 |
103 | - 上一个字母
104 | - 下一个字母
105 |
106 |
110 |
113 |
114 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
--------------------------------------------------------------------------------
/doc/index-files/index-10.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | N - 索引
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 | A B C E F G I L M N R S T U W
73 |
74 |
75 |
N
76 |
77 | - newAccount() - 类 中的方法com.theforceprotocol.blockchainrpc.ethclient.AccountHelper
78 | -
79 | - newBip39Wallet(String) - 类 中的方法com.theforceprotocol.blockchainrpc.ethclient.AccountHelper
80 | -
81 | - newWalletFile(String) - 类 中的方法com.theforceprotocol.blockchainrpc.ethclient.AccountHelper
82 | -
83 |
84 |
A B C E F G I L M N R S T U W
85 |
86 |
103 |
130 |
131 |
132 |
133 |
--------------------------------------------------------------------------------
/doc/index-files/index-11.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | R - 索引
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 | A B C E F G I L M N R S T U W
73 |
74 |
75 |
R
76 |
77 | - READ_TIMEOUT - 类 中的静态变量com.theforceprotocol.blockchainrpc.ethclient.Web3JClient
78 | -
79 |
80 |
A B C E F G I L M N R S T U W
81 |
82 |
99 |
126 |
127 |
128 |
129 |
--------------------------------------------------------------------------------
/doc/index-files/index-12.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | S - 索引
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 | A B C E F G I L M N R S T U W
73 |
74 |
75 |
S
76 |
77 | - send(String, double, String) - 类 中的方法com.theforceprotocol.blockchainrpc.EOS
78 | -
79 | - sendGet(String, String) - 类 中的静态方法com.theforceprotocol.util.CommonUtils
80 | -
81 | - setCode(Integer) - 类 中的方法com.theforceprotocol.blockchainrpc.TransactionRecord
82 | -
83 | - setDescription(String) - 类 中的方法com.theforceprotocol.blockchainrpc.TransactionRecord
84 | -
85 | - setTxHash(String) - 类 中的方法com.theforceprotocol.blockchainrpc.TransactionRecord
86 | -
87 | - success(String) - 类 中的静态方法com.theforceprotocol.blockchainrpc.TransactionRecord
88 | -
89 | - SUCCESS_CODE - 类 中的静态变量com.theforceprotocol.blockchainrpc.TransactionRecord
90 | -
91 |
92 |
A B C E F G I L M N R S T U W
93 |
94 |
111 |
138 |
139 |
140 |
141 |
--------------------------------------------------------------------------------
/doc/index-files/index-13.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | T - 索引
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 | A B C E F G I L M N R S T U W
73 |
74 |
75 |
T
76 |
77 | - TransactionRecord - com.theforceprotocol.blockchainrpc中的类
78 | -
79 |
交易成功
80 |
81 | - TransactionRecord() - 类 的构造器com.theforceprotocol.blockchainrpc.TransactionRecord
82 | -
83 | - transferBtc(String, String, double, String) - 类 中的方法com.theforceprotocol.blockchainrpc.BitcoinClient
84 | -
85 | - transferERC20(String, String, String, String) - 类 中的方法com.theforceprotocol.blockchainrpc.ethclient.EthTransferClient
86 | -
87 | - transferERC20(String, String) - 类 中的方法com.theforceprotocol.blockchainrpc.ethclient.EthTransferClient
88 | -
89 | - transferERC20ByNonce(String, String, String, String, BigInteger) - 类 中的方法com.theforceprotocol.blockchainrpc.ethclient.EthTransferClient
90 | -
91 | - transferERC20ByNonce(String, String, BigInteger) - 类 中的方法com.theforceprotocol.blockchainrpc.ethclient.EthTransferClient
92 | -
93 | - transferETHToAddress(String, String) - 类 中的方法com.theforceprotocol.blockchainrpc.ethclient.EthTransferClient
94 | -
95 | - transferETHToAddress(String, String, String) - 类 中的方法com.theforceprotocol.blockchainrpc.ethclient.EthTransferClient
96 | -
97 | - transferUsdt(String, String, String, double, String) - 类 中的方法com.theforceprotocol.blockchainrpc.USDTClient
98 | -
99 |
100 |
A B C E F G I L M N R S T U W
101 |
102 |
119 |
146 |
147 |
148 |
149 |
--------------------------------------------------------------------------------
/doc/index-files/index-14.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | U - 索引
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 | A B C E F G I L M N R S T U W
73 |
74 |
75 |
U
76 |
77 | - USDTClient - com.theforceprotocol.blockchainrpc中的类
78 | -
79 | - USDTClient() - 类 的构造器com.theforceprotocol.blockchainrpc.USDTClient
80 | -
81 | - UsdtInstance() - 类 中的静态方法com.theforceprotocol.blockchainrpc.USDTClient
82 | -
83 |
84 |
A B C E F G I L M N R S T U W
85 |
86 |
103 |
130 |
131 |
132 |
133 |
--------------------------------------------------------------------------------
/doc/index-files/index-15.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | W - 索引
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
45 |
46 | - 上一个字母
47 | - 下一个字母
48 |
49 |
53 |
56 |
57 |
67 |
68 |
69 |
70 |
71 |
72 | A B C E F G I L M N R S T U W
73 |
74 |
75 |
W
76 |
77 | - Web3JClient - com.theforceprotocol.blockchainrpc.ethclient中的类
78 | -
79 | - withdrawBtc(String, double) - 类 中的方法com.theforceprotocol.blockchainrpc.BitcoinClient
80 | -
81 | - withdrawUsdt(String, double) - 类 中的方法com.theforceprotocol.blockchainrpc.USDTClient
82 | -
83 | - WRITE_TIMEOUT - 类 中的静态变量com.theforceprotocol.blockchainrpc.ethclient.Web3JClient
84 | -
85 |
86 |
A B C E F G I L M N R S T U W
87 |
88 |
105 |
106 |
107 | - 上一个字母
108 | - 下一个字母
109 |
110 |
114 |
117 |
118 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
--------------------------------------------------------------------------------
/doc/index-files/index-16.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | U - 索引
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 | A B C D E F G I L M N O R S T U W
73 |
74 |
75 |
U
76 |
77 | - USDTClient - com.theforceprotocol.blockchainrpc中的类
78 | -
79 | - USDTClient() - 类 的构造器com.theforceprotocol.blockchainrpc.USDTClient
80 | -
81 | - UsdtInstance() - 类 中的静态方法com.theforceprotocol.blockchainrpc.USDTClient
82 | -
83 |
84 |
A B C D E F G I L M N O R S T U W
85 |
86 |
103 |
130 |
131 |
132 |
133 |
--------------------------------------------------------------------------------
/doc/index-files/index-17.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | W - 索引
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
45 |
46 | - 上一个字母
47 | - 下一个字母
48 |
49 |
53 |
56 |
57 |
67 |
68 |
69 |
70 |
71 |
72 | A B C D E F G I L M N O R S T U W
73 |
74 |
75 |
W
76 |
77 | - Web3JClient - com.theforceprotocol.blockchainrpc.ethclient中的类
78 | -
79 | - withdrawBtc(String, double) - 类 中的方法com.theforceprotocol.blockchainrpc.BitcoinClient
80 | -
81 | - withdrawUsdt(String, double) - 类 中的方法com.theforceprotocol.blockchainrpc.USDTClient
82 | -
83 | - WRITE_TIMEOUT - 类 中的静态变量com.theforceprotocol.blockchainrpc.ethclient.Web3JClient
84 | -
85 |
86 |
A B C D E F G I L M N O R S T U W
87 |
88 |
105 |
106 |
107 | - 上一个字母
108 | - 下一个字母
109 |
110 |
114 |
117 |
118 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
--------------------------------------------------------------------------------
/doc/index-files/index-2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | B - 索引
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 | A B C E F G I L M N R S T U W
73 |
74 |
75 |
B
76 |
77 | - BigDecimalUtil - com.theforceprotocol.blockchainrpc中的类
78 | -
79 |
数据计算工具类
80 |
81 | - BigDecimalUtil() - 类 的构造器com.theforceprotocol.blockchainrpc.BigDecimalUtil
82 | -
83 | - BitcoinClient - com.theforceprotocol.blockchainrpc中的类
84 | -
85 | - BitcoinClient() - 类 的构造器com.theforceprotocol.blockchainrpc.BitcoinClient
86 | -
87 | - BtcInstance() - 类 中的静态方法com.theforceprotocol.blockchainrpc.BitcoinClient
88 | -
89 |
90 |
A B C E F G I L M N R S T U W
91 |
92 |
109 |
136 |
137 |
138 |
139 |
--------------------------------------------------------------------------------
/doc/index-files/index-3.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | C - 索引
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 | A B C E F G I L M N R S T U W
73 |
74 |
75 |
C
76 |
77 | - calculationFee(int) - 类 中的静态方法com.theforceprotocol.util.CommonUtils
78 | -
79 |
计算手续费
80 |
81 | - com.theforceprotocol.blockchainrpc - 程序包 com.theforceprotocol.blockchainrpc
82 | -
83 | - com.theforceprotocol.blockchainrpc.ethclient - 程序包 com.theforceprotocol.blockchainrpc.ethclient
84 | -
85 | - com.theforceprotocol.util - 程序包 com.theforceprotocol.util
86 | -
87 | - CommonUtils - com.theforceprotocol.util中的类
88 | -
89 | - CommonUtils() - 类 的构造器com.theforceprotocol.util.CommonUtils
90 | -
91 | - Configuration - com.theforceprotocol.blockchainrpc中的类
92 | -
93 | - Configuration() - 类 的构造器com.theforceprotocol.blockchainrpc.Configuration
94 | -
95 | - CONNECT_TIMEOUT - 类 中的静态变量com.theforceprotocol.blockchainrpc.ethclient.Web3JClient
96 | -
97 |
98 |
A B C E F G I L M N R S T U W
99 |
100 |
117 |
144 |
145 |
146 |
147 |
--------------------------------------------------------------------------------
/doc/index-files/index-4.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | E - 索引
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 | A B C E F G I L M N R S T U W
73 |
74 |
75 |
E
76 |
77 | - encodeTransferData(String, BigInteger) - 类 中的静态方法com.theforceprotocol.blockchainrpc.ethclient.EthTransferClient
78 | -
79 | - EOS - com.theforceprotocol.blockchainrpc中的类
80 | -
81 | - EOS() - 类 的构造器com.theforceprotocol.blockchainrpc.EOS
82 | -
83 | - estimateGas(Transaction) - 类 中的静态方法com.theforceprotocol.blockchainrpc.ethclient.EthTransferClient
84 | -
85 | - EthInstance() - 类 中的静态方法com.theforceprotocol.blockchainrpc.ethclient.EthTransferClient
86 | -
87 | - EthTransferClient - com.theforceprotocol.blockchainrpc.ethclient中的类
88 | -
89 |
ETH转账
90 |
91 | - EthTransferClient() - 类 的构造器com.theforceprotocol.blockchainrpc.ethclient.EthTransferClient
92 | -
93 |
94 |
A B C E F G I L M N R S T U W
95 |
96 |
113 |
140 |
141 |
142 |
143 |
--------------------------------------------------------------------------------
/doc/index-files/index-5.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | F - 索引
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 | A B C E F G I L M N R S T U W
73 |
74 |
75 |
F
76 |
77 | - fail() - 类 中的静态方法com.theforceprotocol.blockchainrpc.TransactionRecord
78 | -
79 | - fail(String) - 类 中的静态方法com.theforceprotocol.blockchainrpc.TransactionRecord
80 | -
81 |
82 |
A B C E F G I L M N R S T U W
83 |
84 |
101 |
128 |
129 |
130 |
131 |
--------------------------------------------------------------------------------
/doc/index-files/index-7.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | I - 索引
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 | A B C E F G I L M N R S T U W
73 |
74 |
75 |
I
76 |
77 | - importPrivateKey(String) - 类 中的方法com.theforceprotocol.blockchainrpc.ethclient.AccountHelper
78 | -
79 | - init() - 类 中的方法com.theforceprotocol.blockchainrpc.BitcoinClient
80 | -
81 | - init() - 类 中的方法com.theforceprotocol.blockchainrpc.USDTClient
82 | -
83 | - Instance() - 类 中的静态方法com.theforceprotocol.blockchainrpc.BitcoinClient
84 | -
85 | - Instance() - 类 中的静态方法com.theforceprotocol.blockchainrpc.USDTClient
86 | -
87 | - isScriptAddress(String) - 类 中的方法com.theforceprotocol.blockchainrpc.BitcoinClient
88 | -
89 |
90 |
A B C E F G I L M N R S T U W
91 |
92 |
109 |
136 |
137 |
138 |
139 |
--------------------------------------------------------------------------------
/doc/index-files/index-8.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | L - 索引
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 | A B C E F G I L M N R S T U W
73 |
74 |
75 |
L
76 |
77 | - littleEndian2BigEndianString(String) - 类 中的静态方法com.theforceprotocol.util.CommonUtils
78 | -
79 | - loadWalletFile(String, String) - 类 中的方法com.theforceprotocol.blockchainrpc.ethclient.AccountHelper
80 | -
81 |
82 |
A B C E F G I L M N R S T U W
83 |
84 |
101 |
128 |
129 |
130 |
131 |
--------------------------------------------------------------------------------
/doc/index-files/index-9.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | M - 索引
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 | A B C E F G I L M N R S T U W
73 |
74 |
75 |
M
76 |
77 | - mOkHttpClient - 类 中的静态变量com.theforceprotocol.blockchainrpc.ethclient.Web3JClient
78 | -
79 |
80 |
A B C E F G I L M N R S T U W
81 |
82 |
99 |
126 |
127 |
128 |
129 |
--------------------------------------------------------------------------------
/doc/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 生成的文档 (无标题)
8 |
61 |
62 |
76 |
77 |
--------------------------------------------------------------------------------
/doc/overview-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 概览列表
8 |
9 |
10 |
11 |
12 |
13 |
14 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/doc/overview-summary.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 概览
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 |
95 |
96 |
113 |
114 |
115 | - 上一个
116 | - 下一个
117 |
118 |
122 |
125 |
126 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
--------------------------------------------------------------------------------
/doc/overview-tree.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 类分层结构
8 |
9 |
10 |
11 |
12 |
13 |
23 |
26 |
27 |
44 |
71 |
72 |
81 |
82 |
类分层结构
83 |
84 | - java.lang.Object
85 |
97 |
98 |
99 |
100 |
101 |
118 |
119 |
120 | - 上一个
121 | - 下一个
122 |
123 |
127 |
130 |
131 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/doc/package-list:
--------------------------------------------------------------------------------
1 | com.theforceprotocol.blockchainrpc
2 | com.theforceprotocol.blockchainrpc.ethclient
3 | com.theforceprotocol.util
4 |
--------------------------------------------------------------------------------
/doc/script.js:
--------------------------------------------------------------------------------
1 | function show(type)
2 | {
3 | count = 0;
4 | for (var key in methods) {
5 | var row = document.getElementById(key);
6 | if ((methods[key] & type) != 0) {
7 | row.style.display = '';
8 | row.className = (count++ % 2) ? rowColor : altColor;
9 | }
10 | else
11 | row.style.display = 'none';
12 | }
13 | updateTabs(type);
14 | }
15 |
16 | function updateTabs(type)
17 | {
18 | for (var value in tabs) {
19 | var sNode = document.getElementById(tabs[value][0]);
20 | var spanNode = sNode.firstChild;
21 | if (value == type) {
22 | sNode.className = activeTableTab;
23 | spanNode.innerHTML = tabs[value][1];
24 | }
25 | else {
26 | sNode.className = tableTab;
27 | spanNode.innerHTML = "" + tabs[value][1] + "";
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | com.example
7 | demo
8 | 0.0.1-SNAPSHOT
9 | jar
10 |
11 | demo
12 | Demo project for Spring Boot
13 |
14 |
15 | org.springframework.boot
16 | spring-boot-starter-parent
17 | 2.0.3.RELEASE
18 |
19 |
20 |
21 |
22 | UTF-8
23 | UTF-8
24 | 1.8
25 |
26 |
27 |
28 |
29 | api-v1-client-java-mvn-repo
30 | https://raw.githubusercontent.com/blockchain/api-v1-client-java/mvn-repo/
31 |
32 | true
33 | always
34 |
35 |
36 |
37 | mvn-nemp-ftp
38 | Nemp's Maven Repository
39 | http://mvn.neemre.com/
40 |
41 |
42 |
43 |
44 |
45 | org.springframework.boot
46 | spring-boot-starter
47 |
48 |
49 | org.springframework.boot
50 | spring-boot-starter-web
51 |
52 |
53 |
54 | com.github.briandilley.jsonrpc4j
55 | jsonrpc4j
56 | 1.1
57 |
58 |
59 |
60 |
61 | org.springframework.boot
62 | spring-boot-starter-test
63 | test
64 |
65 |
66 | org.projectlombok
67 | lombok
68 | 1.18.0
69 |
70 |
71 | commons-codec
72 | commons-codec
73 | 1.11
74 |
75 |
76 | com.alibaba
77 | fastjson
78 | 1.2.47
79 |
80 |
81 | info.blockchain
82 | api
83 | LATEST
84 |
85 |
86 | org.bitcoinj
87 | bitcoinj-core
88 | 0.15
89 | compile
90 |
91 |
92 | com.neemre.btcd-cli4j
93 | btcd-cli4j-core
94 | 0.5.1
95 |
96 |
97 | com.neemre.btcd-cli4j
98 | btcd-cli4j-daemon
99 | 0.5.1
100 |
101 |
102 |
103 | com.squareup.okio
104 | okio
105 | 1.15.0
106 |
107 |
108 | org.web3j
109 | core
110 | 3.4.0
111 |
112 |
113 | com.squareup.okio
114 | okio
115 |
116 |
117 |
118 |
119 |
120 | org.springframework.boot
121 | spring-boot-starter-data-jpa
122 |
123 |
124 |
125 | mysql
126 | mysql-connector-java
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 | org.springframework.boot
135 | spring-boot-maven-plugin
136 |
137 |
138 |
139 |
140 |
141 |
142 |
--------------------------------------------------------------------------------
/src/main/java/com/theforceprotocol/DemoApplication.java:
--------------------------------------------------------------------------------
1 | package com.theforceprotocol;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.scheduling.annotation.EnableScheduling;
6 |
7 | @SpringBootApplication
8 | @EnableScheduling
9 | public class DemoApplication {
10 |
11 | public static void main(String[] args) {
12 | SpringApplication.run(DemoApplication.class, args);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/main/java/com/theforceprotocol/blockchainrpc/TransactionRecord.java:
--------------------------------------------------------------------------------
1 | package com.theforceprotocol.blockchainrpc;
2 |
3 | /**
4 | * 交易成功
5 | *
6 | * @author Mingliang
7 | * @date 2019/3/1 18:26
8 | **/
9 | public class TransactionRecord {
10 | public final static Integer SUCCESS_CODE = 200;
11 | private final static Integer FAIL_CODE = 500;
12 |
13 | private Integer code;
14 |
15 | private String txHash;
16 |
17 | private String description;
18 |
19 | public static TransactionRecord success(String txHash) {
20 | TransactionRecord tr = new TransactionRecord();
21 | tr.setCode(SUCCESS_CODE);
22 | tr.setTxHash(txHash);
23 | return tr;
24 | }
25 |
26 | public static TransactionRecord fail() {
27 | return fail("转账失败");
28 | }
29 |
30 | public static TransactionRecord fail(String txHash) {
31 | TransactionRecord tr = new TransactionRecord();
32 | tr.setCode(FAIL_CODE);
33 | tr.setTxHash(txHash);
34 | return tr;
35 | }
36 |
37 | public Integer getCode() {
38 | return code;
39 | }
40 |
41 | public void setCode(Integer code) {
42 | this.code = code;
43 | }
44 |
45 | public String getTxHash() {
46 | return txHash;
47 | }
48 |
49 | public void setTxHash(String txHash) {
50 | this.txHash = txHash;
51 | }
52 |
53 | public String getDescription() {
54 | return description;
55 | }
56 |
57 | public void setDescription(String description) {
58 | this.description = description;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/src/main/java/com/theforceprotocol/blockchainrpc/ethclient/AccountHelper.java:
--------------------------------------------------------------------------------
1 | package com.theforceprotocol.blockchainrpc.ethclient;
2 |
3 | import org.slf4j.Logger;
4 | import org.slf4j.LoggerFactory;
5 | import org.web3j.crypto.*;
6 | import org.web3j.protocol.Web3j;
7 | import org.web3j.protocol.http.HttpService;
8 |
9 | import java.io.File;
10 | import java.math.BigInteger;
11 | import java.util.List;
12 |
13 | public class AccountHelper {
14 | private Logger logger = LoggerFactory.getLogger(AccountHelper.class);
15 | private String keystoreDir = "C:\\keystore";
16 |
17 | private void logAccount(String[] tuple) {
18 | logger.info("Private Key: " + tuple[0]);
19 | logger.info("Public Key: " + tuple[1]);
20 | logger.info("address: " + tuple[2]);
21 | }
22 |
23 | private String[] getAccountTuple(ECKeyPair keyPair) {
24 | return new String[]{
25 | keyPair.getPrivateKey().toString(16),
26 | keyPair.getPublicKey().toString(16),
27 | Keys.getAddress(keyPair)
28 | };
29 | }
30 |
31 | public String[] newAccount() throws Exception {
32 | ECKeyPair keyPair = Keys.createEcKeyPair();
33 | String[] tuple = getAccountTuple(keyPair);
34 | return tuple;
35 | }
36 |
37 | public String[] importPrivateKey(String privateKey) throws Exception {
38 | BigInteger key = new BigInteger(privateKey, 16);
39 | ECKeyPair keyPair = ECKeyPair.create(key);
40 | String[] tuple = getAccountTuple(keyPair);
41 | logAccount(tuple);
42 | return tuple;
43 | }
44 |
45 | public String newWalletFile(String password) throws Exception {
46 | File dest = new File(keystoreDir);
47 | String walletFileName = WalletUtils.generateNewWalletFile(password, dest, true);
48 | logger.info("Wallet file: " + walletFileName);
49 | return walletFileName;
50 | }
51 |
52 | public String[] loadWalletFile(String password, String walletFileName) throws Exception {
53 | String src = keystoreDir + "/" + walletFileName;
54 | Credentials credentials = WalletUtils.loadCredentials(password, src);
55 | ECKeyPair keyPair = credentials.getEcKeyPair();
56 | String[] tuple = getAccountTuple(keyPair);
57 | logAccount(tuple);
58 | return tuple;
59 | }
60 |
61 | private void logBip39Wallet(Bip39Wallet wallet) {
62 | logger.info("Bip39 wallet file: " + wallet.getFilename());
63 | logger.info("Bip39 wallet mnemonic: " + wallet.getMnemonic());
64 | }
65 |
66 | public String[] newBip39Wallet(String password) throws Exception {
67 | File dest = new File(keystoreDir);
68 | Bip39Wallet wallet = WalletUtils.generateBip39Wallet(password, dest);
69 | logBip39Wallet(wallet);
70 | return new String[]{wallet.getFilename(), wallet.getMnemonic()};
71 | }
72 |
73 | private void logAccounts(List accounts) {
74 | for (int i = 0; i < accounts.size(); i++) {
75 | logger.info("account " + i + ": " + accounts.get(i));
76 | }
77 | }
78 |
79 | public String[] getNodeAccounts() throws Exception {
80 | Web3j web3j = Web3j.build(new HttpService("https://mainnet.infura.io/opPa"));
81 | List accounts = web3j.ethAccounts().send().getAccounts();
82 | logAccounts(accounts);
83 | return accounts.toArray(new String[accounts.size()]);
84 | }
85 |
86 | public static void main(String[] args) throws Exception {
87 | AccountHelper accountHelper = new AccountHelper();
88 | //创建密钥对
89 | String[] tuple = accountHelper.newAccount();
90 | //导入私钥
91 | String[] tuple2 = accountHelper.importPrivateKey(tuple[0]);
92 | //创建钱包文件
93 | String walletFileName = accountHelper.newWalletFile("123");
94 | //载入钱包文件,创建账户凭证
95 | accountHelper.loadWalletFile("123", walletFileName);
96 | //查看节点账户
97 | accountHelper.getNodeAccounts();
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/src/main/java/com/theforceprotocol/blockchainrpc/ethclient/Web3JClient.java:
--------------------------------------------------------------------------------
1 | package com.theforceprotocol.blockchainrpc.ethclient;
2 |
3 | import org.web3j.protocol.Web3j;
4 | import org.web3j.protocol.http.HttpService;
5 |
6 | public class Web3JClient {
7 | private static String ip = "https://mainnet.infura.io/opPa";
8 |
9 | private Web3JClient() {
10 | }
11 |
12 | private volatile static Web3j web3j;
13 |
14 | public static Web3j getClient() {
15 | if (web3j == null) {
16 | synchronized (Web3JClient.class) {
17 | if (web3j == null) {
18 | web3j = Web3j.build(new HttpService(ip));
19 | }
20 | }
21 | }
22 | return web3j;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/com/theforceprotocol/config/BeanConfig.java:
--------------------------------------------------------------------------------
1 | package com.theforceprotocol.config;
2 |
3 | import com.googlecode.jsonrpc4j.JsonRpcHttpClient;
4 | import org.apache.tomcat.util.codec.binary.Base64;
5 | import org.springframework.context.annotation.Bean;
6 | import org.springframework.context.annotation.Configuration;
7 |
8 | import java.net.URL;
9 | import java.util.HashMap;
10 | import java.util.Map;
11 |
12 | @Configuration
13 | public class BeanConfig {
14 |
15 | @Bean
16 | public JsonRpcHttpClient client() throws Throwable {
17 | // 身份认证
18 | String cred = Base64.encodeBase64String(("username" + ":" + "password").getBytes());
19 | Map headers = new HashMap <>(1);
20 | headers.put("Authorization", "Basic " + cred);
21 | return new JsonRpcHttpClient(new URL("http://" + "ip" + ":" + "8332"), headers);//BTC
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/theforceprotocol/controller/AirdropController.java:
--------------------------------------------------------------------------------
1 | package com.theforceprotocol.controller;
2 |
3 | import com.theforceprotocol.blockchainrpc.TransactionRecord;
4 | import com.theforceprotocol.blockchainrpc.ethclient.AccountHelper;
5 | import com.theforceprotocol.blockchainrpc.ethclient.EthTransferClient;
6 | import com.theforceprotocol.repository.*;
7 | import org.springframework.beans.factory.annotation.Autowired;
8 | import org.springframework.stereotype.Controller;
9 | import org.springframework.web.bind.annotation.GetMapping;
10 | import org.springframework.web.bind.annotation.RequestMapping;
11 | import org.springframework.web.bind.annotation.RequestParam;
12 | import org.springframework.web.bind.annotation.ResponseBody;
13 |
14 | import java.math.BigInteger;
15 | import java.util.ArrayList;
16 | import java.util.HashMap;
17 | import java.util.List;
18 | import java.util.Map;
19 |
20 | @Controller
21 | @RequestMapping(path = "/airdrop")
22 | public class AirdropController {
23 | @Autowired
24 | private AirdropRepository airdropRepository;
25 |
26 | @Autowired
27 | private AirdropResultRepository airdropResultRepository;
28 | @Autowired
29 | private TxInfoRepository txInfoRepository;
30 |
31 | BigInteger curEtherScanNonce = new BigInteger("0");
32 | private static int nonce = 0;
33 |
34 | @GetMapping(path = "/add")
35 | public @ResponseBody
36 | String addAirdropUser(@RequestParam String address, @RequestParam String count) {
37 | Forairdrop forairdrop = new Forairdrop();
38 | forairdrop.setAddress(address);
39 | forairdrop.setCount(count);
40 | airdropRepository.save(forairdrop);
41 | return "add " + "address: " + address + ",count:" + count;
42 | }
43 |
44 | @GetMapping(path = "/del")
45 | public @ResponseBody
46 | String addAirdropUser(@RequestParam String id) {
47 | int index = Integer.parseInt(id.trim());
48 | airdropRepository.deleteById(index);
49 | return "del " + "id: " + id;
50 | }
51 |
52 | @GetMapping(path = "/all")
53 | public @ResponseBody
54 | Iterable getAllUsers() {
55 | return airdropRepository.findAll();
56 | }
57 |
58 | @GetMapping(path = "/airdrop")
59 | public @ResponseBody
60 | List airdrop() throws Exception {
61 | Iterable userList = airdropRepository.findAll();
62 | List trs = new ArrayList<>();
63 |
64 | curEtherScanNonce = EthTransferClient.EthInstance().getAddressNonce();
65 |
66 | for (Forairdrop airdrop : userList) {
67 | TransactionRecord tr = EthTransferClient.EthInstance().transferERC20ByNonce(airdrop.getAddress(), airdrop.getCount() + "000000000000000000", curEtherScanNonce);
68 | trs.add(tr);
69 |
70 | ForairdropResult result = new ForairdropResult();
71 | result.setAddress(airdrop.getAddress());
72 | result.setCount(airdrop.getCount());
73 | result.setTxid(tr.getTxHash());
74 |
75 | TxInfo txInfo = new TxInfo();
76 | txInfo.setAmount(airdrop.getCount());
77 |
78 | txInfo.setNonce(curEtherScanNonce.intValue());
79 | txInfo.setToaddress(airdrop.getAddress());
80 | txInfo.setTxhash(tr.getTxHash());
81 | txInfoRepository.save(txInfo);
82 |
83 | airdropResultRepository.save(result);
84 |
85 | curEtherScanNonce = curEtherScanNonce.add(BigInteger.valueOf(1));
86 | }
87 |
88 | return trs;
89 | }
90 |
91 | @GetMapping(path = "/ethkeygen")
92 | public @ResponseBody
93 | List