Skip to content

Commit

Permalink
Merge pull request #83 from mikeluxue/0.6.0
Browse files Browse the repository at this point in the history
0.6.0
  • Loading branch information
eodiandie authored Jun 14, 2023
2 parents 8661820 + 2a45ffe commit 7dbffc0
Show file tree
Hide file tree
Showing 10 changed files with 5,372 additions and 223 deletions.
6 changes: 3 additions & 3 deletions trident-java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,21 @@ dependencies {
<dependency>
<groupId>org.tron.trident</groupId>
<artifactId>abi</artifactId>
<version>0.5.0</version>
<version>0.6.0</version>
<scope>system</scope>
<systemPath>your path</systemPath>
</dependency>
<dependency>
<groupId>org.tron.trident</groupId>
<artifactId>utils</artifactId>
<version>0.5.0</version>
<version>0.6.0</version>
<scope>system</scope>
<systemPath>your path</systemPath>
</dependency>
<dependency>
<groupId>org.tron.trident</groupId>
<artifactId>core</artifactId>
<version>0.5.0</version>
<version>0.6.0</version>
<scope>system</scope>
<systemPath>your path</systemPath>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion trident-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ext {
}

allprojects {
version '0.5.0'
version '0.6.0'
group = 'org.tron.trident'

repositories {
Expand Down
582 changes: 554 additions & 28 deletions trident-java/core/src/main/grpc/org/tron/trident/api/WalletGrpc.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,37 @@ org.tron.trident.api.GrpcAPI.NumberMessage> getGetRewardInfoMethod() {
return getGetRewardInfoMethod;
}

private static volatile io.grpc.MethodDescriptor<org.tron.trident.api.GrpcAPI.BytesMessage,
org.tron.trident.proto.Chain.Transaction> getGetTransactionFromPendingMethod;

@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetTransactionFromPending",
requestType = org.tron.trident.api.GrpcAPI.BytesMessage.class,
responseType = org.tron.trident.proto.Chain.Transaction.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<org.tron.trident.api.GrpcAPI.BytesMessage,
org.tron.trident.proto.Chain.Transaction> getGetTransactionFromPendingMethod() {
io.grpc.MethodDescriptor<org.tron.trident.api.GrpcAPI.BytesMessage, org.tron.trident.proto.Chain.Transaction> getGetTransactionFromPendingMethod;
if ((getGetTransactionFromPendingMethod = WalletSolidityGrpc.getGetTransactionFromPendingMethod) == null) {
synchronized (WalletSolidityGrpc.class) {
if ((getGetTransactionFromPendingMethod = WalletSolidityGrpc.getGetTransactionFromPendingMethod) == null) {
WalletSolidityGrpc.getGetTransactionFromPendingMethod = getGetTransactionFromPendingMethod =
io.grpc.MethodDescriptor.<org.tron.trident.api.GrpcAPI.BytesMessage, org.tron.trident.proto.Chain.Transaction>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTransactionFromPending"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tron.trident.api.GrpcAPI.BytesMessage.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tron.trident.proto.Chain.Transaction.getDefaultInstance()))
.setSchemaDescriptor(new WalletSolidityMethodDescriptorSupplier("GetTransactionFromPending"))
.build();
}
}
}
return getGetTransactionFromPendingMethod;
}

/**
* Creates a new async stub that supports all call types for the service
*/
Expand Down Expand Up @@ -236,6 +267,13 @@ public void getRewardInfo(org.tron.trident.api.GrpcAPI.BytesMessage request,
asyncUnimplementedUnaryCall(getGetRewardInfoMethod(), responseObserver);
}

/**
*/
public void getTransactionFromPending(org.tron.trident.api.GrpcAPI.BytesMessage request,
io.grpc.stub.StreamObserver<org.tron.trident.proto.Chain.Transaction> responseObserver) {
asyncUnimplementedUnaryCall(getGetTransactionFromPendingMethod(), responseObserver);
}

@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
Expand Down Expand Up @@ -266,6 +304,13 @@ public void getRewardInfo(org.tron.trident.api.GrpcAPI.BytesMessage request,
org.tron.trident.api.GrpcAPI.BytesMessage,
org.tron.trident.api.GrpcAPI.NumberMessage>(
this, METHODID_GET_REWARD_INFO)))
.addMethod(
getGetTransactionFromPendingMethod(),
asyncUnaryCall(
new MethodHandlers<
org.tron.trident.api.GrpcAPI.BytesMessage,
org.tron.trident.proto.Chain.Transaction>(
this, METHODID_GET_TRANSACTION_FROM_PENDING)))
.build();
}
}
Expand Down Expand Up @@ -321,6 +366,14 @@ public void getRewardInfo(org.tron.trident.api.GrpcAPI.BytesMessage request,
asyncUnaryCall(
getChannel().newCall(getGetRewardInfoMethod(), getCallOptions()), request, responseObserver);
}

