diff --git a/proto/regen/ecocredit/v1/events.proto b/proto/regen/ecocredit/v1/events.proto index 4bd5802dfa..cf42cd6e6a 100644 --- a/proto/regen/ecocredit/v1/events.proto +++ b/proto/regen/ecocredit/v1/events.proto @@ -284,6 +284,9 @@ message EventWithdrawProjectClass { // class_id is the unique identifier of the class that was withdrawn from. string class_id = 2; + + // old_status is the old status of the project class relationship before withdrawal. + ProjectEnrollmentStatus old_status = 3; } // EventEvaluateProjectClass is emitted when a project class relationship is @@ -301,10 +304,10 @@ message EventEvaluateProjectClass { string class_id = 3; // old_status is the old status of the project class relationship. - ProjectClassStatus old_status = 4; + ProjectEnrollmentStatus old_status = 4; // new_status is the new status of the project class relationship. - ProjectClassStatus new_status = 5; + ProjectEnrollmentStatus new_status = 5; // new_class_metadata is any new class metadata. string new_class_metadata = 6; diff --git a/proto/regen/ecocredit/v1/query.proto b/proto/regen/ecocredit/v1/query.proto index 453f129351..85ec4e3821 100644 --- a/proto/regen/ecocredit/v1/query.proto +++ b/proto/regen/ecocredit/v1/query.proto @@ -260,19 +260,21 @@ service Query { option (google.api.http).get = "/regen/ecocredit/v1/allowed-bridge-chains"; } - // ProjectClass queries information about a project credit class relationship. + // ProjectEnrollment queries information about a project's enrollment in a + // credit class. // // Since Revision 3 - rpc ProjectClass(QueryProjectClassRequest) returns (QueryProjectClassResponse) { + rpc ProjectEnrollment(QueryProjectEnrollmentRequest) returns (QueryProjectEnrollmentResponse) { option (google.api.http) = { - get : "/regen/ecocredit/v1/project/{project_id}/class/{project_id}" + get : "/regen/ecocredit/v1/project/{project_id}/enrollment/{class_id}" }; } - // ProjectClasses queries all credit classes associated with a project. - rpc ProjectClasses(QueryProjectClassesRequest) returns (QueryProjectClassesResponse) { + // ProjectEnrollments queries all credit class enrollments associated with a + // project. + rpc ProjectEnrollments(QueryProjectEnrollmentsRequest) returns (QueryProjectEnrollmentsResponse) { option (google.api.http) = { - get : "/regen/ecocredit/v1/project/{project_id}/class" + get : "/regen/ecocredit/v1/project/{project_id}/enrollment" }; } } @@ -843,10 +845,10 @@ message QueryAllowedBridgeChainsResponse { repeated string allowed_bridge_chains = 1; } -// QueryProjectClassRequest is the Query/ProjectClass request type. +// QueryProjectEnrollmentRequest is the Query/ProjectEnrollment request type. // // Since Revision 3 -message QueryProjectClassRequest { +message QueryProjectEnrollmentRequest { // project_id is the unique identifier of the project to query. string project_id = 1; @@ -855,19 +857,19 @@ message QueryProjectClassRequest { string class_id = 2; } -// QueryProjectClassResponse is the Query/ProjectClass response type. +// QueryProjectEnrollmentResponse is the Query/ProjectEnrollment response type. // // Since Revision 3 -message QueryProjectClassResponse { +message QueryProjectEnrollmentResponse { // project_class is the fetched project class relationship. - ProjectClass project_class = 1; + ProjectEnrollment project_class = 1; } -// QueryProjectClassesRequest is the Query/ProjectClasses request type. +// QueryProjectEnrollmentsRequest is the Query/ProjectEnrollments request type. // // Since Revision 3 -message QueryProjectClassesRequest { +message QueryProjectEnrollmentsRequest { // project_id is the unique identifier of the project to query. string project_id = 1; @@ -875,13 +877,13 @@ message QueryProjectClassesRequest { cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// QueryProjectClassesResponse is the Query/ProjectClasses response type. +// QueryProjectEnrollmentsResponse is the Query/ProjectEnrollments response type. // // Since Revision 3 -message QueryProjectClassesResponse { +message QueryProjectEnrollmentsResponse { - // classes are the fetched credit classes. - repeated ClassInfo classes = 1; + // enrollments are the fetched project credit class enrollments. + repeated ProjectEnrollment enrollments = 1; // pagination defines the pagination in the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; diff --git a/proto/regen/ecocredit/v1/state.proto b/proto/regen/ecocredit/v1/state.proto index 8248363f53..ad2953aa8a 100644 --- a/proto/regen/ecocredit/v1/state.proto +++ b/proto/regen/ecocredit/v1/state.proto @@ -388,8 +388,8 @@ message AllowedBridgeChain { string chain_name = 1; } -// ProjectClass stores the data a project - credit class relation. -message ProjectClass { +// ProjectEnrollment stores the data a project's enrollment in a credit class. +message ProjectEnrollment { option (cosmos.orm.v1.table) = { id : 17 primary_key : {fields : "project_key,class_key"} @@ -404,8 +404,8 @@ message ProjectClass { // for efficient lookups. uint64 class_key = 3; - // status is the status of the relation. - ProjectClassStatus status = 4; + // status is the status of the enrollment. + ProjectEnrollmentStatus status = 4; // project_metadata is any arbitrary metadata set by the project // admin. This should primarily be used to store metadata regarding the project's @@ -420,24 +420,28 @@ message ProjectClass { // Application represents the evaluation status that a credit class issuer // assigns to a credit class application. -enum ProjectClassStatus { - // PROJECT_CLASS_STATUS_UNSPECIFIED indicates that a credit class application +enum ProjectEnrollmentStatus { + // PROJECT_ENROLLMENT_STATUS_UNSPECIFIED indicates that a credit class application // has been submitted but not evaluated. - PROJECT_CLASS_STATUS_UNSPECIFIED = 0; + PROJECT_ENROLLMENT_STATUS_UNSPECIFIED = 0; - // PROJECT_CLASS_STATUS_ACCEPTED indicates that the project has been + // PROJECT_ENROLLMENT_STATUS_ACCEPTED indicates that the project has been // accepted into the credit class. - PROJECT_CLASS_STATUS_ACCEPTED = 1; + PROJECT_ENROLLMENT_STATUS_ACCEPTED = 1; - // PROJECT_CLASS_STATUS_CHANGES_REQUESTED indicates that an application to + // PROJECT_ENROLLMENT_STATUS_CHANGES_REQUESTED indicates that an application to // a credit class has been reviewed and that changes to the application have // been requested. It can also be used to indicate that a project within a credit // class has had its status reassessed and that changes to the project are // requested in order to continue in the credit class. - PROJECT_CLASS_STATUS_CHANGES_REQUESTED = 2; + PROJECT_ENROLLMENT_STATUS_CHANGES_REQUESTED = 2; - // PROJECT_CLASS_STATUS_REJECTED indicates that the application has been - // rejected and that the project will not be accepted into the credit class - // or that a project previously accepted has been removed from the credit class. - PROJECT_CLASS_STATUS_REJECTED = 3; + // PROJECT_ENROLLMENT_STATUS_REJECTED indicates that the application has been + // rejected and that the project will not be accepted into the credit class. + PROJECT_ENROLLMENT_STATUS_REJECTED = 3; + + // PROJECT_ENROLLMENT_STATUS_TERMINATED indicates that the project has been + // terminated from the credit class. This status is used when a project was + // in the credit class but has been removed or completed. + PROJECT_ENROLLMENT_STATUS_TERMINATED = 4; } diff --git a/proto/regen/ecocredit/v1/tx.proto b/proto/regen/ecocredit/v1/tx.proto index ea89d64149..bb78493e5e 100644 --- a/proto/regen/ecocredit/v1/tx.proto +++ b/proto/regen/ecocredit/v1/tx.proto @@ -35,7 +35,7 @@ service Msg { rpc CreateUnregisteredProject(MsgCreateUnregisteredProject) returns (MsgCreateUnregisteredProjectResponse); - // UpdateProjectClass creates a new project credit class application, updates + // UpdateProjectEnrollment creates a new project credit class application, updates // an existing one or updates an existing relationship when changes are requested. // A project may be enrolled in at most one credit class per credit type // but can be enrolled in multiple credit classes across different credit @@ -46,15 +46,15 @@ service Msg { // to "changes requested". // // Since Revision 3 - rpc UpdateProjectClass(MsgUpdateProjectClass) - returns (MsgUpdateProjectClassResponse); + rpc UpdateProjectEnrollment(MsgUpdateProjectEnrollment) + returns (MsgUpdateProjectEnrollmentResponse); - // WithdrawProjectClass withdraws a project from a credit class application + // WithdrawProjectEnrollment withdraws a project from a credit class application // or enrollment unilaterally on the part of a project admin. // // Since Revision 3 - rpc WithdrawProjectClass(MsgWithdrawProjectClass) - returns (MsgWithdrawProjectClassResponse); + rpc WithdrawProjectEnrollment(MsgWithdrawProjectEnrollment) + returns (MsgWithdrawProjectEnrollmentResponse); // EvaluateProjectClass allows a credit class issuer to evaluate a project // application or existing relationship, either approving, requesting changes to, or @@ -67,8 +67,8 @@ service Msg { // application the CreateProject method should be used instead. // // Since Revision 3 - rpc EvaluateProjectClass(MsgEvaluateProjectClass) - returns (MsgEvaluateProjectClassResponse); + rpc EvaluateProjectEnrollment(MsgEvaluateProjectEnrollment) + returns (MsgEvaluateProjectEnrollmentResponse); // CreateBatch creates a new batch of credits under the given project with a // start and end date representing the monitoring period, a list of credits to @@ -347,8 +347,8 @@ message MsgCreateUnregisteredProjectResponse { string project_id = 1; } -// MsgUpdateProjectClass is the Msg/UpdateProjectClass request type. -message MsgUpdateProjectClass { +// MsgUpdateProjectEnrollment is the Msg/UpdateProjectEnrollment request type. +message MsgUpdateProjectEnrollment { option (cosmos.msg.v1.signer) = "project_admin"; // project_admin is the address of the account that is the admin of the @@ -369,11 +369,11 @@ message MsgUpdateProjectClass { string metadata = 4; } -// MsgUpdateProjectClassResponse is the Msg/UpdateProjectClass response type. -message MsgUpdateProjectClassResponse {} +// MsgUpdateProjectEnrollmentResponse is the Msg/UpdateProjectEnrollment response type. +message MsgUpdateProjectEnrollmentResponse {} -// MsgWithdrawProjectClass is the Msg/WithdrawProjectClass request type. -message MsgWithdrawProjectClass { +// MsgWithdrawProjectEnrollment is the Msg/WithdrawProjectEnrollment request type. +message MsgWithdrawProjectEnrollment { option (cosmos.msg.v1.signer) = "project_admin"; // project_admin is the address of the account that is the admin of the @@ -389,11 +389,11 @@ message MsgWithdrawProjectClass { string metadata = 3; } -// MsgWithdrawProjectClassResponse is the Msg/WithdrawProjectClass response type. -message MsgWithdrawProjectClassResponse {} +// MsgWithdrawProjectEnrollmentResponse is the Msg/WithdrawProjectEnrollment response type. +message MsgWithdrawProjectEnrollmentResponse {} -// MsgEvaluateProjectClass is the Msg/EvaluateProjectClass request type. -message MsgEvaluateProjectClass { +// MsgEvaluateProjectEnrollment is the Msg/EvaluateProjectEnrollment request type. +message MsgEvaluateProjectEnrollment { option (cosmos.msg.v1.signer) = "issuer"; // issuer is the address of the account that is the issuer of the credit class @@ -404,7 +404,7 @@ message MsgEvaluateProjectClass { uint64 application_id = 2; // evaluation is the evaluation of the application. - ProjectClassStatus evaluation = 3; + ProjectEnrollmentStatus evaluation = 3; // metadata is any optiopnal arbitrary string with a maximum length of 256 characters // that includes or references the reason for the approving, requesting changes @@ -412,8 +412,8 @@ message MsgEvaluateProjectClass { string metadata = 4; } -// MsgEvaluateProjectClassResponse is the Msg/EvaluateProjectClass response type. -message MsgEvaluateProjectClassResponse {} +// MsgEvaluateProjectEnrollmentResponse is the Msg/EvaluateProjectEnrollment response type. +message MsgEvaluateProjectEnrollmentResponse {} // MsgCreateBatch is the Msg/CreateBatch request type. message MsgCreateBatch {