Skip to content

Commit

Permalink
Merge pull request #2131 from hyperledger-web3j/fix_organization_name
Browse files Browse the repository at this point in the history
Fix organization
  • Loading branch information
gtebrean authored Dec 17, 2024
2 parents 6785725 + 8fff251 commit 3169ca8
Show file tree
Hide file tree
Showing 25 changed files with 147 additions and 166 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

### BREAKING CHANGES

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

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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Web3j is a lightweight, highly modular, reactive, type safe Java and
Android library for working with Smart Contracts and integrating with
clients (nodes) on the Ethereum network:

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

This allows you to work with the [Ethereum](https://www.ethereum.org/)
blockchain, without the additional overhead of having to write your own
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ description 'Web3j base project.'
'spotless'
].each { buildScript ->
download {
src "https://raw.githubusercontent.com/hyperledger/web3j-build-tools/main/gradle/$buildScript/build.gradle"
src "https://raw.githubusercontent.com/hyperledger-web3j/web3j-build-tools/main/gradle/$buildScript/build.gradle"
dest "$rootDir/gradle/$buildScript/build.gradle"
overwrite false
quiet true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public class SolidityFunctionWrapper extends Generator {
+ "or the "
+ SolidityFunctionWrapperGenerator.class.getName()
+ " in the \n"
+ "<a href=\"https://github.com/hyperledger/web3j/tree/main/codegen\">"
+ "<a href=\"https://github.com/hyperledger-web3j/web3j/tree/main/codegen\">"
+ "codegen module</a> to update.\n";

private final boolean useNativeJavaTypes;
Expand Down Expand Up @@ -422,8 +422,7 @@ private FieldSpec createEventDefinition(
String name,
List<NamedTypeName> parameters,
Map<String, Integer> eventsCount,
AbiDefinition event
) {
AbiDefinition event) {

CodeBlock initializer = buildVariableLengthEventInitializer(name, parameters);

Expand Down Expand Up @@ -460,8 +459,7 @@ List<MethodSpec> buildFunctionDefinitions(
methodSpecs.addAll(buildFunctions(functionDefinition, useUpperCase));
} else if (functionDefinition.getType().equals(TYPE_EVENT)) {
methodSpecs.addAll(
buildEventFunctions(functionDefinition, classBuilder, eventsCount)
);
buildEventFunctions(functionDefinition, classBuilder, eventsCount));
}
}
return methodSpecs;
Expand Down Expand Up @@ -1955,8 +1953,7 @@ private static String getEventFromLogFunctionName(String functionName) {
List<MethodSpec> buildEventFunctions(
AbiDefinition functionDefinition,
TypeSpec.Builder classBuilder,
Map<String, Integer> eventsCount
)
Map<String, Integer> eventsCount)
throws ClassNotFoundException {
List<AbiDefinition.NamedType> inputs = functionDefinition.getInputs();

Expand Down Expand Up @@ -1985,9 +1982,8 @@ List<MethodSpec> buildEventFunctions(

String functionName = functionDefinition.getName();

classBuilder.addField(createEventDefinition(
functionName, parameters, eventsCount, functionDefinition
));
classBuilder.addField(
createEventDefinition(functionName, parameters, eventsCount, functionDefinition));

functionName = functionDefinition.getName();

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* <p><strong>Do not modify!</strong>
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
* <a href="https://github.com/hyperledger/web3j/tree/main/codegen">codegen module</a> to update.
* <a href="https://github.com/hyperledger-web3j/web3j/tree/main/codegen">codegen module</a> to update.
*
* <p>Generated with web3j version none.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* <p><strong>Do not modify!</strong>
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
* <a href="https://github.com/hyperledger/web3j/tree/main/codegen">codegen module</a> to update.
* <a href="https://github.com/hyperledger-web3j/web3j/tree/main/codegen">codegen module</a> to update.
*
* <p>Generated with web3j version none.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* <p><strong>Do not modify!</strong>
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
* <a href="https://github.com/hyperledger/web3j/tree/main/codegen">codegen module</a> to update.
* <a href="https://github.com/hyperledger-web3j/web3j/tree/main/codegen">codegen module</a> to update.
*
* <p>Generated with web3j version none.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* <p><strong>Do not modify!</strong>
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
* <a href="https://github.com/hyperledger/web3j/tree/main/codegen">codegen module</a> to update.
* <a href="https://github.com/hyperledger-web3j/web3j/tree/main/codegen">codegen module</a> to update.
*
* <p>Generated with web3j version none.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* <p><strong>Do not modify!</strong>
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
* <a href="https://github.com/hyperledger/web3j/tree/main/codegen">codegen module</a> to update.
* <a href="https://github.com/hyperledger-web3j/web3j/tree/main/codegen">codegen module</a> to update.
*
* <p>Generated with web3j version none.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* <p><strong>Do not modify!</strong>
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
* <a href="https://github.com/hyperledger/web3j/tree/main/codegen">codegen module</a> to update.
* <a href="https://github.com/hyperledger-web3j/web3j/tree/main/codegen">codegen module</a> to update.
*
* <p>Generated with web3j version none.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* <p><strong>Do not modify!</strong>
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
* <a href="https://github.com/hyperledger/web3j/tree/main/codegen">codegen module</a> to update.
* <a href="https://github.com/hyperledger-web3j/web3j/tree/main/codegen">codegen module</a> to update.
*
* <p>Generated with web3j version none.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* <p><strong>Do not modify!</strong>
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
* <a href="https://github.com/hyperledger/web3j/tree/main/codegen">codegen module</a> to update.
* <a href="https://github.com/hyperledger-web3j/web3j/tree/main/codegen">codegen module</a> to update.
*
* <p>Generated with web3j version none.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* <p><strong>Do not modify!</strong>
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
* <a href="https://github.com/hyperledger/web3j/tree/main/codegen">codegen module</a> to update.
* <a href="https://github.com/hyperledger-web3j/web3j/tree/main/codegen">codegen module</a> to update.
*
* <p>Generated with web3j version none.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;

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

public List<Transaction> getPendingTransactions() {
return pending.values().stream()
.map(Map::values)
.flatMap(Collection::stream)
.toList();
return pending.values().stream().map(Map::values).flatMap(Collection::stream).toList();
}

public List<Transaction> getQueuedTransactions() {
return queued.values().stream()
.map(Map::values)
.flatMap(Collection::stream)
.toList();
return queued.values().stream().map(Map::values).flatMap(Collection::stream).toList();
}

private static <K, V> Map<K, V> immutableCopy(Map<K, V> map, Function<V, V> valueMapper) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import java.io.IOException;
import java.math.BigInteger;
import java.util.List;
import java.util.stream.Collectors;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken;
Expand Down Expand Up @@ -76,9 +75,7 @@ public List<List<BigInteger>> getReward() {
return reward.stream()
.map(
rewardPercentile ->
rewardPercentile.stream()
.map(Numeric::decodeQuantity)
.toList())
rewardPercentile.stream().map(Numeric::decodeQuantity).toList())
.toList();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,14 @@
import java.io.IOException;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.TreeNode;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;

public class KeepAsJsonDeserialzier extends JsonDeserializer<String> {

@Override
public String deserialize(JsonParser jp, DeserializationContext ctxt)
throws IOException {
public String deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException {

TreeNode tree = jp.getCodec().readTree(jp);
return tree.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,7 @@ private void sendReplyToListener(WebSocketRequest request, Object reply) {
request.getOnReply().complete(reply);
}

private void sendExceptionToListener(
String replyStr, WebSocketRequest request, Exception e) {
private void sendExceptionToListener(String replyStr, WebSocketRequest request, Exception e) {
request.getOnReply()
.completeExceptionally(
new IOException(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public EmptyTransactionReceipt(String transactionHash) {
super();
this.setTransactionHash(transactionHash);
}

private UnsupportedOperationException unsupportedOperation() {
return new UnsupportedOperationException(
"Empty transaction receipt, only transaction hash is available");
Expand Down
12 changes: 6 additions & 6 deletions core/src/test/java/org/web3j/protocol/BatchTester.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ public okhttp3.Response intercept(Chain chain) throws IOException {
}

return new okhttp3.Response.Builder()
.request(chain.request())
.protocol(Protocol.HTTP_2)
.code(200)
.body(ResponseBody.create(jsonResponse, JSON_MEDIA_TYPE))
.message("")
.build();
.request(chain.request())
.protocol(Protocol.HTTP_2)
.code(200)
.body(ResponseBody.create(jsonResponse, JSON_MEDIA_TYPE))
.message("")
.build();
}

public void setJsonResponse(String jsonResponse) {
Expand Down
20 changes: 10 additions & 10 deletions core/src/test/java/org/web3j/protocol/RequestTester.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,16 @@ public okhttp3.Response intercept(Chain chain) throws IOException {
Request request = chain.request();
this.requestBody = request.body();
return new okhttp3.Response.Builder()
.request(chain.request())
.protocol(Protocol.HTTP_2)
.code(200)
.body(
ResponseBody.create(
"{\"jsonrpc\":\"2.0\",\"method\":\"\","
+ "\"params\":[],\"id\":1}",
JSON_MEDIA_TYPE))
.message("")
.build();
.request(chain.request())
.protocol(Protocol.HTTP_2)
.code(200)
.body(
ResponseBody.create(
"{\"jsonrpc\":\"2.0\",\"method\":\"\","
+ "\"params\":[],\"id\":1}",
JSON_MEDIA_TYPE))
.message("")
.build();
}

public RequestBody getRequestBody() {
Expand Down
12 changes: 6 additions & 6 deletions core/src/test/java/org/web3j/protocol/ResponseTester.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ public okhttp3.Response intercept(Chain chain) throws IOException {
}

return new okhttp3.Response.Builder()
.body(ResponseBody.create(jsonResponse, JSON_MEDIA_TYPE))
.request(chain.request())
.protocol(Protocol.HTTP_2)
.code(200)
.message("")
.build();
.body(ResponseBody.create(jsonResponse, JSON_MEDIA_TYPE))
.request(chain.request())
.protocol(Protocol.HTTP_2)
.code(200)
.message("")
.build();
}
}
}
4 changes: 2 additions & 2 deletions core/src/test/java/org/web3j/protocol/core/BatchTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ void testBatchResponse() throws Exception {
assertTrue(response.getResponses().get(1) instanceof Web3Sha3);
Web3Sha3 web3Sha3 = (Web3Sha3) response.getResponses().get(1);
assertEquals(
"0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad",
web3Sha3.getResult());
"0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad",
web3Sha3.getResult());

assertTrue(response.getResponses().get(2) instanceof NetVersion);
NetVersion netVersion = (NetVersion) response.getResponses().get(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;

import com.fasterxml.jackson.databind.ObjectMapper;
import io.reactivex.Flowable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*/
package org.web3j.tx;

import java.io.IOException;
import java.math.BigInteger;

import org.junit.jupiter.api.BeforeEach;
Expand Down

0 comments on commit 3169ca8

Please sign in to comment.