/**
*/
public void getTransactionFromPending(org.tron.trident.api.GrpcAPI.BytesMessage request,
io.grpc.stub.StreamObserver<org.tron.trident.proto.Chain.Transaction> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetTransactionFromPendingMethod(), getCallOptions()), request, responseObserver);
}
}

/**
Expand Down Expand Up @@ -370,6 +423,13 @@ public org.tron.trident.api.GrpcAPI.NumberMessage getRewardInfo(org.tron.trident
return blockingUnaryCall(
getChannel(), getGetRewardInfoMethod(), getCallOptions(), request);
}

/**
*/
public org.tron.trident.proto.Chain.Transaction getTransactionFromPending(org.tron.trident.api.GrpcAPI.BytesMessage request) {
return blockingUnaryCall(
getChannel(), getGetTransactionFromPendingMethod(), getCallOptions(), request);
}
}

/**
Expand Down Expand Up @@ -423,12 +483,21 @@ public com.google.common.util.concurrent.ListenableFuture<org.tron.trident.api.G
return futureUnaryCall(
getChannel().newCall(getGetRewardInfoMethod(), getCallOptions()), request);
}

/**
*/
public com.google.common.util.concurrent.ListenableFuture<org.tron.trident.proto.Chain.Transaction> getTransactionFromPending(
org.tron.trident.api.GrpcAPI.BytesMessage request) {
return futureUnaryCall(
getChannel().newCall(getGetTransactionFromPendingMethod(), getCallOptions()), request);
}
}

private static final int METHODID_GET_ACCOUNT = 0;
private static final int METHODID_GET_NOW_BLOCK2 = 1;
private static final int METHODID_GET_TRANSACTION_BY_ID = 2;
private static final int METHODID_GET_REWARD_INFO = 3;
private static final int METHODID_GET_TRANSACTION_FROM_PENDING = 4;

private static final class MethodHandlers<Req, Resp> implements
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
Expand Down Expand Up @@ -463,6 +532,10 @@ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserv
serviceImpl.getRewardInfo((org.tron.trident.api.GrpcAPI.BytesMessage) request,
(io.grpc.stub.StreamObserver<org.tron.trident.api.GrpcAPI.NumberMessage>) responseObserver);
break;
case METHODID_GET_TRANSACTION_FROM_PENDING:
serviceImpl.getTransactionFromPending((org.tron.trident.api.GrpcAPI.BytesMessage) request,
(io.grpc.stub.StreamObserver<org.tron.trident.proto.Chain.Transaction>) responseObserver);
break;
default:
throw new AssertionError();
}
Expand Down Expand Up @@ -528,6 +601,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
.addMethod(getGetNowBlock2Method())
.addMethod(getGetTransactionByIdMethod())
.addMethod(getGetRewardInfoMethod())
.addMethod(getGetTransactionFromPendingMethod())
.build();
}
}
Expand Down
Loading

0 comments on commit 7dbffc0

Please sign in to comment.