Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5c69eb9

Browse files
committed
[3.0.0-SNAPSHOT]
Updated CI with keyAdded more toString/equalsHashcode contracts
1 parent7790bb7 commit5c69eb9

20 files changed

+472
-118
lines changed

‎.github/workflows/master.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ jobs:
2828

2929
-name:Test
3030
run:'./gradlew test jacocoTestReport'
31+
env:
32+
ETHERSCAN_API_KEY:${{ secrets.ETHERSCAN_API_KEY }}
3133

3234
-name:SonarQube
33-
if:matrix.java == '17'
35+
if:matrix.java == '11'
3436
run:'./gradlew sonar --info'
3537
env:
3638
GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}

‎.github/workflows/publish-release.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222

2323
-name:Test
2424
run:'./gradlew test jacocoTestReport'
25+
env:
26+
ETHERSCAN_API_KEY:${{ secrets.ETHERSCAN_API_KEY_PUBLISH }}
2527

2628
-name:SonarQube
2729
run:'./gradlew sonar --info'

‎.github/workflows/publish-snapshot.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232

3333
-name:Test
3434
run:'./gradlew test jacocoTestReport'
35+
env:
36+
ETHERSCAN_API_KEY:${{ secrets.ETHERSCAN_API_KEY_PUBLISH }}
3537

3638
-name:Publish Snapshot
3739
run:'./gradlew publish'

‎.github/workflows/pull-request.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ jobs:
3030

3131
-name:Test
3232
run:'./gradlew test jacocoTestReport'
33+
env:
34+
ETHERSCAN_API_KEY:${{ secrets.ETHERSCAN_API_KEY }}
3335

3436
-name:SonarQube
35-
if:matrix.java == '17'
37+
if:matrix.java == '11'
3638
run:'./gradlew sonar --info'
3739
env:
3840
GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Java EtherScan API
22

