diff --git a/pom.xml b/pom.xml index d390adc..28db9dd 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ UTF-8 - 17 + 8 ${osslabz.encoding} ${osslabz.encoding} diff --git a/src/main/java/net/osslabz/evm/abi/decoder/AbiDecoder.java b/src/main/java/net/osslabz/evm/abi/decoder/AbiDecoder.java index 092a629..046866b 100644 --- a/src/main/java/net/osslabz/evm/abi/decoder/AbiDecoder.java +++ b/src/main/java/net/osslabz/evm/abi/decoder/AbiDecoder.java @@ -5,8 +5,9 @@ import java.io.IOException; import java.io.InputStream; +import java.nio.charset.StandardCharsets; import java.nio.file.Files; -import java.nio.file.Path; +import java.nio.file.Paths; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -20,7 +21,7 @@ public class AbiDecoder { Map methodSignatures = new HashMap<>(); public AbiDecoder(String abiFilePath) throws IOException { - this.abi = AbiDefinition.fromJson(Files.readString(Path.of(abiFilePath))); + this.abi = AbiDefinition.fromJson(new String(Files.readAllBytes(Paths.get(abiFilePath)), StandardCharsets.UTF_8)); init(); } @@ -111,4 +112,4 @@ public List decodeFunctionsCalls(String inputData) { } return resolvedCalls; } -} +} \ No newline at end of file