You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, protos in references have all their message as internal. This is an issue because services in protos can be 'inherited' and rpcs with message references will have accessibility mismatch issue (message being internal and rpc being public). The solution is placing the proto in the message folder. This is misleading since message that not say anything about the nature of the proto class.
Steps To Reproduce
In contract/hello_world_contract.proto:
syntax="proto3";
import "aelf/options.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/wrappers.proto";
import "Protobuf/reference/acs12.proto";
import "Protobuf/reference/request_interface.proto";// The namespace of this classoptioncsharp_namespace="AElf.Contracts.VrfTest";serviceVrfTest{// The name of the state class the smart contract is going to use to access blockchain stateoption(aelf.csharp_state)="AElf.Contracts.VrfTest.VrfTestState";option(aelf.base)="Protobuf/reference/acs12.proto";option(aelf.base)="Protobuf/reference/request_interface.proto";// Actions (methods that modify contract state)// Stores the value in contract staterpcUpdate(google.protobuf.StringValue)returns(google.protobuf.Empty){}// Views (methods that don't modify contract state)// Get the value stored from contract staterpcRead(google.protobuf.Empty)returns(google.protobuf.StringValue){option(aelf.is_view)= true;}}// An event that will be emitted from contract method callmessageUpdatedMessage{option(aelf.is_event)= true;stringvalue=1;}
In reference/request_interface.proto:
// the version of the language, use proto3 for contractssyntax="proto3";// some core imports for AElf chain types
import "aelf/core.proto";
import "aelf/options.proto";
import "Protobuf/reference/acs12.proto";packageoracle;// import for using the google.protobuf.* type.
import "google/protobuf/empty.proto";
import "google/protobuf/wrappers.proto";
import "google/protobuf/timestamp.proto";option(aelf.identity)="request_interface";// the name of the C# namespace in which the contract code will be,// generated code will also be in this namespace.optioncsharp_namespace="AElf.Contracts.VrfTest";// the contract definition: a gRPC service definition.serviceRequestInterface{// the full name of the C# class that will contain the state (here <namespace>.<state-class-name> format).rpcStartOracleRequest(StartOracleRequestInput)returns(google.protobuf.Empty);rpcHandleOracleFulfillment(HandleOracleFulfillmentInput)returns(google.protobuf.Empty);}messageStartOracleRequestInput{int64subscription_id=1;int32request_type_index=2;bytesspecific_data=3;}messageHandleOracleFulfillmentInput{aelf.Hashrequest_id=1;bytesresponse=2;byteserr=3;int32request_type_index=4;}messageOracleResponse{bytesresponse=1;byteserr=2;}
Current Behavior
Compile error
Expected Behavior
Compile successfully with contracts in reference used for 'inheritance' purposes. Rename message folder to base folder instead.
Environment
dotnet 7.0
AElf.Tools 1.0.2
The text was updated successfully, but these errors were encountered:
Description
Currently, protos in references have all their message as internal. This is an issue because services in protos can be 'inherited' and rpcs with message references will have accessibility mismatch issue (message being internal and rpc being public). The solution is placing the proto in the message folder. This is misleading since message that not say anything about the nature of the proto class.
Steps To Reproduce
Current Behavior
Expected Behavior
folder
tobase
folder instead.Environment
The text was updated successfully, but these errors were encountered: