Skip to content

Commit 3169ca8

Browse files
authored
Merge pull request #2131 from hyperledger-web3j/fix_organization_name
Fix organization
2 parents 6785725 + 8fff251 commit 3169ca8

File tree

25 files changed

+147
-166
lines changed

25 files changed

+147
-166
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
2121

2222
### BREAKING CHANGES
2323

24-
*
24+
* Change organization name [#2131](https://github.com/hyperledger-web3j/web3j/pull/2131)
2525

2626
# [4.12.2](https://github.com/hyperledger/web3j/releases/tag/v4.12.2) (2024-09-18)
2727

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Web3j is a lightweight, highly modular, reactive, type safe Java and
1212
Android library for working with Smart Contracts and integrating with
1313
clients (nodes) on the Ethereum network:
1414

15-
![image](https://github.com/hyperledger/web3j-docs/blob/main/docs/img/web3j_network.png)
15+
![image](https://github.com/hyperledger-web3j/web3j-docs/blob/main/docs/img/web3j_network.png)
1616

1717
This allows you to work with the [Ethereum](https://www.ethereum.org/)
1818
blockchain, without the additional overhead of having to write your own

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ description 'Web3j base project.'
5050
'spotless'
5151
].each { buildScript ->
5252
download {
53-
src "https://raw.githubusercontent.com/hyperledger/web3j-build-tools/main/gradle/$buildScript/build.gradle"
53+
src "https://raw.githubusercontent.com/hyperledger-web3j/web3j-build-tools/main/gradle/$buildScript/build.gradle"
5454
dest "$rootDir/gradle/$buildScript/build.gradle"
5555
overwrite false
5656
quiet true

codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapper.java

+6-10
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public class SolidityFunctionWrapper extends Generator {
120120
+ "or the "
121121
+ SolidityFunctionWrapperGenerator.class.getName()
122122
+ " in the \n"
123-
+ "<a href=\"https://github.com/hyperledger/web3j/tree/main/codegen\">"
123+
+ "<a href=\"https://github.com/hyperledger-web3j/web3j/tree/main/codegen\">"
124124
+ "codegen module</a> to update.\n";
125125

126126
private final boolean useNativeJavaTypes;
@@ -422,8 +422,7 @@ private FieldSpec createEventDefinition(
422422
String name,
423423
List<NamedTypeName> parameters,
424424
Map<String, Integer> eventsCount,
425-
AbiDefinition event
426-
) {
425+
AbiDefinition event) {
427426

428427
CodeBlock initializer = buildVariableLengthEventInitializer(name, parameters);
429428

@@ -460,8 +459,7 @@ List<MethodSpec> buildFunctionDefinitions(
460459
methodSpecs.addAll(buildFunctions(functionDefinition, useUpperCase));
461460
} else if (functionDefinition.getType().equals(TYPE_EVENT)) {
462461
methodSpecs.addAll(
463-
buildEventFunctions(functionDefinition, classBuilder, eventsCount)
464-
);
462+
buildEventFunctions(functionDefinition, classBuilder, eventsCount));
465463
}
466464
}
467465
return methodSpecs;
@@ -1955,8 +1953,7 @@ private static String getEventFromLogFunctionName(String functionName) {
19551953
List<MethodSpec> buildEventFunctions(
19561954
AbiDefinition functionDefinition,
19571955
TypeSpec.Builder classBuilder,
1958-
Map<String, Integer> eventsCount
1959-
)
1956+
Map<String, Integer> eventsCount)
19601957
throws ClassNotFoundException {
19611958
List<AbiDefinition.NamedType> inputs = functionDefinition.getInputs();
19621959

@@ -1985,9 +1982,8 @@ List<MethodSpec> buildEventFunctions(
19851982

19861983
String functionName = functionDefinition.getName();
19871984

1988-
classBuilder.addField(createEventDefinition(
1989-
functionName, parameters, eventsCount, functionDefinition
1990-
));
1985+
classBuilder.addField(
1986+
createEventDefinition(functionName, parameters, eventsCount, functionDefinition));
19911987

19921988
functionName = functionDefinition.getName();
19931989

codegen/src/test/java/org/web3j/codegen/SolidityFunctionWrapperTest.java

+99-99
Large diffs are not rendered by default.

codegen/src/test/resources/solidity/abifuncs/build/java/AbiFuncs.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* <p><strong>Do not modify!</strong>
2020
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
2121
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
22-
* <a href="https://github.com/hyperledger/web3j/tree/main/codegen">codegen module</a> to update.
22+
* <a href="https://github.com/hyperledger-web3j/web3j/tree/main/codegen">codegen module</a> to update.
2323
*
2424
* <p>Generated with web3j version none.
2525
*/

codegen/src/test/resources/solidity/arrayofstructandstruct/build/java/ArrayOfStructAndStruct.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* <p><strong>Do not modify!</strong>
2424
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
2525
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
26-
* <a href="https://github.com/hyperledger/web3j/tree/main/codegen">codegen module</a> to update.
26+
* <a href="https://github.com/hyperledger-web3j/web3j/tree/main/codegen">codegen module</a> to update.
2727
*
2828
* <p>Generated with web3j version none.
2929
*/

codegen/src/test/resources/solidity/arrayofstructclassgeneration/build/java/ArrayOfStructClassGeneration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* <p><strong>Do not modify!</strong>
2424
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
2525
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
26-
* <a href="https://github.com/hyperledger/web3j/tree/main/codegen">codegen module</a> to update.
26+
* <a href="https://github.com/hyperledger-web3j/web3j/tree/main/codegen">codegen module</a> to update.
2727
*
2828
* <p>Generated with web3j version none.
2929
*/

codegen/src/test/resources/solidity/arraysinstruct/build/java/ArraysInStruct.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* <p><strong>Do not modify!</strong>
3434
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
3535
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
36-
* <a href="https://github.com/hyperledger/web3j/tree/main/codegen">codegen module</a> to update.
36+
* <a href="https://github.com/hyperledger-web3j/web3j/tree/main/codegen">codegen module</a> to update.
3737
*
3838
* <p>Generated with web3j version none.
3939
*/

codegen/src/test/resources/solidity/eventparameters/build/java/EventParameters.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* <p><strong>Do not modify!</strong>
3232
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
3333
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
34-
* <a href="https://github.com/hyperledger/web3j/tree/main/codegen">codegen module</a> to update.
34+
* <a href="https://github.com/hyperledger-web3j/web3j/tree/main/codegen">codegen module</a> to update.
3535
*
3636
* <p>Generated with web3j version none.
3737
*/

codegen/src/test/resources/solidity/metacoin/build/java/MetaCoin.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* <p><strong>Do not modify!</strong>
3232
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
3333
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
34-
* <a href="https://github.com/hyperledger/web3j/tree/main/codegen">codegen module</a> to update.
34+
* <a href="https://github.com/hyperledger-web3j/web3j/tree/main/codegen">codegen module</a> to update.
3535
*
3636
* <p>Generated with web3j version none.
3737
*/

codegen/src/test/resources/solidity/onlyinarraystruct/build/java/OnlyInArrayStruct.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* <p><strong>Do not modify!</strong>
2525
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
2626
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
27-
* <a href="https://github.com/hyperledger/web3j/tree/main/codegen">codegen module</a> to update.
27+
* <a href="https://github.com/hyperledger-web3j/web3j/tree/main/codegen">codegen module</a> to update.
2828
*
2929
* <p>Generated with web3j version none.
3030
*/

codegen/src/test/resources/solidity/sameinnerstructname/build/java/SameInnerStructName.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* <p><strong>Do not modify!</strong>
2424
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
2525
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
26-
* <a href="https://github.com/hyperledger/web3j/tree/main/codegen">codegen module</a> to update.
26+
* <a href="https://github.com/hyperledger-web3j/web3j/tree/main/codegen">codegen module</a> to update.
2727
*
2828
* <p>Generated with web3j version none.
2929
*/

codegen/src/test/resources/solidity/staticarrayofstructsinstruct/build/java/StaticArrayOfStructsInStruct.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* <p><strong>Do not modify!</strong>
2828
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
2929
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
30-
* <a href="https://github.com/hyperledger/web3j/tree/main/codegen">codegen module</a> to update.
30+
* <a href="https://github.com/hyperledger-web3j/web3j/tree/main/codegen">codegen module</a> to update.
3131
*
3232
* <p>Generated with web3j version none.
3333
*/

core/src/main/java/org/web3j/protocol/admin/methods/response/TxPoolContent.java

+2-9
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import java.util.List;
2020
import java.util.Map;
2121
import java.util.function.Function;
22-
import java.util.stream.Collectors;
2322

2423
import org.web3j.protocol.core.Response;
2524
import org.web3j.protocol.core.methods.response.Transaction;
@@ -49,17 +48,11 @@ public Map<String, Map<BigInteger, Transaction>> getQueued() {
4948
}
5049

5150
public List<Transaction> getPendingTransactions() {
52-
return pending.values().stream()
53-
.map(Map::values)
54-
.flatMap(Collection::stream)
55-
.toList();
51+
return pending.values().stream().map(Map::values).flatMap(Collection::stream).toList();
5652
}
5753

5854
public List<Transaction> getQueuedTransactions() {
59-
return queued.values().stream()
60-
.map(Map::values)
61-
.flatMap(Collection::stream)
62-
.toList();
55+
return queued.values().stream().map(Map::values).flatMap(Collection::stream).toList();
6356
}
6457

6558
private static <K, V> Map<K, V> immutableCopy(Map<K, V> map, Function<V, V> valueMapper) {

core/src/main/java/org/web3j/protocol/core/methods/response/EthFeeHistory.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import java.io.IOException;
1616
import java.math.BigInteger;
1717
import java.util.List;
18-
import java.util.stream.Collectors;
1918

2019
import com.fasterxml.jackson.core.JsonParser;
2120
import com.fasterxml.jackson.core.JsonToken;
@@ -76,9 +75,7 @@ public List<List<BigInteger>> getReward() {
7675
return reward.stream()
7776
.map(
7877
rewardPercentile ->
79-
rewardPercentile.stream()
80-
.map(Numeric::decodeQuantity)
81-
.toList())
78+
rewardPercentile.stream().map(Numeric::decodeQuantity).toList())
8279
.toList();
8380
}
8481

core/src/main/java/org/web3j/protocol/deserializer/KeepAsJsonDeserialzier.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,14 @@
1515
import java.io.IOException;
1616

1717
import com.fasterxml.jackson.core.JsonParser;
18-
import com.fasterxml.jackson.core.JsonProcessingException;
1918
import com.fasterxml.jackson.core.TreeNode;
2019
import com.fasterxml.jackson.databind.DeserializationContext;
2120
import com.fasterxml.jackson.databind.JsonDeserializer;
2221

2322
public class KeepAsJsonDeserialzier extends JsonDeserializer<String> {
2423

2524
@Override
26-
public String deserialize(JsonParser jp, DeserializationContext ctxt)
27-
throws IOException {
25+
public String deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException {
2826

2927
TreeNode tree = jp.getCodec().readTree(jp);
3028
return tree.toString();

core/src/main/java/org/web3j/protocol/websocket/WebSocketService.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,7 @@ private void sendReplyToListener(WebSocketRequest request, Object reply) {
374374
request.getOnReply().complete(reply);
375375
}
376376

377-
private void sendExceptionToListener(
378-
String replyStr, WebSocketRequest request, Exception e) {
377+
private void sendExceptionToListener(String replyStr, WebSocketRequest request, Exception e) {
379378
request.getOnReply()
380379
.completeExceptionally(
381380
new IOException(

core/src/main/java/org/web3j/tx/response/EmptyTransactionReceipt.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public EmptyTransactionReceipt(String transactionHash) {
2828
super();
2929
this.setTransactionHash(transactionHash);
3030
}
31-
31+
3232
private UnsupportedOperationException unsupportedOperation() {
3333
return new UnsupportedOperationException(
3434
"Empty transaction receipt, only transaction hash is available");

core/src/test/java/org/web3j/protocol/BatchTester.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ public okhttp3.Response intercept(Chain chain) throws IOException {
104104
}
105105

106106
return new okhttp3.Response.Builder()
107-
.request(chain.request())
108-
.protocol(Protocol.HTTP_2)
109-
.code(200)
110-
.body(ResponseBody.create(jsonResponse, JSON_MEDIA_TYPE))
111-
.message("")
112-
.build();
107+
.request(chain.request())
108+
.protocol(Protocol.HTTP_2)
109+
.code(200)
110+
.body(ResponseBody.create(jsonResponse, JSON_MEDIA_TYPE))
111+
.message("")
112+
.build();
113113
}
114114

115115
public void setJsonResponse(String jsonResponse) {

core/src/test/java/org/web3j/protocol/RequestTester.java

+10-10
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,16 @@ public okhttp3.Response intercept(Chain chain) throws IOException {
7171
Request request = chain.request();
7272
this.requestBody = request.body();
7373
return new okhttp3.Response.Builder()
74-
.request(chain.request())
75-
.protocol(Protocol.HTTP_2)
76-
.code(200)
77-
.body(
78-
ResponseBody.create(
79-
"{\"jsonrpc\":\"2.0\",\"method\":\"\","
80-
+ "\"params\":[],\"id\":1}",
81-
JSON_MEDIA_TYPE))
82-
.message("")
83-
.build();
74+
.request(chain.request())
75+
.protocol(Protocol.HTTP_2)
76+
.code(200)
77+
.body(
78+
ResponseBody.create(
79+
"{\"jsonrpc\":\"2.0\",\"method\":\"\","
80+
+ "\"params\":[],\"id\":1}",
81+
JSON_MEDIA_TYPE))
82+
.message("")
83+
.build();
8484
}
8585

8686
public RequestBody getRequestBody() {

core/src/test/java/org/web3j/protocol/ResponseTester.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ public okhttp3.Response intercept(Chain chain) throws IOException {
7575
}
7676

7777
return new okhttp3.Response.Builder()
78-
.body(ResponseBody.create(jsonResponse, JSON_MEDIA_TYPE))
79-
.request(chain.request())
80-
.protocol(Protocol.HTTP_2)
81-
.code(200)
82-
.message("")
83-
.build();
78+
.body(ResponseBody.create(jsonResponse, JSON_MEDIA_TYPE))
79+
.request(chain.request())
80+
.protocol(Protocol.HTTP_2)
81+
.code(200)
82+
.message("")
83+
.build();
8484
}
8585
}
8686
}

core/src/test/java/org/web3j/protocol/core/BatchTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ void testBatchResponse() throws Exception {
8686
assertTrue(response.getResponses().get(1) instanceof Web3Sha3);
8787
Web3Sha3 web3Sha3 = (Web3Sha3) response.getResponses().get(1);
8888
assertEquals(
89-
"0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad",
90-
web3Sha3.getResult());
89+
"0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad",
90+
web3Sha3.getResult());
9191

9292
assertTrue(response.getResponses().get(2) instanceof NetVersion);
9393
NetVersion netVersion = (NetVersion) response.getResponses().get(2);

core/src/test/java/org/web3j/protocol/core/filters/FilterTester.java

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import java.util.concurrent.Executors;
2121
import java.util.concurrent.ScheduledExecutorService;
2222
import java.util.concurrent.TimeUnit;
23-
import java.util.stream.Collectors;
2423

2524
import com.fasterxml.jackson.databind.ObjectMapper;
2625
import io.reactivex.Flowable;

core/src/test/java/org/web3j/tx/FastRawTransactionManagerTest.java

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
*/
1313
package org.web3j.tx;
1414

15-
import java.io.IOException;
1615
import java.math.BigInteger;
1716

1817
import org.junit.jupiter.api.BeforeEach;

0 commit comments

Comments
 (0)