3-
[![Minimum required Java version](https://img.shields.io/badge/Java-1.8%2B-blue?logo=openjdk)](https://openjdk.org/projects/jdk8/)
3+
[![Minimum required Java version](https://img.shields.io/badge/Java-11%2B-blue?logo=openjdk)](https://openjdk.org/projects/jdk/11/)
44
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.goodforgod/java-etherscan-api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.goodforgod/java-etherscan-api)
55
[![Java CI](https://github.com/GoodforGod/java-etherscan-api/workflows/CI%20Master/badge.svg)](https://github.com/GoodforGod/java-etherscan-api/actions?query=workflow%3ACI+Master)
66
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=GoodforGod_java-etherscan-api&metric=coverage)](https://sonarcloud.io/dashboard?id=GoodforGod_java-etherscan-api)

‎build.gradle‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ test {
3535
testLogging {
3636
events("passed","skipped","failed")
3737
exceptionFormat("full")
38-
showStandardStreams(true)
38+
showStandardStreams(false)
3939
}
4040

4141
reports {

‎src/main/java/io/goodforgod/api/etherscan/model/proxy/BlockProxy.java‎

Lines changed: 59 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -143,48 +143,6 @@ public List<TxProxy> getTransactions() {
143143
}
144144
// </editor-fold>
145145

146-
@Override
147-
publicbooleanequals(Objecto) {
148-
if (this ==o)
149-
returntrue;
150-
if (!(oinstanceofBlockProxy))
151-
returnfalse;
152-
BlockProxythat = (BlockProxy)o;
153-
returnObjects.equals(number,that.number) &&Objects.equals(hash,that.hash)
154-
&&Objects.equals(parentHash,that.parentHash) &&Objects.equals(nonce,that.nonce);
155-
}
156-
157-
@Override
158-
publicinthashCode() {
159-
returnObjects.hash(number,hash,parentHash,nonce);
160-
}
161-
162-
@Override
163-
publicStringtoString() {
164-
return"BlockProxy{" +
165-
"number=" +number +
166-
", hash=" +hash +
167-
", parentHash=" +parentHash +
168-
", stateRoot=" +stateRoot +
169-
", size=" +size +
170-
", difficulty=" +difficulty +
171-
", totalDifficulty=" +totalDifficulty +
172-
", timestamp=" +timestamp +
173-
", miner=" +miner +
174-
", nonce=" +nonce +
175-
", extraData=" +extraData +
176-
", logsBloom=" +logsBloom +
177-
", mixHash=" +mixHash +
178-
", gasUsed=" +gasUsed +
179-
", gasLimit=" +gasLimit +
180-
", sha3Uncles=" +sha3Uncles +
181-
", uncles=" +uncles +
182-
", receiptsRoot=" +receiptsRoot +
183-
", transactionsRoot=" +transactionsRoot +
184-
", transactions=" +transactions +
185-
'}';
186-
}
187-
188146
@Override
189147
publicintcompareTo(@NotNullBlockProxyo) {
190148
returnLong.compare(getNumber(),o.getNumber());
@@ -353,4 +311,63 @@ public BlockProxy build() {
353311
returnblockProxy;
354312
}
355313
}
314+
315+
@Override
316+
publicbooleanequals(Objecto) {
317+
if (this ==o)
318+
returntrue;
319+
if (o ==null ||getClass() !=o.getClass())
320+
returnfalse;
321+
BlockProxythat = (BlockProxy)o;
322+
returnObjects.equals(number,that.number) &&Objects.equals(_number,that._number) &&Objects.equals(hash,that.hash)
323+
&&Objects.equals(parentHash,that.parentHash) &&Objects.equals(stateRoot,that.stateRoot)
324+
&&Objects.equals(size,that.size) &&Objects.equals(_size,that._size)
325+
&&Objects.equals(difficulty,that.difficulty) &&Objects.equals(totalDifficulty,that.totalDifficulty)
326+
&&Objects.equals(timestamp,that.timestamp) &&Objects.equals(_timestamp,that._timestamp)
327+
&&Objects.equals(miner,that.miner) &&Objects.equals(nonce,that.nonce)
328+
&&Objects.equals(extraData,that.extraData) &&Objects.equals(logsBloom,that.logsBloom)
329+
&&Objects.equals(mixHash,that.mixHash) &&Objects.equals(gasUsed,that.gasUsed)
330+
&&Objects.equals(_gasUsed,that._gasUsed) &&Objects.equals(gasLimit,that.gasLimit)
331+
&&Objects.equals(_gasLimit,that._gasLimit) &&Objects.equals(sha3Uncles,that.sha3Uncles)
332+
&&Objects.equals(uncles,that.uncles) &&Objects.equals(receiptsRoot,that.receiptsRoot)
333+
&&Objects.equals(transactionsRoot,that.transactionsRoot) &&Objects.equals(transactions,that.transactions);
334+
}
335+
336+
@Override
337+
publicinthashCode() {
338+
returnObjects.hash(number,number,hash,parentHash,stateRoot,size,size,difficulty,totalDifficulty,timestamp,
339+
timestamp,miner,nonce,extraData,logsBloom,mixHash,gasUsed,gasUsed,gasLimit,gasLimit,sha3Uncles,uncles,
340+
receiptsRoot,transactionsRoot,transactions);
341+
}
342+
343+
@Override
344+
publicStringtoString() {
345+
return"BlockProxy{" +
346+
"number=" +number +
347+
", number=" +_number +
348+
", hash=" +hash +
349+
", parentHash=" +parentHash +
350+
", stateRoot=" +stateRoot +
351+
", size=" +size +
352+
", size=" +_size +
353+
", difficulty=" +difficulty +
354+
", totalDifficulty=" +totalDifficulty +
355+
", timestamp=" +timestamp +
356+
", timestamp=" +_timestamp +
357+
", miner=" +miner +
358+
", nonce=" +nonce +
359+
", extraData=" +extraData +
360+
", logsBloom=" +logsBloom +
361+
", mixHash=" +mixHash +
362+
", gasUsed=" +gasUsed +
363+
", gasUsed=" +_gasUsed +
364+
", gasLimit=" +gasLimit +
365+
", gasLimit=" +_gasLimit +
366+
", sha3Uncles=" +sha3Uncles +
367+
", uncles=" +uncles +
368+
", receiptsRoot=" +receiptsRoot +
369+
", transactionsRoot=" +transactionsRoot +
370+
", transactions=" +transactions +
371+
'}';
372+
}
356373
}

‎src/main/java/io/goodforgod/api/etherscan/model/proxy/ReceiptProxy.java‎

Lines changed: 46 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -95,41 +95,6 @@ public String getLogsBloom() {
9595
}
9696
// </editor-fold>
9797

98-
@Override
99-
publicbooleanequals(Objecto) {
100-
if (this ==o)
101-
returntrue;
102-
if (!(oinstanceofReceiptProxy))
103-
returnfalse;
104-
ReceiptProxythat = (ReceiptProxy)o;
105-
returnObjects.equals(blockNumber,that.blockNumber) &&Objects.equals(blockHash,that.blockHash)
106-
&&Objects.equals(transactionHash,that.transactionHash)
107-
&&Objects.equals(transactionIndex,that.transactionIndex);
108-
}
109-
110-
@Override
111-
publicinthashCode() {
112-
returnObjects.hash(blockNumber,blockHash,transactionHash,transactionIndex);
113-
}
114-
115-
@Override
116-
publicStringtoString() {
117-
return"ReceiptProxy{" +
118-
"root=" +root +
119-
", from=" +from +
120-
", to=" +to +
121-
", blockNumber=" +blockNumber +
122-
", blockHash=" +blockHash +
123-
", transactionHash=" +transactionHash +
124-
", transactionIndex=" +transactionIndex +
125-
", gasUsed=" +gasUsed +
126-
", cumulativeGasUsed=" +cumulativeGasUsed +
127-
", contractAddress=" +contractAddress +
128-
", logs=" +logs +
129-
", logsBloom=" +logsBloom +
130-
'}';
131-
}
132-
13398
publicstaticReceiptProxyBuilderbuilder() {
13499
returnnewReceiptProxyBuilder();
135100
}
@@ -234,4 +199,50 @@ public ReceiptProxy build() {
234199
returnreceiptProxy;
235200
}
236201
}
202+
203+
@Override
204+
publicbooleanequals(Objecto) {
205+
if (this ==o)
206+
returntrue;
207+
if (o ==null ||getClass() !=o.getClass())
208+
returnfalse;
209+
ReceiptProxythat = (ReceiptProxy)o;
210+
returnObjects.equals(root,that.root) &&Objects.equals(from,that.from) &&Objects.equals(to,that.to)
211+
&&Objects.equals(blockNumber,that.blockNumber) &&Objects.equals(_blockNumber,that._blockNumber)
212+
&&Objects.equals(blockHash,that.blockHash) &&Objects.equals(transactionHash,that.transactionHash)
213+
&&Objects.equals(transactionIndex,that.transactionIndex)
214+
&&Objects.equals(_transactionIndex,that._transactionIndex) &&Objects.equals(gasUsed,that.gasUsed)
215+
&&Objects.equals(_gasUsed,that._gasUsed) &&Objects.equals(cumulativeGasUsed,that.cumulativeGasUsed)
216+
&&Objects.equals(_cumulativeGasUsed,that._cumulativeGasUsed)
217+
&&Objects.equals(contractAddress,that.contractAddress) &&Objects.equals(logs,that.logs)
218+
&&Objects.equals(logsBloom,that.logsBloom);
219+
}
220+
221+
@Override
222+
publicinthashCode() {
223+
returnObjects.hash(root,from,to,blockNumber,blockNumber,blockHash,transactionHash,transactionIndex,
224+
transactionIndex,gasUsed,gasUsed,cumulativeGasUsed,cumulativeGasUsed,contractAddress,logs,logsBloom);
225+
}
226+
227+
@Override
228+
publicStringtoString() {
229+
return"ReceiptProxy{" +
230+
"root=" +root +'\'' +
231+
", from=" +from +'\'' +
232+
", to=" +to +'\'' +
233+
", blockNumber=" +blockNumber +'\'' +
234+
", blockNumber=" +_blockNumber +
235+
", blockHash=" +blockHash +'\'' +
236+
", transactionHash=" +transactionHash +'\'' +
237+
", transactionIndex=" +transactionIndex +'\'' +
238+
", transactionIndex=" +_transactionIndex +
239+
", gasUsed=" +gasUsed +'\'' +
240+
", gasUsed=" +_gasUsed +
241+
", cumulativeGasUsed=" +cumulativeGasUsed +'\'' +
242+
", cumulativeGasUsed=" +_cumulativeGasUsed +
243+
", contractAddress=" +contractAddress +'\'' +
244+
", logs=" +logs +
245+
", logsBloom=" +logsBloom +'\'' +
246+
'}';
247+
}
237248
}

‎src/main/java/io/goodforgod/api/etherscan/model/proxy/TxProxy.java‎

Lines changed: 49 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -107,43 +107,6 @@ public Long getBlockNumber() {
107107
}
108108
// </editor-fold>
109109

110-
@Override
111-
publicbooleanequals(Objecto) {
112-
if (this ==o)
113-
returntrue;
114-
if (!(oinstanceofTxProxy))
115-
returnfalse;
116-
TxProxytxProxy = (TxProxy)o;
117-
returnObjects.equals(hash,txProxy.hash) &&Objects.equals(transactionIndex,txProxy.transactionIndex)
118-
&&Objects.equals(nonce,txProxy.nonce) &&Objects.equals(blockHash,txProxy.blockHash)
119-
&&Objects.equals(blockNumber,txProxy.blockNumber);
120-
}
121-
122-
@Override
123-
publicinthashCode() {
124-
returnObjects.hash(hash,transactionIndex,nonce,blockHash,blockNumber);
125-
}
126-
127-
@Override
128-
publicStringtoString() {
129-
return"TxProxy{" +
130-
"to=" +to +
131-
", hash=" +hash +
132-
", transactionIndex=" +transactionIndex +
133-
", from=" +from +
134-
", v=" +v +
135-
", input=" +input +
136-
", s=" +s +
137-
", r=" +r +
138-
", nonce=" +nonce +
139-
", value=" +value +
140-
", gas=" +gas +
141-
", gasPrice=" +gasPrice +
142-
", blockHash=" +blockHash +
143-
", blockNumber=" +blockNumber +
144-
'}';
145-
}
146-
147110
@Override
148111
publicintcompareTo(@NotNullTxProxyo) {
149112
finalintfirstCompare =Long.compare(getBlockNumber(),o.getBlockNumber());
@@ -271,4 +234,53 @@ public TxProxy build() {
271234
returntxProxy;
272235
}
273236
}
237+
238+
@Override
239+
publicbooleanequals(Objecto) {
240+
if (this ==o)
241+
returntrue;
242+
if (o ==null ||getClass() !=o.getClass())
243+
returnfalse;
244+
TxProxytxProxy = (TxProxy)o;
245+
returnObjects.equals(to,txProxy.to) &&Objects.equals(hash,txProxy.hash)
246+
&&Objects.equals(transactionIndex,txProxy.transactionIndex)
247+
&&Objects.equals(_transactionIndex,txProxy._transactionIndex) &&Objects.equals(from,txProxy.from)
248+
&&Objects.equals(v,txProxy.v) &&Objects.equals(input,txProxy.input) &&Objects.equals(s,txProxy.s)
249+
&&Objects.equals(r,txProxy.r) &&Objects.equals(nonce,txProxy.nonce) &&Objects.equals(_nonce,txProxy._nonce)
250+
&&Objects.equals(value,txProxy.value) &&Objects.equals(gas,txProxy.gas) &&Objects.equals(_gas,txProxy._gas)
251+
&&Objects.equals(gasPrice,txProxy.gasPrice) &&Objects.equals(_gasPrice,txProxy._gasPrice)
252+
&&Objects.equals(blockHash,txProxy.blockHash) &&Objects.equals(blockNumber,txProxy.blockNumber)
253+
&&Objects.equals(_blockNumber,txProxy._blockNumber);
254+
}
255+
256+
@Override
257+
publicinthashCode() {
258+
returnObjects.hash(to,hash,transactionIndex,transactionIndex,from,v,input,s,r,nonce,nonce,value,gas,gas,
259+
gasPrice,gasPrice,blockHash,blockNumber,blockNumber);
260+
}
261+
262+
@Override
263+
publicStringtoString() {
264+
return"TxProxy{" +
265+
"to=" +to +'\'' +
266+
", hash=" +hash +'\'' +
267+
", transactionIndex=" +transactionIndex +'\'' +
268+
", transactionIndex=" +_transactionIndex +
269+
", from=" +from +'\'' +
270+
", v=" +v +'\'' +
271+
", input=" +input +'\'' +
272+
", s=" +s +'\'' +
273+
", r=" +r +'\'' +
274+
", nonce=" +nonce +'\'' +
275+
", nonce=" +_nonce +
276+
", value=" +value +'\'' +
277+
", gas=" +gas +'\'' +
278+
", gas=" +_gas +
279+
", gasPrice=" +gasPrice +'\'' +
280+
", gasPrice=" +_gasPrice +
281+
", blockHash=" +blockHash +'\'' +
282+
", blockNumber=" +blockNumber +'\'' +
283+
", blockNumber=" +_blockNumber +
284+
'}';
285+
}
274286
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp