Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, windows-2019, macos-latest ]
os: [ ubuntu-22.04, windows-2025, macos-latest ]
steps:
- uses: actions/checkout@v3
with:
Expand Down
17 changes: 11 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ ext {
if (!project.hasProperty("ossrhPassword")) {
ossrhPassword = "xxx"
}
jacksonVersion = '2.14.3'
commonsIOVersion = '2.11.0'
commonsLang3Version = '3.12.0'
jacksonVersion = '2.20.1'
commonsIOVersion = '2.20.0'
commonsLang3Version = '3.19.0'
toml4jVersion = "0.7.2"
bcprovJDK18onVersion = '1.78'
webankJavaCryptoVersion = "1.0.3"
Expand Down Expand Up @@ -114,6 +114,10 @@ sourceSets {
}
}

tasks.withType(ProcessResources) {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}

googleJavaFormat {
toolVersion = '1.7'
options style: 'AOSP'
Expand All @@ -135,6 +139,7 @@ dependencies {
api("com.google.code.gson:gson:${gsonVersion}")
api("org.apache.commons:commons-lang3:${commonsLang3Version}")
api("com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}")
api("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:${jacksonVersion}")
api("commons-io:commons-io:${commonsIOVersion}")
api("com.webank:webank-blockchain-java-crypto:${webankJavaCryptoVersion}")
api("com.moandjiezana.toml:toml4j:${toml4jVersion}") {
Expand Down Expand Up @@ -249,10 +254,10 @@ publishing {
}
repositories {
maven {
def releasesRepoURL = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
def snapshotsRepoURL = "https://oss.sonatype.org/content/repositories/snapshots"
name = 'ossrh-staging-api'
def releasesRepoURL = "https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/"
def snapshotsRepoURL = "https://central.sonatype.com/repository/maven-snapshots/"
url = !version.endsWith("SNAPSHOT") ? releasesRepoURL : snapshotsRepoURL

credentials {
username ossrhUsername
password ossrhPassword
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.fisco.bcos.sdk.v3.codec.ContractCodecException;
import org.fisco.bcos.sdk.v3.codec.datatypes.DynamicBytes;
import org.fisco.bcos.sdk.v3.codec.datatypes.Type;
import org.fisco.bcos.sdk.v3.codec.datatypes.generated.Bytes4;
import org.fisco.bcos.sdk.v3.codec.datatypes.generated.Int256;
import org.fisco.bcos.sdk.v3.crypto.keypair.CryptoKeyPair;
import org.fisco.bcos.sdk.v3.model.ConstantConfig;
Expand All @@ -46,7 +45,6 @@
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.mockito.internal.matchers.Null;

/**
* TransactionProcessorTest @Description: TransactionProcessorTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.util.List;
import java.util.Random;
import org.fisco.bcos.sdk.jni.common.JniException;
import org.fisco.bcos.sdk.jni.utilities.tx.TransactionBuilderJniObj;
import org.fisco.bcos.sdk.v3.client.Client;
import org.fisco.bcos.sdk.v3.client.protocol.response.BcosBlock;
import org.fisco.bcos.sdk.v3.client.protocol.response.BcosGroupInfo;
Expand All @@ -42,16 +41,11 @@
import org.fisco.bcos.sdk.v3.config.exceptions.ConfigException;
import org.fisco.bcos.sdk.v3.crypto.CryptoSuite;
import org.fisco.bcos.sdk.v3.crypto.keypair.CryptoKeyPair;
import org.fisco.bcos.sdk.v3.crypto.signature.SignatureResult;
import org.fisco.bcos.sdk.v3.model.ConstantConfig;
import org.fisco.bcos.sdk.v3.model.TransactionReceipt;
import org.fisco.bcos.sdk.v3.test.wasm.liquid.Asset;
import org.fisco.bcos.sdk.v3.test.wasm.liquid.HelloWorld;
import org.fisco.bcos.sdk.v3.test.wasm.liquid.HelloWorld2;
import org.fisco.bcos.sdk.v3.transaction.codec.decode.TransactionDecoderService;
import org.fisco.bcos.sdk.v3.transaction.model.exception.ContractException;
import org.fisco.bcos.sdk.v3.transaction.pusher.TransactionPusherService;
import org.fisco.bcos.sdk.v3.utils.Hex;
import org.junit.Assert;
import org.junit.Test;

Expand Down
8 changes: 6 additions & 2 deletions src/main/java/org/fisco/bcos/sdk/v3/client/ClientImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -1664,7 +1664,8 @@ public <T extends JsonRpcResponse<?>> T callRemoteMethod(

future.complete(response);
});
Response response = future.get();
Response response =
future.get(configOption.getNetworkConfig().getTimeout(), TimeUnit.MILLISECONDS);
return ClientImpl.parseResponseIntoJsonRpcResponse(
request.getMethod(), response, responseType);
} catch (ClientException e) {
Expand All @@ -1675,7 +1676,10 @@ public <T extends JsonRpcResponse<?>> T callRemoteMethod(
"callRemoteMethod failed for decode the message exception, error message:"
+ e.getMessage(),
e);
} catch (JsonProcessingException | InterruptedException | ExecutionException e) {
} catch (JsonProcessingException
| InterruptedException
| ExecutionException
| TimeoutException e) {
logger.error("callRemoteMethod exception, raw request:{} ", request, e);
throw new ClientException(
"callRemoteMethod failed for decode the message exception, error message:"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ public CryptoKeyPair createKeyPair(KeyPair javaKeyPair) {
return new ECDSAKeyPair(javaKeyPair);
}

public static CryptoKeyPair cryptoKeyPair(KeyPair javaKeyPair) {
if (javaKeyPair == null) {
return new ECDSAKeyPair();
}
return new ECDSAKeyPair(javaKeyPair);
}

public static String getAddressByPublicKey(String publicKey) {
return getAddress(publicKey, ECDSAKeyPair.DefaultHashAlgorithm);
}
Expand Down
Loading
Loading