Skip to content

Commit 5173684

Browse files
authored
bump version 4.11.4 (#2049)
Signed-off-by: Nischal Sharma <[email protected]>
1 parent 601d57c commit 5173684

File tree

6 files changed

+29
-21
lines changed

6 files changed

+29
-21
lines changed

CHANGELOG.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,21 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6-
# [4.11.3]() (Upcoming)
6+
# [4.11.4]() (Upcoming)
7+
8+
### Bug Fixes
9+
10+
*
11+
12+
### Features
13+
14+
* bump snapshot version to 4.11.4 [#2049](https://github.com/web3j/web3j/pull/2049)
15+
16+
### BREAKING CHANGES
17+
18+
*
19+
20+
# [4.11.3](https://github.com/hyperledger/web3j/releases/tag/v4.11.3) (2024-05-01)
721

822
### Bug Fixes
923

abi/src/main/java/org/web3j/abi/TypeEncoder.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,11 @@ public static String encode(Type parameter) {
101101
*/
102102
public static String encodePacked(Type parameter) {
103103
if (parameter instanceof Utf8String) {
104-
//removePadding can also be used, but is not necessary
105-
return Numeric.toHexStringNoPrefix(((Utf8String) parameter).getValue().getBytes(StandardCharsets.UTF_8));
104+
// removePadding can also be used, but is not necessary
105+
return Numeric.toHexStringNoPrefix(
106+
((Utf8String) parameter).getValue().getBytes(StandardCharsets.UTF_8));
106107
} else if (parameter instanceof DynamicBytes) {
107-
//removePadding can also be used, but is not necessary
108+
// removePadding can also be used, but is not necessary
108109
return Numeric.toHexStringNoPrefix(((DynamicBytes) parameter).getValue());
109110
} else if (parameter instanceof DynamicArray) {
110111
return arrayEncodePacked((DynamicArray) parameter);
@@ -144,7 +145,8 @@ static String removePadding(String encodedValue, Type parameter) {
144145
return encodedValue.substring(64, 64 + length * 2);
145146
}
146147
if (parameter instanceof DynamicBytes) {
147-
return encodedValue.substring(64, 64 + ((DynamicBytes) parameter).getValue().length * 2);
148+
return encodedValue.substring(
149+
64, 64 + ((DynamicBytes) parameter).getValue().length * 2);
148150
} else {
149151
throw new UnsupportedOperationException(
150152
"Type cannot be encoded: " + parameter.getClass());

abi/src/test/java/org/web3j/abi/DefaultFunctionEncoderTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,13 @@ public void testEncodeConstructorPacked_multipleParameters() {
158158
Arrays.asList(
159159
new Uint32(BigInteger.valueOf(69)),
160160
new Bool(true),
161-
new DynamicBytes((new byte[]{0, 1, 2, 3, 4, 5})))));
161+
new DynamicBytes((new byte[] {0, 1, 2, 3, 4, 5})))));
162162
assertEquals(
163163
"12000102030405",
164164
FunctionEncoder.encodeConstructorPacked(
165165
Arrays.asList(
166166
new DynamicBytes(Numeric.hexStringToByteArray("0x12")),
167-
new DynamicBytes((new byte[]{0, 1, 2, 3, 4, 5})))));
167+
new DynamicBytes((new byte[] {0, 1, 2, 3, 4, 5})))));
168168
}
169169

170170
@Test

abi/src/test/java/org/web3j/abi/TypeEncoderPackedTest.java

+4-12
Original file line numberDiff line numberDiff line change
@@ -904,24 +904,16 @@ public void testStaticArrayEncodePacked() {
904904
@Test
905905
public void testDynamicBytesEncodePacked() {
906906
DynamicBytes dynamicBytes = new DynamicBytes(new byte[] {0, 1, 2, 3, 4, 5});
907-
assertEquals(
908-
"000102030405",
909-
TypeEncoder.encodePacked(dynamicBytes));
907+
assertEquals("000102030405", TypeEncoder.encodePacked(dynamicBytes));
910908

911909
DynamicBytes zero = new DynamicBytes(new byte[] {0});
912-
assertEquals(
913-
"00",
914-
TypeEncoder.encodePacked(zero));
910+
assertEquals("00", TypeEncoder.encodePacked(zero));
915911

916912
DynamicBytes empty = new DynamicBytes(new byte[] {});
917-
assertEquals(
918-
"",
919-
TypeEncoder.encodePacked(empty));
913+
assertEquals("", TypeEncoder.encodePacked(empty));
920914

921915
DynamicBytes dave = new DynamicBytes("dave".getBytes());
922-
assertEquals(
923-
"64617665",
924-
TypeEncoder.encodePacked(dave));
916+
assertEquals("64617665", TypeEncoder.encodePacked(dave));
925917

926918
DynamicBytes loremIpsum =
927919
new DynamicBytes(

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ ext {
3030
// test dependencies
3131
equalsverifierVersion = '3.14.1'
3232
junitVersion = '5.5.2'
33-
web3jUnitVersion = '4.11.2'
33+
web3jUnitVersion = '4.11.3'
3434
junitBenchmarkVersion = '0.7.2'
3535
logbackVersion = '1.4.14'
3636
mockitoJunitVersion = '3.1.0'

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
group=org.web3j
2-
version=4.11.3-SNAPSHOT
2+
version=4.11.4-SNAPSHOT

0 commit comments

Comments
 (0)