From c4ccf388893e9fc4786cabf83eaa375d46ed88e3 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Thu, 8 Jun 2023 08:36:11 +0300 Subject: [PATCH 01/52] Revert "Merge pull request #1806 from apex-crypto/feature/event_from_log" This reverts commit 2bc0ad147c3cd9b58c8aa672e03bac939e15f5d2, reversing changes made to 7afb1e96784985ffe61ec8819d4805db43a30b0c. --- .../codegen/SolidityFunctionWrapper.java | 82 ++++++++++--------- .../codegen/SolidityFunctionWrapperTest.java | 77 ++++++++--------- .../build/java/EventParameters.java | 33 ++++---- 3 files changed, 99 insertions(+), 93 deletions(-) diff --git a/codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapper.java b/codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapper.java index a329d66a66..c0d0ed67d0 100644 --- a/codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapper.java +++ b/codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapper.java @@ -1697,15 +1697,47 @@ MethodSpec buildEventFlowableFunction( ParameterizedTypeName.get( ClassName.get(Flowable.class), ClassName.get("", responseClassName)); - return MethodSpec.methodBuilder(generatedFunctionName) - .addModifiers(Modifier.PUBLIC) - .addParameter(EthFilter.class, FILTER) - .returns(parameterizedTypeName) - .addStatement( - "return web3j.ethLogFlowable(filter).map(log -> " - + getEventFromLogFunctionName(functionName) - + "(log))") - .build(); + MethodSpec.Builder flowableMethodBuilder = + MethodSpec.methodBuilder(generatedFunctionName) + .addModifiers(Modifier.PUBLIC) + .addParameter(EthFilter.class, FILTER) + .returns(parameterizedTypeName); + + TypeSpec converter = + TypeSpec.anonymousClassBuilder("") + .addSuperinterface( + ParameterizedTypeName.get( + ClassName.get(io.reactivex.functions.Function.class), + ClassName.get(Log.class), + ClassName.get("", responseClassName))) + .addMethod( + MethodSpec.methodBuilder("apply") + .addAnnotation(Override.class) + .addModifiers(Modifier.PUBLIC) + .addParameter(Log.class, "log") + .returns(ClassName.get("", responseClassName)) + .addStatement( + "$T eventValues = extractEventParametersWithLog(" + + buildEventDefinitionName(functionName) + + ", log)", + Contract.EventValuesWithLog.class) + .addStatement( + "$1T typedResponse = new $1T()", + ClassName.get("", responseClassName)) + .addCode( + buildTypedResponse( + "typedResponse", + indexedParameters, + nonIndexedParameters, + true)) + .addStatement("return typedResponse") + .build()) + .build(); + + flowableMethodBuilder.addStatement( + "return web3j.ethLogFlowable(filter).map($L)", converter); + + return flowableMethodBuilder.build(); } MethodSpec buildDefaultEventFlowableFunction(String responseClassName, String functionName) { @@ -1781,34 +1813,6 @@ MethodSpec buildEventTransactionReceiptFunction( return transactionMethodBuilder.build(); } - MethodSpec buildEventLogFunction( - String responseClassName, - String functionName, - List indexedParameters, - List nonIndexedParameters) { - - String generatedFunctionName = getEventFromLogFunctionName(functionName); - return MethodSpec.methodBuilder(generatedFunctionName) - .addModifiers(Modifier.PUBLIC, Modifier.STATIC) - .addParameter(Log.class, "log") - .returns(ClassName.get("", responseClassName)) - .addStatement( - "$T eventValues = staticExtractEventParametersWithLog(" - + buildEventDefinitionName(functionName) - + ", log)", - Contract.EventValuesWithLog.class) - .addStatement("$1T typedResponse = new $1T()", ClassName.get("", responseClassName)) - .addCode( - buildTypedResponse( - "typedResponse", indexedParameters, nonIndexedParameters, true)) - .addStatement("return typedResponse") - .build(); - } - - private static String getEventFromLogFunctionName(String functionName) { - return "get" + Strings.capitaliseFirstLetter(functionName) + "EventFromLog"; - } - List buildEventFunctions( AbiDefinition functionDefinition, TypeSpec.Builder classBuilder) throws ClassNotFoundException { @@ -1849,9 +1853,7 @@ List buildEventFunctions( methods.add( buildEventTransactionReceiptFunction( responseClassName, functionName, indexedParameters, nonIndexedParameters)); - methods.add( - buildEventLogFunction( - responseClassName, functionName, indexedParameters, nonIndexedParameters)); + methods.add( buildEventFlowableFunction( responseClassName, functionName, indexedParameters, nonIndexedParameters)); diff --git a/codegen/src/test/java/org/web3j/codegen/SolidityFunctionWrapperTest.java b/codegen/src/test/java/org/web3j/codegen/SolidityFunctionWrapperTest.java index 2f15a1130e..257a51f042 100644 --- a/codegen/src/test/java/org/web3j/codegen/SolidityFunctionWrapperTest.java +++ b/codegen/src/test/java/org/web3j/codegen/SolidityFunctionWrapperTest.java @@ -695,20 +695,21 @@ public void testBuildEventConstantMultipleValueReturn() throws Exception { + " return responses;\n" + " }\n" + "\n" - + " public static TransferEventResponse getTransferEventFromLog(org.web3j.protocol.core.methods.response.Log log) {\n" - + " org.web3j.tx.Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(TRANSFER_EVENT, log);\n" - + " TransferEventResponse typedResponse = new TransferEventResponse();\n" - + " typedResponse.log = log;\n" - + " typedResponse.id = (byte[]) eventValues.getIndexedValues().get(0).getValue();\n" - + " typedResponse.from = (java.lang.String) eventValues.getIndexedValues().get(1).getValue();\n" - + " typedResponse.to = (java.lang.String) eventValues.getIndexedValues().get(2).getValue();\n" - + " typedResponse.value = (java.math.BigInteger) eventValues.getNonIndexedValues().get(0).getValue();\n" - + " typedResponse.message = (java.lang.String) eventValues.getNonIndexedValues().get(1).getValue();\n" - + " return typedResponse;\n" - + " }\n" - + "\n" + " public io.reactivex.Flowable transferEventFlowable(org.web3j.protocol.core.methods.request.EthFilter filter) {\n" - + " return web3j.ethLogFlowable(filter).map(log -> getTransferEventFromLog(log));\n" + + " return web3j.ethLogFlowable(filter).map(new io.reactivex.functions.Function() {\n" + + " @java.lang.Override\n" + + " public TransferEventResponse apply(org.web3j.protocol.core.methods.response.Log log) {\n" + + " org.web3j.tx.Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(TRANSFER_EVENT, log);\n" + + " TransferEventResponse typedResponse = new TransferEventResponse();\n" + + " typedResponse.log = log;\n" + + " typedResponse.id = (byte[]) eventValues.getIndexedValues().get(0).getValue();\n" + + " typedResponse.from = (java.lang.String) eventValues.getIndexedValues().get(1).getValue();\n" + + " typedResponse.to = (java.lang.String) eventValues.getIndexedValues().get(2).getValue();\n" + + " typedResponse.value = (java.math.BigInteger) eventValues.getNonIndexedValues().get(0).getValue();\n" + + " typedResponse.message = (java.lang.String) eventValues.getNonIndexedValues().get(1).getValue();\n" + + " return typedResponse;\n" + + " }\n" + + " });\n" + " }\n" + "\n" + " public io.reactivex.Flowable transferEventFlowable(org.web3j.protocol.core.DefaultBlockParameter startBlock, org.web3j.protocol.core.DefaultBlockParameter endBlock) {\n" @@ -730,7 +731,7 @@ public void testBuildEventConstantMultipleValueReturn() throws Exception { + " }\n" + "}\n"; - assertEquals(expected, builder.build().toString()); + assertEquals(builder.build().toString(), (expected)); } @Test @@ -779,21 +780,22 @@ public void testBuildEventWithNamedAndNoNamedParameters() throws Exception { + " return responses;\n" + " }\n" + "\n" - + " public static TransferEventResponse getTransferEventFromLog(org.web3j.protocol.core.methods.response.Log log) {\n" - + " org.web3j.tx.Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(TRANSFER_EVENT, log);\n" - + " TransferEventResponse typedResponse = new TransferEventResponse();\n" - + " typedResponse.log = log;\n" - + " typedResponse.id = (byte[]) eventValues.getIndexedValues().get(0).getValue();\n" - + " typedResponse.param1 = (java.lang.String) eventValues.getIndexedValues().get(1).getValue();\n" - + " typedResponse.to = (java.lang.String) eventValues.getIndexedValues().get(2).getValue();\n" - + " typedResponse.param3 = (byte[]) eventValues.getNonIndexedValues().get(0).getValue();\n" - + " typedResponse.param4 = (java.math.BigInteger) eventValues.getNonIndexedValues().get(1).getValue();\n" - + " typedResponse.message = (java.lang.String) eventValues.getNonIndexedValues().get(2).getValue();\n" - + " return typedResponse;\n" - + " }\n" - + "\n" + " public io.reactivex.Flowable transferEventFlowable(org.web3j.protocol.core.methods.request.EthFilter filter) {\n" - + " return web3j.ethLogFlowable(filter).map(log -> getTransferEventFromLog(log));\n" + + " return web3j.ethLogFlowable(filter).map(new io.reactivex.functions.Function() {\n" + + " @java.lang.Override\n" + + " public TransferEventResponse apply(org.web3j.protocol.core.methods.response.Log log) {\n" + + " org.web3j.tx.Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(TRANSFER_EVENT, log);\n" + + " TransferEventResponse typedResponse = new TransferEventResponse();\n" + + " typedResponse.log = log;\n" + + " typedResponse.id = (byte[]) eventValues.getIndexedValues().get(0).getValue();\n" + + " typedResponse.param1 = (java.lang.String) eventValues.getIndexedValues().get(1).getValue();\n" + + " typedResponse.to = (java.lang.String) eventValues.getIndexedValues().get(2).getValue();\n" + + " typedResponse.param3 = (byte[]) eventValues.getNonIndexedValues().get(0).getValue();\n" + + " typedResponse.param4 = (java.math.BigInteger) eventValues.getNonIndexedValues().get(1).getValue();\n" + + " typedResponse.message = (java.lang.String) eventValues.getNonIndexedValues().get(2).getValue();\n" + + " return typedResponse;\n" + + " }\n" + + " });\n" + " }\n" + "\n" + " public io.reactivex.Flowable transferEventFlowable(org.web3j.protocol.core.DefaultBlockParameter startBlock, org.web3j.protocol.core.DefaultBlockParameter endBlock) {\n" @@ -849,16 +851,17 @@ public void testBuildEventWithNativeList() throws Exception { + " return responses;\n" + " }\n" + "\n" - + " public static TransferEventResponse getTransferEventFromLog(org.web3j.protocol.core.methods.response.Log log) {\n" - + " org.web3j.tx.Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(TRANSFER_EVENT, log);\n" - + " TransferEventResponse typedResponse = new TransferEventResponse();\n" - + " typedResponse.log = log;\n" - + " typedResponse.array = (java.util.List) ((org.web3j.abi.datatypes.Array) eventValues.getNonIndexedValues().get(0)).getNativeValueCopy();\n" - + " return typedResponse;\n" - + " }\n" - + "\n" + " public io.reactivex.Flowable transferEventFlowable(org.web3j.protocol.core.methods.request.EthFilter filter) {\n" - + " return web3j.ethLogFlowable(filter).map(log -> getTransferEventFromLog(log));\n" + + " return web3j.ethLogFlowable(filter).map(new io.reactivex.functions.Function() {\n" + + " @java.lang.Override\n" + + " public TransferEventResponse apply(org.web3j.protocol.core.methods.response.Log log) {\n" + + " org.web3j.tx.Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(TRANSFER_EVENT, log);\n" + + " TransferEventResponse typedResponse = new TransferEventResponse();\n" + + " typedResponse.log = log;\n" + + " typedResponse.array = (java.util.List) ((org.web3j.abi.datatypes.Array) eventValues.getNonIndexedValues().get(0)).getNativeValueCopy();\n" + + " return typedResponse;\n" + + " }\n" + + " });\n" + " }\n" + "\n" + " public io.reactivex.Flowable transferEventFlowable(org.web3j.protocol.core.DefaultBlockParameter startBlock, org.web3j.protocol.core.DefaultBlockParameter endBlock) {\n" diff --git a/codegen/src/test/resources/solidity/eventparameters/build/java/EventParameters.java b/codegen/src/test/resources/solidity/eventparameters/build/java/EventParameters.java index 0fbc8ea5db..1a1850c58d 100644 --- a/codegen/src/test/resources/solidity/eventparameters/build/java/EventParameters.java +++ b/codegen/src/test/resources/solidity/eventparameters/build/java/EventParameters.java @@ -1,6 +1,7 @@ package org.web3j.unittests.java; import io.reactivex.Flowable; +import io.reactivex.functions.Function; import java.math.BigInteger; import java.util.ArrayList; import java.util.Arrays; @@ -10,7 +11,6 @@ import org.web3j.abi.TypeReference; import org.web3j.abi.datatypes.Address; import org.web3j.abi.datatypes.Event; -import org.web3j.abi.datatypes.Function; import org.web3j.abi.datatypes.Type; import org.web3j.abi.datatypes.Utf8String; import org.web3j.abi.datatypes.generated.Uint256; @@ -82,19 +82,20 @@ public static List getTestEventEvents(TransactionReceipt return responses; } - public static TestEventEventResponse getTestEventEventFromLog(Log log) { - Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(TESTEVENT_EVENT, log); - TestEventEventResponse typedResponse = new TestEventEventResponse(); - typedResponse.log = log; - typedResponse._contractNumber = (BigInteger) eventValues.getIndexedValues().get(0).getValue(); - typedResponse.param1 = (byte[]) eventValues.getIndexedValues().get(1).getValue(); - typedResponse.param2 = (String) eventValues.getNonIndexedValues().get(0).getValue(); - typedResponse.param3 = (String) eventValues.getNonIndexedValues().get(1).getValue(); - return typedResponse; - } - public Flowable testEventEventFlowable(EthFilter filter) { - return web3j.ethLogFlowable(filter).map(log -> getTestEventEventFromLog(log)); + return web3j.ethLogFlowable(filter).map(new Function() { + @Override + public TestEventEventResponse apply(Log log) { + Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(TESTEVENT_EVENT, log); + TestEventEventResponse typedResponse = new TestEventEventResponse(); + typedResponse.log = log; + typedResponse._contractNumber = (BigInteger) eventValues.getIndexedValues().get(0).getValue(); + typedResponse.param1 = (byte[]) eventValues.getIndexedValues().get(1).getValue(); + typedResponse.param2 = (String) eventValues.getNonIndexedValues().get(0).getValue(); + typedResponse.param3 = (String) eventValues.getNonIndexedValues().get(1).getValue(); + return typedResponse; + } + }); } public Flowable testEventEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) { @@ -104,21 +105,21 @@ public Flowable testEventEventFlowable(DefaultBlockParam } public RemoteFunctionCall _contractNumber() { - final Function function = new Function(FUNC__CONTRACTNUMBER, + final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function(FUNC__CONTRACTNUMBER, Arrays.asList(), Arrays.>asList(new TypeReference() {})); return executeRemoteCallSingleValueReturn(function, BigInteger.class); } public RemoteFunctionCall _testAddress() { - final Function function = new Function(FUNC__TESTADDRESS, + final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function(FUNC__TESTADDRESS, Arrays.asList(), Arrays.>asList(new TypeReference
() {})); return executeRemoteCallSingleValueReturn(function, String.class); } public RemoteFunctionCall testEvent() { - final Function function = new Function( + final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function( FUNC_TESTEVENT, Arrays.asList(), Collections.>emptyList()); From 569150b09c3ed224474236caa578e85b9fdcde9c Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Thu, 8 Jun 2023 10:11:21 +0300 Subject: [PATCH 02/52] bump version --- gradle.properties | 2 +- gradle/publish/build.gradle | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gradle.properties b/gradle.properties index 594713b04f..af7574658f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ group=org.web3j -version=4.10.1-SNAPSHOT +version=4.10.1-RC diff --git a/gradle/publish/build.gradle b/gradle/publish/build.gradle index 9cc5f449d3..27d9a36139 100644 --- a/gradle/publish/build.gradle +++ b/gradle/publish/build.gradle @@ -82,10 +82,10 @@ nexusStaging { } -signing { - sign publishing.publications.maven - def signingKey = new File("$rootDir/web3j.asc") - if (signingKey.exists()) { - useInMemoryPgpKeys(signingKey.getText('UTF-8'), System.getenv('GPG_PASSPHRASE')) - } -} +//signing { +// sign publishing.publications.maven +// def signingKey = new File("$rootDir/web3j.asc") +// if (signingKey.exists()) { +// useInMemoryPgpKeys(signingKey.getText('UTF-8'), System.getenv('GPG_PASSPHRASE')) +// } +//} From f2eef7b9f28e04055b69ad9f704e938810e54514 Mon Sep 17 00:00:00 2001 From: "eric.deng" <30487254+vae520283995@users.noreply.github.com> Date: Mon, 12 Jun 2023 18:10:10 +0800 Subject: [PATCH 03/52] Update StructuredDataEncoder.java Encode PrimitiveValue requires sha3 --- .../src/main/java/org/web3j/crypto/StructuredDataEncoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/src/main/java/org/web3j/crypto/StructuredDataEncoder.java b/crypto/src/main/java/org/web3j/crypto/StructuredDataEncoder.java index df8c70da7f..cb2b0bb88a 100644 --- a/crypto/src/main/java/org/web3j/crypto/StructuredDataEncoder.java +++ b/crypto/src/main/java/org/web3j/crypto/StructuredDataEncoder.java @@ -260,9 +260,9 @@ private byte[] convertToEncodedItem(String baseType, Object data) { rawValue.length); } } else if (baseType.equals("string")) { - hashBytes = ((String) data).getBytes(); + hashBytes = sha3(((String) data).getBytes()); } else if (baseType.equals("bytes")) { - hashBytes = Numeric.hexStringToByteArray((String) data); + hashBytes = sha3(Numeric.hexStringToByteArray((String) data)); } else { byte[] b = convertArgToBytes((String) data); BigInteger bi = new BigInteger(1, b); From 1d1c5e58bc37497fbf5f3f1b1b3b2ee150f3d697 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Mon, 12 Jun 2023 17:29:47 +0300 Subject: [PATCH 04/52] Revert "Revert "Merge pull request #1806 from apex-crypto/feature/event_from_log"" This reverts commit c4ccf388893e9fc4786cabf83eaa375d46ed88e3. --- .../codegen/SolidityFunctionWrapper.java | 82 +++++++++---------- .../codegen/SolidityFunctionWrapperTest.java | 77 +++++++++-------- .../build/java/EventParameters.java | 33 ++++---- 3 files changed, 93 insertions(+), 99 deletions(-) diff --git a/codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapper.java b/codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapper.java index c0d0ed67d0..a329d66a66 100644 --- a/codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapper.java +++ b/codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapper.java @@ -1697,47 +1697,15 @@ MethodSpec buildEventFlowableFunction( ParameterizedTypeName.get( ClassName.get(Flowable.class), ClassName.get("", responseClassName)); - MethodSpec.Builder flowableMethodBuilder = - MethodSpec.methodBuilder(generatedFunctionName) - .addModifiers(Modifier.PUBLIC) - .addParameter(EthFilter.class, FILTER) - .returns(parameterizedTypeName); - - TypeSpec converter = - TypeSpec.anonymousClassBuilder("") - .addSuperinterface( - ParameterizedTypeName.get( - ClassName.get(io.reactivex.functions.Function.class), - ClassName.get(Log.class), - ClassName.get("", responseClassName))) - .addMethod( - MethodSpec.methodBuilder("apply") - .addAnnotation(Override.class) - .addModifiers(Modifier.PUBLIC) - .addParameter(Log.class, "log") - .returns(ClassName.get("", responseClassName)) - .addStatement( - "$T eventValues = extractEventParametersWithLog(" - + buildEventDefinitionName(functionName) - + ", log)", - Contract.EventValuesWithLog.class) - .addStatement( - "$1T typedResponse = new $1T()", - ClassName.get("", responseClassName)) - .addCode( - buildTypedResponse( - "typedResponse", - indexedParameters, - nonIndexedParameters, - true)) - .addStatement("return typedResponse") - .build()) - .build(); - - flowableMethodBuilder.addStatement( - "return web3j.ethLogFlowable(filter).map($L)", converter); - - return flowableMethodBuilder.build(); + return MethodSpec.methodBuilder(generatedFunctionName) + .addModifiers(Modifier.PUBLIC) + .addParameter(EthFilter.class, FILTER) + .returns(parameterizedTypeName) + .addStatement( + "return web3j.ethLogFlowable(filter).map(log -> " + + getEventFromLogFunctionName(functionName) + + "(log))") + .build(); } MethodSpec buildDefaultEventFlowableFunction(String responseClassName, String functionName) { @@ -1813,6 +1781,34 @@ MethodSpec buildEventTransactionReceiptFunction( return transactionMethodBuilder.build(); } + MethodSpec buildEventLogFunction( + String responseClassName, + String functionName, + List indexedParameters, + List nonIndexedParameters) { + + String generatedFunctionName = getEventFromLogFunctionName(functionName); + return MethodSpec.methodBuilder(generatedFunctionName) + .addModifiers(Modifier.PUBLIC, Modifier.STATIC) + .addParameter(Log.class, "log") + .returns(ClassName.get("", responseClassName)) + .addStatement( + "$T eventValues = staticExtractEventParametersWithLog(" + + buildEventDefinitionName(functionName) + + ", log)", + Contract.EventValuesWithLog.class) + .addStatement("$1T typedResponse = new $1T()", ClassName.get("", responseClassName)) + .addCode( + buildTypedResponse( + "typedResponse", indexedParameters, nonIndexedParameters, true)) + .addStatement("return typedResponse") + .build(); + } + + private static String getEventFromLogFunctionName(String functionName) { + return "get" + Strings.capitaliseFirstLetter(functionName) + "EventFromLog"; + } + List buildEventFunctions( AbiDefinition functionDefinition, TypeSpec.Builder classBuilder) throws ClassNotFoundException { @@ -1853,7 +1849,9 @@ List buildEventFunctions( methods.add( buildEventTransactionReceiptFunction( responseClassName, functionName, indexedParameters, nonIndexedParameters)); - + methods.add( + buildEventLogFunction( + responseClassName, functionName, indexedParameters, nonIndexedParameters)); methods.add( buildEventFlowableFunction( responseClassName, functionName, indexedParameters, nonIndexedParameters)); diff --git a/codegen/src/test/java/org/web3j/codegen/SolidityFunctionWrapperTest.java b/codegen/src/test/java/org/web3j/codegen/SolidityFunctionWrapperTest.java index 257a51f042..2f15a1130e 100644 --- a/codegen/src/test/java/org/web3j/codegen/SolidityFunctionWrapperTest.java +++ b/codegen/src/test/java/org/web3j/codegen/SolidityFunctionWrapperTest.java @@ -695,21 +695,20 @@ public void testBuildEventConstantMultipleValueReturn() throws Exception { + " return responses;\n" + " }\n" + "\n" + + " public static TransferEventResponse getTransferEventFromLog(org.web3j.protocol.core.methods.response.Log log) {\n" + + " org.web3j.tx.Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(TRANSFER_EVENT, log);\n" + + " TransferEventResponse typedResponse = new TransferEventResponse();\n" + + " typedResponse.log = log;\n" + + " typedResponse.id = (byte[]) eventValues.getIndexedValues().get(0).getValue();\n" + + " typedResponse.from = (java.lang.String) eventValues.getIndexedValues().get(1).getValue();\n" + + " typedResponse.to = (java.lang.String) eventValues.getIndexedValues().get(2).getValue();\n" + + " typedResponse.value = (java.math.BigInteger) eventValues.getNonIndexedValues().get(0).getValue();\n" + + " typedResponse.message = (java.lang.String) eventValues.getNonIndexedValues().get(1).getValue();\n" + + " return typedResponse;\n" + + " }\n" + + "\n" + " public io.reactivex.Flowable transferEventFlowable(org.web3j.protocol.core.methods.request.EthFilter filter) {\n" - + " return web3j.ethLogFlowable(filter).map(new io.reactivex.functions.Function() {\n" - + " @java.lang.Override\n" - + " public TransferEventResponse apply(org.web3j.protocol.core.methods.response.Log log) {\n" - + " org.web3j.tx.Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(TRANSFER_EVENT, log);\n" - + " TransferEventResponse typedResponse = new TransferEventResponse();\n" - + " typedResponse.log = log;\n" - + " typedResponse.id = (byte[]) eventValues.getIndexedValues().get(0).getValue();\n" - + " typedResponse.from = (java.lang.String) eventValues.getIndexedValues().get(1).getValue();\n" - + " typedResponse.to = (java.lang.String) eventValues.getIndexedValues().get(2).getValue();\n" - + " typedResponse.value = (java.math.BigInteger) eventValues.getNonIndexedValues().get(0).getValue();\n" - + " typedResponse.message = (java.lang.String) eventValues.getNonIndexedValues().get(1).getValue();\n" - + " return typedResponse;\n" - + " }\n" - + " });\n" + + " return web3j.ethLogFlowable(filter).map(log -> getTransferEventFromLog(log));\n" + " }\n" + "\n" + " public io.reactivex.Flowable transferEventFlowable(org.web3j.protocol.core.DefaultBlockParameter startBlock, org.web3j.protocol.core.DefaultBlockParameter endBlock) {\n" @@ -731,7 +730,7 @@ public void testBuildEventConstantMultipleValueReturn() throws Exception { + " }\n" + "}\n"; - assertEquals(builder.build().toString(), (expected)); + assertEquals(expected, builder.build().toString()); } @Test @@ -780,22 +779,21 @@ public void testBuildEventWithNamedAndNoNamedParameters() throws Exception { + " return responses;\n" + " }\n" + "\n" + + " public static TransferEventResponse getTransferEventFromLog(org.web3j.protocol.core.methods.response.Log log) {\n" + + " org.web3j.tx.Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(TRANSFER_EVENT, log);\n" + + " TransferEventResponse typedResponse = new TransferEventResponse();\n" + + " typedResponse.log = log;\n" + + " typedResponse.id = (byte[]) eventValues.getIndexedValues().get(0).getValue();\n" + + " typedResponse.param1 = (java.lang.String) eventValues.getIndexedValues().get(1).getValue();\n" + + " typedResponse.to = (java.lang.String) eventValues.getIndexedValues().get(2).getValue();\n" + + " typedResponse.param3 = (byte[]) eventValues.getNonIndexedValues().get(0).getValue();\n" + + " typedResponse.param4 = (java.math.BigInteger) eventValues.getNonIndexedValues().get(1).getValue();\n" + + " typedResponse.message = (java.lang.String) eventValues.getNonIndexedValues().get(2).getValue();\n" + + " return typedResponse;\n" + + " }\n" + + "\n" + " public io.reactivex.Flowable transferEventFlowable(org.web3j.protocol.core.methods.request.EthFilter filter) {\n" - + " return web3j.ethLogFlowable(filter).map(new io.reactivex.functions.Function() {\n" - + " @java.lang.Override\n" - + " public TransferEventResponse apply(org.web3j.protocol.core.methods.response.Log log) {\n" - + " org.web3j.tx.Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(TRANSFER_EVENT, log);\n" - + " TransferEventResponse typedResponse = new TransferEventResponse();\n" - + " typedResponse.log = log;\n" - + " typedResponse.id = (byte[]) eventValues.getIndexedValues().get(0).getValue();\n" - + " typedResponse.param1 = (java.lang.String) eventValues.getIndexedValues().get(1).getValue();\n" - + " typedResponse.to = (java.lang.String) eventValues.getIndexedValues().get(2).getValue();\n" - + " typedResponse.param3 = (byte[]) eventValues.getNonIndexedValues().get(0).getValue();\n" - + " typedResponse.param4 = (java.math.BigInteger) eventValues.getNonIndexedValues().get(1).getValue();\n" - + " typedResponse.message = (java.lang.String) eventValues.getNonIndexedValues().get(2).getValue();\n" - + " return typedResponse;\n" - + " }\n" - + " });\n" + + " return web3j.ethLogFlowable(filter).map(log -> getTransferEventFromLog(log));\n" + " }\n" + "\n" + " public io.reactivex.Flowable transferEventFlowable(org.web3j.protocol.core.DefaultBlockParameter startBlock, org.web3j.protocol.core.DefaultBlockParameter endBlock) {\n" @@ -851,17 +849,16 @@ public void testBuildEventWithNativeList() throws Exception { + " return responses;\n" + " }\n" + "\n" + + " public static TransferEventResponse getTransferEventFromLog(org.web3j.protocol.core.methods.response.Log log) {\n" + + " org.web3j.tx.Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(TRANSFER_EVENT, log);\n" + + " TransferEventResponse typedResponse = new TransferEventResponse();\n" + + " typedResponse.log = log;\n" + + " typedResponse.array = (java.util.List) ((org.web3j.abi.datatypes.Array) eventValues.getNonIndexedValues().get(0)).getNativeValueCopy();\n" + + " return typedResponse;\n" + + " }\n" + + "\n" + " public io.reactivex.Flowable transferEventFlowable(org.web3j.protocol.core.methods.request.EthFilter filter) {\n" - + " return web3j.ethLogFlowable(filter).map(new io.reactivex.functions.Function() {\n" - + " @java.lang.Override\n" - + " public TransferEventResponse apply(org.web3j.protocol.core.methods.response.Log log) {\n" - + " org.web3j.tx.Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(TRANSFER_EVENT, log);\n" - + " TransferEventResponse typedResponse = new TransferEventResponse();\n" - + " typedResponse.log = log;\n" - + " typedResponse.array = (java.util.List) ((org.web3j.abi.datatypes.Array) eventValues.getNonIndexedValues().get(0)).getNativeValueCopy();\n" - + " return typedResponse;\n" - + " }\n" - + " });\n" + + " return web3j.ethLogFlowable(filter).map(log -> getTransferEventFromLog(log));\n" + " }\n" + "\n" + " public io.reactivex.Flowable transferEventFlowable(org.web3j.protocol.core.DefaultBlockParameter startBlock, org.web3j.protocol.core.DefaultBlockParameter endBlock) {\n" diff --git a/codegen/src/test/resources/solidity/eventparameters/build/java/EventParameters.java b/codegen/src/test/resources/solidity/eventparameters/build/java/EventParameters.java index 1a1850c58d..0fbc8ea5db 100644 --- a/codegen/src/test/resources/solidity/eventparameters/build/java/EventParameters.java +++ b/codegen/src/test/resources/solidity/eventparameters/build/java/EventParameters.java @@ -1,7 +1,6 @@ package org.web3j.unittests.java; import io.reactivex.Flowable; -import io.reactivex.functions.Function; import java.math.BigInteger; import java.util.ArrayList; import java.util.Arrays; @@ -11,6 +10,7 @@ import org.web3j.abi.TypeReference; import org.web3j.abi.datatypes.Address; import org.web3j.abi.datatypes.Event; +import org.web3j.abi.datatypes.Function; import org.web3j.abi.datatypes.Type; import org.web3j.abi.datatypes.Utf8String; import org.web3j.abi.datatypes.generated.Uint256; @@ -82,20 +82,19 @@ public static List getTestEventEvents(TransactionReceipt return responses; } + public static TestEventEventResponse getTestEventEventFromLog(Log log) { + Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(TESTEVENT_EVENT, log); + TestEventEventResponse typedResponse = new TestEventEventResponse(); + typedResponse.log = log; + typedResponse._contractNumber = (BigInteger) eventValues.getIndexedValues().get(0).getValue(); + typedResponse.param1 = (byte[]) eventValues.getIndexedValues().get(1).getValue(); + typedResponse.param2 = (String) eventValues.getNonIndexedValues().get(0).getValue(); + typedResponse.param3 = (String) eventValues.getNonIndexedValues().get(1).getValue(); + return typedResponse; + } + public Flowable testEventEventFlowable(EthFilter filter) { - return web3j.ethLogFlowable(filter).map(new Function() { - @Override - public TestEventEventResponse apply(Log log) { - Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(TESTEVENT_EVENT, log); - TestEventEventResponse typedResponse = new TestEventEventResponse(); - typedResponse.log = log; - typedResponse._contractNumber = (BigInteger) eventValues.getIndexedValues().get(0).getValue(); - typedResponse.param1 = (byte[]) eventValues.getIndexedValues().get(1).getValue(); - typedResponse.param2 = (String) eventValues.getNonIndexedValues().get(0).getValue(); - typedResponse.param3 = (String) eventValues.getNonIndexedValues().get(1).getValue(); - return typedResponse; - } - }); + return web3j.ethLogFlowable(filter).map(log -> getTestEventEventFromLog(log)); } public Flowable testEventEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) { @@ -105,21 +104,21 @@ public Flowable testEventEventFlowable(DefaultBlockParam } public RemoteFunctionCall _contractNumber() { - final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function(FUNC__CONTRACTNUMBER, + final Function function = new Function(FUNC__CONTRACTNUMBER, Arrays.asList(), Arrays.>asList(new TypeReference() {})); return executeRemoteCallSingleValueReturn(function, BigInteger.class); } public RemoteFunctionCall _testAddress() { - final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function(FUNC__TESTADDRESS, + final Function function = new Function(FUNC__TESTADDRESS, Arrays.asList(), Arrays.>asList(new TypeReference
() {})); return executeRemoteCallSingleValueReturn(function, String.class); } public RemoteFunctionCall testEvent() { - final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function( + final Function function = new Function( FUNC_TESTEVENT, Arrays.asList(), Collections.>emptyList()); From 0219f7b4861464d1a9ba229067d91a97430a95d7 Mon Sep 17 00:00:00 2001 From: Raphael Vullriede Date: Wed, 14 Jun 2023 11:27:40 +0200 Subject: [PATCH 05/52] make it clear a previously filter is being reinstalled --- .../src/main/java/org/web3j/protocol/core/filters/Filter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/web3j/protocol/core/filters/Filter.java b/core/src/main/java/org/web3j/protocol/core/filters/Filter.java index bad17d53ec..c755135512 100644 --- a/core/src/main/java/org/web3j/protocol/core/filters/Filter.java +++ b/core/src/main/java/org/web3j/protocol/core/filters/Filter.java @@ -160,7 +160,7 @@ private void pollFilter(EthFilter ethFilter) { protected abstract void process(List logResults); private void reinstallFilter() { - log.warn("The filter has not been found. Filter id: " + filterId); + log.warn("Previously installed filter has not been found, trying to reinstall. Filter id: {}", filterId); schedule.cancel(false); this.run(scheduledExecutorService, blockTime); } @@ -203,4 +203,4 @@ void throwException(Response.Error error) { void throwException(Throwable cause) { throw new FilterException("Error sending request", cause); } -} +} \ No newline at end of file From e5bb9a99d9f198eb4926be5b101b426f55b74632 Mon Sep 17 00:00:00 2001 From: Raphael Vullriede Date: Wed, 14 Jun 2023 11:41:35 +0200 Subject: [PATCH 06/52] appy spotLess --- .../main/java/org/web3j/protocol/core/filters/Filter.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/web3j/protocol/core/filters/Filter.java b/core/src/main/java/org/web3j/protocol/core/filters/Filter.java index c755135512..a382dcf19f 100644 --- a/core/src/main/java/org/web3j/protocol/core/filters/Filter.java +++ b/core/src/main/java/org/web3j/protocol/core/filters/Filter.java @@ -160,7 +160,9 @@ private void pollFilter(EthFilter ethFilter) { protected abstract void process(List logResults); private void reinstallFilter() { - log.warn("Previously installed filter has not been found, trying to reinstall. Filter id: {}", filterId); + log.warn( + "Previously installed filter has not been found, trying to reinstall. Filter id: {}", + filterId); schedule.cancel(false); this.run(scheduledExecutorService, blockTime); } @@ -203,4 +205,4 @@ void throwException(Response.Error error) { void throwException(Throwable cause) { throw new FilterException("Error sending request", cause); } -} \ No newline at end of file +} From e02db9b38f2569b8679aa0e665e680001cc270f9 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Wed, 14 Jun 2023 12:51:12 +0300 Subject: [PATCH 07/52] update class loader --- .../web3j/codegen/unit/gen/ClassProvider.java | 7 ++ .../codegen/unit/gen/CompilerClassLoader.java | 70 +++++++++++++++++-- 2 files changed, 70 insertions(+), 7 deletions(-) diff --git a/codegen/src/main/java/org/web3j/codegen/unit/gen/ClassProvider.java b/codegen/src/main/java/org/web3j/codegen/unit/gen/ClassProvider.java index f059b527ba..cf1c73b850 100644 --- a/codegen/src/main/java/org/web3j/codegen/unit/gen/ClassProvider.java +++ b/codegen/src/main/java/org/web3j/codegen/unit/gen/ClassProvider.java @@ -44,6 +44,13 @@ public final List> getClasses() throws IOException { .collect(Collectors.toList()); } + public final void loadAdditionalClasses(List> loadedClasses) + throws IOException, ClassNotFoundException { + final List loadedClassesNames = + loadedClasses.stream().map(Class::getSimpleName).toList(); + ((CompilerClassLoader) classLoader).loadCompiledClasses(loadedClassesNames); + } + private String toClassName(final String sourceFile) { try { return sourceFile diff --git a/codegen/src/main/java/org/web3j/codegen/unit/gen/CompilerClassLoader.java b/codegen/src/main/java/org/web3j/codegen/unit/gen/CompilerClassLoader.java index 2cd2633422..77bb11cb5f 100644 --- a/codegen/src/main/java/org/web3j/codegen/unit/gen/CompilerClassLoader.java +++ b/codegen/src/main/java/org/web3j/codegen/unit/gen/CompilerClassLoader.java @@ -17,6 +17,7 @@ import java.net.URL; import java.net.URLDecoder; import java.nio.file.Files; +import java.nio.file.Path; import java.nio.file.Paths; import java.util.Arrays; import java.util.List; @@ -45,15 +46,51 @@ public CompilerClassLoader(final File outputDir, final URL... urls) { this.urls = urls; } + public void loadCompiledClasses(final List loadedClasses) throws IOException { + Files.walk(Paths.get(outputDir.getAbsoluteFile().toURI())) + .filter(Files::isRegularFile) + .filter( + filePath -> { + String path = filePath.toString(); + String fileName = + path.substring( + path.lastIndexOf("/") + 1, path.lastIndexOf(".")); + return !loadedClasses.contains(fileName); + }) + .forEach( + filePath -> { + String path = filePath.toString(); + String fileName = + path.substring( + outputDir.toString().length() + 1, + path.lastIndexOf(".")) + .replaceAll("/", "."); + Optional bytes = readBytes(filePath.toFile()); + defineClass(fileName, bytes.get(), 0, bytes.get().length); + }); + } + @Override protected Class findClass(final String name) throws ClassNotFoundException { - return compileClass(name) - .flatMap(this::readBytes) - .map(bytes -> defineClass(name, bytes, 0, bytes.length)) + List> loadedClasses = + compileClass(name).stream() + .map( + classFile -> { + Optional bytes = readBytes(classFile); + return defineClass( + extractClassName(classFile.toString()), + bytes.get(), + 0, + bytes.get().length); + }) + .collect(Collectors.toList()); + return loadedClasses.stream() + .filter(c -> c.getName().equals(name)) + .findFirst() .orElseThrow(() -> new ClassNotFoundException(name)); } - private Optional compileClass(final String name) { + private List compileClass(final String name) { final String path = name.replace(".", File.separator); final JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); @@ -79,7 +116,7 @@ private Optional compileClass(final String name) { } if (!sourceFile.exists()) { - return Optional.empty(); + return List.of(); } final Iterable javaFileObjects = @@ -93,8 +130,27 @@ private Optional compileClass(final String name) { final CompilationTask task = compiler.getTask(null, null, System.err::println, options, null, javaFileObjects); - final File classFile = new File(outputDir, path + ".class"); - return task.call() ? Optional.of(classFile) : Optional.empty(); + if (task.call()) { + try { + return Files.walk(Paths.get(outputDir.getAbsoluteFile().toURI())) + .filter(Files::isRegularFile) + .filter( + filePath -> { + String fileName = extractClassName(filePath.toString()); + return fileName.startsWith(name); + }) + .map(Path::toFile) + .toList(); + } catch (IOException e) { + throw new IllegalStateException("Unable to process compiled classes: ", e); + } + } + return List.of(); + } + + private String extractClassName(final String pathName) { + return pathName.substring(outputDir.toString().length() + 1, pathName.lastIndexOf(".")) + .replaceAll("/", "."); } private String buildClassPath() { From f935cc6b7352b1adf097efcd045ffbdf10a1cf96 Mon Sep 17 00:00:00 2001 From: Raphael Vullriede Date: Wed, 14 Jun 2023 12:19:18 +0200 Subject: [PATCH 08/52] add the eth_baseFee call --- core/src/main/java/org/web3j/protocol/core/Ethereum.java | 3 +++ .../main/java/org/web3j/protocol/core/JsonRpc2_0Web3j.java | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/core/src/main/java/org/web3j/protocol/core/Ethereum.java b/core/src/main/java/org/web3j/protocol/core/Ethereum.java index 49a405251e..2b22361064 100644 --- a/core/src/main/java/org/web3j/protocol/core/Ethereum.java +++ b/core/src/main/java/org/web3j/protocol/core/Ethereum.java @@ -22,6 +22,7 @@ import org.web3j.protocol.core.methods.response.DbPutHex; import org.web3j.protocol.core.methods.response.DbPutString; import org.web3j.protocol.core.methods.response.EthAccounts; +import org.web3j.protocol.core.methods.response.EthBaseFee; import org.web3j.protocol.core.methods.response.EthBlock; import org.web3j.protocol.core.methods.response.EthBlockNumber; import org.web3j.protocol.core.methods.response.EthChainId; @@ -112,6 +113,8 @@ public interface Ethereum { Request ethMaxPriorityFeePerGas(); + Request ethBaseFee(); + Request ethFeeHistory( int blockCount, DefaultBlockParameter newestBlock, List rewardPercentiles); diff --git a/core/src/main/java/org/web3j/protocol/core/JsonRpc2_0Web3j.java b/core/src/main/java/org/web3j/protocol/core/JsonRpc2_0Web3j.java index c080864143..1e15629ed1 100644 --- a/core/src/main/java/org/web3j/protocol/core/JsonRpc2_0Web3j.java +++ b/core/src/main/java/org/web3j/protocol/core/JsonRpc2_0Web3j.java @@ -34,6 +34,7 @@ import org.web3j.protocol.core.methods.response.DbPutHex; import org.web3j.protocol.core.methods.response.DbPutString; import org.web3j.protocol.core.methods.response.EthAccounts; +import org.web3j.protocol.core.methods.response.EthBaseFee; import org.web3j.protocol.core.methods.response.EthBlock; import org.web3j.protocol.core.methods.response.EthBlockNumber; import org.web3j.protocol.core.methods.response.EthChainId; @@ -233,6 +234,12 @@ public Request ethMaxPriorityFeePerGas() { EthMaxPriorityFeePerGas.class); } + @Override + public Request ethBaseFee() { + return new Request<>( + "eth_baseFee", Collections.emptyList(), web3jService, EthBaseFee.class); + } + @Override public Request ethFeeHistory( int blockCount, DefaultBlockParameter newestBlock, List rewardPercentiles) { From c663539dd484124a6270667179a1a13e3ae4d2b9 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Wed, 14 Jun 2023 13:33:58 +0300 Subject: [PATCH 09/52] remove first approach --- .../web3j/codegen/unit/gen/ClassProvider.java | 7 ------ .../codegen/unit/gen/CompilerClassLoader.java | 24 ------------------- 2 files changed, 31 deletions(-) diff --git a/codegen/src/main/java/org/web3j/codegen/unit/gen/ClassProvider.java b/codegen/src/main/java/org/web3j/codegen/unit/gen/ClassProvider.java index cf1c73b850..f059b527ba 100644 --- a/codegen/src/main/java/org/web3j/codegen/unit/gen/ClassProvider.java +++ b/codegen/src/main/java/org/web3j/codegen/unit/gen/ClassProvider.java @@ -44,13 +44,6 @@ public final List> getClasses() throws IOException { .collect(Collectors.toList()); } - public final void loadAdditionalClasses(List> loadedClasses) - throws IOException, ClassNotFoundException { - final List loadedClassesNames = - loadedClasses.stream().map(Class::getSimpleName).toList(); - ((CompilerClassLoader) classLoader).loadCompiledClasses(loadedClassesNames); - } - private String toClassName(final String sourceFile) { try { return sourceFile diff --git a/codegen/src/main/java/org/web3j/codegen/unit/gen/CompilerClassLoader.java b/codegen/src/main/java/org/web3j/codegen/unit/gen/CompilerClassLoader.java index 77bb11cb5f..565a7d32b2 100644 --- a/codegen/src/main/java/org/web3j/codegen/unit/gen/CompilerClassLoader.java +++ b/codegen/src/main/java/org/web3j/codegen/unit/gen/CompilerClassLoader.java @@ -46,30 +46,6 @@ public CompilerClassLoader(final File outputDir, final URL... urls) { this.urls = urls; } - public void loadCompiledClasses(final List loadedClasses) throws IOException { - Files.walk(Paths.get(outputDir.getAbsoluteFile().toURI())) - .filter(Files::isRegularFile) - .filter( - filePath -> { - String path = filePath.toString(); - String fileName = - path.substring( - path.lastIndexOf("/") + 1, path.lastIndexOf(".")); - return !loadedClasses.contains(fileName); - }) - .forEach( - filePath -> { - String path = filePath.toString(); - String fileName = - path.substring( - outputDir.toString().length() + 1, - path.lastIndexOf(".")) - .replaceAll("/", "."); - Optional bytes = readBytes(filePath.toFile()); - defineClass(fileName, bytes.get(), 0, bytes.get().length); - }); - } - @Override protected Class findClass(final String name) throws ClassNotFoundException { List> loadedClasses = From d94650f074106727de92fbabd9651366769f5db2 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Fri, 16 Jun 2023 12:54:43 +0300 Subject: [PATCH 10/52] update versions --- gradle.properties | 2 +- gradle/publish/build.gradle | 15 +++++++-------- integration-tests/build.gradle | 4 ++-- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/gradle.properties b/gradle.properties index af7574658f..594713b04f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ group=org.web3j -version=4.10.1-RC +version=4.10.1-SNAPSHOT diff --git a/gradle/publish/build.gradle b/gradle/publish/build.gradle index 27d9a36139..5ffa61d0a8 100644 --- a/gradle/publish/build.gradle +++ b/gradle/publish/build.gradle @@ -81,11 +81,10 @@ nexusStaging { packageGroup = rootProject.group } - -//signing { -// sign publishing.publications.maven -// def signingKey = new File("$rootDir/web3j.asc") -// if (signingKey.exists()) { -// useInMemoryPgpKeys(signingKey.getText('UTF-8'), System.getenv('GPG_PASSPHRASE')) -// } -//} +signing { + sign publishing.publications.maven + def signingKey = new File("$rootDir/web3j.asc") + if (signingKey.exists()) { + useInMemoryPgpKeys(signingKey.getText('UTF-8'), System.getenv('GPG_PASSPHRASE')) + } +} diff --git a/integration-tests/build.gradle b/integration-tests/build.gradle index cc952b9892..4c2f7ca57a 100644 --- a/integration-tests/build.gradle +++ b/integration-tests/build.gradle @@ -9,8 +9,8 @@ repositories { maven { url "https://splunk.jfrog.io/splunk/ext-releases-local" } } ext { - besuPluginVersion = '23.4.0' - besuInternalVersion = '23.4.0' + besuPluginVersion = '23.4.1' + besuInternalVersion = '23.4.1' besuInternalCryptoVersion = '23.1.3' besuCryptoDepVersion = '0.7.1' } From 24f90882f37efb7c7567636ecf2e95c82646dfcd Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Fri, 16 Jun 2023 14:31:20 +0300 Subject: [PATCH 11/52] Bump snapshot --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 594713b04f..fab63095f7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ group=org.web3j -version=4.10.1-SNAPSHOT +version=4.10.2-SNAPSHOT From ffbfa7ecd05abf018c3d3f3d4ad81aaf2b3dab7b Mon Sep 17 00:00:00 2001 From: Jorge <46056498+jorgectf@users.noreply.github.com> Date: Mon, 3 Jul 2023 09:21:43 +0200 Subject: [PATCH 12/52] Add CodeQL workflow --- .github/workflows/codeql.yml | 57 ++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000000..7038aa5d5b --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,57 @@ +name: "CodeQL" + +on: + push: + branches: [ 'master' ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ 'master' ] + schedule: + - cron: '35 2 * * 3' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'java' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Use only 'java' to analyze code written in Java, Kotlin or both + # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up JDK 17 + uses: actions/setup-java@v1 + with: + java-version: 17 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + - name: Build + run: ./gradlew check jacocoRootTestReport + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" From d33d53b19ede9b8e18f494e71fc1698cd46c2874 Mon Sep 17 00:00:00 2001 From: Mehrdad Salehi Date: Mon, 17 Jul 2023 13:22:12 +0330 Subject: [PATCH 13/52] Add Bloom filter utility. --- .../src/main/java/org/web3j/utils/Bloom.java | 213 ++ .../test/java/org/web3j/utils/BloomTest.java | 2240 +++++++++++++++++ 2 files changed, 2453 insertions(+) create mode 100644 utils/src/main/java/org/web3j/utils/Bloom.java create mode 100644 utils/src/test/java/org/web3j/utils/BloomTest.java diff --git a/utils/src/main/java/org/web3j/utils/Bloom.java b/utils/src/main/java/org/web3j/utils/Bloom.java new file mode 100644 index 0000000000..a8e072b5b1 --- /dev/null +++ b/utils/src/main/java/org/web3j/utils/Bloom.java @@ -0,0 +1,213 @@ +/* + * Copyright 2019 Web3 Labs Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.web3j.utils; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.util.Arrays; + +import org.web3j.crypto.Hash; + +/** + * Ethereum Bloom filter. can be used to create a filter or test an item (topic) for a given filter. + * + * @author Mehrdad Salehi + */ +public class Bloom { + // implemented as Ethereum yellow paper, section 4.3.1 + private static final int BYTES_LENGTH = 256; + private final byte[] bytes = new byte[BYTES_LENGTH]; + + /** + * test topics against a bloom filter. + * + * @param bloomBytes the filter bytes. + * @param topics topics to be tested + * @return true if all topics is present in filter, otherwise returns false + * @throws IllegalArgumentException if bloomBytes length is not 256, or it is null, or topics is + * null. + */ + public static boolean test(byte[] bloomBytes, byte[]... topics) { + Bloom bloom = new Bloom(bloomBytes); + if (topics == null) { + throw new IllegalArgumentException("topics can not be null"); + } + for (byte[] topic : topics) { + if (!bloom.test(topic)) { + return false; + } + } + return true; + } + + /** + * test topics against a bloom filter. + * + * @param bloomBytes the filter bytes. + * @param topics topics to be tested + * @return true if all topics is present in filter, otherwise returns false + * @throws IllegalArgumentException if bloomBytes length is not 256, or it is null, or topics is + * null. + */ + public static boolean test(String bloomBytes, String... topics) { + Bloom bloom = new Bloom(bloomBytes); + if (topics == null) { + throw new IllegalArgumentException("topics can not be null"); + } + for (String topic : topics) { + if (!bloom.test(topic)) { + return false; + } + } + return true; + } + + /** creates empty filter (all bits set to zero). */ + public Bloom() {} + + /** + * create filter from hex string. + * + * @param bytes the filter data. its length must be 256 bytes. + * @throws IllegalArgumentException if bytes length is not 256, or it is null. + */ + public Bloom(String bytes) { + if (bytes == null) { + throw new IllegalArgumentException("bytes can not be null"); + } + setBytes(Numeric.hexStringToByteArray(bytes)); + } + + /** + * create filter from bytes. + * + * @param bytes the filter data. its length must be 256 bytes. + * @throws IllegalArgumentException if bytes length is not 256, or it is null. + */ + public Bloom(byte[] bytes) { + setBytes(bytes); + } + + /** + * add a byte array (topic) to filter. after adding, test() will return true for this topic. + * + * @param topic the topic hex string. + * @throws IllegalArgumentException if topic is null. + */ + public void add(String topic) { + if (topic == null) { + throw new IllegalArgumentException("topic can not be null"); + } + add(Numeric.hexStringToByteArray(topic)); + } + + /** + * add a byte array (topic) to filter. after adding, test() will return true for this topic. + * + * @param topic the topic hex string. + * @throws IllegalArgumentException if topic is null. + */ + public void add(byte[] topic) { + if (topic == null) { + throw new IllegalArgumentException("topic can not be null"); + } + BloomValues b = getBloomValues(topic); + this.bytes[b.index[0]] |= b.value[0]; + this.bytes[b.index[1]] |= b.value[1]; + this.bytes[b.index[2]] |= b.value[2]; + } + + /** + * test presents of a topic. for every topic added by add() this returns true. + * + * @param topic the topic hex string. + * @return true if topic is present (false-positive is possible), and false if topic is not + * present(false-negative is not possible). + * @throws IllegalArgumentException if topic is null. + */ + public boolean test(String topic) { + if (topic == null) { + throw new IllegalArgumentException("topic can not be null"); + } + return test(Numeric.hexStringToByteArray(topic)); + } + + /** + * test presents of a topic. for every topic added by add() this returns true. + * + * @param topic the topic bytes. + * @return true if topic is present (false-positive is possible), and false if topic is not + * present(false-negative is not possible). + * @throws IllegalArgumentException if topic is null. + */ + public boolean test(byte[] topic) { + BloomValues b = getBloomValues(topic); + return b.value[0] == (b.value[0] & this.bytes[b.index[0]]) + && b.value[1] == (b.value[1] & this.bytes[b.index[1]]) + && b.value[2] == (b.value[2] & this.bytes[b.index[2]]); + } + + @Override + public String toString() { + return getBytesHexString(); + } + + /** @return Bloom filter bytes as hex string */ + public String getBytesHexString() { + return Numeric.toHexString(this.bytes); + } + + /** @return Bloom filter bytes (returns a copy) */ + public byte[] getBytes() { + byte[] bytesCopy = new byte[BYTES_LENGTH]; + System.arraycopy(this.bytes, 0, bytesCopy, 0, BYTES_LENGTH); + return bytesCopy; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Bloom bloom = (Bloom) o; + return Arrays.equals(bytes, bloom.bytes); + } + + @Override + public int hashCode() { + return Arrays.hashCode(bytes); + } + + private void setBytes(byte[] bytes) { + if (bytes == null) { + throw new IllegalArgumentException("bytes can not be null"); + } + if (bytes.length != BYTES_LENGTH) { + throw new IllegalArgumentException("bytes must be 256 in length"); + } + System.arraycopy(bytes, 0, this.bytes, 0, BYTES_LENGTH); + } + + private BloomValues getBloomValues(byte[] item) { + final byte[] hash = Hash.sha3(item); + byte v1 = (byte) (1 << (hash[1] & 0x7)); + byte v2 = (byte) (1 << (hash[3] & 0x7)); + byte v3 = (byte) (1 << (hash[5] & 0x7)); + ByteBuffer byteBuffer = ByteBuffer.wrap(hash).order(ByteOrder.BIG_ENDIAN); + int i1 = BYTES_LENGTH - ((byteBuffer.getShort(0) & 0x7ff) >> 3) - 1; + int i2 = BYTES_LENGTH - ((byteBuffer.getShort(2) & 0x7ff) >> 3) - 1; + int i3 = BYTES_LENGTH - ((byteBuffer.getShort(4) & 0x7ff) >> 3) - 1; + return new BloomValues(new byte[] {v1, v2, v3}, new int[] {i1, i2, i3}); + } + + private record BloomValues(byte[] value, int[] index) {} +} diff --git a/utils/src/test/java/org/web3j/utils/BloomTest.java b/utils/src/test/java/org/web3j/utils/BloomTest.java new file mode 100644 index 0000000000..a514eda74f --- /dev/null +++ b/utils/src/test/java/org/web3j/utils/BloomTest.java @@ -0,0 +1,2240 @@ +/* + * Copyright 2019 Web3 Labs Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.web3j.utils; + +import java.util.ArrayList; +import java.util.List; + +import org.junit.jupiter.api.Test; + +import static java.util.Arrays.asList; +import static org.junit.jupiter.api.Assertions.*; + +/** @author Mehrdad Salehi */ +public class BloomTest { + + // Ethereum logsBloom and logs for block + // '0xd865345454f7b3ea4c65bbeaf420d1aa591a788bb49bf45839f51d85cecb1d50' + // using real ethereum data is a great test case for Bloom class. + private static final String ethereumSampleLogsBloom = + "0xa165399f470c1660df9af0a2889b452611324e442c01850e6181081410e90f8202f4a3c1804802a983d03b4200160b230e3502028c06bdde5420de9f236cd7b82abec259ceb0182e9a4beb2c760796b088a125920164aa87cff59445c9b04820faa7010c96127e0f6595795782baae6e90d0860833126f3e821313d004ac002c086a0d5eee8a0199a45c52e8070a00fea4c89c81d9de069f11280646d611a92caec934758be0a6406f3e48eddc520ca1ccd2428d6b7b8acf060fda631f768607545c719211840cd687b89531054db2cf0c61423897e67fd03ec1441a007a64ed7fb3e94cc25408a1050cf002422108a485801d9a4dd8b04bab8d7b632308dc4b"; + private static final List ethereumSampleLogs = new ArrayList<>(); + + static { + // each line is a log (consisting of its topics) + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000006b75d8af000000e20b7a7ddf000ba900b4009a80", + "0x0000000000000000000000001cf4b25ea65cec291fd17aa3769867c32de0fff3")); + ethereumSampleLogs.addAll( + asList( + "0x0981d9774a59a703db85f5eaa23672283ea31106", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000001cf4b25ea65cec291fd17aa3769867c32de0fff3", + "0x0000000000000000000000000981d9774a59a703db85f5eaa23672283ea31106")); + ethereumSampleLogs.addAll( + asList( + "0x0981d9774a59a703db85f5eaa23672283ea31106", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000001cf4b25ea65cec291fd17aa3769867c32de0fff3", + "0x0000000000000000000000006b75d8af000000e20b7a7ddf000ba900b4009a80")); + ethereumSampleLogs.addAll( + asList( + "0x1cf4b25ea65cec291fd17aa3769867c32de0fff3", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x1cf4b25ea65cec291fd17aa3769867c32de0fff3", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000006b75d8af000000e20b7a7ddf000ba900b4009a80", + "0x0000000000000000000000006b75d8af000000e20b7a7ddf000ba900b4009a80")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000006b75d8af000000e20b7a7ddf000ba900b4009a80", + "0x000000000000000000000000f8d443502d122ef30743d2eafc4651d3501343de")); + ethereumSampleLogs.addAll( + asList( + "0xedabd7ee017fbac322d65aea7497899a211a7124", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000f8d443502d122ef30743d2eafc4651d3501343de", + "0x000000000000000000000000edabd7ee017fbac322d65aea7497899a211a7124")); + ethereumSampleLogs.addAll( + asList( + "0xedabd7ee017fbac322d65aea7497899a211a7124", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000f8d443502d122ef30743d2eafc4651d3501343de", + "0x0000000000000000000000006b75d8af000000e20b7a7ddf000ba900b4009a80")); + ethereumSampleLogs.addAll( + asList( + "0xf8d443502d122ef30743d2eafc4651d3501343de", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0xf8d443502d122ef30743d2eafc4651d3501343de", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000006b75d8af000000e20b7a7ddf000ba900b4009a80", + "0x0000000000000000000000006b75d8af000000e20b7a7ddf000ba900b4009a80")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x0000000000000000000000001cf4b25ea65cec291fd17aa3769867c32de0fff3")); + ethereumSampleLogs.addAll( + asList( + "0x0981d9774a59a703db85f5eaa23672283ea31106", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000001cf4b25ea65cec291fd17aa3769867c32de0fff3", + "0x0000000000000000000000000981d9774a59a703db85f5eaa23672283ea31106")); + ethereumSampleLogs.addAll( + asList( + "0x0981d9774a59a703db85f5eaa23672283ea31106", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000001cf4b25ea65cec291fd17aa3769867c32de0fff3", + "0x000000000000000000000000f8eb9c2248ce3b6357c7e7067d4d16d62b7ed004")); + ethereumSampleLogs.addAll( + asList( + "0x1cf4b25ea65cec291fd17aa3769867c32de0fff3", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x1cf4b25ea65cec291fd17aa3769867c32de0fff3", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x000000000000000000000000f8eb9c2248ce3b6357c7e7067d4d16d62b7ed004")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x000000000000000000000000def171fe48cf0115b1d80b88dc8eab59176fee57")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000def171fe48cf0115b1d80b88dc8eab59176fee57", + "0x000000000000000000000000f8d443502d122ef30743d2eafc4651d3501343de")); + ethereumSampleLogs.addAll( + asList( + "0xedabd7ee017fbac322d65aea7497899a211a7124", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000f8d443502d122ef30743d2eafc4651d3501343de", + "0x000000000000000000000000edabd7ee017fbac322d65aea7497899a211a7124")); + ethereumSampleLogs.addAll( + asList( + "0xedabd7ee017fbac322d65aea7497899a211a7124", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000f8d443502d122ef30743d2eafc4651d3501343de", + "0x00000000000000000000000074de5d4fcbf63e00296fd95d33236b9794016631")); + ethereumSampleLogs.addAll( + asList( + "0xf8d443502d122ef30743d2eafc4651d3501343de", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0xf8d443502d122ef30743d2eafc4651d3501343de", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x000000000000000000000000def171fe48cf0115b1d80b88dc8eab59176fee57", + "0x00000000000000000000000074de5d4fcbf63e00296fd95d33236b9794016631")); + ethereumSampleLogs.addAll( + asList( + "0xedabd7ee017fbac322d65aea7497899a211a7124", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000074de5d4fcbf63e00296fd95d33236b9794016631", + "0x000000000000000000000000edabd7ee017fbac322d65aea7497899a211a7124")); + ethereumSampleLogs.addAll( + asList( + "0xedabd7ee017fbac322d65aea7497899a211a7124", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000074de5d4fcbf63e00296fd95d33236b9794016631", + "0x000000000000000000000000d1a041eb146e5d965f2d39746e17818caac763f3")); + ethereumSampleLogs.addAll( + asList( + "0x881d40237659c251811cec9c364ef91dc08d300c", + "0xbeee1e6e7fe307ddcf84b0a16137a4430ad5e2480fc4f4a8e250ab56ccd7630d", + "0x9e4182a38ef65fd4828a1563124c6ada8e2cd461a1a638cbc46803f0cd3e7f48", + "0x000000000000000000000000d1a041eb146e5d965f2d39746e17818caac763f3")); + ethereumSampleLogs.addAll( + asList( + "0x0981d9774a59a703db85f5eaa23672283ea31106", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000006b75d8af000000e20b7a7ddf000ba900b4009a80", + "0x0000000000000000000000000981d9774a59a703db85f5eaa23672283ea31106")); + ethereumSampleLogs.addAll( + asList( + "0x0981d9774a59a703db85f5eaa23672283ea31106", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000006b75d8af000000e20b7a7ddf000ba900b4009a80", + "0x0000000000000000000000001cf4b25ea65cec291fd17aa3769867c32de0fff3")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000001cf4b25ea65cec291fd17aa3769867c32de0fff3", + "0x0000000000000000000000006b75d8af000000e20b7a7ddf000ba900b4009a80")); + ethereumSampleLogs.addAll( + asList( + "0x1cf4b25ea65cec291fd17aa3769867c32de0fff3", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x1cf4b25ea65cec291fd17aa3769867c32de0fff3", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000006b75d8af000000e20b7a7ddf000ba900b4009a80", + "0x0000000000000000000000006b75d8af000000e20b7a7ddf000ba900b4009a80")); + ethereumSampleLogs.addAll( + asList( + "0xedabd7ee017fbac322d65aea7497899a211a7124", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000006b75d8af000000e20b7a7ddf000ba900b4009a80", + "0x000000000000000000000000edabd7ee017fbac322d65aea7497899a211a7124")); + ethereumSampleLogs.addAll( + asList( + "0xedabd7ee017fbac322d65aea7497899a211a7124", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000006b75d8af000000e20b7a7ddf000ba900b4009a80", + "0x000000000000000000000000f8d443502d122ef30743d2eafc4651d3501343de")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000f8d443502d122ef30743d2eafc4651d3501343de", + "0x0000000000000000000000006b75d8af000000e20b7a7ddf000ba900b4009a80")); + ethereumSampleLogs.addAll( + asList( + "0xf8d443502d122ef30743d2eafc4651d3501343de", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0xf8d443502d122ef30743d2eafc4651d3501343de", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000006b75d8af000000e20b7a7ddf000ba900b4009a80", + "0x0000000000000000000000006b75d8af000000e20b7a7ddf000ba900b4009a80")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d", + "0x000000000000000000000000697955d59d554ee723b0df1f664fc61120f922b2")); + ethereumSampleLogs.addAll( + asList( + "0x299ba7376a749aa70c681856991a235de59afd4a", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000697955d59d554ee723b0df1f664fc61120f922b2", + "0x000000000000000000000000299ba7376a749aa70c681856991a235de59afd4a")); + ethereumSampleLogs.addAll( + asList( + "0x299ba7376a749aa70c681856991a235de59afd4a", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000697955d59d554ee723b0df1f664fc61120f922b2", + "0x000000000000000000000000b3cb53696fa10e5465ebff96de82f5adb7262d01")); + ethereumSampleLogs.addAll( + asList( + "0x697955d59d554ee723b0df1f664fc61120f922b2", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x697955d59d554ee723b0df1f664fc61120f922b2", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d", + "0x000000000000000000000000b3cb53696fa10e5465ebff96de82f5adb7262d01")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d", + "0x000000000000000000000000df1787149aebcfbc74913d12bc9281f4a22bf512")); + ethereumSampleLogs.addAll( + asList( + "0x7e9a53f35582c937008fd2ffd61455a7d5b2db8a", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000df1787149aebcfbc74913d12bc9281f4a22bf512", + "0x00000000000000000000000078b1094269465e61b08fe6040db5cb754e85a159")); + ethereumSampleLogs.addAll( + asList( + "0xdf1787149aebcfbc74913d12bc9281f4a22bf512", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0xdf1787149aebcfbc74913d12bc9281f4a22bf512", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d", + "0x00000000000000000000000078b1094269465e61b08fe6040db5cb754e85a159")); + ethereumSampleLogs.addAll( + asList( + "0x5f5166c4fdb9055efb24a7e75cc1a21ca8ca61a3", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000e47fb0e937399c95fa036242c524b3062662c711", + "0x0000000000000000000000002515c6b737151bbd5c7826c04717b342ac44c1da")); + ethereumSampleLogs.addAll( + asList( + "0x5f5166c4fdb9055efb24a7e75cc1a21ca8ca61a3", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000e47fb0e937399c95fa036242c524b3062662c711", + "0x000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000002515c6b737151bbd5c7826c04717b342ac44c1da", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0x2515c6b737151bbd5c7826c04717b342ac44c1da", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x2515c6b737151bbd5c7826c04717b342ac44c1da", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0x299ba7376a749aa70c681856991a235de59afd4a", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000f67b8a996e77b1ef8cece67b36672129cb730723", + "0x000000000000000000000000299ba7376a749aa70c681856991a235de59afd4a")); + ethereumSampleLogs.addAll( + asList( + "0x299ba7376a749aa70c681856991a235de59afd4a", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000f67b8a996e77b1ef8cece67b36672129cb730723", + "0x000000000000000000000000697955d59d554ee723b0df1f664fc61120f922b2")); + ethereumSampleLogs.addAll( + asList( + "0x299ba7376a749aa70c681856991a235de59afd4a", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000f67b8a996e77b1ef8cece67b36672129cb730723", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000697955d59d554ee723b0df1f664fc61120f922b2", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0x697955d59d554ee723b0df1f664fc61120f922b2", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x697955d59d554ee723b0df1f664fc61120f922b2", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x00000000000000000000000077edae6a5f332605720688c7fda7476476e8f83f")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000077edae6a5f332605720688c7fda7476476e8f83f", + "0x0000000000000000000000001b8aa0d4171528da5053477a0fb553287e5a0d28")); + ethereumSampleLogs.addAll( + asList( + "0x88e8e2675f1c68a1df2927e31523bb3ed320f808", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000001b8aa0d4171528da5053477a0fb553287e5a0d28", + "0x00000000000000000000000088e8e2675f1c68a1df2927e31523bb3ed320f808")); + ethereumSampleLogs.addAll( + asList( + "0x88e8e2675f1c68a1df2927e31523bb3ed320f808", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000001b8aa0d4171528da5053477a0fb553287e5a0d28", + "0x0000000000000000000000004945604635e64e230f5b0936b35b2c80f665673a")); + ethereumSampleLogs.addAll( + asList( + "0x1b8aa0d4171528da5053477a0fb553287e5a0d28", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x1b8aa0d4171528da5053477a0fb553287e5a0d28", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x00000000000000000000000077edae6a5f332605720688c7fda7476476e8f83f", + "0x0000000000000000000000004945604635e64e230f5b0936b35b2c80f665673a")); + ethereumSampleLogs.addAll( + asList( + "0x77edae6a5f332605720688c7fda7476476e8f83f", + "0x20efd6d5195b7b50273f01cd79a27989255356f9f13293edc53ee142accfdb75")); + ethereumSampleLogs.addAll( + asList( + "0x4d73adb72bc3dd368966edd0f0b2148401a178e2", + "0x2bd2d8a84b748439fd50d79a49502b4eb5faa25b864da6a9ab5c150704be9a4d", + "0x000000000000000000000000000000000000000000000000000000000000006f", + "0x000000000000000000000000296f55f8fb28e498b858d0bcda06d955b2cb3f97")); + ethereumSampleLogs.addAll( + asList( + "0x101816545f6bd2b1076434b54383a1e633390a2e", + "0xdbdd25248751feb2f3b66721dfdd11662a68bc155af3771e661aabec92fba814")); + ethereumSampleLogs.addAll( + asList( + "0x72e2f4830b9e45d52f80ac08cb2bec0fef72ed9c", + "0xb4a87134099d10c48345145381989042ab07dc53e6e62a6511fca55438562e26", + "0x000000000000000000000000101816545f6bd2b1076434b54383a1e633390a2e", + "0x00000000000000000000000084913f6e40f17a93b84c8caf3e2afbcbcf09c89c")); + ethereumSampleLogs.addAll( + asList( + "0x101816545f6bd2b1076434b54383a1e633390a2e", + "0xfb2b592367452f1c437675bed47f5e1e6c25188c17d7ba01a12eb030bc41ccef")); + ethereumSampleLogs.addAll( + asList( + "0xdac17f958d2ee523a2206206994597c13d831ec7", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000ec30d02f10353f8efc9601371f56e808751f396f", + "0x0000000000000000000000005e135d990c7e54fc3a10f806fb96db01194dec65")); + ethereumSampleLogs.addAll( + asList( + "0x5e8422345238f34275888049021821e8e08caa1f", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000a1f8a6807c402e4a15ef4eba36528a3fed24e577", + "0x00000000000000000000000089060182b5b69888ed076b6995ff4272067d2cb1")); + ethereumSampleLogs.addAll( + asList( + "0xa1f8a6807c402e4a15ef4eba36528a3fed24e577", + "0x8b3e96f2b889fa771c53c981b40daf005f63f637f1869f707052d15a3dd97140", + "0x00000000000000000000000089060182b5b69888ed076b6995ff4272067d2cb1")); + ethereumSampleLogs.addAll( + asList( + "0x299ba7376a749aa70c681856991a235de59afd4a", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x0000000000000000000000000bee740c1e0c707091018537f760fe19d355a693", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d", + "0x00000000000000000000000004d540b6dbb7b6077b4efa2b4045164057c19bb2")); + ethereumSampleLogs.addAll( + asList( + "0xf0396e9fa7d7099a7f38afa68f400f48ab611e65", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000004d540b6dbb7b6077b4efa2b4045164057c19bb2", + "0x000000000000000000000000f0396e9fa7d7099a7f38afa68f400f48ab611e65")); + ethereumSampleLogs.addAll( + asList( + "0xf0396e9fa7d7099a7f38afa68f400f48ab611e65", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000004d540b6dbb7b6077b4efa2b4045164057c19bb2", + "0x000000000000000000000000dcfe57fa52b484672e7704bf96656cd3328b6169")); + ethereumSampleLogs.addAll( + asList( + "0x04d540b6dbb7b6077b4efa2b4045164057c19bb2", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x04d540b6dbb7b6077b4efa2b4045164057c19bb2", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d", + "0x000000000000000000000000dcfe57fa52b484672e7704bf96656cd3328b6169")); + ethereumSampleLogs.addAll( + asList( + "0xdac17f958d2ee523a2206206994597c13d831ec7", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000082ac51d37c7165fe1c854425fd6a0a7c41e0eb4", + "0x0000000000000000000000005041ed759dd4afc3a72b8192c143f72f4724081a")); + ethereumSampleLogs.addAll( + asList( + "0x265f542c1e78068f13d87c6fe0df54f3e9562a48", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000002160632e38e61336ea6b7d5cc03a52959e72e67c", + "0x0000000000000000000000004357ea68633a079fdfae21b35a68bc0f9d590402")); + ethereumSampleLogs.addAll( + asList( + "0x265f542c1e78068f13d87c6fe0df54f3e9562a48", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x0000000000000000000000002160632e38e61336ea6b7d5cc03a52959e72e67c", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000004357ea68633a079fdfae21b35a68bc0f9d590402", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0x4357ea68633a079fdfae21b35a68bc0f9d590402", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x4357ea68633a079fdfae21b35a68bc0f9d590402", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0x299ba7376a749aa70c681856991a235de59afd4a", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000008effa86c6530763cbb8030fb883046135dda3ed1", + "0x000000000000000000000000299ba7376a749aa70c681856991a235de59afd4a")); + ethereumSampleLogs.addAll( + asList( + "0x299ba7376a749aa70c681856991a235de59afd4a", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000008effa86c6530763cbb8030fb883046135dda3ed1", + "0x000000000000000000000000697955d59d554ee723b0df1f664fc61120f922b2")); + ethereumSampleLogs.addAll( + asList( + "0x299ba7376a749aa70c681856991a235de59afd4a", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x0000000000000000000000008effa86c6530763cbb8030fb883046135dda3ed1", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000697955d59d554ee723b0df1f664fc61120f922b2", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0x697955d59d554ee723b0df1f664fc61120f922b2", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x697955d59d554ee723b0df1f664fc61120f922b2", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0x5d22045daceab03b158031ecb7d9d06fad24609b", + "0x06724742ccc8c330a39a641ef02a0b419bd09248360680bb38159b0a8c2635d6")); + ethereumSampleLogs.addAll( + asList( + "0x0474801e5eb8e369b219740e7b542243cf822c81", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000008f7d5718bf464d3a7307618072248d2f50f43844", + "0x0000000000000000000000000474801e5eb8e369b219740e7b542243cf822c81")); + ethereumSampleLogs.addAll( + asList( + "0xad574c1b36cb5f03eb471a9501c4ccff8040dd2d", + "0x96d62f25518350ace6bbb1a985c6538769c45b92ee3bb0e861f4bd945145be05")); + ethereumSampleLogs.addAll( + asList( + "0xee56293ef5ed7ae73ccb8d8e68d5f0e2c1f1e40c", + "0x76b049c6a58fbcb3b1b5c347116d3f7bb8ee99c66d0a424ef58b5539acde2e25", + "0x000000000000000000000000e1b8b355d4f8ded50c513eb073dd0a373f443f60")); + ethereumSampleLogs.addAll( + asList( + "0xc662c410c0ecf747543f5ba90660f6abebd9c8c4", + "0xdb80dd488acf86d17c747445b0eabb5d57c541d3bd7b6b87af987858e5066b2b", + "0x000000000000000000000000ae0ee0a63a2ce6baeeffe56e7714fb4efe48d419", + "0x073314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82", + "0x02d757788a8d8d6f21d1cd40bce38a8222d70654214e96ff95d8086e684fbee5")); + ethereumSampleLogs.addAll( + asList( + "0xae0ee0a63a2ce6baeeffe56e7714fb4efe48d419", + "0x5b5dbc6c64043a15d3fe6943a6e443a826b78755edc257b2ec890c022225dbcf", + "0x000000000000000000000000507cc038bbb890ed37ac360339280da47b680e44", + "0x039a9666dea630afcc70067c5c59f991a2d4ba8cbacfafd4599b5db1c2678ab4")); + ethereumSampleLogs.addAll( + asList( + "0xb2114e5420927932666a5c5bd1ac4e14d9ede32b", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000060cada2416b0b8a96a3367a42b3899bb9cba7872", + "0x000000000000000000000000b2114e5420927932666a5c5bd1ac4e14d9ede32b")); + ethereumSampleLogs.addAll( + asList( + "0xb2114e5420927932666a5c5bd1ac4e14d9ede32b", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000060cada2416b0b8a96a3367a42b3899bb9cba7872", + "0x0000000000000000000000002c0be28a222a21b9e3a237f72b20ee58dc1af111")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000002c0be28a222a21b9e3a237f72b20ee58dc1af111", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0x2c0be28a222a21b9e3a237f72b20ee58dc1af111", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x2c0be28a222a21b9e3a237f72b20ee58dc1af111", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0xdac17f958d2ee523a2206206994597c13d831ec7", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000046705dfff24256421a05d056c29e81bdc09723b8", + "0x000000000000000000000000774beaf89772af0c64976ce994734df3c1161f20")); + ethereumSampleLogs.addAll( + asList( + "0xdac17f958d2ee523a2206206994597c13d831ec7", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000046705dfff24256421a05d056c29e81bdc09723b8", + "0x000000000000000000000000a88bc3c8472f558d987d41de10deecbdea21e86a")); + ethereumSampleLogs.addAll( + asList( + "0xdac17f958d2ee523a2206206994597c13d831ec7", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000d1669ac6044269b59fa12c5822439f609ca54f41", + "0x000000000000000000000000056795dc791b2e0f849ef2ebe7a4128648a42382")); + ethereumSampleLogs.addAll( + asList( + "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000005a5e62cebfb3fc3790f6c85fa620e82b5c58bd1", + "0x000000000000000000000000dcb9788a78dcbb43e95b987b6e72dc833dab9ae4")); + ethereumSampleLogs.addAll( + asList( + "0x4b9278b94a1112cad404048903b8d343a810b07e", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000059e4de75da572e5fcf7a6baf63d07f37a9c35785", + "0x0000000000000000000000008c8677c84b2c66a811ecd0640318479c52f18e2b")); + ethereumSampleLogs.addAll( + asList( + "0x4b9278b94a1112cad404048903b8d343a810b07e", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000059e4de75da572e5fcf7a6baf63d07f37a9c35785", + "0x0000000000000000000000007587bf25de6765de33a79b93364c47ac1d65f43c")); + ethereumSampleLogs.addAll( + asList( + "0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000d16e4cdb153b2dcc617061174223a6d4bfae53f5", + "0x0000000000000000000000009ab4a6d11a76d1a596f346986c5caff93c344398")); + ethereumSampleLogs.addAll( + asList( + "0x3597bfd533a99c9aa083587b074434e61eb0a258", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000dfd5293d8e347dfe59e90efd55b2956a1343963d", + "0x00000000000000000000000019325319b3510c0b1fe68bc61da460e7c0c48391")); + ethereumSampleLogs.addAll( + asList( + "0xdac17f958d2ee523a2206206994597c13d831ec7", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000021a31ee1afc51d94c2efccaa2092ad1028285549", + "0x00000000000000000000000092bea576689f034274911ebc5acb508a53fb531d")); + ethereumSampleLogs.addAll( + asList( + "0xd814bf1470ba832b6577971bbb3c9309028f224b", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x0000000000000000000000000edf4ceffd3c74013769bce363764e91d4d93c58", + "0x00000000000000000000000077edae6a5f332605720688c7fda7476476e8f83f")); + ethereumSampleLogs.addAll( + asList( + "0xdac17f958d2ee523a2206206994597c13d831ec7", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000a7dd0e36637c9d4e70e3cc5bff1ba9cdd06ac662", + "0x000000000000000000000000921d1f55ba9430f27f5cb81038f09a2b8feb8a26")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x4531cd5795773d7101c17bdeb9f5ab7f47d7056017506f937083be5d6e77a382")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x4531cd5795773d7101c17bdeb9f5ab7f47d7056017506f937083be5d6e77a382")); + ethereumSampleLogs.addAll( + asList( + "0x473037de59cf9484632f4a27b509cfe8d4a31404", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000eb49f0309dd219846758d1d4b15a381542182825", + "0x000000000000000000000000edee7b5989428ee82e7d25064415ea046d0fd15c")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x4531cd5795773d7101c17bdeb9f5ab7f47d7056017506f937083be5d6e77a382")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x4531cd5795773d7101c17bdeb9f5ab7f47d7056017506f937083be5d6e77a382")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x4531cd5795773d7101c17bdeb9f5ab7f47d7056017506f937083be5d6e77a382")); + ethereumSampleLogs.addAll( + asList( + "0x70008f18fc58928dce982b0a69c2c21ff80dca54", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000093e5fd53384e697e91c4e7df124dd5dbaf9dcfb", + "0x000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000098c3d3183c4b8a650614ad179a1a98be0a8d6b8e", + "0x0000000000000000000000000f8086d08a69ebd8e3a130a87a3b6a260723976f")); + ethereumSampleLogs.addAll( + asList( + "0xa9b1eb5908cfc3cdf91f9b8b3a74108598009096", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000f8086d08a69ebd8e3a130a87a3b6a260723976f", + "0x00000000000000000000000098c3d3183c4b8a650614ad179a1a98be0a8d6b8e")); + ethereumSampleLogs.addAll( + asList( + "0x0f8086d08a69ebd8e3a130a87a3b6a260723976f", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x0f8086d08a69ebd8e3a130a87a3b6a260723976f", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x00000000000000000000000098c3d3183c4b8a650614ad179a1a98be0a8d6b8e", + "0x00000000000000000000000098c3d3183c4b8a650614ad179a1a98be0a8d6b8e")); + ethereumSampleLogs.addAll( + asList( + "0xc662c410c0ecf747543f5ba90660f6abebd9c8c4", + "0x9866f8ddfe70bb512b2f2b28b49d4017c43f7ba775f1a20c61c13eea8cdac111")); + ethereumSampleLogs.addAll( + asList( + "0xc662c410c0ecf747543f5ba90660f6abebd9c8c4", + "0x9592d37825c744e33fa80c469683bbd04d336241bb600b574758efd182abe26a", + "0x000000000000000000000000ae0ee0a63a2ce6baeeffe56e7714fb4efe48d419", + "0x073314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82", + "0x02d757788a8d8d6f21d1cd40bce38a8222d70654214e96ff95d8086e684fbee5")); + ethereumSampleLogs.addAll( + asList( + "0xc662c410c0ecf747543f5ba90660f6abebd9c8c4", + "0x9592d37825c744e33fa80c469683bbd04d336241bb600b574758efd182abe26a", + "0x000000000000000000000000ae0ee0a63a2ce6baeeffe56e7714fb4efe48d419", + "0x073314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82", + "0x02d757788a8d8d6f21d1cd40bce38a8222d70654214e96ff95d8086e684fbee5")); + ethereumSampleLogs.addAll( + asList( + "0xc662c410c0ecf747543f5ba90660f6abebd9c8c4", + "0x9592d37825c744e33fa80c469683bbd04d336241bb600b574758efd182abe26a", + "0x000000000000000000000000ae0ee0a63a2ce6baeeffe56e7714fb4efe48d419", + "0x073314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82", + "0x02d757788a8d8d6f21d1cd40bce38a8222d70654214e96ff95d8086e684fbee5")); + ethereumSampleLogs.addAll( + asList( + "0xc662c410c0ecf747543f5ba90660f6abebd9c8c4", + "0x9592d37825c744e33fa80c469683bbd04d336241bb600b574758efd182abe26a", + "0x000000000000000000000000ae0ee0a63a2ce6baeeffe56e7714fb4efe48d419", + "0x073314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82", + "0x02d757788a8d8d6f21d1cd40bce38a8222d70654214e96ff95d8086e684fbee5")); + ethereumSampleLogs.addAll( + asList( + "0xc662c410c0ecf747543f5ba90660f6abebd9c8c4", + "0x9592d37825c744e33fa80c469683bbd04d336241bb600b574758efd182abe26a", + "0x000000000000000000000000ae0ee0a63a2ce6baeeffe56e7714fb4efe48d419", + "0x073314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82", + "0x02d757788a8d8d6f21d1cd40bce38a8222d70654214e96ff95d8086e684fbee5")); + ethereumSampleLogs.addAll( + asList( + "0xc662c410c0ecf747543f5ba90660f6abebd9c8c4", + "0x9592d37825c744e33fa80c469683bbd04d336241bb600b574758efd182abe26a", + "0x000000000000000000000000ae0ee0a63a2ce6baeeffe56e7714fb4efe48d419", + "0x073314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82", + "0x02d757788a8d8d6f21d1cd40bce38a8222d70654214e96ff95d8086e684fbee5")); + ethereumSampleLogs.addAll( + asList( + "0xc662c410c0ecf747543f5ba90660f6abebd9c8c4", + "0xd342ddf7a308dec111745b00315c14b7efb2bdae570a6856e088ed0c65a3576c")); + ethereumSampleLogs.addAll( + asList( + "0x419d0d8bdd9af5e606ae2232ed285aff190e711b", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000028c6c06298d514db089934071355e5743bf21d60", + "0x0000000000000000000000005e8304b5600cccba6d6292c6687ac9ead0ec6288")); + ethereumSampleLogs.addAll( + asList( + "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000e8c6c9227491c0a8156a0106a0204d881bb7e531", + "0x0000000000000000000000004a137fd5e7a256ef08a7de531a17d0be0cc7b6b6")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000004a137fd5e7a256ef08a7de531a17d0be0cc7b6b6", + "0x000000000000000000000000e8c6c9227491c0a8156a0106a0204d881bb7e531")); + ethereumSampleLogs.addAll( + asList( + "0xe8c6c9227491c0a8156a0106a0204d881bb7e531", + "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67", + "0x000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564", + "0x0000000000000000000000004a137fd5e7a256ef08a7de531a17d0be0cc7b6b6")); + ethereumSampleLogs.addAll( + asList( + "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000005777d92f208679db4b9778590fa3cab3ac9e2168", + "0x0000000000000000000000002d2a7d56773ae7d5c7b9f1b57f7be05039447b4d")); + ethereumSampleLogs.addAll( + asList( + "0x6b175474e89094c44da98b954eedeac495271d0f", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000075bff91af9878f5ec3fede9b52d51159afc2430a", + "0x0000000000000000000000005777d92f208679db4b9778590fa3cab3ac9e2168")); + ethereumSampleLogs.addAll( + asList( + "0x419d0d8bdd9af5e606ae2232ed285aff190e711b", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000486263aa56d1b49d78dea765754164b880c99954", + "0x00000000000000000000000075bff91af9878f5ec3fede9b52d51159afc2430a")); + ethereumSampleLogs.addAll( + asList( + "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000002d2a7d56773ae7d5c7b9f1b57f7be05039447b4d", + "0x000000000000000000000000486263aa56d1b49d78dea765754164b880c99954")); + ethereumSampleLogs.addAll( + asList( + "0x486263aa56d1b49d78dea765754164b880c99954", + "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67", + "0x0000000000000000000000002d2a7d56773ae7d5c7b9f1b57f7be05039447b4d", + "0x00000000000000000000000075bff91af9878f5ec3fede9b52d51159afc2430a")); + ethereumSampleLogs.addAll( + asList( + "0x75bff91af9878f5ec3fede9b52d51159afc2430a", + "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67", + "0x0000000000000000000000002d2a7d56773ae7d5c7b9f1b57f7be05039447b4d", + "0x0000000000000000000000005777d92f208679db4b9778590fa3cab3ac9e2168")); + ethereumSampleLogs.addAll( + asList( + "0x5777d92f208679db4b9778590fa3cab3ac9e2168", + "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67", + "0x0000000000000000000000002d2a7d56773ae7d5c7b9f1b57f7be05039447b4d", + "0x0000000000000000000000002d2a7d56773ae7d5c7b9f1b57f7be05039447b4d")); + ethereumSampleLogs.addAll( + asList( + "0x7ee68a5b4f11365b361e32c6d6fe3fb4973e4524", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000190417184a9a19386c29022399d6b291fac6c92d", + "0x0000000000000000000000001111111254eeb25477b68fb85ed929f73a960582")); + ethereumSampleLogs.addAll( + asList( + "0x7ee68a5b4f11365b361e32c6d6fe3fb4973e4524", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000190417184a9a19386c29022399d6b291fac6c92d", + "0x00000000000000000000000021cc2f06d372ae3ab455116b3d203b431255760e")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000021cc2f06d372ae3ab455116b3d203b431255760e", + "0x00000000000000000000000006da0fd433c1a5d7a4faa01111c044910a184553")); + ethereumSampleLogs.addAll( + asList( + "0x21cc2f06d372ae3ab455116b3d203b431255760e", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x21cc2f06d372ae3ab455116b3d203b431255760e", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000001111111254eeb25477b68fb85ed929f73a960582", + "0x00000000000000000000000006da0fd433c1a5d7a4faa01111c044910a184553")); + ethereumSampleLogs.addAll( + asList( + "0xdac17f958d2ee523a2206206994597c13d831ec7", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000006da0fd433c1a5d7a4faa01111c044910a184553", + "0x000000000000000000000000190417184a9a19386c29022399d6b291fac6c92d")); + ethereumSampleLogs.addAll( + asList( + "0x06da0fd433c1a5d7a4faa01111c044910a184553", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x06da0fd433c1a5d7a4faa01111c044910a184553", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000001111111254eeb25477b68fb85ed929f73a960582", + "0x000000000000000000000000190417184a9a19386c29022399d6b291fac6c92d")); + ethereumSampleLogs.addAll( + asList( + "0x00000000000000adc04c56bf30ac9d3c0aaf14dc", + "0x9d9af8e38d66c62e2c12f0225249fd9d721c54b83f48d9352c97c6cacdcb6f31", + "0x0000000000000000000000003b09a0e57a1bfc5b4d1a6a6335ecfa92be3c78e7", + "0x000000000000000000000000004c00500000ad104d7dbd00e3ae0a5c00560c00")); + ethereumSampleLogs.addAll( + asList( + "0xfd384bd3b79ed98f0f00ecba8a22230406a700d5", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x0000000000000000000000003b09a0e57a1bfc5b4d1a6a6335ecfa92be3c78e7", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000000000000000000000000000000000000000009b8")); + ethereumSampleLogs.addAll( + asList( + "0xfd384bd3b79ed98f0f00ecba8a22230406a700d5", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000003b09a0e57a1bfc5b4d1a6a6335ecfa92be3c78e7", + "0x0000000000000000000000005bb8bd0d1a9f2d80c05dfb799dc08afcc509fc84", + "0x00000000000000000000000000000000000000000000000000000000000009b8")); + ethereumSampleLogs.addAll( + asList( + "0xabea9132b05a70803a4e85094fd0e1800777fbef", + "0xd0943372c08b438a88d4b39d77216901079eda9ca59d45349841c099083b6830")); + ethereumSampleLogs.addAll( + asList( + "0xabea9132b05a70803a4e85094fd0e1800777fbef", + "0x8f5f51448394699ad6a3b80cdadf4ec68c5d724c8c3fea09bea55b3c2d0e2dd0", + "0x0000000000000000000000000000000000000000000000000000000000000000")); + ethereumSampleLogs.addAll( + asList( + "0x5f5166c4fdb9055efb24a7e75cc1a21ca8ca61a3", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000281c3f10852fa733990c867621a850779b07ecdf", + "0x0000000000000000000000002515c6b737151bbd5c7826c04717b342ac44c1da")); + ethereumSampleLogs.addAll( + asList( + "0x5f5166c4fdb9055efb24a7e75cc1a21ca8ca61a3", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000281c3f10852fa733990c867621a850779b07ecdf", + "0x000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000002515c6b737151bbd5c7826c04717b342ac44c1da", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0x2515c6b737151bbd5c7826c04717b342ac44c1da", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x2515c6b737151bbd5c7826c04717b342ac44c1da", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0x2b591e99afe9f32eaa6214f7b7629768c40eeb39", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000d894d7909917ded810e67fe6dd964017f632d962", + "0x00000000000000000000000074de5d4fcbf63e00296fd95d33236b9794016631")); + ethereumSampleLogs.addAll( + asList( + "0x2b591e99afe9f32eaa6214f7b7629768c40eeb39", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000d894d7909917ded810e67fe6dd964017f632d962", + "0x000000000000000000000000881d40237659c251811cec9c364ef91dc08d300c")); + ethereumSampleLogs.addAll( + asList( + "0x2b591e99afe9f32eaa6214f7b7629768c40eeb39", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000074de5d4fcbf63e00296fd95d33236b9794016631", + "0x00000000000000000000000092f3f71cef740ed5784874b8c70ff87ecdf33588")); + ethereumSampleLogs.addAll( + asList( + "0x2b591e99afe9f32eaa6214f7b7629768c40eeb39", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x00000000000000000000000074de5d4fcbf63e00296fd95d33236b9794016631", + "0x0000000000000000000000001111111254eeb25477b68fb85ed929f73a960582")); + ethereumSampleLogs.addAll( + asList( + "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000069d91b94f0aaf8e8a2586909fa77a5c2c89818d5", + "0x0000000000000000000000001111111254eeb25477b68fb85ed929f73a960582")); + ethereumSampleLogs.addAll( + asList( + "0x2b591e99afe9f32eaa6214f7b7629768c40eeb39", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000092f3f71cef740ed5784874b8c70ff87ecdf33588", + "0x00000000000000000000000069d91b94f0aaf8e8a2586909fa77a5c2c89818d5")); + ethereumSampleLogs.addAll( + asList( + "0x69d91b94f0aaf8e8a2586909fa77a5c2c89818d5", + "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67", + "0x00000000000000000000000092f3f71cef740ed5784874b8c70ff87ecdf33588", + "0x0000000000000000000000001111111254eeb25477b68fb85ed929f73a960582")); + ethereumSampleLogs.addAll( + asList( + "0x2b591e99afe9f32eaa6214f7b7629768c40eeb39", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000092f3f71cef740ed5784874b8c70ff87ecdf33588", + "0x00000000000000000000000055d5c232d921b9eaa6b37b5845e439acd04b4dba")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000055d5c232d921b9eaa6b37b5845e439acd04b4dba", + "0x000000000000000000000000655edce464cc797526600a462a8154650eee4b77")); + ethereumSampleLogs.addAll( + asList( + "0x55d5c232d921b9eaa6b37b5845e439acd04b4dba", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x55d5c232d921b9eaa6b37b5845e439acd04b4dba", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x00000000000000000000000092f3f71cef740ed5784874b8c70ff87ecdf33588", + "0x000000000000000000000000655edce464cc797526600a462a8154650eee4b77")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000082743c07bf3be4d55876f87bca6cce5f84429bd0", + "0x000000000000000000000000655edce464cc797526600a462a8154650eee4b77")); + ethereumSampleLogs.addAll( + asList( + "0x2b591e99afe9f32eaa6214f7b7629768c40eeb39", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000092f3f71cef740ed5784874b8c70ff87ecdf33588", + "0x00000000000000000000000082743c07bf3be4d55876f87bca6cce5f84429bd0")); + ethereumSampleLogs.addAll( + asList( + "0x82743c07bf3be4d55876f87bca6cce5f84429bd0", + "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67", + "0x00000000000000000000000092f3f71cef740ed5784874b8c70ff87ecdf33588", + "0x000000000000000000000000655edce464cc797526600a462a8154650eee4b77")); + ethereumSampleLogs.addAll( + asList( + "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000655edce464cc797526600a462a8154650eee4b77", + "0x00000000000000000000000092f3f71cef740ed5784874b8c70ff87ecdf33588")); + ethereumSampleLogs.addAll( + asList( + "0x655edce464cc797526600a462a8154650eee4b77", + "0x4be05c8d54f5e056ab2cfa033e9f582057001268c3e28561bb999d35d2c8f2c8", + "0x000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0x000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + "0x00000000000000000000000092f3f71cef740ed5784874b8c70ff87ecdf33588")); + ethereumSampleLogs.addAll( + asList( + "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000092f3f71cef740ed5784874b8c70ff87ecdf33588", + "0x0000000000000000000000001111111254eeb25477b68fb85ed929f73a960582")); + ethereumSampleLogs.addAll( + asList( + "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000001111111254eeb25477b68fb85ed929f73a960582", + "0x00000000000000000000000074de5d4fcbf63e00296fd95d33236b9794016631")); + ethereumSampleLogs.addAll( + asList( + "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000074de5d4fcbf63e00296fd95d33236b9794016631", + "0x0000000000000000000000002acf35c9a3f4c5c3f4c78ef5fb64c3ee82f07c45")); + ethereumSampleLogs.addAll( + asList( + "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000074de5d4fcbf63e00296fd95d33236b9794016631", + "0x000000000000000000000000d894d7909917ded810e67fe6dd964017f632d962")); + ethereumSampleLogs.addAll( + asList( + "0x881d40237659c251811cec9c364ef91dc08d300c", + "0xbeee1e6e7fe307ddcf84b0a16137a4430ad5e2480fc4f4a8e250ab56ccd7630d", + "0xf35f348d53012d52a5d39f9390d246956ac932d5778d2bb49e359dba4fa0896d", + "0x000000000000000000000000d894d7909917ded810e67fe6dd964017f632d962")); + ethereumSampleLogs.addAll( + asList( + "0x5f5166c4fdb9055efb24a7e75cc1a21ca8ca61a3", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000f7e388f0a9227b40eabbde85ecec2ae0a6c43010", + "0x000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3")); + ethereumSampleLogs.addAll( + asList( + "0x5f5166c4fdb9055efb24a7e75cc1a21ca8ca61a3", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000aa6d4f0d0787bb815d4eeb1b03f874667733b17b", + "0x0000000000000000000000002515c6b737151bbd5c7826c04717b342ac44c1da")); + ethereumSampleLogs.addAll( + asList( + "0x5f5166c4fdb9055efb24a7e75cc1a21ca8ca61a3", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000aa6d4f0d0787bb815d4eeb1b03f874667733b17b", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000002515c6b737151bbd5c7826c04717b342ac44c1da", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0x2515c6b737151bbd5c7826c04717b342ac44c1da", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x2515c6b737151bbd5c7826c04717b342ac44c1da", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0xdac17f958d2ee523a2206206994597c13d831ec7", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000c35f1217b87b1d5ebafef711453499f8d68be3ff", + "0x000000000000000000000000b8001c3ec9aa1985f6c747e25c28324e4a361ec1")); + ethereumSampleLogs.addAll( + asList( + "0xde30da39c46104798bb5aa3fe8b9e0e1f348163f", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000f5ea82ea954608be5326ef229b9f005b4325b8d5", + "0x0000000000000000000000000e3efd5be54cc0f4c64e0d186b0af4b7f2a0e95f")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x0000000000000000000000006941888f86d97b4832810d3fd04a225a8488aeb5")); + ethereumSampleLogs.addAll( + asList( + "0x2e0d6baf75f79e814019926b4329aab2e559f395", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000006941888f86d97b4832810d3fd04a225a8488aeb5", + "0x000000000000000000000000a56d91fdbef5325891a08ea3831baaf5ec1594df")); + ethereumSampleLogs.addAll( + asList( + "0x6941888f86d97b4832810d3fd04a225a8488aeb5", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x6941888f86d97b4832810d3fd04a225a8488aeb5", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x000000000000000000000000a56d91fdbef5325891a08ea3831baaf5ec1594df")); + ethereumSampleLogs.addAll( + asList( + "0x88e8e2675f1c68a1df2927e31523bb3ed320f808", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000babc570306f5a390f5117f2587e345389d0946c2", + "0x00000000000000000000000077edae6a5f332605720688c7fda7476476e8f83f")); + ethereumSampleLogs.addAll( + asList( + "0x88e8e2675f1c68a1df2927e31523bb3ed320f808", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000babc570306f5a390f5117f2587e345389d0946c2", + "0x00000000000000000000000088e8e2675f1c68a1df2927e31523bb3ed320f808")); + ethereumSampleLogs.addAll( + asList( + "0x88e8e2675f1c68a1df2927e31523bb3ed320f808", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000088e8e2675f1c68a1df2927e31523bb3ed320f808", + "0x0000000000000000000000001b8aa0d4171528da5053477a0fb553287e5a0d28")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000001b8aa0d4171528da5053477a0fb553287e5a0d28", + "0x0000000000000000000000002435aa6afd562b316180802c4f90d9323789114d")); + ethereumSampleLogs.addAll( + asList( + "0x1b8aa0d4171528da5053477a0fb553287e5a0d28", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x1b8aa0d4171528da5053477a0fb553287e5a0d28", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d", + "0x0000000000000000000000002435aa6afd562b316180802c4f90d9323789114d")); + ethereumSampleLogs.addAll( + asList( + "0x88e8e2675f1c68a1df2927e31523bb3ed320f808", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000babc570306f5a390f5117f2587e345389d0946c2", + "0x0000000000000000000000001b8aa0d4171528da5053477a0fb553287e5a0d28")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000001b8aa0d4171528da5053477a0fb553287e5a0d28", + "0x00000000000000000000000077edae6a5f332605720688c7fda7476476e8f83f")); + ethereumSampleLogs.addAll( + asList( + "0x1b8aa0d4171528da5053477a0fb553287e5a0d28", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x1b8aa0d4171528da5053477a0fb553287e5a0d28", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x00000000000000000000000077edae6a5f332605720688c7fda7476476e8f83f", + "0x00000000000000000000000077edae6a5f332605720688c7fda7476476e8f83f")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000077edae6a5f332605720688c7fda7476476e8f83f", + "0x000000000000000000000000dcf63a49f5938fd3b673271015ecf1aa3a2ef154")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", + "0x000000000000000000000000dcf63a49f5938fd3b673271015ecf1aa3a2ef154")); + ethereumSampleLogs.addAll( + asList( + "0x77edae6a5f332605720688c7fda7476476e8f83f", + "0x20efd6d5195b7b50273f01cd79a27989255356f9f13293edc53ee142accfdb75")); + ethereumSampleLogs.addAll( + asList( + "0x299ba7376a749aa70c681856991a235de59afd4a", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000732a0534f24dc37d1d0205d427827cec32d03116", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0xdac17f958d2ee523a2206206994597c13d831ec7", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x0000000000000000000000005eba75c233518cf8f27a0949bd870557045c7e72", + "0x000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3")); + ethereumSampleLogs.addAll( + asList( + "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x00000000000000000000000001962a84b4d64ee0af2995b2151ba52ac39a2318", + "0x000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff")); + ethereumSampleLogs.addAll( + asList( + "0xb2ecfe4e4d61f8790bbb9de2d1259b9e2410cea5", + "0xf4092a7c54e135dc5f273d6675327b7b7838392537d2f7b63f7acbec8c7cd296", + "0x000000000000000000000000f86aaeb9a6a8bba1e2c4317e771e1ca044449799")); + ethereumSampleLogs.addAll( + asList( + "0x000000000022d473030f116ddee9f6b43ac78ba3", + "0xc6a377bfc4eb120024a8ac08eef205be16b817020812c73223e81d1bdb9708ec", + "0x00000000000000000000000072665730836bffd5743f4cea4973370e95e6b335", + "0x000000000000000000000000299ba7376a749aa70c681856991a235de59afd4a", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0x299ba7376a749aa70c681856991a235de59afd4a", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000072665730836bffd5743f4cea4973370e95e6b335", + "0x000000000000000000000000299ba7376a749aa70c681856991a235de59afd4a")); + ethereumSampleLogs.addAll( + asList( + "0x299ba7376a749aa70c681856991a235de59afd4a", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000072665730836bffd5743f4cea4973370e95e6b335", + "0x000000000000000000000000697955d59d554ee723b0df1f664fc61120f922b2")); + ethereumSampleLogs.addAll( + asList( + "0x299ba7376a749aa70c681856991a235de59afd4a", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x00000000000000000000000072665730836bffd5743f4cea4973370e95e6b335", + "0x000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000697955d59d554ee723b0df1f664fc61120f922b2", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0x697955d59d554ee723b0df1f664fc61120f922b2", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x697955d59d554ee723b0df1f664fc61120f922b2", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0x3a23f943181408eac424116af7b7790c94cb97a5", + "0x6ea2964966a13d361befaca87edb26595ca75a30f3b77887d67d5a7d0e4805c0")); + ethereumSampleLogs.addAll( + asList( + "0xb584d4be1a5470ca1a8778e9b86c81e165204599", + "0x90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15", + "0x000000000000000000000000bd3c5a08181a374662a47c0493e7a9f1a02a8eee", + "0x0000000000000000000000000000000000000000000000000000000000000144")); + ethereumSampleLogs.addAll( + asList( + "0x3a23f943181408eac424116af7b7790c94cb97a5", + "0x74594da9e31ee4068e17809037db37db496702bf7d8d63afe6f97949277d1609")); + ethereumSampleLogs.addAll( + asList( + "0x7448c7456a97769f6cd04f1e83a4a23ccdc46abd", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000058adf9953e5a2d175a15dc5807aca3520bf46cb3", + "0x000000000000000000000000dd32284b8ac3f78cbddc7f96d9cc35bfbecc99de")); + ethereumSampleLogs.addAll( + asList( + "0x58adf9953e5a2d175a15dc5807aca3520bf46cb3", + "0xd9cb1e2714d65a111c0f20f060176ad657496bd47a3de04ec7c3d4ca232112ac", + "0x000000000000000000000000000000000000000000000000000000000000588f", + "0x000000000000000000000000dd32284b8ac3f78cbddc7f96d9cc35bfbecc99de")); + ethereumSampleLogs.addAll( + asList( + "0xefaed650f1a94801806bb110019d9b0dc79531a8", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x0000000000000000000000009bd69ddddf7954b733730369c13717409c1631d5", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000000000000000000000000000000000000003000e")); + ethereumSampleLogs.addAll( + asList( + "0xefaed650f1a94801806bb110019d9b0dc79531a8", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000009bd69ddddf7954b733730369c13717409c1631d5", + "0x00000000000000000000000038fd17958dd5fd50655934596b9afdb4bef4273a", + "0x000000000000000000000000000000000000000000000000000000000003000e")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0x686f2404e77ab0d9070a46cdfb0b7fecdd2318b0", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000005104846dc1c3c7697b856dc69e350ae4dcc47e24", + "0x00000000000000000000000071d9e6d1e3302885ff22928bcf53e37a9e241336")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x0000000000000000000000005104846dc1c3c7697b856dc69e350ae4dcc47e24")); + ethereumSampleLogs.addAll( + asList( + "0x5104846dc1c3c7697b856dc69e350ae4dcc47e24", + "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x00000000000000000000000071d9e6d1e3302885ff22928bcf53e37a9e241336")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0x5f5166c4fdb9055efb24a7e75cc1a21ca8ca61a3", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000c479ec273f96d04b0dca154d7653a091c07f5575", + "0x000000000000000000000000cb8ea77a7bc005c435e404d94cff9efb54aac33f")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x000000000000000000000000c479ec273f96d04b0dca154d7653a091c07f5575")); + ethereumSampleLogs.addAll( + asList( + "0xc479ec273f96d04b0dca154d7653a091c07f5575", + "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x000000000000000000000000cb8ea77a7bc005c435e404d94cff9efb54aac33f")); + ethereumSampleLogs.addAll( + asList( + "0x4d224452801aced8b2f0aebe155379bb5d594381", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000005954ab967bc958940b7eb73ee84797dc8a2afbb9", + "0x000000000000000000000000276266acada1798bcfac5822936768383d2ed782")); + ethereumSampleLogs.addAll( + asList( + "0x5954ab967bc958940b7eb73ee84797dc8a2afbb9", + "0xd334b3114fc25cbd72389ff9c361d5f8b0924e35fa237c65ac209a2cdcf4ba13", + "0x000000000000000000000000276266acada1798bcfac5822936768383d2ed782", + "0x0000000000000000000000000000000000000000000000000000000000000001")); + ethereumSampleLogs.addAll( + asList( + "0xc55126051b22ebb829d00368f4b12bde432de5da", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000079c7df7740e999872277fe97eb3f8c106ee2af4b", + "0x000000000000000000000000742b70151cd3bc7ab598aaff1d54b90c3ebc6027")); + ethereumSampleLogs.addAll( + asList( + "0x742b70151cd3bc7ab598aaff1d54b90c3ebc6027", + "0xd4665e3049283582ba6f9eba07a5b3e12dab49e02da99e8927a47af5d134bea5", + "0x00000000000000000000000079c7df7740e999872277fe97eb3f8c106ee2af4b", + "0x0000000000000000000000000000000000000000000000000000000064af3e80")); + ethereumSampleLogs.addAll( + asList( + "0xb584d4be1a5470ca1a8778e9b86c81e165204599", + "0x90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15", + "0x00000000000000000000000068db37632c236721ed4226f09c8ac6a4ba3a6c30", + "0x0000000000000000000000000000000000000000000000000000000000000038")); + ethereumSampleLogs.addAll( + asList( + "0xde30da39c46104798bb5aa3fe8b9e0e1f348163f", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000f5ea82ea954608be5326ef229b9f005b4325b8d5", + "0x0000000000000000000000000e3efd5be54cc0f4c64e0d186b0af4b7f2a0e95f")); + ethereumSampleLogs.addAll( + asList( + "0x046eee2cc3188071c02bfc1745a6b17c656e3f3d", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000510100d5143e011db24e2aa38abe85d73d5b2177", + "0x000000000000000000000000ce736567abf129e336194e60e2ec96fe25d05a37")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000ce736567abf129e336194e60e2ec96fe25d05a37", + "0x000000000000000000000000510100d5143e011db24e2aa38abe85d73d5b2177")); + ethereumSampleLogs.addAll( + asList( + "0x510100d5143e011db24e2aa38abe85d73d5b2177", + "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x000000000000000000000000ce736567abf129e336194e60e2ec96fe25d05a37")); + ethereumSampleLogs.addAll( + asList( + "0x2e0d6baf75f79e814019926b4329aab2e559f395", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000d2a3ccb365da1ae13287c6b1bdb30c96379e2d34", + "0x00000000000000000000000077edae6a5f332605720688c7fda7476476e8f83f")); + ethereumSampleLogs.addAll( + asList( + "0x2e0d6baf75f79e814019926b4329aab2e559f395", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000002e0d6baf75f79e814019926b4329aab2e559f395", + "0x0000000000000000000000006941888f86d97b4832810d3fd04a225a8488aeb5")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000006941888f86d97b4832810d3fd04a225a8488aeb5", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0x6941888f86d97b4832810d3fd04a225a8488aeb5", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x6941888f86d97b4832810d3fd04a225a8488aeb5", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0x2e0d6baf75f79e814019926b4329aab2e559f395", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000d2a3ccb365da1ae13287c6b1bdb30c96379e2d34", + "0x0000000000000000000000002e0d6baf75f79e814019926b4329aab2e559f395")); + ethereumSampleLogs.addAll( + asList( + "0x2e0d6baf75f79e814019926b4329aab2e559f395", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000d2a3ccb365da1ae13287c6b1bdb30c96379e2d34", + "0x0000000000000000000000006941888f86d97b4832810d3fd04a225a8488aeb5")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000006941888f86d97b4832810d3fd04a225a8488aeb5", + "0x00000000000000000000000077edae6a5f332605720688c7fda7476476e8f83f")); + ethereumSampleLogs.addAll( + asList( + "0x6941888f86d97b4832810d3fd04a225a8488aeb5", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x6941888f86d97b4832810d3fd04a225a8488aeb5", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x00000000000000000000000077edae6a5f332605720688c7fda7476476e8f83f", + "0x00000000000000000000000077edae6a5f332605720688c7fda7476476e8f83f")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000077edae6a5f332605720688c7fda7476476e8f83f", + "0x000000000000000000000000dcf63a49f5938fd3b673271015ecf1aa3a2ef154")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", + "0x000000000000000000000000dcf63a49f5938fd3b673271015ecf1aa3a2ef154")); + ethereumSampleLogs.addAll( + asList( + "0x77edae6a5f332605720688c7fda7476476e8f83f", + "0x20efd6d5195b7b50273f01cd79a27989255356f9f13293edc53ee142accfdb75")); + ethereumSampleLogs.addAll( + asList( + "0xec7972f53d96a6a2260f8460768f49b8721b6106", + "0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31", + "0x0000000000000000000000009ab17bdaa2ab4a70aedd11a2a2641a14d5b23ddb", + "0x0000000000000000000000002f18f339620a63e43f0839eeb18d7de1e1be4dfb")); + ethereumSampleLogs.addAll( + asList( + "0xba30e5f9bb24caa003e9f2f0497ad287fdf95623", + "0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31", + "0x00000000000000000000000033bc00f70df5f87e31e81a0e920f1737d049c467", + "0x0000000000000000000000002f18f339620a63e43f0839eeb18d7de1e1be4dfb")); + ethereumSampleLogs.addAll( + asList( + "0xd8912c10681d8b21fd3742244f44658dba12264e", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000599b543e2d08b33cc934c4736df1c03c10674e9f", + "0x000000000000000000000000d10fb93013a889e372afcc3fa6e5e8c6747ffacc")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x0000000000000000000000009dcf87f65b0c9ed7bad50504727364e19cb14366", + "0x0000000000000000000000001715a3e4a142d8b698131108995174f37aeba10d")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0x06450dee7fd2fb8e39061434babcfc05599a6fb8", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000002a9d2ba41aba912316d16742f259412b681898db", + "0x0000000000000000000000008a7457e00344973e5be44b6f1202e6392364a02b")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x0000000000000000000000002a9d2ba41aba912316d16742f259412b681898db")); + ethereumSampleLogs.addAll( + asList( + "0x2a9d2ba41aba912316d16742f259412b681898db", + "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x0000000000000000000000008a7457e00344973e5be44b6f1202e6392364a02b")); + ethereumSampleLogs.addAll( + asList( + "0x29469395eaf6f95920e59f858042f0e28d98a20b", + "0xe5095dc360d1a56740c946cccc76520c1a1a57381c950520062adeda68dbf572")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x000000000000000000000000697955d59d554ee723b0df1f664fc61120f922b2")); + ethereumSampleLogs.addAll( + asList( + "0x299ba7376a749aa70c681856991a235de59afd4a", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000697955d59d554ee723b0df1f664fc61120f922b2", + "0x000000000000000000000000299ba7376a749aa70c681856991a235de59afd4a")); + ethereumSampleLogs.addAll( + asList( + "0x299ba7376a749aa70c681856991a235de59afd4a", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000697955d59d554ee723b0df1f664fc61120f922b2", + "0x000000000000000000000000c09aa480827a2fe5592cbd35d7db6b91e6ed5839")); + ethereumSampleLogs.addAll( + asList( + "0x697955d59d554ee723b0df1f664fc61120f922b2", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x697955d59d554ee723b0df1f664fc61120f922b2", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x000000000000000000000000c09aa480827a2fe5592cbd35d7db6b91e6ed5839")); + ethereumSampleLogs.addAll( + asList( + "0x955d5c14c8d4944da1ea7836bd44d54a8ec35ba1", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x0000000000000000000000008ed66b9153c6f12602897b8f3e5c7792ef57a697", + "0x0000000000000000000000006131b5fae19ea4f9d964eac0408e4408b66337b5")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0x0f5d2fb29fb7d3cfee444a200298f468908cc942", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000008661ae7918c0115af9e3691662f605e9c550ddc9", + "0x0000000000000000000000007c9043947aa4a16c6b3ad218ccee950fa5bf9a58")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x0000000000000000000000008661ae7918c0115af9e3691662f605e9c550ddc9")); + ethereumSampleLogs.addAll( + asList( + "0x8661ae7918c0115af9e3691662f605e9c550ddc9", + "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x0000000000000000000000007c9043947aa4a16c6b3ad218ccee950fa5bf9a58")); + ethereumSampleLogs.addAll( + asList( + "0xc662c410c0ecf747543f5ba90660f6abebd9c8c4", + "0xdb80dd488acf86d17c747445b0eabb5d57c541d3bd7b6b87af987858e5066b2b", + "0x000000000000000000000000ae0ee0a63a2ce6baeeffe56e7714fb4efe48d419", + "0x073314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82", + "0x02d757788a8d8d6f21d1cd40bce38a8222d70654214e96ff95d8086e684fbee5")); + ethereumSampleLogs.addAll( + asList( + "0xae0ee0a63a2ce6baeeffe56e7714fb4efe48d419", + "0x5b5dbc6c64043a15d3fe6943a6e443a826b78755edc257b2ec890c022225dbcf", + "0x000000000000000000000000a2f5c395c3aa091ff2957ac5fb9cd665f8e16179", + "0x04d344bf86e0dae1e04bb624ce3094c8ac3581e00ea34320d42651c9dd9a9bfa")); + ethereumSampleLogs.addAll( + asList( + "0x2a3dd3eb832af982ec71669e178424b10dca2ede", + "0x501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b")); + ethereumSampleLogs.addAll( + asList( + "0x580bda1e7a0cfae92fa7f6c20a3794f169ce3cfb", + "0x61014378f82a0d809aefaf87a8ac9505b89c321808287a6e7810f29304c1fce3", + "0x40ea7bebc9f35f62306b5d351267832428edc798cc6d4dea2f9135614164a85c", + "0x1f557f0fece7d7ede04688cd79722d4127d7f90a6b25f77b73d642ba06aeb872")); + ethereumSampleLogs.addAll( + asList( + "0xc662c410c0ecf747543f5ba90660f6abebd9c8c4", + "0xdb80dd488acf86d17c747445b0eabb5d57c541d3bd7b6b87af987858e5066b2b", + "0x000000000000000000000000ae0ee0a63a2ce6baeeffe56e7714fb4efe48d419", + "0x073314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82", + "0x02d757788a8d8d6f21d1cd40bce38a8222d70654214e96ff95d8086e684fbee5")); + ethereumSampleLogs.addAll( + asList( + "0xae0ee0a63a2ce6baeeffe56e7714fb4efe48d419", + "0x5b5dbc6c64043a15d3fe6943a6e443a826b78755edc257b2ec890c022225dbcf", + "0x000000000000000000000000a149405152517a4fc9b26b1130b87ef0dd80f433", + "0x03b6821afda20f5b837082c7e032caae7fe63c69740ad05b59fd2058249654dd")); + ethereumSampleLogs.addAll( + asList( + "0xae7ab96520de3a18e5e111b5eaab095312d7fe84", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000c7eac8af908b54984e80ebac3f4fdf4e2d525622", + "0x0000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0")); + ethereumSampleLogs.addAll( + asList( + "0xdac17f958d2ee523a2206206994597c13d831ec7", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000408446aac7a2638bf9043d3283e1f229594bcf52", + "0x0000000000000000000000008957d73f37d74ef86aa4386da8799ad14f92a524")); + ethereumSampleLogs.addAll( + asList( + "0xbbc7f7a6aadac103769c66cbc69ab720f7f9eae3", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000067208c7e28cf38c52d5925bc761762280395d2dd", + "0x00000000000000000000000052faced7f8529bd69b1c570c6464cef85e252496")); + ethereumSampleLogs.addAll( + asList( + "0xbbc7f7a6aadac103769c66cbc69ab720f7f9eae3", + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x00000000000000000000000067208c7e28cf38c52d5925bc761762280395d2dd", + "0x0000000000000000000000005ee36f573f0e543f905796c0e697caa7e984e0c8")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x000000000000000000000000d88256c89b4bbf246f6634a96301c6b056f9832a")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x00000000000000000000000056a2a171bbff5bfa6766fbc139e741ca82ad6402")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x000000000000000000000000c14a4727cdcd9ed8c1e84535c031b7842fdad151")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x000000000000000000000000ba9898ef227ba75b92d7c1b2927e9e6cc2f2b47a")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x000000000000000000000000de34e24dcfae916aff15ed3c8b408bfa98afbdf8")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x0000000000000000000000009a299150cdddf538e917a98310602ec2894661cb")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x0000000000000000000000006594185dbba35fac6838120cf496d2f62cbd11f1")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x000000000000000000000000424afec660f97f6cd87231a9413d1df1805a179c")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x00000000000000000000000075a78ab24134f76e167d85743d14c0bd1f2e9952")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x000000000000000000000000ad56a4f6169f5376078b5ba06152d2ecadbf48f4")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x000000000000000000000000db95a28dd010cc84c6a5c5581c575ddfcac10d43")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x000000000000000000000000e39fb530056843a5dc9303f99c7f2ee73adebb3b")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x00000000000000000000000081673be0d9e979413543b41531b1e85fd7e3f943")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x000000000000000000000000808904fc78e28af02f0dba6e9f5ac31ff08a1a8c")); + ethereumSampleLogs.addAll( + asList( + "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000057891966931eb4bb6fb81430e6ce0a03aabde063", + "0x0000000000000000000000000e3ca8c0318ccfcd15bddc70b3239e0d09fcf80d")); + ethereumSampleLogs.addAll( + asList( + "0x57891966931eb4bb6fb81430e6ce0a03aabde063", + "0xac1b18083978656d557d6e91c88203585cfda1031bdb14538327121ef140d383", + "0x0000000000000000000000000e3ca8c0318ccfcd15bddc70b3239e0d09fcf80d", + "0x000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x000000000000000000000000129dbf99a3daa889c964be5645170fcc036ba565")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x0000000000000000000000004a80f36e942527c3eb368a3500f8a01877e43ce5")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x000000000000000000000000ef7d0a63c78d18349cb2c912e6160bd1a12f1a03")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x0000000000000000000000009aeb52b64b159f8582ca2e1e92df5c8d7dbd8aca")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x00000000000000000000000072366274553f60823b3c96489d36697e1eaeb7dd")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x00000000000000000000000052fe57673dff3b13a8ab2a82f4da981ee0719817")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x000000000000000000000000d83256a8bb182e7be2382550ed24861c71108d35")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x000000000000000000000000e6acf6285e2ddaf5a115c7752c2028102fc18c9b")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x000000000000000000000000e8d0031d9d7fb35387706163e91a7ee338680fab")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x0000000000000000000000007d4806a76483883e286d96319c01822506ee6016")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x000000000000000000000000bb81903a440ccbb264df6c197c1ae01567ec9abf")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x0000000000000000000000009f0793f67344460177d6fd592275b7ecd1bccdd9")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x0000000000000000000000004baf33e1773333d762667b4c99bfdd14ab1f73b2")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x0000000000000000000000009f7bfbad1d63df041a64255c572cd217ee961147")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x000000000000000000000000e64285eb680ce846396556230a1ac2b689f4f748")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x00000000000000000000000009e79e819d3214a6ff2329651202e636b2bd4a6a")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x000000000000000000000000392f8d754e3301bd1cbeac7ea856a146781233df")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x00000000000000000000000058d465bac0f2c68a3910c3f96511423de57e8a3d")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x00000000000000000000000028409ed5c4f1a752a690d5acf50ec6ded38d9e16")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x000000000000000000000000fe20c54324ae4a5cbb716f198ef4c1b563479694")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x00000000000000000000000015a5b7ba8676d4f9db8d402308f1f40fffbacef3")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x000000000000000000000000cb73a2ba85ae0d135a13003c681e20dfc23aec89")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x0000000000000000000000003ffbec21ad1fa6987753b1c4753aa37ace32b67f")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x0000000000000000000000001473a847c7b2d856f815e6faf74863f44a37a192")); + ethereumSampleLogs.addAll( + asList( + "0x32400084c286cf3e17e7b677ea9583e60a000324", + "0x26464d64ddb13f6d187de632d165bd1065382ec0b66c25c648957116e7bc25c8", + "0x00000000000000000000000015a5b7ba8676d4f9db8d402308f1f40fffbacef3")); + ethereumSampleLogs.addAll( + asList( + "0xc37126b2399b078e73cbcf7d7ed2df139114b2ae", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000645d821234cb223cf3be3d67fce25ac939705b26", + "0x000000000000000000000000c37126b2399b078e73cbcf7d7ed2df139114b2ae")); + ethereumSampleLogs.addAll( + asList( + "0xc37126b2399b078e73cbcf7d7ed2df139114b2ae", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000645d821234cb223cf3be3d67fce25ac939705b26", + "0x00000000000000000000000089a312c86a7a9f49550fa4254a9117e520b3d982")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000089a312c86a7a9f49550fa4254a9117e520b3d982", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0x89a312c86a7a9f49550fa4254a9117e520b3d982", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x89a312c86a7a9f49550fa4254a9117e520b3d982", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0xabea9132b05a70803a4e85094fd0e1800777fbef", + "0xd0943372c08b438a88d4b39d77216901079eda9ca59d45349841c099083b6830")); + ethereumSampleLogs.addAll( + asList( + "0xabea9132b05a70803a4e85094fd0e1800777fbef", + "0x8f5f51448394699ad6a3b80cdadf4ec68c5d724c8c3fea09bea55b3c2d0e2dd0", + "0x0000000000000000000000000000000000000000000000000000000000000000")); + ethereumSampleLogs.addAll( + asList( + "0xabea9132b05a70803a4e85094fd0e1800777fbef", + "0xd0943372c08b438a88d4b39d77216901079eda9ca59d45349841c099083b6830")); + ethereumSampleLogs.addAll( + asList( + "0xabea9132b05a70803a4e85094fd0e1800777fbef", + "0x8f5f51448394699ad6a3b80cdadf4ec68c5d724c8c3fea09bea55b3c2d0e2dd0", + "0x0000000000000000000000000000000000000000000000000000000000000000")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x0000000000000000000000002c0be28a222a21b9e3a237f72b20ee58dc1af111")); + ethereumSampleLogs.addAll( + asList( + "0xb2114e5420927932666a5c5bd1ac4e14d9ede32b", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000002c0be28a222a21b9e3a237f72b20ee58dc1af111", + "0x000000000000000000000000b2114e5420927932666a5c5bd1ac4e14d9ede32b")); + ethereumSampleLogs.addAll( + asList( + "0xb2114e5420927932666a5c5bd1ac4e14d9ede32b", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000002c0be28a222a21b9e3a237f72b20ee58dc1af111", + "0x000000000000000000000000b2dc388c52610c04694d6ba985215ca78ed55d7c")); + ethereumSampleLogs.addAll( + asList( + "0x2c0be28a222a21b9e3a237f72b20ee58dc1af111", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x2c0be28a222a21b9e3a237f72b20ee58dc1af111", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x000000000000000000000000b2dc388c52610c04694d6ba985215ca78ed55d7c")); + ethereumSampleLogs.addAll( + asList( + "0xdac17f958d2ee523a2206206994597c13d831ec7", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000169b829b0cb7bad4182a6550b394b2f31d7b6007", + "0x000000000000000000000000ec554417cb64c7433bb2f84a46b9ad633dd457c6")); + ethereumSampleLogs.addAll( + asList( + "0xdfe97868233d1aa22e815a266982f2cf17685a27", + "0xa7aaf2512769da4e444e3de247be2564225c2e7a8f74cfe528e46e17d24868e2", + "0x8d39e97da0ff8439e8ec469dbd47d4b61d0d2b606c76d4be9b2bf6cac3a58267", + "0x0000000000000000000000000000000000000000000000000000000000000310", + "0x00000000000000000000000000000000000000000000000000000000065b51ff")); + ethereumSampleLogs.addAll( + asList( + "0x821ac3ff49378d4c1c432ccce8b72fa1e54ee00c", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000d21365d0279454e2d51f7d6e2f7382ad2084813", + "0x000000000000000000000000592d74a6a463dac2fc98c2a5328206e349e9c6f6")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000592d74a6a463dac2fc98c2a5328206e349e9c6f6", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0x592d74a6a463dac2fc98c2a5328206e349e9c6f6", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x592d74a6a463dac2fc98c2a5328206e349e9c6f6", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", + "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d")); + ethereumSampleLogs.addAll( + asList( + "0xfb66321d7c674995dfcc2cb67a30bc978dc862ad", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000af05945e6f60c74a033fea30bf4836fe5e0216fc", + "0x000000000000000000000000fb66321d7c674995dfcc2cb67a30bc978dc862ad")); + ethereumSampleLogs.addAll( + asList( + "0xfb66321d7c674995dfcc2cb67a30bc978dc862ad", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000af05945e6f60c74a033fea30bf4836fe5e0216fc", + "0x000000000000000000000000076a3e1500f3110d8f4445d396a3d7ca6d0ca269")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000076a3e1500f3110d8f4445d396a3d7ca6d0ca269", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0x076a3e1500f3110d8f4445d396a3d7ca6d0ca269", + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1")); + ethereumSampleLogs.addAll( + asList( + "0x076a3e1500f3110d8f4445d396a3d7ca6d0ca269", + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", + "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad")); + ethereumSampleLogs.addAll( + asList( + "0x3d3d35bb9bec23b06ca00fe472b50e7a4c692c30", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000001165c6925e780a375215545f6e91d604644ba0e0", + "0x0000000000000000000000004e053ac1f6f34a73f5bbd876efd20525eacb5382")); + ethereumSampleLogs.addAll( + asList( + "0x3d3d35bb9bec23b06ca00fe472b50e7a4c692c30", + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000e4684afe69ba238e3de17bbd0b1a64ce7077da42", + "0x0000000000000000000000001165c6925e780a375215545f6e91d604644ba0e0")); + ethereumSampleLogs.addAll( + asList( + "0xe4684afe69ba238e3de17bbd0b1a64ce7077da42", + "0xb72ef6a0e5a62f73e52dd5fa571d9f28d0d3c7895c4e1b60e5a8d01e879957ac", + "0x0000000000000000000000001165c6925e780a375215545f6e91d604644ba0e0", + "0x000000000000000000000000000000000000000000000000008f004c67e61a80")); + ethereumSampleLogs.addAll( + asList( + "0x4e053ac1f6f34a73f5bbd876efd20525eacb5382", + "0x650639b17ab5dbad2d79a2e4757e3be67a53db225cede5d96cb5ab54837b85ce", + "0x0000000000000000000000001165c6925e780a375215545f6e91d604644ba0e0", + "0x0000000000000000000000000000000000000000000000000000000000000001")); + ethereumSampleLogs.addAll( + asList( + "0x4e053ac1f6f34a73f5bbd876efd20525eacb5382", + "0xdae4417c25a93cfb86ce5fbbb8fc1630945b61afaeab4f29cf301b9a058ba914", + "0x0000000000000000000000001165c6925e780a375215545f6e91d604644ba0e0", + "0x00000000000000000000000000000000000000000000001834eb47aaa867f7c6")); + } + + @Test + public void testNullHexStringFilterData() { + String nullHexString = null; + assertThrows(IllegalArgumentException.class, () -> new Bloom(nullHexString)); + } + + @Test + public void testNullBytesArrayFilterData() { + byte[] nullBytesArray = null; + assertThrows(IllegalArgumentException.class, () -> new Bloom(nullBytesArray)); + } + + @Test + public void testNot256BytesArrayForFilterData() { + byte[] bytes = new byte[] {1, 2, 3}; + assertThrows(IllegalArgumentException.class, () -> new Bloom(bytes)); + } + + @Test + public void testNot256HexStringForFilterData() { + String hex = "0xffccaa"; + assertThrows(IllegalArgumentException.class, () -> new Bloom(hex)); + } + + @Test + public void testAddedTopicsMustReturnTrueWhenTested() { + List topics = + asList( + "Mehrdad".getBytes(), + "test".getBytes(), + "hello".getBytes(), + "hello world".getBytes(), + "web3j".getBytes(), + "teeesssstttt121233".getBytes()); + + Bloom bloom = new Bloom(); + topics.forEach(bloom::add); + topics.forEach( + t -> { + boolean result = bloom.test(t); + assertTrue(result, "must return true"); + }); + } + + @Test + public void testNotAddedTopicsMustReturnFalseWhenTested() { + List topicsNotAdded = + asList( + "Mehrdad23".getBytes(), + "test2".getBytes(), + "hello2".getBytes(), + "hello world2".getBytes(), + "web3j2".getBytes(), + "teeesssstttt1212332".getBytes()); + + Bloom bloom = new Bloom(); + topicsNotAdded.forEach( + t -> { + boolean result = bloom.test(t); + assertFalse(result, "must return false"); + }); + } + + @Test + public void testNotAddedTopicsIsExpectedToReturnFalseWhenTested() { + List topicsAdded = + asList( + "Mehrdad".getBytes(), + "test".getBytes(), + "hello".getBytes(), + "hello world".getBytes(), + "web3j".getBytes(), + "teeesssstttt121233".getBytes()); + + List topicsNotAdded = + asList( + "Mehrdad2".getBytes(), + "test2".getBytes(), + "hello2".getBytes(), + "hello world2".getBytes(), + "web3j2".getBytes(), + "teeesssstttt1212332".getBytes()); + + Bloom bloom = new Bloom(); + topicsAdded.forEach(bloom::add); + topicsNotAdded.forEach( + t -> { + boolean result = bloom.test(t); + assertFalse( + result, "expected to return false (but false-positive is possible)"); + }); + } + + @Test + public void testEthereumSampleLogsWithItsLogsBloomToReturnTrueForAllTopics() { + Bloom bloom = new Bloom(ethereumSampleLogsBloom); + for (String topic : ethereumSampleLogs) { + boolean result = bloom.test(topic); + assertTrue(result, "must return true"); + } + } + + @Test + public void testEthereumSampleLogsBloomReconstructionFromItsTopics() { + Bloom reconstructedBloom = new Bloom(); + for (String topic : ethereumSampleLogs) { + reconstructedBloom.add(topic); + } + assertEquals( + new Bloom(ethereumSampleLogsBloom), + reconstructedBloom, + "reconstructed logsBloom should be equal"); + } + + @Test + public void testStaticMethodTestWhenAllTopicsIsInBloomForHexInput() { + boolean result = + Bloom.test( + ethereumSampleLogsBloom, + ethereumSampleLogs.get(0), + ethereumSampleLogs.get(100)); + assertTrue(result, "must return true"); + } + + @Test + public void testStaticMethodTestWhenAllTopicsIsInBloomForBytesInput() { + boolean result = + Bloom.test( + Numeric.hexStringToByteArray(ethereumSampleLogsBloom), + Numeric.hexStringToByteArray(ethereumSampleLogs.get(0)), + Numeric.hexStringToByteArray(ethereumSampleLogs.get(100))); + assertTrue(result, "must return true"); + } + + @Test + public void testStaticMethodTestWhenOneTopicIsNotInBloom() { + boolean result = + Bloom.test( + ethereumSampleLogsBloom, + ethereumSampleLogs.get(0), + ethereumSampleLogs.get(100), + "0xff"); + assertFalse(result, "expected to return false (but false-positive is possible)"); + } + + @Test + public void testStaticMethodTestWhenAllTopicsAreNotInBloom() { + boolean result = + Bloom.test(ethereumSampleLogsBloom, "0x10101121", "0xffffffffffccccaa112", "0xff"); + assertFalse(result, "expected to return false (but false-positive is possible)"); + } +} From 2167efe2b3f5d8ee42138b480f7d7d7b67a5de92 Mon Sep 17 00:00:00 2001 From: Nischal Sharma Date: Thu, 20 Jul 2023 04:10:35 +0530 Subject: [PATCH 14/52] added ENSIP15 normalization --- build.gradle | 1 + core/build.gradle | 3 ++- core/src/main/java/org/web3j/ens/NameHash.java | 10 ++++++---- core/src/test/java/org/web3j/ens/NameHashTest.java | 10 ++++++++-- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 4ff860fd86..8149e69193 100644 --- a/build.gradle +++ b/build.gradle @@ -23,6 +23,7 @@ ext { slf4jVersion = '1.7.30' javaWebSocketVersion = '1.5.3' picocliVersion = '3.0.0' + ensAdraffyVersion = '0.1.1' // test dependencies equalsverifierVersion = '3.14.1' junitVersion = '5.5.2' diff --git a/core/build.gradle b/core/build.gradle index 40223c7489..d23df7f444 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -18,7 +18,8 @@ dependencies { "io.reactivex.rxjava2:rxjava:$rxjavaVersion", "org.java-websocket:Java-WebSocket:$javaWebSocketVersion", "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion", - "org.slf4j:slf4j-api:$slf4jVersion" + "org.slf4j:slf4j-api:$slf4jVersion", + "io.github.adraffy:ens-normalize:$ensAdraffyVersion" testImplementation project(path: ':crypto', configuration: 'testArtifacts'), "nl.jqno.equalsverifier:equalsverifier:$equalsverifierVersion", "ch.qos.logback:logback-classic:$logbackVersion" diff --git a/core/src/main/java/org/web3j/ens/NameHash.java b/core/src/main/java/org/web3j/ens/NameHash.java index ea6e5b87c7..d97b847f56 100644 --- a/core/src/main/java/org/web3j/ens/NameHash.java +++ b/core/src/main/java/org/web3j/ens/NameHash.java @@ -14,10 +14,12 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; -import java.net.IDN; import java.nio.charset.StandardCharsets; import java.util.Arrays; +import io.github.adraffy.ens.ENSNormalize; +import io.github.adraffy.ens.InvalidLabelException; + import org.web3j.crypto.Hash; import org.web3j.utils.Numeric; @@ -58,7 +60,7 @@ private static byte[] nameHash(String[] labels) { /** * Normalise ENS name as per the specification. + * href="https://docs.ens.domains/ens-improvement-proposals/ensip-15-normalization-standard">specification. * * @param ensName our user input ENS name * @return normalised ens name @@ -66,8 +68,8 @@ private static byte[] nameHash(String[] labels) { */ public static String normalise(String ensName) { try { - return IDN.toASCII(ensName, IDN.USE_STD3_ASCII_RULES).toLowerCase(); - } catch (IllegalArgumentException e) { + return ENSNormalize.ENSIP15.normalize(ensName); + } catch (InvalidLabelException e) { throw new EnsResolutionException("Invalid ENS name provided: " + ensName); } } diff --git a/core/src/test/java/org/web3j/ens/NameHashTest.java b/core/src/test/java/org/web3j/ens/NameHashTest.java index d38c81df56..2818ed3b0f 100644 --- a/core/src/test/java/org/web3j/ens/NameHashTest.java +++ b/core/src/test/java/org/web3j/ens/NameHashTest.java @@ -36,6 +36,10 @@ public void testNameHash() { assertEquals( nameHash("foo.eth"), ("0xde9b09fd7c5f901e23a3f19fecc54828e9c848539801e86591bd9801b019f84f")); + + assertEquals( + nameHash("\uD83D\uDC8E.gmcafe.art"), + ("0xf7de5954cda078ee481b14cff677e8066fe805a89b5c87b4a9b866338049b04a")); } @Test @@ -48,20 +52,22 @@ public void testNormalise() { assertEquals(normalise("Obb.at"), ("obb.at")); assertEquals(normalise("TESTER.eth"), ("tester.eth")); assertEquals(normalise("test\u200btest.com"), ("testtest.com")); + assertEquals(normalise("hyph-‐‑‒–—―⁃−⎯⏤﹘e⸺n⸻s.eth"), ("hyph------------e--n---s.eth")); } @Test public void testNormaliseInvalid() { testInvalidName("foo..bar"); testInvalidName("ba\\u007Fr.eth"); - testInvalidName("-baz.eth-"); testInvalidName("foo_bar.eth"); + testInvalidName("..a..eth"); + testInvalidName("aα.ɑ"); + testInvalidName("0x.0χ.0х"); } @Test void testDnsEncode() throws IOException { String dnsEncoded = NameHash.dnsEncode("1.offchainexample.eth"); - assertEquals("0x01310f6f6666636861696e6578616d706c650365746800", dnsEncoded); } From 90a47dc145fa19efd9e575ea946b97e2c9c84f9a Mon Sep 17 00:00:00 2001 From: Kamil Dziadek Date: Tue, 25 Jul 2023 16:39:47 +0200 Subject: [PATCH 15/52] Fixing filter Jackson serialisation RCA: `getThis` is treated as `this` property that during serialisation fails with `direct self-reference leading to cycle` FIX: ignoring `this` during serialisation --- .../org/web3j/protocol/core/methods/request/EthFilter.java | 3 +++ .../org/web3j/protocol/core/methods/request/ShhFilter.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/core/src/main/java/org/web3j/protocol/core/methods/request/EthFilter.java b/core/src/main/java/org/web3j/protocol/core/methods/request/EthFilter.java index 304a316f13..7ca829c9f1 100644 --- a/core/src/main/java/org/web3j/protocol/core/methods/request/EthFilter.java +++ b/core/src/main/java/org/web3j/protocol/core/methods/request/EthFilter.java @@ -12,6 +12,8 @@ */ package org.web3j.protocol.core.methods.request; +import com.fasterxml.jackson.annotation.JsonIgnore; + import java.util.Collections; import java.util.List; @@ -71,6 +73,7 @@ public List getAddress() { } @Override + @JsonIgnore EthFilter getThis() { return this; } diff --git a/core/src/main/java/org/web3j/protocol/core/methods/request/ShhFilter.java b/core/src/main/java/org/web3j/protocol/core/methods/request/ShhFilter.java index 5c95d5b5f5..be0c27f02a 100644 --- a/core/src/main/java/org/web3j/protocol/core/methods/request/ShhFilter.java +++ b/core/src/main/java/org/web3j/protocol/core/methods/request/ShhFilter.java @@ -12,6 +12,8 @@ */ package org.web3j.protocol.core.methods.request; +import com.fasterxml.jackson.annotation.JsonIgnore; + /** * Filter implementation as per docs @@ -29,6 +31,7 @@ public String getTo() { } @Override + @JsonIgnore ShhFilter getThis() { return this; } From ceab54dd73bc1048838981c271f2d74ab664c214 Mon Sep 17 00:00:00 2001 From: Nischal Sharma Date: Thu, 27 Jul 2023 12:59:25 +0530 Subject: [PATCH 16/52] ENSIP-15 normalization updated to v0.1.2 Signed-off-by: Nischal Sharma --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 8149e69193..7102b87347 100644 --- a/build.gradle +++ b/build.gradle @@ -23,7 +23,7 @@ ext { slf4jVersion = '1.7.30' javaWebSocketVersion = '1.5.3' picocliVersion = '3.0.0' - ensAdraffyVersion = '0.1.1' + ensAdraffyVersion = '0.1.2' // test dependencies equalsverifierVersion = '3.14.1' junitVersion = '5.5.2' From 37c15da42a4c954d794f14b29083c344fced04a9 Mon Sep 17 00:00:00 2001 From: Kamil Dziadek Date: Mon, 31 Jul 2023 19:04:08 +0200 Subject: [PATCH 17/52] Fixing formatting --- .../org/web3j/protocol/core/methods/request/EthFilter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/web3j/protocol/core/methods/request/EthFilter.java b/core/src/main/java/org/web3j/protocol/core/methods/request/EthFilter.java index 7ca829c9f1..a48c1de734 100644 --- a/core/src/main/java/org/web3j/protocol/core/methods/request/EthFilter.java +++ b/core/src/main/java/org/web3j/protocol/core/methods/request/EthFilter.java @@ -12,11 +12,11 @@ */ package org.web3j.protocol.core.methods.request; -import com.fasterxml.jackson.annotation.JsonIgnore; - import java.util.Collections; import java.util.List; +import com.fasterxml.jackson.annotation.JsonIgnore; + import org.web3j.protocol.core.DefaultBlockParameter; /** From ceb3e26122b84c443ac0790f328694bad1542f2e Mon Sep 17 00:00:00 2001 From: Nischal Sharma Date: Tue, 1 Aug 2023 18:47:53 +0530 Subject: [PATCH 18/52] Updated a spelling --- core/src/main/java/org/web3j/protocol/core/filters/Filter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/web3j/protocol/core/filters/Filter.java b/core/src/main/java/org/web3j/protocol/core/filters/Filter.java index a382dcf19f..d083caf7a3 100644 --- a/core/src/main/java/org/web3j/protocol/core/filters/Filter.java +++ b/core/src/main/java/org/web3j/protocol/core/filters/Filter.java @@ -161,7 +161,7 @@ private void pollFilter(EthFilter ethFilter) { private void reinstallFilter() { log.warn( - "Previously installed filter has not been found, trying to reinstall. Filter id: {}", + "Previously installed filter has not been found, trying to re-install. Filter id: {}", filterId); schedule.cancel(false); this.run(scheduledExecutorService, blockTime); From 856cec7e15c983dba906519407fa3104aba8b46f Mon Sep 17 00:00:00 2001 From: Raphael Vullriede Date: Tue, 1 Aug 2023 21:08:20 +0200 Subject: [PATCH 19/52] add missing file --- .../core/methods/response/EthBaseFee.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 core/src/main/java/org/web3j/protocol/core/methods/response/EthBaseFee.java diff --git a/core/src/main/java/org/web3j/protocol/core/methods/response/EthBaseFee.java b/core/src/main/java/org/web3j/protocol/core/methods/response/EthBaseFee.java new file mode 100644 index 0000000000..f67c05ae0c --- /dev/null +++ b/core/src/main/java/org/web3j/protocol/core/methods/response/EthBaseFee.java @@ -0,0 +1,25 @@ +/* + * Copyright 2019 Web3 Labs Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.web3j.protocol.core.methods.response; + +import java.math.BigInteger; + +import org.web3j.protocol.core.Response; +import org.web3j.utils.Numeric; + +/** eth_baseFee. */ +public class EthBaseFee extends Response { + public BigInteger getBaseFee() { + return Numeric.decodeQuantity(getResult()); + } +} From 984e617699f38fb32484acc3dfc7dd0308f0b9b9 Mon Sep 17 00:00:00 2001 From: Raphael Vullriede Date: Tue, 1 Aug 2023 21:43:56 +0200 Subject: [PATCH 20/52] add basic test --- .../web3j/protocol/core/methods/response/EthBaseFee.java | 1 + .../src/test/java/org/web3j/protocol/core/RequestTest.java | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/core/src/main/java/org/web3j/protocol/core/methods/response/EthBaseFee.java b/core/src/main/java/org/web3j/protocol/core/methods/response/EthBaseFee.java index f67c05ae0c..37265fa3db 100644 --- a/core/src/main/java/org/web3j/protocol/core/methods/response/EthBaseFee.java +++ b/core/src/main/java/org/web3j/protocol/core/methods/response/EthBaseFee.java @@ -19,6 +19,7 @@ /** eth_baseFee. */ public class EthBaseFee extends Response { + public BigInteger getBaseFee() { return Numeric.decodeQuantity(getResult()); } diff --git a/core/src/test/java/org/web3j/protocol/core/RequestTest.java b/core/src/test/java/org/web3j/protocol/core/RequestTest.java index 09d5efe215..a198e132ef 100644 --- a/core/src/test/java/org/web3j/protocol/core/RequestTest.java +++ b/core/src/test/java/org/web3j/protocol/core/RequestTest.java @@ -154,6 +154,13 @@ public void testEthMaxPriorityFeePerGas() throws Exception { "{\"jsonrpc\":\"2.0\",\"method\":\"eth_maxPriorityFeePerGas\",\"params\":[],\"id\":1}"); } + @Test + public void testEthBaseFee() throws Exception { + web3j.ethBaseFee().send(); + + verifyResult("{\"jsonrpc\":\"2.0\",\"method\":\"eth_baseFee\",\"params\":[],\"id\":1}"); + } + @Test public void testEthFeeHistory() throws Exception { web3j.ethFeeHistory(1, DefaultBlockParameterName.LATEST, null).send(); From 004dbc7df23ac08efd722a1b5e32f793f07dee36 Mon Sep 17 00:00:00 2001 From: Raphael Vullriede Date: Wed, 2 Aug 2023 10:06:43 +0200 Subject: [PATCH 21/52] add response test as well --- .../org/web3j/protocol/core/ResponseTest.java | 16 +++++++++++++++- gradle/publish/build.gradle | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/core/src/test/java/org/web3j/protocol/core/ResponseTest.java b/core/src/test/java/org/web3j/protocol/core/ResponseTest.java index 921d5571aa..59031a8ac2 100644 --- a/core/src/test/java/org/web3j/protocol/core/ResponseTest.java +++ b/core/src/test/java/org/web3j/protocol/core/ResponseTest.java @@ -32,6 +32,7 @@ import org.web3j.protocol.core.methods.response.DbPutHex; import org.web3j.protocol.core.methods.response.DbPutString; import org.web3j.protocol.core.methods.response.EthAccounts; +import org.web3j.protocol.core.methods.response.EthBaseFee; import org.web3j.protocol.core.methods.response.EthBlock; import org.web3j.protocol.core.methods.response.EthBlockNumber; import org.web3j.protocol.core.methods.response.EthCall; @@ -599,6 +600,19 @@ public void testEthEstimateGas() { assertEquals(ethEstimateGas.getAmountUsed(), (BigInteger.valueOf(21000))); } + @Test + public void testEthBaseFee() { + buildResponse( + "{\n" + + " \"id\":1,\n" + + " \"jsonrpc\": \"2.0\",\n" + + " \"result\": \"0x5d21dba00\"\n" + + "}"); + + EthBaseFee ethBaseFee = deserialiseResponse(EthBaseFee.class); + assertEquals(ethBaseFee.getBaseFee(), (BigInteger.valueOf(25000000000L))); + } + @Test public void testEthBlockTransactionHashes() { @@ -1796,4 +1810,4 @@ public void testTxPoolStatus() { assertEquals(status.getPending(), 10); assertEquals(status.getQueued(), 7); } -} +} \ No newline at end of file diff --git a/gradle/publish/build.gradle b/gradle/publish/build.gradle index 5ffa61d0a8..9426ed6fd1 100644 --- a/gradle/publish/build.gradle +++ b/gradle/publish/build.gradle @@ -87,4 +87,4 @@ signing { if (signingKey.exists()) { useInMemoryPgpKeys(signingKey.getText('UTF-8'), System.getenv('GPG_PASSPHRASE')) } -} +} \ No newline at end of file From d58612c201e2dd2c113a916014b99f704e6b80db Mon Sep 17 00:00:00 2001 From: Raphael Vullriede Date: Wed, 2 Aug 2023 13:22:13 +0200 Subject: [PATCH 22/52] fix code style (spotless) --- .../java/org/web3j/protocol/core/ResponseTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/src/test/java/org/web3j/protocol/core/ResponseTest.java b/core/src/test/java/org/web3j/protocol/core/ResponseTest.java index 59031a8ac2..9ca8999f4d 100644 --- a/core/src/test/java/org/web3j/protocol/core/ResponseTest.java +++ b/core/src/test/java/org/web3j/protocol/core/ResponseTest.java @@ -603,11 +603,11 @@ public void testEthEstimateGas() { @Test public void testEthBaseFee() { buildResponse( - "{\n" - + " \"id\":1,\n" - + " \"jsonrpc\": \"2.0\",\n" - + " \"result\": \"0x5d21dba00\"\n" - + "}"); + "{\n" + + " \"id\":1,\n" + + " \"jsonrpc\": \"2.0\",\n" + + " \"result\": \"0x5d21dba00\"\n" + + "}"); EthBaseFee ethBaseFee = deserialiseResponse(EthBaseFee.class); assertEquals(ethBaseFee.getBaseFee(), (BigInteger.valueOf(25000000000L))); @@ -1810,4 +1810,4 @@ public void testTxPoolStatus() { assertEquals(status.getPending(), 10); assertEquals(status.getQueued(), 7); } -} \ No newline at end of file +} From 9e6009bdc7ba1b99cfe4d9117fb197f72a7e6dca Mon Sep 17 00:00:00 2001 From: thinkAfCod Date: Sun, 16 Jul 2023 15:49:06 +0800 Subject: [PATCH 23/52] add the eth_getProof call --- .../org/web3j/protocol/core/Ethereum.java | 3 + .../web3j/protocol/core/JsonRpc2_0Web3j.java | 11 + .../core/methods/response/EthGetProof.java | 432 ++++++++++++++++++ .../org/web3j/protocol/core/RequestTest.java | 16 + .../org/web3j/protocol/core/ResponseTest.java | 58 +++ .../java/org/web3j/protocol/core/CoreIT.java | 15 +- 6 files changed, 534 insertions(+), 1 deletion(-) create mode 100644 core/src/main/java/org/web3j/protocol/core/methods/response/EthGetProof.java diff --git a/core/src/main/java/org/web3j/protocol/core/Ethereum.java b/core/src/main/java/org/web3j/protocol/core/Ethereum.java index 2b22361064..567797adef 100644 --- a/core/src/main/java/org/web3j/protocol/core/Ethereum.java +++ b/core/src/main/java/org/web3j/protocol/core/Ethereum.java @@ -40,6 +40,7 @@ import org.web3j.protocol.core.methods.response.EthGetBlockTransactionCountByNumber; import org.web3j.protocol.core.methods.response.EthGetCode; import org.web3j.protocol.core.methods.response.EthGetCompilers; +import org.web3j.protocol.core.methods.response.EthGetProof; import org.web3j.protocol.core.methods.response.EthGetStorageAt; import org.web3j.protocol.core.methods.response.EthGetTransactionCount; import org.web3j.protocol.core.methods.response.EthGetTransactionReceipt; @@ -205,6 +206,8 @@ Request ethGetUncleByBlockNumberAndIndex( Request ethGetLogs(org.web3j.protocol.core.methods.request.EthFilter ethFilter); + Request ethGetProof(String address, List storageKeys, String quantity); + Request ethGetWork(); Request ethSubmitWork(String nonce, String headerPowHash, String mixDigest); diff --git a/core/src/main/java/org/web3j/protocol/core/JsonRpc2_0Web3j.java b/core/src/main/java/org/web3j/protocol/core/JsonRpc2_0Web3j.java index 1e15629ed1..fffa488a24 100644 --- a/core/src/main/java/org/web3j/protocol/core/JsonRpc2_0Web3j.java +++ b/core/src/main/java/org/web3j/protocol/core/JsonRpc2_0Web3j.java @@ -52,6 +52,7 @@ import org.web3j.protocol.core.methods.response.EthGetBlockTransactionCountByNumber; import org.web3j.protocol.core.methods.response.EthGetCode; import org.web3j.protocol.core.methods.response.EthGetCompilers; +import org.web3j.protocol.core.methods.response.EthGetProof; import org.web3j.protocol.core.methods.response.EthGetStorageAt; import org.web3j.protocol.core.methods.response.EthGetTransactionCount; import org.web3j.protocol.core.methods.response.EthGetTransactionReceipt; @@ -575,6 +576,16 @@ public Request ethGetLogs( return new Request<>("eth_getLogs", Arrays.asList(ethFilter), web3jService, EthLog.class); } + @Override + public Request ethGetProof( + String address, List storageKeys, String quantity) { + return new Request<>( + "eth_getProof", + Arrays.asList(address, storageKeys, quantity), + web3jService, + EthGetProof.class); + } + @Override public Request ethGetWork() { return new Request<>( diff --git a/core/src/main/java/org/web3j/protocol/core/methods/response/EthGetProof.java b/core/src/main/java/org/web3j/protocol/core/methods/response/EthGetProof.java new file mode 100644 index 0000000000..9906c98433 --- /dev/null +++ b/core/src/main/java/org/web3j/protocol/core/methods/response/EthGetProof.java @@ -0,0 +1,432 @@ +/* + * Copyright 2023 Web3 Labs Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.web3j.protocol.core.methods.response; + +import java.io.IOException; +import java.math.BigInteger; +import java.util.List; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.ObjectReader; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +import org.web3j.protocol.ObjectMapperFactory; +import org.web3j.protocol.core.Response; +import org.web3j.utils.Numeric; + +/** + * eth_getProof api response. + * + * @author thinkAfCod + * @since 2023.06 + */ +public class EthGetProof extends Response { + + @Override + @JsonDeserialize(using = EthGetProof.ResponseDeserializer.class) + public void setResult(EthGetProof.Proof result) { + super.setResult(result); + } + + /** + * get proof result. + * + * @return proof result + */ + public EthGetProof.Proof getProof() { + return getResult(); + } + + /** Instantiates a new Eth get proof. */ + public EthGetProof() {} + + /** json rpc result of object. */ + public static class Proof { + + private String address; + + private String balance; + + private String codeHash; + + private String nonce; + + private String storageHash; + + private List accountProof; + + private List storageProof; + + /** Instantiates a new Proof. */ + public Proof() {} + + /** + * Instantiates a new Proof. + * + * @param address the address + * @param balance the balance + * @param codeHash the code hash + * @param nonce the nonce + * @param storageHash the storage hash + * @param accountProof the account proof + * @param storageProof the storage proof + */ + public Proof( + String address, + String balance, + String codeHash, + String nonce, + String storageHash, + List accountProof, + List storageProof) { + this.address = address; + this.balance = balance; + this.codeHash = codeHash; + this.nonce = nonce; + this.storageHash = storageHash; + this.accountProof = accountProof; + this.storageProof = storageProof; + } + + /** + * Gets address. + * + * @return the address + */ + public String getAddress() { + return address; + } + + /** + * Sets address. + * + * @param address the address + */ + public void setAddress(String address) { + this.address = address; + } + + /** + * Gets balance raw. + * + * @return the balance raw + */ + public String getBalanceRaw() { + return this.balance; + } + + /** + * Gets balance. + * + * @return the balance + */ + public BigInteger getBalance() { + return Numeric.decodeQuantity(balance); + } + + /** + * Sets balance. + * + * @param balance the balance + */ + public void setBalance(String balance) { + this.balance = balance; + } + + /** + * Gets code hash. + * + * @return the code hash + */ + public String getCodeHash() { + return codeHash; + } + + /** + * Sets code hash. + * + * @param codeHash the code hash + */ + public void setCodeHash(String codeHash) { + this.codeHash = codeHash; + } + + /** + * Gets nonce. + * + * @return the nonce + */ + public String getNonce() { + return nonce; + } + + /** + * Sets nonce. + * + * @param nonce the nonce + */ + public void setNonce(String nonce) { + this.nonce = nonce; + } + + /** + * Gets storage hash. + * + * @return the storage hash + */ + public String getStorageHash() { + return storageHash; + } + + /** + * Sets storage hash. + * + * @param storageHash the storage hash + */ + public void setStorageHash(String storageHash) { + this.storageHash = storageHash; + } + + /** + * Gets account proof. + * + * @return the account proof + */ + public List getAccountProof() { + return accountProof; + } + + /** + * Sets account proof. + * + * @param accountProof the account proof + */ + public void setAccountProof(List accountProof) { + this.accountProof = accountProof; + } + + /** + * Gets storage proof. + * + * @return the storage proof + */ + public List getStorageProof() { + return storageProof; + } + + /** + * Sets storage proof. + * + * @param storageProof the storage proof + */ + public void setStorageProof(List storageProof) { + this.storageProof = storageProof; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof EthGetProof.Proof)) { + return false; + } + EthGetProof.Proof proof = (EthGetProof.Proof) o; + + if (getAddress() != null + ? !getAddress().equals(proof.getAddress()) + : proof.getAddress() != null) { + return false; + } + + if (getBalanceRaw() != null + ? !getBalanceRaw().equals(proof.getBalanceRaw()) + : proof.getBalanceRaw() != null) { + return false; + } + + if (getCodeHash() != null + ? !getCodeHash().equals(proof.getCodeHash()) + : proof.getCodeHash() != null) { + return false; + } + if (getNonce() != null + ? !getNonce().equals(proof.getNonce()) + : proof.getNonce() != null) { + return false; + } + + if (getStorageHash() != null + ? !getStorageHash().equals(proof.getStorageHash()) + : proof.getStorageHash() != null) { + return false; + } + + if (getAccountProof() != null + ? !getAccountProof().equals(proof.getAccountProof()) + : proof.getAccountProof() != null) { + return false; + } + + return getStorageProof() != null + ? getStorageProof().equals(proof.getStorageProof()) + : proof.getStorageProof() == null; + } + + @Override + public int hashCode() { + int result = getAddress() != null ? getAddress().hashCode() : 0; + result = 31 * result + (getBalanceRaw() != null ? getBalanceRaw().hashCode() : 0); + result = 31 * result + (getCodeHash() != null ? getCodeHash().hashCode() : 0); + result = 31 * result + (getNonce() != null ? getNonce().hashCode() : 0); + result = 31 * result + (getStorageHash() != null ? getStorageHash().hashCode() : 0); + result = 31 * result + (getAccountProof() != null ? getAccountProof().hashCode() : 0); + result = 31 * result + (getStorageProof() != null ? getStorageProof().hashCode() : 0); + return result; + } + } + + /** storage proof. */ + public static class StorageProof { + private String key; + + private String value; + + private List proof; + + /** Storage proof. */ + public StorageProof() {} + + /** + * Instantiates a new Storage proof. + * + * @param key the key + * @param value the value + * @param proof the proof + */ + public StorageProof(String key, String value, List proof) { + this.key = key; + this.value = value; + this.proof = proof; + } + + /** + * Gets key. + * + * @return the key + */ + public String getKey() { + return key; + } + + /** + * Sets key. + * + * @param key the key + */ + public void setKey(String key) { + this.key = key; + } + + /** + * Gets value. + * + * @return the value + */ + public String getValue() { + return value; + } + + /** + * Sets value. + * + * @param value the value + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets proof. + * + * @return the proof + */ + public List getProof() { + return proof; + } + + /** + * Sets proof. + * + * @param proof the proof + */ + public void setProof(List proof) { + this.proof = proof; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof StorageProof)) { + return false; + } + + StorageProof proof = (EthGetProof.StorageProof) o; + + if (getKey() != null ? !getKey().equals(proof.getKey()) : proof.getKey() != null) { + return false; + } + if (getValue() != null + ? !getValue().equals(proof.getValue()) + : proof.getValue() != null) { + return false; + } + return getProof() != null + ? getProof().equals(proof.getProof()) + : proof.getProof() == null; + } + + @Override + public int hashCode() { + int result = getKey() != null ? getKey().hashCode() : 0; + result = 31 * result + (getValue() != null ? getValue().hashCode() : 0); + result = 31 * result + (getProof() != null ? getProof().hashCode() : 0); + return result; + } + } + + /** Json Deserializer of Proof. */ + public static class ResponseDeserializer extends JsonDeserializer { + + /** Instantiates a new Response deserializer. */ + public ResponseDeserializer() {} + + private ObjectReader objectReader = ObjectMapperFactory.getObjectReader(); + + @Override + public EthGetProof.Proof deserialize( + JsonParser jsonParser, DeserializationContext deserializationContext) + throws IOException { + if (jsonParser.getCurrentToken() != JsonToken.VALUE_NULL) { + return objectReader.readValue(jsonParser, EthGetProof.Proof.class); + } else { + return null; // null is wrapped by Optional in above getter + } + } + } +} diff --git a/core/src/test/java/org/web3j/protocol/core/RequestTest.java b/core/src/test/java/org/web3j/protocol/core/RequestTest.java index a198e132ef..3edf310def 100644 --- a/core/src/test/java/org/web3j/protocol/core/RequestTest.java +++ b/core/src/test/java/org/web3j/protocol/core/RequestTest.java @@ -612,6 +612,22 @@ public void testEthGetLogsWithBlockHash() throws Exception { + "\"address\":[\"\"]}],\"id\":}"); } + @Test + public void testEthGetProof() throws Exception { + web3j.ethGetProof( + "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", + Arrays.asList( + "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"), + "latest") + .send(); + verifyResult( + "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getProof\"," + + "\"params\":[\"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842\"," + + "[\"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\"]," + + "\"latest\"]," + + "\"id\":0}"); + } + @Test public void testEthGetWork() throws Exception { web3j.ethGetWork().send(); diff --git a/core/src/test/java/org/web3j/protocol/core/ResponseTest.java b/core/src/test/java/org/web3j/protocol/core/ResponseTest.java index 9ca8999f4d..e4bcbf51c0 100644 --- a/core/src/test/java/org/web3j/protocol/core/ResponseTest.java +++ b/core/src/test/java/org/web3j/protocol/core/ResponseTest.java @@ -14,6 +14,7 @@ import java.io.IOException; import java.math.BigInteger; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; @@ -48,6 +49,7 @@ import org.web3j.protocol.core.methods.response.EthGetBlockTransactionCountByNumber; import org.web3j.protocol.core.methods.response.EthGetCode; import org.web3j.protocol.core.methods.response.EthGetCompilers; +import org.web3j.protocol.core.methods.response.EthGetProof; import org.web3j.protocol.core.methods.response.EthGetStorageAt; import org.web3j.protocol.core.methods.response.EthGetTransactionCount; import org.web3j.protocol.core.methods.response.EthGetTransactionReceipt; @@ -1515,6 +1517,62 @@ public void testEthLog() { assertEquals(ethLog.getLogs(), (logs)); } + @Test + public void testEthGetProof() { + buildResponse( + "{\n" + + " \"jsonrpc\": \"2.0\",\n" + + " \"id\": 1,\n" + + " \"result\": {\n" + + " \"address\": \"0x7f0d15c7faae65896648c8273b6d7e43f58fa842\",\n" + + " \"accountProof\": [\n" + + " \"0xf90211a08245f766623948f962b9f277955e4be3868d107042195746e5bb9b60e45c4a35a0f95891987a66390224caca18cf15d40288e85a58fee02b61b4e235a95844678ca04c783e1622a91a7cd4d06e82e654cc8bcd5b00a545889ff729f35ccd8387f5e3a08e28b463ee2ada55e1647c4c502976e5c09dcd94828e78d0ad09ab94db80a14aa0a41aaedbede9a14677796971bbe97ac152c4101471d62786208cf54bb7763818a02bc95a8f57339e1262460c02e885ab2fc03762a7a646693b659e64889522ca3aa075772fb16c66643216c7ab93eb2c96d28142b8c99573f4fcdce41b9064a303d1a0da840a0f8f62bf404e1241139fb6d6eedf56e5ea7fed9e79001bbc31806d7168a0550099050860af73557452539c5bd055324400969f76b4643b531a8fef7c4ad2a02de16af6ab3f4205295bdd828e81c97930413ee3dd8e0aa76268909492c0f646a0ab2f8ba58a07310e12c7140427278f5715cbf975b735bac5d2338c487b2b615ca004725301c50e47bfa03c8495b5f009ee5aac8b15581dc6e9f5870c63e8fcc118a0cbd9efe9133d519ca35327c90c3b102972967e35e4432e4d0ce8416311267b7ca04e8d4cd1b3d110571ed885ccd470458a86e2dcf1fd083f1c2b9118001d4fc89ea03c6135b75f89e3b5c24c1354638e1a10c2248e5d7bc87df2d8230910660d3d84a0186eea2111408bc02272677443c21e2533146a56785a6bc34f9180e2ba4b567880\",\n" + + " \"0xf90211a0ebfa45ac468954fd9f1e4d5c8b5b0015500b7e9f083e1626e05a03069d2d7b67a077e18486d90836a1816056a6fa8ed0339e15cf937ea87841e035ab26fd39057ea06e8c3b073ed5d7e86a205f0011f726b0a87f011b4e6e0521a287d378eda627a5a0b1decdb542bf89924e1022d9ab05e3dd9e2aca2f32f43489ce5723ddbe8b7a4fa0223dd0aa6c255a7b5a1e4b9753eacf599db92476baf674136f39b808d084991da0cbd89f24d151b9b23b147bf1bb71006d8661b19a8171cf26bb20842944a25ff1a0a380efa4b380cf41b0af35bb7a4f68c1a3988f9aa62c1a4c3c0bfd72d6c588c2a0c76f535a14cd7d869f5f01054cc72b827bd1c7b11df30138b98421a7c331d5a8a0d5b25d3d8a6c82f60c6eab724afed222f575824789d2d9f0768d46be39b7cbd1a0e2b2326a7ee7c454bde59d682367af495756b3c11408b7d97e3e84936ef4c5a1a00bb7e8a57023a0926c6683cd2a9a530b29d26d75d38872aeec1a21100b77fecba0288d0834990caaf30d2c6dfff07e52615e16c463e7256fab04ede25899d032f9a0dbb8748605aeb933068490238594afa7d93e018d04712d3d6af29fac9c81620fa0bae1aa9abe2c40e45f3274edeaba95f81a7e91da98c746bf31b21c280f100682a0c726027419c64dba7e2aeb5d1423b1fad6e773cb604668dc044671d5d5b18430a0cacd3a2b6c933e9a2148c7314d294d2f7356bb17900ac3b4faccd7f561cd6f1d80\",\n" + + " \"0xf90211a0d26a9a18bdeb7e2387f9d9375bbc1b987c45a58f3eaaa4d29df611f0618c17d4a0839e8f34f581129bf52277d6aab412bc9794866fa22e93938fffbf85896b067ba008d315b1fbb99070a424b7efdeb3a8a90d631e325dc48f5f8c36b67ca0244081a0c1436f0a1e74a33600455326571d9549e904724d2646c0c86bed0e226a687bd1a05699909cad5f4b507001ce88a887af4148fb7ee14ed0f93c7aa9635b66407f9da0cb5f6eb1cc89cef0e221aeef566c891fa46f456370d52a8b322e4917c2f9ad87a0da1425f08bbf9d0368d159cd810f33c2b19a6e5d0b15043dfac565cf03b57c77a0b26393ad5305e312a3e388deb50bec841bbcbec45317ffb7753114f3d6d37ff9a0c24f396b4ae01cb32a72880baff2db25843979103c3a4d1116698416e29439c4a0d6738cafb3d29dd438a2bf074d9b991636535b83b41f589189801ce75e94c5b7a02f2c355b91c78a6d5386a874a092b1d8e1c740408afb532721c1af0e905de5e3a01511013c45279c74536a5e538251c4dfd7594848ed570b48615b094ca83849dda05e12cb9b86dc6c2c1e0dd68f8c2a93c83d2eedb5dbba3969a2b6c7032e26fc7ca0cfa01a6943b11ca2be19dfa3b23d535395f17db6ac1fe1dd5172643e8ccd68f7a002ae61b52a9a0b09c4ca9866b69e4f10765c1f7778e2d4f2300183868f5fd151a039dc21a690fbeed9ea699959be8b2e76eed93b9da21d12ee4254d0a1c51dc87380\",\n" + + " \"0xf90211a05b44d7409dc085529b33905d01eb00210fb1c787998b88df5619fb6e3b860181a03bb3e5e3e8d979fd3bc86c602d6e6a57b1fc4c7f5f6a774b7e91af001cdef664a0a8fd61cceed0f8a639beca30fcd32411c0fcca5a102ff4a2656cde8c7eb858b4a0052e56ef09a9139a58d80329870ddc961e8ed112c8edc1325f71903fba84275ba0729ff34831623850f26d3601d7db1af2da69f115e9be8f9fa8454cc006b51403a09e56b2a68595be5b215cbc173a6e810137be55a748587eb81d172439018ee7aaa0fa5b27319522283b38e2d1abec5941b2d78e78fc40aa5a4b4476e36a0443311fa05b5f6d0058c46ea701f4ba42aabedb7b12e664a91f4b35c5519797df4c623f55a0947a7cbc568c23382aacbe508353c7f8ad299f3ea3eb471506c6b4291868b3e5a0f2313976f5c85685f419fc3022cf28fb9696c05ca27c44437f717f02e0154fbda01a96e6375ed8e8dc0749b2d45f93207d9219168a9eea142053a5e23e7a47232aa06f9d9145b92865e970f60dd81aa55ced05698090e9e23f341729be2a90ce7b96a01b6c084aad02ab8cfc5bdc0800b956db46853cfa8b9b47ff35867f02718f8130a0d7493eefde332cd1de8898096e9e8916cc7e320a6eb0ede2dc165fc5ed8803a1a0f0c6e212824552eee4b2479dae9b570041441e0cb0244d8bf045a73268aefda6a01e9045c2bc23b1610f20c3501862a067bfc80af7908344527c62faf1129fb43d80\",\n" + + " \"0xf90211a056e7736ac44b0a6d46f4a6e40abf6426866f7f29ab0637bc89c390b4f0dc7807a07aec46d6e64a9847c400021f5e0f0373592e676b11d15cdf22765addf1033f01a09c356f78e4889e626568761468ca4e44ce0cc78f08a40035fc9be23b1c1990a0a0d18cfe2360f9559b663f4a8864995420b54e0c4c6c7f33019d2467b67080fed5a08b3d08ef8de3638edabb423c901a6c1ca8b1ef93b41427b2d409be7198a89225a0df689118041c8f4b2751afbf3cb7be36540e52742362df3ded6f67e3a8024feea0a7e5e17854690d418ef89eb6753e1d36e96cadc4a186bcd8ce71f8665fbe6814a0367bc2399eee7dffeaf8aea140a3973cbced2ed904aa7e6c69443a4877bb7115a0b1f51cb2cb73acdce7ee790854c03d59940e415b6598bda7fa753c0ae0e129dda021f400618bbd2b1ac65d863146f3497feaca7e73df4a3cf211b0a95ec5f39b5ea0494ec6c1615466d244e80992aee4b2496b4c8adda7f7b989e776a715a7a72b4aa03d64c83151b47fdf8c16ce7845306575108c3b8c6b3f9ce8032b65f05fb5d017a0c68bc1b17e6a32dd438aec2ca6c8beea5dd53a3192971bbc484036c9431ead88a0580a8ef71765615a19afd214553866e2215f94eb72631335fa8ec0c5ad450e19a04eda5daea47af109418ad18cae8c124e790d66046ce9389376c4a965f919c725a0a0a6553d3fc52e639eac9c20dbb7cd8930eacaa8b35f8b8f3bb23afb53cc966580\",\n" + + " \"0xf90211a0597493b2845e511c876b84fad3925bb78c3922b3734208f20aff5461c7078e7ca0eb3723d662049847561ea31922b2ea5ab7a641ce7c14b5fa0ec346975d16c187a00e5c88ea26113f0295d8c682f1526f2fa7906bc422bfe9cc8b8f869686e179d4a0b94a30e2218afad53a0eacc505ea552a8288457847fcae72555aac638b52c46ea0d6430dd23ef9889e1272e494530d6ec89f080c49bf09f8a6ac634b153fa8ce5ca0e8c4de149f9b385e51fb66516a4d91b62dbd80ddedd4522e14d370da47f63e5aa0fa40fc95a8bdd7126c4db03b0c1a20c654aa22cf6f72024c4a0925d6f29fc9baa005c16a67b6ee21b8e9371064570b2f30342add57d7c45bc43df25fc680132186a0c2ed9529b58b672abd733db30ccac4e5ebeeedeb38418a5925e57b0f822df814a0d18e42474e815b62da57cf67bcd8ed1c90d4f8ecf8f6d0b2e66b9656be2686ada0e4dc3683f731f21c0c34a10d7ffac39b20a64ac326269433a5cacaeb90a8a17da0e3f8b04c275387c6222b6536967f2f1e6fc76dc6ee0e705d3e505f3d07e8bdd4a0deaf89533b13c20ff50ff3f03ff3a2daa8d1329a6a6d17a58c422cbe5ee2f80aa022b542269e108a24dc0ed74e62fc571185dcf398acfbf15a7fb6ce3e8aba50d6a0f29369f8c3d70bc9f472c2175ab5495edcf35a65527f67d391068c0275284307a0c93bd89abbea5ae96496a12d236323d11d2da9cde7a3b9fdb15d504f4ea1eda680\",\n" + + " \"0xf90151a000595129cf1c67ce97ed615df7184fb47a0d018d9147a2a7952a639e464cdfd380a052081f67d885b439bee62a1c4e09c02a1ec729aef4d92be6584a29141a79c5c7a0d99cae2bc3b6fc3e8e2767b4d7a5884b9b2d9d20da7890318beefcdb9c7346d58080a0f63571735d99e763dafadb03d1abe3a93a98740ecddc8514d13df46a35a8d94680a081870f4697e57436ccdd8bdc1d624d7bc07861748ff8b3a352334df68f2c03ada0f0252504ee8753335ecf0ca1f73cf13d4505783ed5110bf4e9b384a68ad88f69a0d38a18ef7b993c9ad2d848453e7722c26998ff3d63e243b99cdab0dabf84157ea06e5ad479dbda7f1647ed613e35d837f5d2c697ef34160f3665173186553ee9c280a0bf8371cac505b6ea0cb0f67ef744713f306a2455f3f8844cfa527c62db59c69980a0d6d689405b1cf73786c5fdabb55ec22f9b5712d1ba9c0bfcd46d4b93721fcac780\",\n" + + " \"0xf8669d37f29e142d49f8824d4e7f1735ec3da219687387629b5fccd86812df84b846f8440180a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a01d93f60f105899172f7255c030301c3af4564edd4a48577dbdc448aec7ddb0ac\"],\n" + + " \"balance\": \"0x0\",\n" + + " \"codeHash\": \"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470\",\n" + + " \"nonce\": \"0x0\",\n" + + " \"storageHash\": \"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",\n" + + " \"storageProof\": [{\n" + + " \"key\": \"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",\n" + + " \"value\": \"0x0\",\n" + + " \"proof\": []\n" + + " }]\n" + + " }\n" + + "}"); + + EthGetProof ethGetProof = deserialiseResponse(EthGetProof.class); + + EthGetProof.Proof proof = + new EthGetProof.Proof( + "0x7f0d15c7faae65896648c8273b6d7e43f58fa842", + "0x0", + "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "0x0", + "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + Arrays.asList( + "0xf90211a08245f766623948f962b9f277955e4be3868d107042195746e5bb9b60e45c4a35a0f95891987a66390224caca18cf15d40288e85a58fee02b61b4e235a95844678ca04c783e1622a91a7cd4d06e82e654cc8bcd5b00a545889ff729f35ccd8387f5e3a08e28b463ee2ada55e1647c4c502976e5c09dcd94828e78d0ad09ab94db80a14aa0a41aaedbede9a14677796971bbe97ac152c4101471d62786208cf54bb7763818a02bc95a8f57339e1262460c02e885ab2fc03762a7a646693b659e64889522ca3aa075772fb16c66643216c7ab93eb2c96d28142b8c99573f4fcdce41b9064a303d1a0da840a0f8f62bf404e1241139fb6d6eedf56e5ea7fed9e79001bbc31806d7168a0550099050860af73557452539c5bd055324400969f76b4643b531a8fef7c4ad2a02de16af6ab3f4205295bdd828e81c97930413ee3dd8e0aa76268909492c0f646a0ab2f8ba58a07310e12c7140427278f5715cbf975b735bac5d2338c487b2b615ca004725301c50e47bfa03c8495b5f009ee5aac8b15581dc6e9f5870c63e8fcc118a0cbd9efe9133d519ca35327c90c3b102972967e35e4432e4d0ce8416311267b7ca04e8d4cd1b3d110571ed885ccd470458a86e2dcf1fd083f1c2b9118001d4fc89ea03c6135b75f89e3b5c24c1354638e1a10c2248e5d7bc87df2d8230910660d3d84a0186eea2111408bc02272677443c21e2533146a56785a6bc34f9180e2ba4b567880", + "0xf90211a0ebfa45ac468954fd9f1e4d5c8b5b0015500b7e9f083e1626e05a03069d2d7b67a077e18486d90836a1816056a6fa8ed0339e15cf937ea87841e035ab26fd39057ea06e8c3b073ed5d7e86a205f0011f726b0a87f011b4e6e0521a287d378eda627a5a0b1decdb542bf89924e1022d9ab05e3dd9e2aca2f32f43489ce5723ddbe8b7a4fa0223dd0aa6c255a7b5a1e4b9753eacf599db92476baf674136f39b808d084991da0cbd89f24d151b9b23b147bf1bb71006d8661b19a8171cf26bb20842944a25ff1a0a380efa4b380cf41b0af35bb7a4f68c1a3988f9aa62c1a4c3c0bfd72d6c588c2a0c76f535a14cd7d869f5f01054cc72b827bd1c7b11df30138b98421a7c331d5a8a0d5b25d3d8a6c82f60c6eab724afed222f575824789d2d9f0768d46be39b7cbd1a0e2b2326a7ee7c454bde59d682367af495756b3c11408b7d97e3e84936ef4c5a1a00bb7e8a57023a0926c6683cd2a9a530b29d26d75d38872aeec1a21100b77fecba0288d0834990caaf30d2c6dfff07e52615e16c463e7256fab04ede25899d032f9a0dbb8748605aeb933068490238594afa7d93e018d04712d3d6af29fac9c81620fa0bae1aa9abe2c40e45f3274edeaba95f81a7e91da98c746bf31b21c280f100682a0c726027419c64dba7e2aeb5d1423b1fad6e773cb604668dc044671d5d5b18430a0cacd3a2b6c933e9a2148c7314d294d2f7356bb17900ac3b4faccd7f561cd6f1d80", + "0xf90211a0d26a9a18bdeb7e2387f9d9375bbc1b987c45a58f3eaaa4d29df611f0618c17d4a0839e8f34f581129bf52277d6aab412bc9794866fa22e93938fffbf85896b067ba008d315b1fbb99070a424b7efdeb3a8a90d631e325dc48f5f8c36b67ca0244081a0c1436f0a1e74a33600455326571d9549e904724d2646c0c86bed0e226a687bd1a05699909cad5f4b507001ce88a887af4148fb7ee14ed0f93c7aa9635b66407f9da0cb5f6eb1cc89cef0e221aeef566c891fa46f456370d52a8b322e4917c2f9ad87a0da1425f08bbf9d0368d159cd810f33c2b19a6e5d0b15043dfac565cf03b57c77a0b26393ad5305e312a3e388deb50bec841bbcbec45317ffb7753114f3d6d37ff9a0c24f396b4ae01cb32a72880baff2db25843979103c3a4d1116698416e29439c4a0d6738cafb3d29dd438a2bf074d9b991636535b83b41f589189801ce75e94c5b7a02f2c355b91c78a6d5386a874a092b1d8e1c740408afb532721c1af0e905de5e3a01511013c45279c74536a5e538251c4dfd7594848ed570b48615b094ca83849dda05e12cb9b86dc6c2c1e0dd68f8c2a93c83d2eedb5dbba3969a2b6c7032e26fc7ca0cfa01a6943b11ca2be19dfa3b23d535395f17db6ac1fe1dd5172643e8ccd68f7a002ae61b52a9a0b09c4ca9866b69e4f10765c1f7778e2d4f2300183868f5fd151a039dc21a690fbeed9ea699959be8b2e76eed93b9da21d12ee4254d0a1c51dc87380", + "0xf90211a05b44d7409dc085529b33905d01eb00210fb1c787998b88df5619fb6e3b860181a03bb3e5e3e8d979fd3bc86c602d6e6a57b1fc4c7f5f6a774b7e91af001cdef664a0a8fd61cceed0f8a639beca30fcd32411c0fcca5a102ff4a2656cde8c7eb858b4a0052e56ef09a9139a58d80329870ddc961e8ed112c8edc1325f71903fba84275ba0729ff34831623850f26d3601d7db1af2da69f115e9be8f9fa8454cc006b51403a09e56b2a68595be5b215cbc173a6e810137be55a748587eb81d172439018ee7aaa0fa5b27319522283b38e2d1abec5941b2d78e78fc40aa5a4b4476e36a0443311fa05b5f6d0058c46ea701f4ba42aabedb7b12e664a91f4b35c5519797df4c623f55a0947a7cbc568c23382aacbe508353c7f8ad299f3ea3eb471506c6b4291868b3e5a0f2313976f5c85685f419fc3022cf28fb9696c05ca27c44437f717f02e0154fbda01a96e6375ed8e8dc0749b2d45f93207d9219168a9eea142053a5e23e7a47232aa06f9d9145b92865e970f60dd81aa55ced05698090e9e23f341729be2a90ce7b96a01b6c084aad02ab8cfc5bdc0800b956db46853cfa8b9b47ff35867f02718f8130a0d7493eefde332cd1de8898096e9e8916cc7e320a6eb0ede2dc165fc5ed8803a1a0f0c6e212824552eee4b2479dae9b570041441e0cb0244d8bf045a73268aefda6a01e9045c2bc23b1610f20c3501862a067bfc80af7908344527c62faf1129fb43d80", + "0xf90211a056e7736ac44b0a6d46f4a6e40abf6426866f7f29ab0637bc89c390b4f0dc7807a07aec46d6e64a9847c400021f5e0f0373592e676b11d15cdf22765addf1033f01a09c356f78e4889e626568761468ca4e44ce0cc78f08a40035fc9be23b1c1990a0a0d18cfe2360f9559b663f4a8864995420b54e0c4c6c7f33019d2467b67080fed5a08b3d08ef8de3638edabb423c901a6c1ca8b1ef93b41427b2d409be7198a89225a0df689118041c8f4b2751afbf3cb7be36540e52742362df3ded6f67e3a8024feea0a7e5e17854690d418ef89eb6753e1d36e96cadc4a186bcd8ce71f8665fbe6814a0367bc2399eee7dffeaf8aea140a3973cbced2ed904aa7e6c69443a4877bb7115a0b1f51cb2cb73acdce7ee790854c03d59940e415b6598bda7fa753c0ae0e129dda021f400618bbd2b1ac65d863146f3497feaca7e73df4a3cf211b0a95ec5f39b5ea0494ec6c1615466d244e80992aee4b2496b4c8adda7f7b989e776a715a7a72b4aa03d64c83151b47fdf8c16ce7845306575108c3b8c6b3f9ce8032b65f05fb5d017a0c68bc1b17e6a32dd438aec2ca6c8beea5dd53a3192971bbc484036c9431ead88a0580a8ef71765615a19afd214553866e2215f94eb72631335fa8ec0c5ad450e19a04eda5daea47af109418ad18cae8c124e790d66046ce9389376c4a965f919c725a0a0a6553d3fc52e639eac9c20dbb7cd8930eacaa8b35f8b8f3bb23afb53cc966580", + "0xf90211a0597493b2845e511c876b84fad3925bb78c3922b3734208f20aff5461c7078e7ca0eb3723d662049847561ea31922b2ea5ab7a641ce7c14b5fa0ec346975d16c187a00e5c88ea26113f0295d8c682f1526f2fa7906bc422bfe9cc8b8f869686e179d4a0b94a30e2218afad53a0eacc505ea552a8288457847fcae72555aac638b52c46ea0d6430dd23ef9889e1272e494530d6ec89f080c49bf09f8a6ac634b153fa8ce5ca0e8c4de149f9b385e51fb66516a4d91b62dbd80ddedd4522e14d370da47f63e5aa0fa40fc95a8bdd7126c4db03b0c1a20c654aa22cf6f72024c4a0925d6f29fc9baa005c16a67b6ee21b8e9371064570b2f30342add57d7c45bc43df25fc680132186a0c2ed9529b58b672abd733db30ccac4e5ebeeedeb38418a5925e57b0f822df814a0d18e42474e815b62da57cf67bcd8ed1c90d4f8ecf8f6d0b2e66b9656be2686ada0e4dc3683f731f21c0c34a10d7ffac39b20a64ac326269433a5cacaeb90a8a17da0e3f8b04c275387c6222b6536967f2f1e6fc76dc6ee0e705d3e505f3d07e8bdd4a0deaf89533b13c20ff50ff3f03ff3a2daa8d1329a6a6d17a58c422cbe5ee2f80aa022b542269e108a24dc0ed74e62fc571185dcf398acfbf15a7fb6ce3e8aba50d6a0f29369f8c3d70bc9f472c2175ab5495edcf35a65527f67d391068c0275284307a0c93bd89abbea5ae96496a12d236323d11d2da9cde7a3b9fdb15d504f4ea1eda680", + "0xf90151a000595129cf1c67ce97ed615df7184fb47a0d018d9147a2a7952a639e464cdfd380a052081f67d885b439bee62a1c4e09c02a1ec729aef4d92be6584a29141a79c5c7a0d99cae2bc3b6fc3e8e2767b4d7a5884b9b2d9d20da7890318beefcdb9c7346d58080a0f63571735d99e763dafadb03d1abe3a93a98740ecddc8514d13df46a35a8d94680a081870f4697e57436ccdd8bdc1d624d7bc07861748ff8b3a352334df68f2c03ada0f0252504ee8753335ecf0ca1f73cf13d4505783ed5110bf4e9b384a68ad88f69a0d38a18ef7b993c9ad2d848453e7722c26998ff3d63e243b99cdab0dabf84157ea06e5ad479dbda7f1647ed613e35d837f5d2c697ef34160f3665173186553ee9c280a0bf8371cac505b6ea0cb0f67ef744713f306a2455f3f8844cfa527c62db59c69980a0d6d689405b1cf73786c5fdabb55ec22f9b5712d1ba9c0bfcd46d4b93721fcac780", + "0xf8669d37f29e142d49f8824d4e7f1735ec3da219687387629b5fccd86812df84b846f8440180a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a01d93f60f105899172f7255c030301c3af4564edd4a48577dbdc448aec7ddb0ac"), + // String key, String value, List proof + Arrays.asList( + new EthGetProof.StorageProof( + "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "0x0", + new ArrayList<>()))); + assertEquals(proof, ethGetProof.getProof()); + } + @Test public void testEthGetWork() { diff --git a/integration-tests/src/test/java/org/web3j/protocol/core/CoreIT.java b/integration-tests/src/test/java/org/web3j/protocol/core/CoreIT.java index c31f02dbe3..d1fcd80218 100644 --- a/integration-tests/src/test/java/org/web3j/protocol/core/CoreIT.java +++ b/integration-tests/src/test/java/org/web3j/protocol/core/CoreIT.java @@ -13,6 +13,7 @@ package org.web3j.protocol.core; import java.math.BigInteger; +import java.util.Arrays; import java.util.List; import org.junit.jupiter.api.BeforeAll; @@ -39,6 +40,7 @@ import org.web3j.protocol.core.methods.response.EthGetBlockTransactionCountByNumber; import org.web3j.protocol.core.methods.response.EthGetCode; import org.web3j.protocol.core.methods.response.EthGetCompilers; +import org.web3j.protocol.core.methods.response.EthGetProof; import org.web3j.protocol.core.methods.response.EthGetStorageAt; import org.web3j.protocol.core.methods.response.EthGetTransactionCount; import org.web3j.protocol.core.methods.response.EthGetTransactionReceipt; @@ -381,7 +383,6 @@ public void testEthGetTransactionByBlockHashAndIndex() throws Exception { @Test public void testEthGetTransactionByBlockNumberAndIndex() throws Exception { - EthTransaction ethTransaction = web3j.ethGetTransactionByBlockNumberAndIndex( DefaultBlockParameter.valueOf(config.validBlockNumber()), @@ -501,6 +502,18 @@ public void testEthGetLogs() throws Exception { assertFalse(logs.isEmpty()); } + @Test + public void testEthGetProof() throws Exception { + EthGetProof ethGetProof = + web3j.ethGetProof( + "0x0000000000000000000000000000000000000000", + Arrays.asList( + "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"), + "latest") + .send(); + assertNotNull(ethGetProof.getResult()); + } + @Disabled // Not available @Test public void testEthGetWork() throws Exception { From bc440394ed97024b2a47e90971588c469f0005f2 Mon Sep 17 00:00:00 2001 From: Nischal Sharma Date: Thu, 3 Aug 2023 14:32:11 +0530 Subject: [PATCH 24/52] bump version to 4.10.3-snapshot --- README.md | 2 +- build.gradle | 2 +- gradle.properties | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 91fb48d268..600228b506 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ Java: org.web3j core - 4.9.8 + 4.10.2 ``` diff --git a/build.gradle b/build.gradle index 7102b87347..ec231a0a88 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ ext { // test dependencies equalsverifierVersion = '3.14.1' junitVersion = '5.5.2' - web3jUnitVersion = '4.10.0' + web3jUnitVersion = '4.10.1' junitBenchmarkVersion = '0.7.2' logbackVersion = '1.2.3' mockitoJunitVersion = '3.1.0' diff --git a/gradle.properties b/gradle.properties index fab63095f7..ae543201d3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ group=org.web3j -version=4.10.2-SNAPSHOT +version=4.10.3-SNAPSHOT From 98840f94de5247b8e12f9738b7674f045caaf8a2 Mon Sep 17 00:00:00 2001 From: KimJinkYU Date: Wed, 16 Aug 2023 23:30:28 +0900 Subject: [PATCH 25/52] Move CipherException from org.web3j.crypto to org.web3j.crypto.exception --- core/src/main/java/org/web3j/crypto/Bip44WalletUtils.java | 1 + core/src/main/java/org/web3j/crypto/Wallet.java | 1 + core/src/main/java/org/web3j/crypto/WalletUtils.java | 1 + .../java/org/web3j/crypto/{ => exception}/CipherException.java | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) rename crypto/src/main/java/org/web3j/crypto/{ => exception}/CipherException.java (96%) diff --git a/core/src/main/java/org/web3j/crypto/Bip44WalletUtils.java b/core/src/main/java/org/web3j/crypto/Bip44WalletUtils.java index c0c3d39aad..6bcb7a2882 100644 --- a/core/src/main/java/org/web3j/crypto/Bip44WalletUtils.java +++ b/core/src/main/java/org/web3j/crypto/Bip44WalletUtils.java @@ -14,6 +14,7 @@ import java.io.File; import java.io.IOException; +import org.web3j.crypto.exception.CipherException; import static org.web3j.crypto.Bip32ECKeyPair.HARDENED_BIT; diff --git a/core/src/main/java/org/web3j/crypto/Wallet.java b/core/src/main/java/org/web3j/crypto/Wallet.java index f4c15ea131..3f058daffe 100644 --- a/core/src/main/java/org/web3j/crypto/Wallet.java +++ b/core/src/main/java/org/web3j/crypto/Wallet.java @@ -29,6 +29,7 @@ import org.bouncycastle.crypto.generators.SCrypt; import org.bouncycastle.crypto.params.KeyParameter; +import org.web3j.crypto.exception.CipherException; import org.web3j.utils.Numeric; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/core/src/main/java/org/web3j/crypto/WalletUtils.java b/core/src/main/java/org/web3j/crypto/WalletUtils.java index e5ba08e314..0eae3cd8a9 100644 --- a/core/src/main/java/org/web3j/crypto/WalletUtils.java +++ b/core/src/main/java/org/web3j/crypto/WalletUtils.java @@ -26,6 +26,7 @@ import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; +import org.web3j.crypto.exception.CipherException; import org.web3j.utils.Numeric; import static org.web3j.crypto.Hash.sha256; diff --git a/crypto/src/main/java/org/web3j/crypto/CipherException.java b/crypto/src/main/java/org/web3j/crypto/exception/CipherException.java similarity index 96% rename from crypto/src/main/java/org/web3j/crypto/CipherException.java rename to crypto/src/main/java/org/web3j/crypto/exception/CipherException.java index 74ae94b53d..4e9b32a60c 100644 --- a/crypto/src/main/java/org/web3j/crypto/CipherException.java +++ b/crypto/src/main/java/org/web3j/crypto/exception/CipherException.java @@ -10,7 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ -package org.web3j.crypto; +package org.web3j.crypto.exception; /** Cipher exception wrapper. */ public class CipherException extends Exception { From 3506f7b310f55fc36e7c25a9a4f4bb48898419ac Mon Sep 17 00:00:00 2001 From: Angus Scott Date: Wed, 16 Aug 2023 17:48:02 +0100 Subject: [PATCH 26/52] Adding support for Withdrawals in EthBlock as part of EIP-4895 --- .../core/methods/response/EthBlock.java | 111 +++++++++++++++++- .../org/web3j/protocol/core/ResponseTest.java | 60 +++++++++- .../core/methods/response/EthBlockTest.java | 6 +- 3 files changed, 165 insertions(+), 12 deletions(-) diff --git a/core/src/main/java/org/web3j/protocol/core/methods/response/EthBlock.java b/core/src/main/java/org/web3j/protocol/core/methods/response/EthBlock.java index cb80388a77..dae4a84eea 100644 --- a/core/src/main/java/org/web3j/protocol/core/methods/response/EthBlock.java +++ b/core/src/main/java/org/web3j/protocol/core/methods/response/EthBlock.java @@ -17,6 +17,7 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import java.util.Objects; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; @@ -81,6 +82,8 @@ public static class Block { private List uncles; private List sealFields; private String baseFeePerGas; + private String withdrawalsRoot; + private List withdrawals; public Block() {} @@ -107,7 +110,9 @@ public Block( List transactions, List uncles, List sealFields, - String baseFeePerGas) { + String baseFeePerGas, + String withdrawalsRoot, + List withdrawals) { this.number = number; this.hash = hash; this.parentHash = parentHash; @@ -131,6 +136,8 @@ public Block( this.uncles = uncles; this.sealFields = sealFields; this.baseFeePerGas = baseFeePerGas; + this.withdrawalsRoot = withdrawalsRoot; + this.withdrawals = withdrawals; } public BigInteger getNumber() { @@ -354,6 +361,22 @@ public String getBaseFeePerGasRaw() { return baseFeePerGas; } + public String getWithdrawalsRoot() { + return withdrawalsRoot; + } + + public void setWithdrawalsRoot(String withdrawalsRoot) { + this.withdrawalsRoot = withdrawalsRoot; + } + + public List getWithdrawals() { + return withdrawals; + } + + public void setWithdrawals(List withdrawals) { + this.withdrawals = withdrawals; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -475,9 +498,21 @@ public boolean equals(Object o) { return false; } - return getSealFields() != null - ? getSealFields().equals(block.getSealFields()) - : block.getSealFields() == null; + if (getSealFields() != null + ? !getSealFields().equals(block.getSealFields()) + : block.getSealFields() != null) { + return false; + } + + if (getWithdrawalsRoot() != null + ? !getWithdrawalsRoot().equals(block.getWithdrawalsRoot()) + : block.getWithdrawalsRoot() != null) { + return false; + } + + return getWithdrawals() != null + ? getWithdrawals().equals(block.getWithdrawals()) + : block.getWithdrawals() == null; } @Override @@ -517,6 +552,10 @@ public int hashCode() { + (getBaseFeePerGasRaw() != null ? getBaseFeePerGasRaw().hashCode() : 0); + result = + 31 * result + + (getWithdrawalsRoot() != null ? getWithdrawalsRoot().hashCode() : 0); + result = 31 * result + (getWithdrawals() != null ? getWithdrawals().hashCode() : 0); return result; } } @@ -702,6 +741,70 @@ public List deserialize( } } + public static class Withdrawal { + private String index; + private String validatorIndex; + private String address; + private String amount; + + public Withdrawal() {} + + public Withdrawal(String index, String validatorIndex, String address, String amount) { + this.index = index; + this.validatorIndex = validatorIndex; + this.address = address; + this.amount = amount; + } + + public String getIndex() { + return index; + } + + public void setIndex(String index) { + this.index = index; + } + + public String getValidatorIndex() { + return validatorIndex; + } + + public void setValidatorIndex(String validatorIndex) { + this.validatorIndex = validatorIndex; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public BigInteger getAmount() { + return Numeric.decodeQuantity(amount); + } + + public void setAmount(String amount) { + this.amount = amount; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Withdrawal that = (Withdrawal) o; + return Objects.equals(index, that.index) + && Objects.equals(validatorIndex, that.validatorIndex) + && Objects.equals(address, that.address) + && Objects.equals(amount, that.amount); + } + + @Override + public int hashCode() { + return Objects.hash(index, validatorIndex, address, amount); + } + } + public static class ResponseDeserialiser extends JsonDeserializer { private ObjectReader objectReader = ObjectMapperFactory.getObjectReader(); diff --git a/core/src/test/java/org/web3j/protocol/core/ResponseTest.java b/core/src/test/java/org/web3j/protocol/core/ResponseTest.java index e4bcbf51c0..bfd0d931d5 100644 --- a/core/src/test/java/org/web3j/protocol/core/ResponseTest.java +++ b/core/src/test/java/org/web3j/protocol/core/ResponseTest.java @@ -654,7 +654,16 @@ public void testEthBlockTransactionHashes() { + " \"0x57919c4e72e79ad7705a26e7ecd5a08ff546ac4fa37882e9cc57be87a3dab26b\",\n" + " \"0x39a3eb432fbef1fc\"\n" + " ],\n" - + " \"baseFeePerGas\": \"0x7\"\n" + + " \"baseFeePerGas\": \"0x7\",\n" + + " \"withdrawalsRoot\": \"0x1b1f845cd61c375a89ef101fd1bd86355f372a6a3dfe1960f2355e70bd5cd8a2\",\n" + + " \"withdrawals\": [\n" + + " {\n" + + " \"index\": \"0x68ba80\",\n" + + " \"validatorIndex\": \"0x65285\",\n" + + " \"address\": \"0x1e09b4199780a45792f4ff195ef68410a091b047\",\n" + + " \"amount\": \"0xd1f129\"\n" + + " }\n" + + " ]\n" + " }\n" + "}"); @@ -692,7 +701,14 @@ public void testEthBlockTransactionHashes() { Arrays.asList( "0x57919c4e72e79ad7705a26e7ecd5a08ff546ac4fa37882e9cc57be87a3dab26b", "0x39a3eb432fbef1fc"), - "0x7"); + "0x7", + "0x1b1f845cd61c375a89ef101fd1bd86355f372a6a3dfe1960f2355e70bd5cd8a2", + Arrays.asList( + new EthBlock.Withdrawal( + "0x68ba80", + "0x65285", + "0x1e09b4199780a45792f4ff195ef68410a091b047", + "0xd1f129"))); assertEquals(ethBlock.getBlock(), (block)); } @@ -760,7 +776,16 @@ public void testEthBlockFullTransactionsParity() { + " \"0x57919c4e72e79ad7705a26e7ecd5a08ff546ac4fa37882e9cc57be87a3dab26b\",\n" + " \"0x39a3eb432fbef1fc\"\n" + " ],\n" - + " \"baseFeePerGas\": \"0x7\"\n" + + " \"baseFeePerGas\": \"0x7\",\n" + + " \"withdrawalsRoot\": \"0x1b1f845cd61c375a89ef101fd1bd86355f372a6a3dfe1960f2355e70bd5cd8a2\",\n" + + " \"withdrawals\": [\n" + + " {\n" + + " \"index\": \"0x68ba80\",\n" + + " \"validatorIndex\": \"0x65285\",\n" + + " \"address\": \"0x1e09b4199780a45792f4ff195ef68410a091b047\",\n" + + " \"amount\": \"0xd1f129\"\n" + + " }\n" + + " ]\n" + " }\n" + "}"); @@ -820,7 +845,14 @@ public void testEthBlockFullTransactionsParity() { Arrays.asList( "0x57919c4e72e79ad7705a26e7ecd5a08ff546ac4fa37882e9cc57be87a3dab26b", "0x39a3eb432fbef1fc"), - "0x7"); + "0x7", + "0x1b1f845cd61c375a89ef101fd1bd86355f372a6a3dfe1960f2355e70bd5cd8a2", + Arrays.asList( + new EthBlock.Withdrawal( + "0x68ba80", + "0x65285", + "0x1e09b4199780a45792f4ff195ef68410a091b047", + "0xd1f129"))); assertEquals(ethBlock.getBlock(), (block)); } @@ -890,7 +922,16 @@ public void testEthBlockFullTransactionsGeth() { + " \"0x57919c4e72e79ad7705a26e7ecd5a08ff546ac4fa37882e9cc57be87a3dab26b\",\n" + " \"0x39a3eb432fbef1fc\"\n" + " ],\n" - + " \"baseFeePerGas\": \"0x7\"\n" + + " \"baseFeePerGas\": \"0x7\",\n" + + " \"withdrawalsRoot\": \"0x1b1f845cd61c375a89ef101fd1bd86355f372a6a3dfe1960f2355e70bd5cd8a2\",\n" + + " \"withdrawals\": [\n" + + " {\n" + + " \"index\": \"0x68ba80\",\n" + + " \"validatorIndex\": \"0x65285\",\n" + + " \"address\": \"0x1e09b4199780a45792f4ff195ef68410a091b047\",\n" + + " \"amount\": \"0xd1f129\"\n" + + " }\n" + + " ]\n" + " }\n" + "}"); @@ -950,7 +991,14 @@ public void testEthBlockFullTransactionsGeth() { Arrays.asList( "0x57919c4e72e79ad7705a26e7ecd5a08ff546ac4fa37882e9cc57be87a3dab26b", "0x39a3eb432fbef1fc"), - "0x7"); + "0x7", + "0x1b1f845cd61c375a89ef101fd1bd86355f372a6a3dfe1960f2355e70bd5cd8a2", + Arrays.asList( + new EthBlock.Withdrawal( + "0x68ba80", + "0x65285", + "0x1e09b4199780a45792f4ff195ef68410a091b047", + "0xd1f129"))); assertEquals(ethBlock.getBlock(), (block)); } diff --git a/core/src/test/java/org/web3j/protocol/core/methods/response/EthBlockTest.java b/core/src/test/java/org/web3j/protocol/core/methods/response/EthBlockTest.java index 1a28e5d005..d77532ff3f 100644 --- a/core/src/test/java/org/web3j/protocol/core/methods/response/EthBlockTest.java +++ b/core/src/test/java/org/web3j/protocol/core/methods/response/EthBlockTest.java @@ -25,7 +25,8 @@ public void testEthBlockNullSize() { EthBlock.Block ethBlock = new EthBlock.Block( null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null); + null, null, null, null, null, null, null, null, null, null, null, null, + null); assertEquals(ethBlock.getSize(), BigInteger.ZERO); } @@ -35,7 +36,8 @@ public void testEthBlockNotNullSize() { EthBlock.Block ethBlock = new EthBlock.Block( null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, "0x3e8", null, null, null, null, null, null, null); + null, null, null, "0x3e8", null, null, null, null, null, null, null, null, + null); assertEquals(ethBlock.getSize(), BigInteger.valueOf(1000)); } From 9766d4da3f43d8056d996b6080d4db2012b730e6 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Fri, 18 Aug 2023 12:59:43 +0300 Subject: [PATCH 27/52] add changes --- .github/workflows/build.yml | 2 +- abi/build.gradle | 30 ++++++++-------- gradle/jacoco/build.gradle | 71 +++++++++++++++++++++++-------------- 3 files changed, 61 insertions(+), 42 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7dd34d2838..221058828a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,6 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build - run: ./gradlew check jacocoRootTestReport + run: ./gradlew jacocoRootReport - name: Upload coverage reports to Codecov with GitHub Action uses: codecov/codecov-action@v3 diff --git a/abi/build.gradle b/abi/build.gradle index 87f864b6f8..dd664588ca 100644 --- a/abi/build.gradle +++ b/abi/build.gradle @@ -10,18 +10,18 @@ dependencies { tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -tasks.named("jacocoRootTestReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } -tasks.named("jacocoRootTestReport").configure { dependsOn(":besu:compileJava",":besu:compileTestJava",":besu:javadoc",":besu:test", ":besu:spotlessGroovyGradle", ":besu:spotlessJava",":besu:spotlessKotlin") } -tasks.named("jacocoRootTestReport").configure { dependsOn(":test",":spotlessGroovyGradle",":spotlessJava",":spotlessKotlin") } -tasks.named("jacocoRootTestReport").configure { dependsOn(":codegen:compileJava",":codegen:compileTestJava",":codegen:javadoc",":codegen:test",":codegen:processTestResources",":codegen:spotlessGroovyGradle", ":codegen:spotlessJava",":codegen:spotlessKotlin") } -tasks.named("jacocoRootTestReport").configure { dependsOn(":contracts:compileJava",":contracts:javadoc",":contracts:test",":contracts:processResources",":contracts:spotlessGroovyGradle", ":contracts:spotlessJava",":contracts:spotlessKotlin") } -tasks.named("jacocoRootTestReport").configure { dependsOn(":core:javadoc",":core:test",":core:spotlessGroovyGradle", ":core:spotlessJava",":core:spotlessKotlin") } -tasks.named("jacocoRootTestReport").configure { dependsOn(":crypto:javadoc",":crypto:test",":crypto:spotlessGroovyGradle", ":crypto:spotlessJava",":crypto:spotlessKotlin") } -tasks.named("jacocoRootTestReport").configure { dependsOn(":eea:compileTestJava",":eea:javadoc",":eea:test",":eea:spotlessGroovyGradle", ":eea:spotlessJava",":eea:spotlessKotlin") } -tasks.named("jacocoRootTestReport").configure { dependsOn(":geth:compileJava",":geth:compileTestJava",":geth:javadoc",":geth:test",":geth:spotlessGroovyGradle", ":geth:spotlessJava",":geth:spotlessKotlin") } -tasks.named("jacocoRootTestReport").configure { dependsOn(":hosted-providers:compileJava",":hosted-providers:compileTestJava",":hosted-providers:javadoc",":hosted-providers:test",":hosted-providers:spotlessGroovyGradle", ":hosted-providers:spotlessJava",":hosted-providers:spotlessKotlin") } -tasks.named("jacocoRootTestReport").configure { dependsOn(":integration-tests:compileTestJava",":integration-tests:processTestResources",":integration-tests:spotlessGroovyGradle", ":integration-tests:spotlessJava",":integration-tests:spotlessKotlin") } -tasks.named("jacocoRootTestReport").configure { dependsOn(":parity:compileJava",":parity:compileTestJava",":parity:javadoc",":parity:test",":parity:spotlessGroovyGradle", ":parity:spotlessJava",":parity:spotlessKotlin") } -tasks.named("jacocoRootTestReport").configure { dependsOn(":rlp:compileTestJava",":rlp:javadoc",":rlp:test",":rlp:spotlessGroovyGradle", ":rlp:spotlessJava",":rlp:spotlessKotlin") } -tasks.named("jacocoRootTestReport").configure { dependsOn(":tuples:javadoc",":tuples:test",":tuples:spotlessGroovyGradle", ":tuples:spotlessJava",":tuples:spotlessKotlin") } -tasks.named("jacocoRootTestReport").configure { dependsOn(":utils:javadoc",":utils:test",":utils:spotlessGroovyGradle", ":utils:spotlessJava",":utils:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } +tasks.named("jacocoRootReport").configure { dependsOn(":besu:compileJava",":besu:compileTestJava",":besu:javadoc",":besu:test", ":besu:spotlessGroovyGradle", ":besu:spotlessJava",":besu:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":test",":spotlessGroovyGradle",":spotlessJava",":spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":codegen:compileJava",":codegen:compileTestJava",":codegen:javadoc",":codegen:test",":codegen:processTestResources",":codegen:spotlessGroovyGradle", ":codegen:spotlessJava",":codegen:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":contracts:compileJava",":contracts:javadoc",":contracts:test",":contracts:processResources",":contracts:spotlessGroovyGradle", ":contracts:spotlessJava",":contracts:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":core:javadoc",":core:test",":core:spotlessGroovyGradle", ":core:spotlessJava",":core:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":crypto:javadoc",":crypto:test",":crypto:spotlessGroovyGradle", ":crypto:spotlessJava",":crypto:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":eea:compileTestJava",":eea:javadoc",":eea:test",":eea:spotlessGroovyGradle", ":eea:spotlessJava",":eea:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":geth:compileJava",":geth:compileTestJava",":geth:javadoc",":geth:test",":geth:spotlessGroovyGradle", ":geth:spotlessJava",":geth:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":hosted-providers:compileJava",":hosted-providers:compileTestJava",":hosted-providers:javadoc",":hosted-providers:test",":hosted-providers:spotlessGroovyGradle", ":hosted-providers:spotlessJava",":hosted-providers:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":integration-tests:compileTestJava",":integration-tests:processTestResources",":integration-tests:spotlessGroovyGradle", ":integration-tests:spotlessJava",":integration-tests:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":parity:compileJava",":parity:compileTestJava",":parity:javadoc",":parity:test",":parity:spotlessGroovyGradle", ":parity:spotlessJava",":parity:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":rlp:compileTestJava",":rlp:javadoc",":rlp:test",":rlp:spotlessGroovyGradle", ":rlp:spotlessJava",":rlp:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":tuples:javadoc",":tuples:test",":tuples:spotlessGroovyGradle", ":tuples:spotlessJava",":tuples:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":utils:javadoc",":utils:test",":utils:spotlessGroovyGradle", ":utils:spotlessJava",":utils:spotlessKotlin") } diff --git a/gradle/jacoco/build.gradle b/gradle/jacoco/build.gradle index 9fd7c8ba1b..fd3c3d546c 100644 --- a/gradle/jacoco/build.gradle +++ b/gradle/jacoco/build.gradle @@ -1,34 +1,53 @@ apply plugin: 'jacoco' -task jacocoRootTestReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) { - - doFirst { - executionData.fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec") - getExecutionData().from(executionData.findAll { it.exists() }) +//task jacocoRootTestReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) { +// +// doFirst { +// executionData.fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec") +// getExecutionData().from(executionData.findAll { it.exists() }) +// } +// +// dependsOn(subprojects.test) +// +// getSourceDirectories().from(subprojects.sourceSets.main.allSource.srcDirs) +// getAdditionalSourceDirs().from(subprojects.sourceSets.main.allSource.srcDirs) +// getClassDirectories().from(subprojects.sourceSets.main.output) +// executionData.from(subprojects.jacocoTestReport.executionData) +// +// reports { +// xml.enabled true +// } +// +// afterEvaluate { +// getClassDirectories().from(files(classDirectories.files.collect { +// fileTree(dir: it, +// exclude: [ +// 'org/web3j/abi/datatypes/generated/**', +// 'org/web3j/tuples/generated/**', +// 'org/web3j/ens/contracts/generated/**', +// 'org/gradle/**' +// ]) +// })) +// } +//} + +task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) { + additionalSourceDirs.from files(subprojects.sourceSets.main.allSource.srcDirs) + sourceDirectories.from files(subprojects.sourceSets.main.allSource.srcDirs) + classDirectories.from files(subprojects.sourceSets.main.output).asFileTree.matching { + exclude 'org/web3j/abi/datatypes/generated/**', + 'org/web3j/tuples/generated/**', + 'org/web3j/ens/contracts/generated/**', + 'org/gradle/**' } - - dependsOn(subprojects.test) - - getSourceDirectories().from(subprojects.sourceSets.main.allSource.srcDirs) - getAdditionalSourceDirs().from(subprojects.sourceSets.main.allSource.srcDirs) - getClassDirectories().from(subprojects.sourceSets.main.output) - executionData.from(subprojects.jacocoTestReport.executionData) - + executionData.from fileTree(dir: '.', includes: ['**/jacoco/*.exec']) reports { - xml.enabled true - } - - afterEvaluate { - getClassDirectories().from(files(classDirectories.files.collect { - fileTree(dir: it, - exclude: [ - 'org/web3j/abi/datatypes/generated/**', - 'org/web3j/tuples/generated/**', - 'org/web3j/ens/contracts/generated/**', - 'org/gradle/**' - ]) - })) + xml.required = true + xml.enabled = true + csv.required = true + html.destination file("build/reports/jacocoHtml") } + onlyIf = { true } } jacoco { From 3596c0df67ed1b202442e886852f4616c6f6d328 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Fri, 18 Aug 2023 13:05:49 +0300 Subject: [PATCH 28/52] update --- .github/workflows/codeql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 7038aa5d5b..97def081e1 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -49,7 +49,7 @@ jobs: # queries: security-extended,security-and-quality - name: Build - run: ./gradlew check jacocoRootTestReport + run: ./gradlew jacocoRootReport - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 From 2b1d7a1188631829feed6bffc2c214f21b3a748c Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Fri, 18 Aug 2023 13:56:56 +0300 Subject: [PATCH 29/52] update --- abi/build.gradle | 34 +++++++++++++++++----------------- build.gradle | 10 ++++++++++ gradle/jacoco/build.gradle | 36 ++++++++++++++++++------------------ 3 files changed, 45 insertions(+), 35 deletions(-) diff --git a/abi/build.gradle b/abi/build.gradle index dd664588ca..36d0044635 100644 --- a/abi/build.gradle +++ b/abi/build.gradle @@ -8,20 +8,20 @@ dependencies { api project(':utils') } -tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } -tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } -tasks.named("jacocoRootReport").configure { dependsOn(":besu:compileJava",":besu:compileTestJava",":besu:javadoc",":besu:test", ":besu:spotlessGroovyGradle", ":besu:spotlessJava",":besu:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":test",":spotlessGroovyGradle",":spotlessJava",":spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":codegen:compileJava",":codegen:compileTestJava",":codegen:javadoc",":codegen:test",":codegen:processTestResources",":codegen:spotlessGroovyGradle", ":codegen:spotlessJava",":codegen:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":contracts:compileJava",":contracts:javadoc",":contracts:test",":contracts:processResources",":contracts:spotlessGroovyGradle", ":contracts:spotlessJava",":contracts:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":core:javadoc",":core:test",":core:spotlessGroovyGradle", ":core:spotlessJava",":core:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":crypto:javadoc",":crypto:test",":crypto:spotlessGroovyGradle", ":crypto:spotlessJava",":crypto:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":eea:compileTestJava",":eea:javadoc",":eea:test",":eea:spotlessGroovyGradle", ":eea:spotlessJava",":eea:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":geth:compileJava",":geth:compileTestJava",":geth:javadoc",":geth:test",":geth:spotlessGroovyGradle", ":geth:spotlessJava",":geth:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":hosted-providers:compileJava",":hosted-providers:compileTestJava",":hosted-providers:javadoc",":hosted-providers:test",":hosted-providers:spotlessGroovyGradle", ":hosted-providers:spotlessJava",":hosted-providers:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":integration-tests:compileTestJava",":integration-tests:processTestResources",":integration-tests:spotlessGroovyGradle", ":integration-tests:spotlessJava",":integration-tests:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":parity:compileJava",":parity:compileTestJava",":parity:javadoc",":parity:test",":parity:spotlessGroovyGradle", ":parity:spotlessJava",":parity:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":rlp:compileTestJava",":rlp:javadoc",":rlp:test",":rlp:spotlessGroovyGradle", ":rlp:spotlessJava",":rlp:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":tuples:javadoc",":tuples:test",":tuples:spotlessGroovyGradle", ":tuples:spotlessJava",":tuples:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":utils:javadoc",":utils:test",":utils:spotlessGroovyGradle", ":utils:spotlessJava",":utils:spotlessKotlin") } +//tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } +//tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } +//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } +//tasks.named("jacocoRootReport").configure { dependsOn(":besu:compileJava",":besu:compileTestJava",":besu:javadoc",":besu:test", ":besu:spotlessGroovyGradle", ":besu:spotlessJava",":besu:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":test",":spotlessGroovyGradle",":spotlessJava",":spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":codegen:compileJava",":codegen:compileTestJava",":codegen:javadoc",":codegen:test",":codegen:processTestResources",":codegen:spotlessGroovyGradle", ":codegen:spotlessJava",":codegen:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":contracts:compileJava",":contracts:javadoc",":contracts:test",":contracts:processResources",":contracts:spotlessGroovyGradle", ":contracts:spotlessJava",":contracts:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":core:javadoc",":core:test",":core:spotlessGroovyGradle", ":core:spotlessJava",":core:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":crypto:javadoc",":crypto:test",":crypto:spotlessGroovyGradle", ":crypto:spotlessJava",":crypto:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":eea:compileTestJava",":eea:javadoc",":eea:test",":eea:spotlessGroovyGradle", ":eea:spotlessJava",":eea:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":geth:compileJava",":geth:compileTestJava",":geth:javadoc",":geth:test",":geth:spotlessGroovyGradle", ":geth:spotlessJava",":geth:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":hosted-providers:compileJava",":hosted-providers:compileTestJava",":hosted-providers:javadoc",":hosted-providers:test",":hosted-providers:spotlessGroovyGradle", ":hosted-providers:spotlessJava",":hosted-providers:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":integration-tests:compileTestJava",":integration-tests:processTestResources",":integration-tests:spotlessGroovyGradle", ":integration-tests:spotlessJava",":integration-tests:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":parity:compileJava",":parity:compileTestJava",":parity:javadoc",":parity:test",":parity:spotlessGroovyGradle", ":parity:spotlessJava",":parity:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":rlp:compileTestJava",":rlp:javadoc",":rlp:test",":rlp:spotlessGroovyGradle", ":rlp:spotlessJava",":rlp:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":tuples:javadoc",":tuples:test",":tuples:spotlessGroovyGradle", ":tuples:spotlessJava",":tuples:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":utils:javadoc",":utils:test",":utils:spotlessGroovyGradle", ":utils:spotlessJava",":utils:spotlessKotlin") } diff --git a/build.gradle b/build.gradle index ec231a0a88..947ed13b8c 100644 --- a/build.gradle +++ b/build.gradle @@ -98,5 +98,15 @@ configure(subprojects.findAll { it.name != 'integration-tests' }) { apply from: "$rootDir/gradle/jacoco/build.gradle" } +jacocoTestReport { + reports { + xml.enabled true + html.enabled false + } +} +jacoco { + toolVersion = "0.8.10" +} + tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle") } tasks.named("spotlessKotlin").configure { dependsOn("spotlessJava", "spotlessGroovyGradle") } diff --git a/gradle/jacoco/build.gradle b/gradle/jacoco/build.gradle index fd3c3d546c..b49b5aaca2 100644 --- a/gradle/jacoco/build.gradle +++ b/gradle/jacoco/build.gradle @@ -31,24 +31,24 @@ apply plugin: 'jacoco' // } //} -task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) { - additionalSourceDirs.from files(subprojects.sourceSets.main.allSource.srcDirs) - sourceDirectories.from files(subprojects.sourceSets.main.allSource.srcDirs) - classDirectories.from files(subprojects.sourceSets.main.output).asFileTree.matching { - exclude 'org/web3j/abi/datatypes/generated/**', - 'org/web3j/tuples/generated/**', - 'org/web3j/ens/contracts/generated/**', - 'org/gradle/**' - } - executionData.from fileTree(dir: '.', includes: ['**/jacoco/*.exec']) - reports { - xml.required = true - xml.enabled = true - csv.required = true - html.destination file("build/reports/jacocoHtml") - } - onlyIf = { true } -} +//task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) { +// additionalSourceDirs.from files(subprojects.sourceSets.main.allSource.srcDirs) +// sourceDirectories.from files(subprojects.sourceSets.main.allSource.srcDirs) +// classDirectories.from files(subprojects.sourceSets.main.output).asFileTree.matching { +// exclude 'org/web3j/abi/datatypes/generated/**', +// 'org/web3j/tuples/generated/**', +// 'org/web3j/ens/contracts/generated/**', +// 'org/gradle/**' +// } +// executionData.from fileTree(dir: '.', includes: ['**/jacoco/*.exec']) +// reports { +// xml.required = true +// xml.enabled = true +// csv.required = true +// html.destination file("build/reports/jacocoHtml") +// } +// onlyIf = { true } +//} jacoco { toolVersion = "0.8.10" From df6a23aeba76fa52839920e05d7dab748b4fedc4 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Fri, 18 Aug 2023 14:00:21 +0300 Subject: [PATCH 30/52] update --- .github/workflows/build.yml | 2 +- .github/workflows/codeql.yml | 2 +- build.gradle | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 221058828a..db4a71282e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,6 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build - run: ./gradlew jacocoRootReport + run: ./gradlew jacocoTestReport - name: Upload coverage reports to Codecov with GitHub Action uses: codecov/codecov-action@v3 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 97def081e1..4e0965d491 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -49,7 +49,7 @@ jobs: # queries: security-extended,security-and-quality - name: Build - run: ./gradlew jacocoRootReport + run: ./gradlew jacocoTestReport - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 diff --git a/build.gradle b/build.gradle index 947ed13b8c..15cc07dfe7 100644 --- a/build.gradle +++ b/build.gradle @@ -104,6 +104,7 @@ jacocoTestReport { html.enabled false } } + jacoco { toolVersion = "0.8.10" } From 2ed144904fcc4c7b5d0bb9962d6a005c4fc3a43d Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Fri, 18 Aug 2023 14:02:58 +0300 Subject: [PATCH 31/52] Update build.gradle --- build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.gradle b/build.gradle index 15cc07dfe7..c8955796bb 100644 --- a/build.gradle +++ b/build.gradle @@ -109,5 +109,7 @@ jacoco { toolVersion = "0.8.10" } +check.dependsOn jacocoTestReport + tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle") } tasks.named("spotlessKotlin").configure { dependsOn("spotlessJava", "spotlessGroovyGradle") } From 24cfaaac38562e1852d79861e83a43c50c31c90e Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Fri, 18 Aug 2023 14:08:27 +0300 Subject: [PATCH 32/52] Revert "Update build.gradle" This reverts commit 2ed144904fcc4c7b5d0bb9962d6a005c4fc3a43d. --- build.gradle | 2 -- 1 file changed, 2 deletions(-) diff --git a/build.gradle b/build.gradle index c8955796bb..15cc07dfe7 100644 --- a/build.gradle +++ b/build.gradle @@ -109,7 +109,5 @@ jacoco { toolVersion = "0.8.10" } -check.dependsOn jacocoTestReport - tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle") } tasks.named("spotlessKotlin").configure { dependsOn("spotlessJava", "spotlessGroovyGradle") } From 9f5754d26016d11fe41804462a37a5dc35e9f320 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Fri, 18 Aug 2023 14:08:37 +0300 Subject: [PATCH 33/52] Revert "update" This reverts commit df6a23aeba76fa52839920e05d7dab748b4fedc4. --- .github/workflows/build.yml | 2 +- .github/workflows/codeql.yml | 2 +- build.gradle | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index db4a71282e..221058828a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,6 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build - run: ./gradlew jacocoTestReport + run: ./gradlew jacocoRootReport - name: Upload coverage reports to Codecov with GitHub Action uses: codecov/codecov-action@v3 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 4e0965d491..97def081e1 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -49,7 +49,7 @@ jobs: # queries: security-extended,security-and-quality - name: Build - run: ./gradlew jacocoTestReport + run: ./gradlew jacocoRootReport - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 diff --git a/build.gradle b/build.gradle index 15cc07dfe7..947ed13b8c 100644 --- a/build.gradle +++ b/build.gradle @@ -104,7 +104,6 @@ jacocoTestReport { html.enabled false } } - jacoco { toolVersion = "0.8.10" } From d247eebca585062b9f1bdfba7bc714419a126716 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Fri, 18 Aug 2023 14:09:11 +0300 Subject: [PATCH 34/52] Revert "update" This reverts commit 2b1d7a1188631829feed6bffc2c214f21b3a748c. --- abi/build.gradle | 34 +++++++++++++++++----------------- build.gradle | 10 ---------- gradle/jacoco/build.gradle | 36 ++++++++++++++++++------------------ 3 files changed, 35 insertions(+), 45 deletions(-) diff --git a/abi/build.gradle b/abi/build.gradle index 36d0044635..dd664588ca 100644 --- a/abi/build.gradle +++ b/abi/build.gradle @@ -8,20 +8,20 @@ dependencies { api project(':utils') } -//tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } -//tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } -//tasks.named("jacocoRootReport").configure { dependsOn(":besu:compileJava",":besu:compileTestJava",":besu:javadoc",":besu:test", ":besu:spotlessGroovyGradle", ":besu:spotlessJava",":besu:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":test",":spotlessGroovyGradle",":spotlessJava",":spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":codegen:compileJava",":codegen:compileTestJava",":codegen:javadoc",":codegen:test",":codegen:processTestResources",":codegen:spotlessGroovyGradle", ":codegen:spotlessJava",":codegen:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":contracts:compileJava",":contracts:javadoc",":contracts:test",":contracts:processResources",":contracts:spotlessGroovyGradle", ":contracts:spotlessJava",":contracts:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":core:javadoc",":core:test",":core:spotlessGroovyGradle", ":core:spotlessJava",":core:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":crypto:javadoc",":crypto:test",":crypto:spotlessGroovyGradle", ":crypto:spotlessJava",":crypto:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":eea:compileTestJava",":eea:javadoc",":eea:test",":eea:spotlessGroovyGradle", ":eea:spotlessJava",":eea:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":geth:compileJava",":geth:compileTestJava",":geth:javadoc",":geth:test",":geth:spotlessGroovyGradle", ":geth:spotlessJava",":geth:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":hosted-providers:compileJava",":hosted-providers:compileTestJava",":hosted-providers:javadoc",":hosted-providers:test",":hosted-providers:spotlessGroovyGradle", ":hosted-providers:spotlessJava",":hosted-providers:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":integration-tests:compileTestJava",":integration-tests:processTestResources",":integration-tests:spotlessGroovyGradle", ":integration-tests:spotlessJava",":integration-tests:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":parity:compileJava",":parity:compileTestJava",":parity:javadoc",":parity:test",":parity:spotlessGroovyGradle", ":parity:spotlessJava",":parity:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":rlp:compileTestJava",":rlp:javadoc",":rlp:test",":rlp:spotlessGroovyGradle", ":rlp:spotlessJava",":rlp:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":tuples:javadoc",":tuples:test",":tuples:spotlessGroovyGradle", ":tuples:spotlessJava",":tuples:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":utils:javadoc",":utils:test",":utils:spotlessGroovyGradle", ":utils:spotlessJava",":utils:spotlessKotlin") } +tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } +tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } +tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } +tasks.named("jacocoRootReport").configure { dependsOn(":besu:compileJava",":besu:compileTestJava",":besu:javadoc",":besu:test", ":besu:spotlessGroovyGradle", ":besu:spotlessJava",":besu:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":test",":spotlessGroovyGradle",":spotlessJava",":spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":codegen:compileJava",":codegen:compileTestJava",":codegen:javadoc",":codegen:test",":codegen:processTestResources",":codegen:spotlessGroovyGradle", ":codegen:spotlessJava",":codegen:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":contracts:compileJava",":contracts:javadoc",":contracts:test",":contracts:processResources",":contracts:spotlessGroovyGradle", ":contracts:spotlessJava",":contracts:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":core:javadoc",":core:test",":core:spotlessGroovyGradle", ":core:spotlessJava",":core:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":crypto:javadoc",":crypto:test",":crypto:spotlessGroovyGradle", ":crypto:spotlessJava",":crypto:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":eea:compileTestJava",":eea:javadoc",":eea:test",":eea:spotlessGroovyGradle", ":eea:spotlessJava",":eea:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":geth:compileJava",":geth:compileTestJava",":geth:javadoc",":geth:test",":geth:spotlessGroovyGradle", ":geth:spotlessJava",":geth:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":hosted-providers:compileJava",":hosted-providers:compileTestJava",":hosted-providers:javadoc",":hosted-providers:test",":hosted-providers:spotlessGroovyGradle", ":hosted-providers:spotlessJava",":hosted-providers:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":integration-tests:compileTestJava",":integration-tests:processTestResources",":integration-tests:spotlessGroovyGradle", ":integration-tests:spotlessJava",":integration-tests:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":parity:compileJava",":parity:compileTestJava",":parity:javadoc",":parity:test",":parity:spotlessGroovyGradle", ":parity:spotlessJava",":parity:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":rlp:compileTestJava",":rlp:javadoc",":rlp:test",":rlp:spotlessGroovyGradle", ":rlp:spotlessJava",":rlp:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":tuples:javadoc",":tuples:test",":tuples:spotlessGroovyGradle", ":tuples:spotlessJava",":tuples:spotlessKotlin") } +tasks.named("jacocoRootReport").configure { dependsOn(":utils:javadoc",":utils:test",":utils:spotlessGroovyGradle", ":utils:spotlessJava",":utils:spotlessKotlin") } diff --git a/build.gradle b/build.gradle index 947ed13b8c..ec231a0a88 100644 --- a/build.gradle +++ b/build.gradle @@ -98,15 +98,5 @@ configure(subprojects.findAll { it.name != 'integration-tests' }) { apply from: "$rootDir/gradle/jacoco/build.gradle" } -jacocoTestReport { - reports { - xml.enabled true - html.enabled false - } -} -jacoco { - toolVersion = "0.8.10" -} - tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle") } tasks.named("spotlessKotlin").configure { dependsOn("spotlessJava", "spotlessGroovyGradle") } diff --git a/gradle/jacoco/build.gradle b/gradle/jacoco/build.gradle index b49b5aaca2..fd3c3d546c 100644 --- a/gradle/jacoco/build.gradle +++ b/gradle/jacoco/build.gradle @@ -31,24 +31,24 @@ apply plugin: 'jacoco' // } //} -//task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) { -// additionalSourceDirs.from files(subprojects.sourceSets.main.allSource.srcDirs) -// sourceDirectories.from files(subprojects.sourceSets.main.allSource.srcDirs) -// classDirectories.from files(subprojects.sourceSets.main.output).asFileTree.matching { -// exclude 'org/web3j/abi/datatypes/generated/**', -// 'org/web3j/tuples/generated/**', -// 'org/web3j/ens/contracts/generated/**', -// 'org/gradle/**' -// } -// executionData.from fileTree(dir: '.', includes: ['**/jacoco/*.exec']) -// reports { -// xml.required = true -// xml.enabled = true -// csv.required = true -// html.destination file("build/reports/jacocoHtml") -// } -// onlyIf = { true } -//} +task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) { + additionalSourceDirs.from files(subprojects.sourceSets.main.allSource.srcDirs) + sourceDirectories.from files(subprojects.sourceSets.main.allSource.srcDirs) + classDirectories.from files(subprojects.sourceSets.main.output).asFileTree.matching { + exclude 'org/web3j/abi/datatypes/generated/**', + 'org/web3j/tuples/generated/**', + 'org/web3j/ens/contracts/generated/**', + 'org/gradle/**' + } + executionData.from fileTree(dir: '.', includes: ['**/jacoco/*.exec']) + reports { + xml.required = true + xml.enabled = true + csv.required = true + html.destination file("build/reports/jacocoHtml") + } + onlyIf = { true } +} jacoco { toolVersion = "0.8.10" From 67b88c228051f339a3903644d13947f2aceac1c3 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Mon, 21 Aug 2023 09:44:27 +0300 Subject: [PATCH 35/52] Update build.gradle --- build.gradle | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build.gradle b/build.gradle index ec231a0a88..c821548a52 100644 --- a/build.gradle +++ b/build.gradle @@ -98,5 +98,13 @@ configure(subprojects.findAll { it.name != 'integration-tests' }) { apply from: "$rootDir/gradle/jacoco/build.gradle" } +test { + // Enable JaCoCo agent for test coverage + jacoco { + // Set the destination file for the coverage report + destinationFile = file("$buildDir/jacoco/test.exec") + } +} + tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle") } tasks.named("spotlessKotlin").configure { dependsOn("spotlessJava", "spotlessGroovyGradle") } From 0cb390c936b69aa479581f21cada805c03679c1c Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Mon, 21 Aug 2023 09:51:24 +0300 Subject: [PATCH 36/52] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 221058828a..0fa3813706 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,6 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build - run: ./gradlew jacocoRootReport + run: ./gradlew test jacocoRootReport - name: Upload coverage reports to Codecov with GitHub Action uses: codecov/codecov-action@v3 From 70ac96635acbc81a5521c53e6ec0551b16aa2e3e Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Mon, 21 Aug 2023 10:03:25 +0300 Subject: [PATCH 37/52] update jacoco --- besu/build.gradle | 1 + codegen/build.gradle | 1 + contracts/build.gradle | 1 + core/build.gradle | 1 + crypto/build.gradle | 1 + eea/build.gradle | 1 + geth/build.gradle | 1 + hosted-providers/build.gradle | 1 + parity/build.gradle | 1 + rlp/build.gradle | 1 + tuples/build.gradle | 1 + utils/build.gradle | 1 + 12 files changed, 12 insertions(+) diff --git a/besu/build.gradle b/besu/build.gradle index a4e5a9183a..77ee0a73a1 100644 --- a/besu/build.gradle +++ b/besu/build.gradle @@ -10,3 +10,4 @@ dependencies { tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } +tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/codegen/build.gradle b/codegen/build.gradle index 4880785a16..c1e9ff3c8e 100644 --- a/codegen/build.gradle +++ b/codegen/build.gradle @@ -40,3 +40,4 @@ file("src/test/resources/solidity").listFiles().each { File file -> tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","processTestResources","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } +tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/contracts/build.gradle b/contracts/build.gradle index 41f6dbecc4..f7657fe20e 100644 --- a/contracts/build.gradle +++ b/contracts/build.gradle @@ -7,3 +7,4 @@ dependencies { } tasks.named("spotlessJava").configure { dependsOn("compileJava","javadoc","processResources","spotlessGroovyGradle") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","javadoc","processResources","spotlessJava","spotlessGroovyGradle") } +tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/core/build.gradle b/core/build.gradle index d23df7f444..34516363f5 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -85,3 +85,4 @@ artifacts { testArtifacts testsJar } tasks.named("spotlessJava").configure { dependsOn("compileJava", "compileTestJava", "processResources", "processTestResources", "spotlessGroovyGradle","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava", "compileTestJava", "processResources", "processTestResources","spotlessJava","spotlessGroovyGradle","javadoc","test") } +tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/crypto/build.gradle b/crypto/build.gradle index 78d98beeb5..54ca61b28d 100644 --- a/crypto/build.gradle +++ b/crypto/build.gradle @@ -18,3 +18,4 @@ artifacts { testArtifacts testsJar } tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","processTestResources","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } +tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/eea/build.gradle b/eea/build.gradle index ee9d41f314..5e4fa8b7ed 100644 --- a/eea/build.gradle +++ b/eea/build.gradle @@ -11,3 +11,4 @@ dependencies { tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } +tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/geth/build.gradle b/geth/build.gradle index 8a66430316..bb44e584a4 100644 --- a/geth/build.gradle +++ b/geth/build.gradle @@ -8,3 +8,4 @@ dependencies { tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } +tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/hosted-providers/build.gradle b/hosted-providers/build.gradle index a8d0727dbc..9024e54d36 100644 --- a/hosted-providers/build.gradle +++ b/hosted-providers/build.gradle @@ -5,3 +5,4 @@ dependencies { implementation project(':core') } tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc", "test") } +tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/parity/build.gradle b/parity/build.gradle index 0a30184abf..0eabba41fb 100644 --- a/parity/build.gradle +++ b/parity/build.gradle @@ -9,3 +9,4 @@ dependencies { tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } +tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/rlp/build.gradle b/rlp/build.gradle index 2d3255ad46..5123ec8f55 100644 --- a/rlp/build.gradle +++ b/rlp/build.gradle @@ -8,3 +8,4 @@ dependencies { api project(':utils') } tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } +tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/tuples/build.gradle b/tuples/build.gradle index c8425a346a..8c4d53bc5f 100644 --- a/tuples/build.gradle +++ b/tuples/build.gradle @@ -3,3 +3,4 @@ description 'Simple Java tuples library' tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc") } +tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/utils/build.gradle b/utils/build.gradle index 0b56afcce9..6e2f9bcb0d 100644 --- a/utils/build.gradle +++ b/utils/build.gradle @@ -8,3 +8,4 @@ dependencies { api "org.bouncycastle:bcprov-jdk18on:$bouncycastleVersion" } tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } +tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } From 107797cc3535b581bd015ca1fa8833af1047c5a6 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Mon, 21 Aug 2023 13:52:01 +0300 Subject: [PATCH 38/52] test sonarquebe --- .github/workflows/build.yml | 2 +- abi/build.gradle | 30 +++++++++--------- besu/build.gradle | 2 +- build.gradle | 8 +---- codegen/build.gradle | 2 +- contracts/build.gradle | 2 +- core/build.gradle | 2 +- crypto/build.gradle | 2 +- eea/build.gradle | 2 +- geth/build.gradle | 2 +- gradle/jacoco/build.gradle | 53 ++++++++++++++++++++++++-------- gradle/repositories/build.gradle | 3 ++ hosted-providers/build.gradle | 2 +- parity/build.gradle | 2 +- rlp/build.gradle | 2 +- tuples/build.gradle | 2 +- utils/build.gradle | 2 +- 17 files changed, 73 insertions(+), 47 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0fa3813706..f431b669d7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,6 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build - run: ./gradlew test jacocoRootReport + run: ./gradlew build - name: Upload coverage reports to Codecov with GitHub Action uses: codecov/codecov-action@v3 diff --git a/abi/build.gradle b/abi/build.gradle index dd664588ca..f17be1be32 100644 --- a/abi/build.gradle +++ b/abi/build.gradle @@ -10,18 +10,18 @@ dependencies { tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } -tasks.named("jacocoRootReport").configure { dependsOn(":besu:compileJava",":besu:compileTestJava",":besu:javadoc",":besu:test", ":besu:spotlessGroovyGradle", ":besu:spotlessJava",":besu:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":test",":spotlessGroovyGradle",":spotlessJava",":spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":codegen:compileJava",":codegen:compileTestJava",":codegen:javadoc",":codegen:test",":codegen:processTestResources",":codegen:spotlessGroovyGradle", ":codegen:spotlessJava",":codegen:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":contracts:compileJava",":contracts:javadoc",":contracts:test",":contracts:processResources",":contracts:spotlessGroovyGradle", ":contracts:spotlessJava",":contracts:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":core:javadoc",":core:test",":core:spotlessGroovyGradle", ":core:spotlessJava",":core:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":crypto:javadoc",":crypto:test",":crypto:spotlessGroovyGradle", ":crypto:spotlessJava",":crypto:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":eea:compileTestJava",":eea:javadoc",":eea:test",":eea:spotlessGroovyGradle", ":eea:spotlessJava",":eea:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":geth:compileJava",":geth:compileTestJava",":geth:javadoc",":geth:test",":geth:spotlessGroovyGradle", ":geth:spotlessJava",":geth:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":hosted-providers:compileJava",":hosted-providers:compileTestJava",":hosted-providers:javadoc",":hosted-providers:test",":hosted-providers:spotlessGroovyGradle", ":hosted-providers:spotlessJava",":hosted-providers:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":integration-tests:compileTestJava",":integration-tests:processTestResources",":integration-tests:spotlessGroovyGradle", ":integration-tests:spotlessJava",":integration-tests:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":parity:compileJava",":parity:compileTestJava",":parity:javadoc",":parity:test",":parity:spotlessGroovyGradle", ":parity:spotlessJava",":parity:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":rlp:compileTestJava",":rlp:javadoc",":rlp:test",":rlp:spotlessGroovyGradle", ":rlp:spotlessJava",":rlp:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":tuples:javadoc",":tuples:test",":tuples:spotlessGroovyGradle", ":tuples:spotlessJava",":tuples:spotlessKotlin") } -tasks.named("jacocoRootReport").configure { dependsOn(":utils:javadoc",":utils:test",":utils:spotlessGroovyGradle", ":utils:spotlessJava",":utils:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } +//tasks.named("jacocoRootReport").configure { dependsOn(":besu:compileJava",":besu:compileTestJava",":besu:javadoc",":besu:test", ":besu:spotlessGroovyGradle", ":besu:spotlessJava",":besu:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":test",":spotlessGroovyGradle",":spotlessJava",":spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":codegen:compileJava",":codegen:compileTestJava",":codegen:javadoc",":codegen:test",":codegen:processTestResources",":codegen:spotlessGroovyGradle", ":codegen:spotlessJava",":codegen:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":contracts:compileJava",":contracts:javadoc",":contracts:test",":contracts:processResources",":contracts:spotlessGroovyGradle", ":contracts:spotlessJava",":contracts:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":core:javadoc",":core:test",":core:spotlessGroovyGradle", ":core:spotlessJava",":core:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":crypto:javadoc",":crypto:test",":crypto:spotlessGroovyGradle", ":crypto:spotlessJava",":crypto:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":eea:compileTestJava",":eea:javadoc",":eea:test",":eea:spotlessGroovyGradle", ":eea:spotlessJava",":eea:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":geth:compileJava",":geth:compileTestJava",":geth:javadoc",":geth:test",":geth:spotlessGroovyGradle", ":geth:spotlessJava",":geth:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":hosted-providers:compileJava",":hosted-providers:compileTestJava",":hosted-providers:javadoc",":hosted-providers:test",":hosted-providers:spotlessGroovyGradle", ":hosted-providers:spotlessJava",":hosted-providers:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":integration-tests:compileTestJava",":integration-tests:processTestResources",":integration-tests:spotlessGroovyGradle", ":integration-tests:spotlessJava",":integration-tests:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":parity:compileJava",":parity:compileTestJava",":parity:javadoc",":parity:test",":parity:spotlessGroovyGradle", ":parity:spotlessJava",":parity:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":rlp:compileTestJava",":rlp:javadoc",":rlp:test",":rlp:spotlessGroovyGradle", ":rlp:spotlessJava",":rlp:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":tuples:javadoc",":tuples:test",":tuples:spotlessGroovyGradle", ":tuples:spotlessJava",":tuples:spotlessKotlin") } +//tasks.named("jacocoRootReport").configure { dependsOn(":utils:javadoc",":utils:test",":utils:spotlessGroovyGradle", ":utils:spotlessJava",":utils:spotlessKotlin") } diff --git a/besu/build.gradle b/besu/build.gradle index 77ee0a73a1..5e84c28fa5 100644 --- a/besu/build.gradle +++ b/besu/build.gradle @@ -10,4 +10,4 @@ dependencies { tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } +//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/build.gradle b/build.gradle index c821548a52..99c02b64e0 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,7 @@ plugins { id 'java' id 'idea' + id 'org.sonarqube' version '3.4.0.2513' id 'jacoco' id 'com.diffplug.gradle.spotless' version '4.5.1' id 'io.codearte.nexus-staging' version '0.22.0' @@ -98,13 +99,6 @@ configure(subprojects.findAll { it.name != 'integration-tests' }) { apply from: "$rootDir/gradle/jacoco/build.gradle" } -test { - // Enable JaCoCo agent for test coverage - jacoco { - // Set the destination file for the coverage report - destinationFile = file("$buildDir/jacoco/test.exec") - } -} tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle") } tasks.named("spotlessKotlin").configure { dependsOn("spotlessJava", "spotlessGroovyGradle") } diff --git a/codegen/build.gradle b/codegen/build.gradle index c1e9ff3c8e..4f8a1095db 100644 --- a/codegen/build.gradle +++ b/codegen/build.gradle @@ -40,4 +40,4 @@ file("src/test/resources/solidity").listFiles().each { File file -> tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","processTestResources","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } +//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/contracts/build.gradle b/contracts/build.gradle index f7657fe20e..4efdd97368 100644 --- a/contracts/build.gradle +++ b/contracts/build.gradle @@ -7,4 +7,4 @@ dependencies { } tasks.named("spotlessJava").configure { dependsOn("compileJava","javadoc","processResources","spotlessGroovyGradle") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","javadoc","processResources","spotlessJava","spotlessGroovyGradle") } -tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } +//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/core/build.gradle b/core/build.gradle index 34516363f5..f8f985d304 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -85,4 +85,4 @@ artifacts { testArtifacts testsJar } tasks.named("spotlessJava").configure { dependsOn("compileJava", "compileTestJava", "processResources", "processTestResources", "spotlessGroovyGradle","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava", "compileTestJava", "processResources", "processTestResources","spotlessJava","spotlessGroovyGradle","javadoc","test") } -tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } +//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/crypto/build.gradle b/crypto/build.gradle index 54ca61b28d..a356bc5250 100644 --- a/crypto/build.gradle +++ b/crypto/build.gradle @@ -18,4 +18,4 @@ artifacts { testArtifacts testsJar } tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","processTestResources","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } +//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/eea/build.gradle b/eea/build.gradle index 5e4fa8b7ed..5edb0676ca 100644 --- a/eea/build.gradle +++ b/eea/build.gradle @@ -11,4 +11,4 @@ dependencies { tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } +//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/geth/build.gradle b/geth/build.gradle index bb44e584a4..f2b548ed08 100644 --- a/geth/build.gradle +++ b/geth/build.gradle @@ -8,4 +8,4 @@ dependencies { tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } +//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/gradle/jacoco/build.gradle b/gradle/jacoco/build.gradle index fd3c3d546c..7763d81b8c 100644 --- a/gradle/jacoco/build.gradle +++ b/gradle/jacoco/build.gradle @@ -1,5 +1,3 @@ -apply plugin: 'jacoco' - //task jacocoRootTestReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) { // // doFirst { @@ -31,26 +29,57 @@ apply plugin: 'jacoco' // } //} -task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) { - additionalSourceDirs.from files(subprojects.sourceSets.main.allSource.srcDirs) - sourceDirectories.from files(subprojects.sourceSets.main.allSource.srcDirs) +//task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) { +// additionalSourceDirs.from files(subprojects.sourceSets.main.allSource.srcDirs) +// sourceDirectories.from files(subprojects.sourceSets.main.allSource.srcDirs) +// classDirectories.from files(subprojects.sourceSets.main.output).asFileTree.matching { +// exclude 'org/web3j/abi/datatypes/generated/**', +// 'org/web3j/tuples/generated/**', +// 'org/web3j/ens/contracts/generated/**', +// 'org/gradle/**' +// } +// executionData.from fileTree(dir: '.', includes: ['**/jacoco/*.exec']) +// reports { +// xml.required = true +// xml.enabled = true +// csv.required = true +// html.destination file("build/reports/jacocoHtml") +// } +// onlyIf = { true } +//} + + +apply(plugin: 'jacoco') + +test { + useJUnitPlatform() + finalizedBy jacocoTestReport +} + +jacocoTestReport { classDirectories.from files(subprojects.sourceSets.main.output).asFileTree.matching { exclude 'org/web3j/abi/datatypes/generated/**', 'org/web3j/tuples/generated/**', 'org/web3j/ens/contracts/generated/**', 'org/gradle/**' } - executionData.from fileTree(dir: '.', includes: ['**/jacoco/*.exec']) + dependsOn test reports { - xml.required = true - xml.enabled = true - csv.required = true - html.destination file("build/reports/jacocoHtml") + xml.enabled true + html.enabled false + csv.enabled false + xml.destination file("${buildDir}/reports/jacoco.xml") + } +} + +sonarqube { + properties { + property "sonar.java.coveragePlugin", "jacoco" + property "sonar.coverage.jacoco.xmlReportPaths", "${buildDir}/reports/jacoco.xml" } - onlyIf = { true } } jacoco { - toolVersion = "0.8.10" + toolVersion = "0.8.8" } diff --git a/gradle/repositories/build.gradle b/gradle/repositories/build.gradle index 350db197fa..e51cf341b2 100644 --- a/gradle/repositories/build.gradle +++ b/gradle/repositories/build.gradle @@ -1,5 +1,8 @@ repositories { mavenCentral() + maven { + url = uri("https://plugins.gradle.org/m2/") + } jcenter() maven { url 'https://oss.sonatype.org/content/repositories/releases/' } maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } diff --git a/hosted-providers/build.gradle b/hosted-providers/build.gradle index 9024e54d36..3054e74237 100644 --- a/hosted-providers/build.gradle +++ b/hosted-providers/build.gradle @@ -5,4 +5,4 @@ dependencies { implementation project(':core') } tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc", "test") } -tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } +//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/parity/build.gradle b/parity/build.gradle index 0eabba41fb..06db56c09c 100644 --- a/parity/build.gradle +++ b/parity/build.gradle @@ -9,4 +9,4 @@ dependencies { tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } +//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/rlp/build.gradle b/rlp/build.gradle index 5123ec8f55..7cc45804d5 100644 --- a/rlp/build.gradle +++ b/rlp/build.gradle @@ -8,4 +8,4 @@ dependencies { api project(':utils') } tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } +//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/tuples/build.gradle b/tuples/build.gradle index 8c4d53bc5f..1c9b4cd638 100644 --- a/tuples/build.gradle +++ b/tuples/build.gradle @@ -3,4 +3,4 @@ description 'Simple Java tuples library' tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc") } -tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } +//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/utils/build.gradle b/utils/build.gradle index 6e2f9bcb0d..46741b584a 100644 --- a/utils/build.gradle +++ b/utils/build.gradle @@ -8,4 +8,4 @@ dependencies { api "org.bouncycastle:bcprov-jdk18on:$bouncycastleVersion" } tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } +//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } From 9aec3530366aae029763a44a98f08d873a2a2dde Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Mon, 21 Aug 2023 14:31:35 +0300 Subject: [PATCH 39/52] refactor --- .github/workflows/codeql.yml | 2 +- abi/build.gradle | 17 +----------- besu/build.gradle | 1 - codegen/build.gradle | 1 - contracts/build.gradle | 1 - gradle/jacoco/build.gradle | 51 ------------------------------------ utils/build.gradle | 1 - 7 files changed, 2 insertions(+), 72 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 97def081e1..4e0965d491 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -49,7 +49,7 @@ jobs: # queries: security-extended,security-and-quality - name: Build - run: ./gradlew jacocoRootReport + run: ./gradlew jacocoTestReport - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 diff --git a/abi/build.gradle b/abi/build.gradle index f17be1be32..4e41063bca 100644 --- a/abi/build.gradle +++ b/abi/build.gradle @@ -9,19 +9,4 @@ dependencies { } tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } -tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } -//tasks.named("jacocoRootReport").configure { dependsOn(":besu:compileJava",":besu:compileTestJava",":besu:javadoc",":besu:test", ":besu:spotlessGroovyGradle", ":besu:spotlessJava",":besu:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":test",":spotlessGroovyGradle",":spotlessJava",":spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":codegen:compileJava",":codegen:compileTestJava",":codegen:javadoc",":codegen:test",":codegen:processTestResources",":codegen:spotlessGroovyGradle", ":codegen:spotlessJava",":codegen:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":contracts:compileJava",":contracts:javadoc",":contracts:test",":contracts:processResources",":contracts:spotlessGroovyGradle", ":contracts:spotlessJava",":contracts:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":core:javadoc",":core:test",":core:spotlessGroovyGradle", ":core:spotlessJava",":core:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":crypto:javadoc",":crypto:test",":crypto:spotlessGroovyGradle", ":crypto:spotlessJava",":crypto:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":eea:compileTestJava",":eea:javadoc",":eea:test",":eea:spotlessGroovyGradle", ":eea:spotlessJava",":eea:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":geth:compileJava",":geth:compileTestJava",":geth:javadoc",":geth:test",":geth:spotlessGroovyGradle", ":geth:spotlessJava",":geth:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":hosted-providers:compileJava",":hosted-providers:compileTestJava",":hosted-providers:javadoc",":hosted-providers:test",":hosted-providers:spotlessGroovyGradle", ":hosted-providers:spotlessJava",":hosted-providers:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":integration-tests:compileTestJava",":integration-tests:processTestResources",":integration-tests:spotlessGroovyGradle", ":integration-tests:spotlessJava",":integration-tests:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":parity:compileJava",":parity:compileTestJava",":parity:javadoc",":parity:test",":parity:spotlessGroovyGradle", ":parity:spotlessJava",":parity:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":rlp:compileTestJava",":rlp:javadoc",":rlp:test",":rlp:spotlessGroovyGradle", ":rlp:spotlessJava",":rlp:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":tuples:javadoc",":tuples:test",":tuples:spotlessGroovyGradle", ":tuples:spotlessJava",":tuples:spotlessKotlin") } -//tasks.named("jacocoRootReport").configure { dependsOn(":utils:javadoc",":utils:test",":utils:spotlessGroovyGradle", ":utils:spotlessJava",":utils:spotlessKotlin") } +tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } \ No newline at end of file diff --git a/besu/build.gradle b/besu/build.gradle index 5e84c28fa5..a4e5a9183a 100644 --- a/besu/build.gradle +++ b/besu/build.gradle @@ -10,4 +10,3 @@ dependencies { tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/codegen/build.gradle b/codegen/build.gradle index 4f8a1095db..4880785a16 100644 --- a/codegen/build.gradle +++ b/codegen/build.gradle @@ -40,4 +40,3 @@ file("src/test/resources/solidity").listFiles().each { File file -> tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","processTestResources","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/contracts/build.gradle b/contracts/build.gradle index 4efdd97368..41f6dbecc4 100644 --- a/contracts/build.gradle +++ b/contracts/build.gradle @@ -7,4 +7,3 @@ dependencies { } tasks.named("spotlessJava").configure { dependsOn("compileJava","javadoc","processResources","spotlessGroovyGradle") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","javadoc","processResources","spotlessJava","spotlessGroovyGradle") } -//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/gradle/jacoco/build.gradle b/gradle/jacoco/build.gradle index 7763d81b8c..395abed1bd 100644 --- a/gradle/jacoco/build.gradle +++ b/gradle/jacoco/build.gradle @@ -1,54 +1,3 @@ -//task jacocoRootTestReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) { -// -// doFirst { -// executionData.fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec") -// getExecutionData().from(executionData.findAll { it.exists() }) -// } -// -// dependsOn(subprojects.test) -// -// getSourceDirectories().from(subprojects.sourceSets.main.allSource.srcDirs) -// getAdditionalSourceDirs().from(subprojects.sourceSets.main.allSource.srcDirs) -// getClassDirectories().from(subprojects.sourceSets.main.output) -// executionData.from(subprojects.jacocoTestReport.executionData) -// -// reports { -// xml.enabled true -// } -// -// afterEvaluate { -// getClassDirectories().from(files(classDirectories.files.collect { -// fileTree(dir: it, -// exclude: [ -// 'org/web3j/abi/datatypes/generated/**', -// 'org/web3j/tuples/generated/**', -// 'org/web3j/ens/contracts/generated/**', -// 'org/gradle/**' -// ]) -// })) -// } -//} - -//task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) { -// additionalSourceDirs.from files(subprojects.sourceSets.main.allSource.srcDirs) -// sourceDirectories.from files(subprojects.sourceSets.main.allSource.srcDirs) -// classDirectories.from files(subprojects.sourceSets.main.output).asFileTree.matching { -// exclude 'org/web3j/abi/datatypes/generated/**', -// 'org/web3j/tuples/generated/**', -// 'org/web3j/ens/contracts/generated/**', -// 'org/gradle/**' -// } -// executionData.from fileTree(dir: '.', includes: ['**/jacoco/*.exec']) -// reports { -// xml.required = true -// xml.enabled = true -// csv.required = true -// html.destination file("build/reports/jacocoHtml") -// } -// onlyIf = { true } -//} - - apply(plugin: 'jacoco') test { diff --git a/utils/build.gradle b/utils/build.gradle index 46741b584a..0b56afcce9 100644 --- a/utils/build.gradle +++ b/utils/build.gradle @@ -8,4 +8,3 @@ dependencies { api "org.bouncycastle:bcprov-jdk18on:$bouncycastleVersion" } tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } From 8aba7e9f9f798cc78f74452044a90d9ca6dea4a5 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Mon, 21 Aug 2023 14:36:44 +0300 Subject: [PATCH 40/52] Update build.gradle --- abi/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abi/build.gradle b/abi/build.gradle index 4e41063bca..8f13019b70 100644 --- a/abi/build.gradle +++ b/abi/build.gradle @@ -9,4 +9,4 @@ dependencies { } tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } -tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } \ No newline at end of file +tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } From 0de35b08404fd27624bde9db6e1a974630526f67 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Mon, 21 Aug 2023 14:54:07 +0300 Subject: [PATCH 41/52] update commands --- .github/workflows/build.yml | 2 +- .github/workflows/codeql.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f431b669d7..744e8006ef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,6 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build - run: ./gradlew build + run: ./gradlew test - name: Upload coverage reports to Codecov with GitHub Action uses: codecov/codecov-action@v3 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 4e0965d491..7deaa35dae 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -49,7 +49,7 @@ jobs: # queries: security-extended,security-and-quality - name: Build - run: ./gradlew jacocoTestReport + run: ./gradlew test - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 From 038dfead971f2c8de385de292be12b574561ff16 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Mon, 21 Aug 2023 15:20:10 +0300 Subject: [PATCH 42/52] remove comments --- core/build.gradle | 1 - crypto/build.gradle | 1 - eea/build.gradle | 1 - geth/build.gradle | 1 - hosted-providers/build.gradle | 1 - parity/build.gradle | 1 - rlp/build.gradle | 1 - tuples/build.gradle | 1 - 8 files changed, 8 deletions(-) diff --git a/core/build.gradle b/core/build.gradle index f8f985d304..d23df7f444 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -85,4 +85,3 @@ artifacts { testArtifacts testsJar } tasks.named("spotlessJava").configure { dependsOn("compileJava", "compileTestJava", "processResources", "processTestResources", "spotlessGroovyGradle","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava", "compileTestJava", "processResources", "processTestResources","spotlessJava","spotlessGroovyGradle","javadoc","test") } -//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/crypto/build.gradle b/crypto/build.gradle index a356bc5250..78d98beeb5 100644 --- a/crypto/build.gradle +++ b/crypto/build.gradle @@ -18,4 +18,3 @@ artifacts { testArtifacts testsJar } tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","processTestResources","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/eea/build.gradle b/eea/build.gradle index 5edb0676ca..ee9d41f314 100644 --- a/eea/build.gradle +++ b/eea/build.gradle @@ -11,4 +11,3 @@ dependencies { tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/geth/build.gradle b/geth/build.gradle index f2b548ed08..8a66430316 100644 --- a/geth/build.gradle +++ b/geth/build.gradle @@ -8,4 +8,3 @@ dependencies { tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/hosted-providers/build.gradle b/hosted-providers/build.gradle index 3054e74237..a8d0727dbc 100644 --- a/hosted-providers/build.gradle +++ b/hosted-providers/build.gradle @@ -5,4 +5,3 @@ dependencies { implementation project(':core') } tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc", "test") } -//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/parity/build.gradle b/parity/build.gradle index 06db56c09c..0a30184abf 100644 --- a/parity/build.gradle +++ b/parity/build.gradle @@ -9,4 +9,3 @@ dependencies { tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/rlp/build.gradle b/rlp/build.gradle index 7cc45804d5..2d3255ad46 100644 --- a/rlp/build.gradle +++ b/rlp/build.gradle @@ -8,4 +8,3 @@ dependencies { api project(':utils') } tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc","test") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc","test") } -//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } diff --git a/tuples/build.gradle b/tuples/build.gradle index 1c9b4cd638..c8425a346a 100644 --- a/tuples/build.gradle +++ b/tuples/build.gradle @@ -3,4 +3,3 @@ description 'Simple Java tuples library' tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle","compileJava","compileTestJava","javadoc") } tasks.named("spotlessKotlin").configure { dependsOn("compileJava","spotlessJava", "spotlessGroovyGradle","compileTestJava","processTestResources","javadoc") } -//tasks.named("jacocoRootReport").configure { dependsOn("compileJava","compileTestJava","javadoc","test", "spotlessGroovyGradle", "spotlessKotlin","spotlessJava") } From 02f2aca34b78a40b8373c496dd8f4ca306914f23 Mon Sep 17 00:00:00 2001 From: JayMaro Date: Wed, 23 Aug 2023 01:56:22 +0900 Subject: [PATCH 43/52] Fix format violations --- core/src/main/java/org/web3j/crypto/Bip44WalletUtils.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/java/org/web3j/crypto/Bip44WalletUtils.java b/core/src/main/java/org/web3j/crypto/Bip44WalletUtils.java index 6bcb7a2882..a8fda16a28 100644 --- a/core/src/main/java/org/web3j/crypto/Bip44WalletUtils.java +++ b/core/src/main/java/org/web3j/crypto/Bip44WalletUtils.java @@ -14,6 +14,7 @@ import java.io.File; import java.io.IOException; + import org.web3j.crypto.exception.CipherException; import static org.web3j.crypto.Bip32ECKeyPair.HARDENED_BIT; From 151d6aa9c3931cc47cc1e63149b5f1e22558e950 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Wed, 30 Aug 2023 18:23:32 +0300 Subject: [PATCH 44/52] add unit test --- .../java/org/web3j/crypto/StructuredDataEncoder.java | 2 +- .../java/org/web3j/crypto/StructuredDataTest.java | 4 ++-- .../ValidStructuredArrayData.json | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/crypto/src/main/java/org/web3j/crypto/StructuredDataEncoder.java b/crypto/src/main/java/org/web3j/crypto/StructuredDataEncoder.java index cb2b0bb88a..ff9e3369e7 100644 --- a/crypto/src/main/java/org/web3j/crypto/StructuredDataEncoder.java +++ b/crypto/src/main/java/org/web3j/crypto/StructuredDataEncoder.java @@ -260,7 +260,7 @@ private byte[] convertToEncodedItem(String baseType, Object data) { rawValue.length); } } else if (baseType.equals("string")) { - hashBytes = sha3(((String) data).getBytes()); + hashBytes = Numeric.hexStringToByteArray(sha3String((String) data)); } else if (baseType.equals("bytes")) { hashBytes = sha3(Numeric.hexStringToByteArray((String) data)); } else { diff --git a/crypto/src/test/java/org/web3j/crypto/StructuredDataTest.java b/crypto/src/test/java/org/web3j/crypto/StructuredDataTest.java index 2b822e399f..5f15636b7e 100644 --- a/crypto/src/test/java/org/web3j/crypto/StructuredDataTest.java +++ b/crypto/src/test/java/org/web3j/crypto/StructuredDataTest.java @@ -308,12 +308,12 @@ public void testValidStructureWithArrays() throws IOException { (HashMap) dataEncoder.jsonMessageObject.getMessage()); String expectedMessageStructHash = - "0xc1c7d7b7dab9a65b30a6e951923b2d54536778329712e2239ed8a3f2f5f2329f"; + "0x14f510c172a64b76f1105338b2e0b09dccfa4aef922131716d58d7fd94e097e8"; assertEquals(expectedMessageStructHash, Numeric.toHexString(dataHash)); assertEquals( - "0x935426a6009a3798ee87cd16ebeb9cea26b29d2d3762ac0951166d032f55d522", + "0xa31e6ec120743db6e47cf44cd6b116cc4383ff4875cf823308938f8ba4566cc0", Numeric.toHexString(dataEncoder.hashStructuredData())); } diff --git a/crypto/src/test/resources/structured_data_json_files/ValidStructuredArrayData.json b/crypto/src/test/resources/structured_data_json_files/ValidStructuredArrayData.json index 9a26e79ad4..3acd6b57eb 100644 --- a/crypto/src/test/resources/structured_data_json_files/ValidStructuredArrayData.json +++ b/crypto/src/test/resources/structured_data_json_files/ValidStructuredArrayData.json @@ -18,8 +18,8 @@ -25 ], "ids": [ - 1, - 2 + "23ee3e3", + "3e2e23" ] }, "to": [ @@ -36,9 +36,9 @@ -300 ], "ids": [ - 0, - 3, - 7 + "2ed2d2", + "21ew2e", + "ewewe2" ] } ] @@ -92,7 +92,7 @@ }, { "name": "ids", - "type": "uint16[]" + "type": "string[]" } ] } From 8c1235afe0bfd21d8051ca87d1e25c14769680b9 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Thu, 31 Aug 2023 15:03:17 +0300 Subject: [PATCH 45/52] fix versions --- build.gradle | 2 +- gradle.properties | 2 +- integration-tests/build.gradle | 4 ++-- .../src/test/java/org/web3j/protocol/parity/ParityIT.java | 2 +- .../src/test/java/org/web3j/protocol/scenarios/ArraysIT.java | 2 +- .../src/test/java/org/web3j/protocol/scenarios/EthCallIT.java | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 99c02b64e0..f88eb8a5aa 100644 --- a/build.gradle +++ b/build.gradle @@ -28,7 +28,7 @@ ext { // test dependencies equalsverifierVersion = '3.14.1' junitVersion = '5.5.2' - web3jUnitVersion = '4.10.1' + web3jUnitVersion = '4.10.2' junitBenchmarkVersion = '0.7.2' logbackVersion = '1.2.3' mockitoJunitVersion = '3.1.0' diff --git a/gradle.properties b/gradle.properties index ae543201d3..b266a3a9e8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ group=org.web3j -version=4.10.3-SNAPSHOT +version=4.10.4-SNAPSHOT diff --git a/integration-tests/build.gradle b/integration-tests/build.gradle index 4c2f7ca57a..b313b03ad1 100644 --- a/integration-tests/build.gradle +++ b/integration-tests/build.gradle @@ -9,8 +9,8 @@ repositories { maven { url "https://splunk.jfrog.io/splunk/ext-releases-local" } } ext { - besuPluginVersion = '23.4.1' - besuInternalVersion = '23.4.1' + besuPluginVersion = '23.7.0' + besuInternalVersion = '23.7.0' besuInternalCryptoVersion = '23.1.3' besuCryptoDepVersion = '0.7.1' } diff --git a/integration-tests/src/test/java/org/web3j/protocol/parity/ParityIT.java b/integration-tests/src/test/java/org/web3j/protocol/parity/ParityIT.java index 7f9c1e918b..54e0260213 100644 --- a/integration-tests/src/test/java/org/web3j/protocol/parity/ParityIT.java +++ b/integration-tests/src/test/java/org/web3j/protocol/parity/ParityIT.java @@ -31,7 +31,7 @@ /** JSON-RPC 2.0 Integration Tests. */ @Disabled -@EVMTest(type = NodeType.OPEN_ETHEREUM) +@EVMTest(type = NodeType.BESU) public class ParityIT { private static String PASSWORD = "1n5ecur3P@55w0rd"; diff --git a/integration-tests/src/test/java/org/web3j/protocol/scenarios/ArraysIT.java b/integration-tests/src/test/java/org/web3j/protocol/scenarios/ArraysIT.java index 5dba398236..d492d62dbf 100644 --- a/integration-tests/src/test/java/org/web3j/protocol/scenarios/ArraysIT.java +++ b/integration-tests/src/test/java/org/web3j/protocol/scenarios/ArraysIT.java @@ -32,7 +32,7 @@ /** Simple integration test to demonstrate arrays usage in web3j. */ // Needs further implementation on Web3j-Unit Project. -@EVMTest(type = NodeType.OPEN_ETHEREUM) +@EVMTest(type = NodeType.BESU) public class ArraysIT extends Scenario { private static Arrays contract; diff --git a/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java b/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java index 16766a61bb..756130ab74 100644 --- a/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java +++ b/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java @@ -35,7 +35,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -@EVMTest(type = NodeType.OPEN_ETHEREUM) +@EVMTest(type = NodeType.BESU) public class EthCallIT extends Scenario { private static Revert contract; From 701c7dabaeef7433950c4f8e9b0c635c589a90ad Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Thu, 31 Aug 2023 15:23:27 +0300 Subject: [PATCH 46/52] Update EthCallIT.java --- .../src/test/java/org/web3j/protocol/scenarios/EthCallIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java b/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java index 756130ab74..d1f31937ec 100644 --- a/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java +++ b/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java @@ -35,7 +35,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -@EVMTest(type = NodeType.BESU) +@EVMTest(type = NodeType.EMBEDDED) public class EthCallIT extends Scenario { private static Revert contract; From 4d689755c6df01eea2bac78a96c38f06c1d89100 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Thu, 31 Aug 2023 15:48:12 +0300 Subject: [PATCH 47/52] Update EthCallIT.java --- .../src/test/java/org/web3j/protocol/scenarios/EthCallIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java b/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java index d1f31937ec..ea708e91ad 100644 --- a/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java +++ b/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java @@ -35,7 +35,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -@EVMTest(type = NodeType.EMBEDDED) +@EVMTest(type = NodeType.COMPOSE) public class EthCallIT extends Scenario { private static Revert contract; From 4ac9ab4e41693c75eb822aad07d0d5973180b0bf Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Thu, 31 Aug 2023 18:14:19 +0300 Subject: [PATCH 48/52] Update EthCallIT.java --- .../src/test/java/org/web3j/protocol/scenarios/EthCallIT.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java b/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java index ea708e91ad..7f7efdad3c 100644 --- a/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java +++ b/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java @@ -35,7 +35,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -@EVMTest(type = NodeType.COMPOSE) +@EVMTest(type = NodeType.GETH) public class EthCallIT extends Scenario { private static Revert contract; @@ -67,7 +67,7 @@ public void testRevertWithoutMessage() throws Exception { public void testRevertWithMessage() throws Exception { EthCall ethCall = ethCall(BigInteger.valueOf(2L)); assertTrue(ethCall.isReverted()); - assertTrue(ethCall.getRevertReason().endsWith("VM execution error.")); + assertTrue(ethCall.getRevertReason().endsWith("execution reverted:")); } private EthCall ethCall(BigInteger value) throws java.io.IOException { From bc5da75466be0277e83f3c2e976a1ebe1388a765 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Thu, 31 Aug 2023 18:33:04 +0300 Subject: [PATCH 49/52] Update EthCallIT.java --- .../src/test/java/org/web3j/protocol/scenarios/EthCallIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java b/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java index 7f7efdad3c..a77eb7c327 100644 --- a/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java +++ b/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java @@ -67,7 +67,7 @@ public void testRevertWithoutMessage() throws Exception { public void testRevertWithMessage() throws Exception { EthCall ethCall = ethCall(BigInteger.valueOf(2L)); assertTrue(ethCall.isReverted()); - assertTrue(ethCall.getRevertReason().endsWith("execution reverted:")); + assertFalse(ethCall.getRevertReason().isBlank()); } private EthCall ethCall(BigInteger value) throws java.io.IOException { From 7e6b17ae3c7831383c9a94c6531b0671847f007c Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Thu, 31 Aug 2023 19:04:38 +0300 Subject: [PATCH 50/52] Update EthCallIT.java --- .../src/test/java/org/web3j/protocol/scenarios/EthCallIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java b/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java index a77eb7c327..8c5e2f6a64 100644 --- a/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java +++ b/integration-tests/src/test/java/org/web3j/protocol/scenarios/EthCallIT.java @@ -35,7 +35,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -@EVMTest(type = NodeType.GETH) +@EVMTest(type = NodeType.BESU) public class EthCallIT extends Scenario { private static Revert contract; From 2eccec2d324819c383a8bd052f2ca2e287f9bbcb Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Thu, 31 Aug 2023 20:03:11 +0300 Subject: [PATCH 51/52] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 600228b506..fc82fafa0d 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ Java: org.web3j core - 4.10.2 + 4.10.3 ``` From efeb2bafe1fa762842fe730484228b4b9bcdd68d Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Tue, 5 Sep 2023 17:44:27 +0300 Subject: [PATCH 52/52] add yParity --- .../core/methods/response/EthBlock.java | 2 + .../core/methods/response/Transaction.java | 17 +++++ .../org/web3j/protocol/core/ResponseTest.java | 73 +++++++++++++++++++ 3 files changed, 92 insertions(+) diff --git a/core/src/main/java/org/web3j/protocol/core/methods/response/EthBlock.java b/core/src/main/java/org/web3j/protocol/core/methods/response/EthBlock.java index dae4a84eea..6013ada6e9 100644 --- a/core/src/main/java/org/web3j/protocol/core/methods/response/EthBlock.java +++ b/core/src/main/java/org/web3j/protocol/core/methods/response/EthBlock.java @@ -673,6 +673,7 @@ public TransactionObject( String r, String s, long v, + String yParity, String type, String maxFeePerGas, String maxPriorityFeePerGas, @@ -696,6 +697,7 @@ public TransactionObject( r, s, v, + yParity, type, maxFeePerGas, maxPriorityFeePerGas, diff --git a/core/src/main/java/org/web3j/protocol/core/methods/response/Transaction.java b/core/src/main/java/org/web3j/protocol/core/methods/response/Transaction.java index 9a0d62ca11..a72d7e6c7a 100644 --- a/core/src/main/java/org/web3j/protocol/core/methods/response/Transaction.java +++ b/core/src/main/java/org/web3j/protocol/core/methods/response/Transaction.java @@ -38,6 +38,7 @@ public class Transaction { private String r; private String s; private long v; // see https://github.com/web3j/web3j/issues/44 + private String yParity; private String type; private String maxFeePerGas; private String maxPriorityFeePerGas; @@ -111,6 +112,7 @@ public Transaction( String r, String s, long v, + String yParity, String type, String maxFeePerGas, String maxPriorityFeePerGas, @@ -133,6 +135,7 @@ public Transaction( this.r = r; this.s = s; this.v = v; + this.yParity = yParity; this.type = type; this.maxFeePerGas = maxFeePerGas; this.maxPriorityFeePerGas = maxPriorityFeePerGas; @@ -318,6 +321,14 @@ public void setV(Object v) { // this.v = v; // } + public String getyParity() { + return yParity; + } + + public void setyParity(String yParity) { + this.yParity = yParity; + } + public Long getChainId() { if (chainId != null) { return Numeric.decodeQuantity(chainId).longValue(); @@ -455,6 +466,11 @@ public boolean equals(Object o) { if (getR() != null ? !getR().equals(that.getR()) : that.getR() != null) { return false; } + if (getyParity() != null + ? !getyParity().equals(that.getyParity()) + : that.getyParity() != null) { + return false; + } if (getType() != null ? !getType().equals(that.getType()) : that.getType() != null) { return false; } @@ -500,6 +516,7 @@ public int hashCode() { result = 31 * result + (getR() != null ? getR().hashCode() : 0); result = 31 * result + (getS() != null ? getS().hashCode() : 0); result = 31 * result + BigInteger.valueOf(getV()).hashCode(); + result = 31 * result + (getyParity() != null ? getyParity().hashCode() : 0); result = 31 * result + (getType() != null ? getType().hashCode() : 0); result = 31 * result + (getMaxFeePerGasRaw() != null ? getMaxFeePerGasRaw().hashCode() : 0); result = diff --git a/core/src/test/java/org/web3j/protocol/core/ResponseTest.java b/core/src/test/java/org/web3j/protocol/core/ResponseTest.java index bfd0d931d5..e0f99f8fa2 100644 --- a/core/src/test/java/org/web3j/protocol/core/ResponseTest.java +++ b/core/src/test/java/org/web3j/protocol/core/ResponseTest.java @@ -1082,6 +1082,79 @@ public void testEthTransaction() { assertEquals(ethTransaction.getTransaction().get(), (transaction)); } + @Test + public void testEthTransactionResponseWithYParity() { + buildResponse( + "{\n" + + " \"id\":1,\n" + + " \"jsonrpc\":\"2.0\",\n" + + " \"result\": {\n" + + " \"hash\":\"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b\",\n" + + " \"nonce\":\"0x\",\n" + + " \"blockHash\": \"0xbeab0aa2411b7ab17f30a99d3cb9c6ef2fc5426d6ad6fd9e2a26a6aed1d1055b\",\n" + + " \"blockNumber\": \"0x15df\",\n" + + " \"chainId\": \"4\",\n" + + " \"transactionIndex\": \"0x1\",\n" + + " \"from\":\"0x407d73d8a49eeb85d32cf465507dd71d507100c1\",\n" + + " \"to\":\"0x85h43d8a49eeb85d32cf465507dd71d507100c1\",\n" + + " \"value\":\"0x7f110\",\n" + + " \"gas\": \"0x7f110\",\n" + + " \"gasPrice\":\"0x09184e72a000\",\n" + + " \"input\":\"0x603880600c6000396000f300603880600c6000396000f3603880600c6000396000f360\",\n" + + " \"creates\":null,\n" + + " \"publicKey\":\"0x6614d7d7bfe989295821985de0439e868b26ff05f98ae0da0ce5bccc24ea368a083b785323c9fcb405dd4c10a2c95d93312a1b2d68beb24ab4ea7c3c2f7c455b\",\n" + + " \"raw\":\"0xf8cd83103a048504a817c800830e57e0945927c5cc723c4486f93bf90bad3be8831139499e80b864140f8dd300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000c03905df347aa6490d5a98fbb8d8e49520000000000000000000000000000000000000000000000000000000057d56ee61ba0f115cc4d7516dd430046504e1c888198e0323e8ded016d755f89c226ba3481dca04a2ae8ee49f1100b5c0202b37ed8bacf4caeddebde6b7f77e12e7a55893e9f62\",\n" + + " \"r\":\"0xf115cc4d7516dd430046504e1c888198e0323e8ded016d755f89c226ba3481dc\",\n" + + " \"s\":\"0x4a2ae8ee49f1100b5c0202b37ed8bacf4caeddebde6b7f77e12e7a55893e9f62\",\n" + + " \"v\":\"0\",\n" + + " \"yParity\":\"1\",\n" + + " \"accessList\": [{" + + " \"address\":\"0x408e41876cccdc0f92210600ef50372656052a38\",\n" + + " \"storageKeys\": [" + + " \"0x18919546fd5421b0ef1b1b8dfce80500e69f2e28ae34c4d6298172949fa77dcc\",\n" + + " \"0x4869ff95a61ee1ded0b22e2d0e3f54f3199886a9f361e634132c95164bfc5129\"\n" + + " ] \n" + + " }], \n" + + " \"type\":\"0x0\",\n" + + " \"maxFeePerGas\": \"0x7f110\",\n" + + " \"maxPriorityFeePerGas\": \"0x7f110\"\n" + + " }\n" + + "}"); + Transaction transaction = + new Transaction( + "0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", + "0x", + "0xbeab0aa2411b7ab17f30a99d3cb9c6ef2fc5426d6ad6fd9e2a26a6aed1d1055b", + "0x15df", + "4", + "0x1", + "0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "0x85h43d8a49eeb85d32cf465507dd71d507100c1", + "0x7f110", + "0x7f110", + "0x09184e72a000", + "0x603880600c6000396000f300603880600c6000396000f3603880600c6000396000f360", + null, + "0x6614d7d7bfe989295821985de0439e868b26ff05f98ae0da0ce5bccc24ea368a083b785323c9fcb405dd4c10a2c95d93312a1b2d68beb24ab4ea7c3c2f7c455b", + "0xf8cd83103a048504a817c800830e57e0945927c5cc723c4486f93bf90bad3be8831139499e80b864140f8dd300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000c03905df347aa6490d5a98fbb8d8e49520000000000000000000000000000000000000000000000000000000057d56ee61ba0f115cc4d7516dd430046504e1c888198e0323e8ded016d755f89c226ba3481dca04a2ae8ee49f1100b5c0202b37ed8bacf4caeddebde6b7f77e12e7a55893e9f62", + "0xf115cc4d7516dd430046504e1c888198e0323e8ded016d755f89c226ba3481dc", + "0x4a2ae8ee49f1100b5c0202b37ed8bacf4caeddebde6b7f77e12e7a55893e9f62", + (byte) 0, + "1", + "0x0", + "0x7f110", + "0x7f110", + Arrays.asList( + new AccessListObject( + "0x408e41876cccdc0f92210600ef50372656052a38", + Arrays.asList( + "0x18919546fd5421b0ef1b1b8dfce80500e69f2e28ae34c4d6298172949fa77dcc", + "0x4869ff95a61ee1ded0b22e2d0e3f54f3199886a9f361e634132c95164bfc5129")))); + + EthTransaction ethTransaction = deserialiseResponse(EthTransaction.class); + assertEquals(ethTransaction.getTransaction().get(), (transaction)); + } + @Test public void testTransactionChainId() { Transaction transaction = new Transaction();