From baa7859987e2c714f4ca4106d7b764f881c38ab8 Mon Sep 17 00:00:00 2001 From: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com> Date: Thu, 10 Mar 2022 09:09:13 -0800 Subject: [PATCH] chore: update ecocredit proto (#869) * chore: update ecocredit proto * fix merge updates --- proto/regen/ecocredit/basket/v1/events.proto | 2 +- proto/regen/ecocredit/basket/v1/query.proto | 2 +- proto/regen/ecocredit/basket/v1/state.proto | 2 +- proto/regen/ecocredit/basket/v1/tx.proto | 2 +- proto/regen/ecocredit/basket/v1/types.proto | 2 +- .../ecocredit/marketplace/v1/events.proto | 2 +- .../ecocredit/marketplace/v1/query.proto | 2 +- .../ecocredit/marketplace/v1/state.proto | 2 +- proto/regen/ecocredit/marketplace/v1/tx.proto | 2 +- .../ecocredit/marketplace/v1/types.proto | 2 +- .../ecocredit/orderbook/v1alpha1/memory.proto | 2 + proto/regen/ecocredit/v1/events.proto | 2 +- proto/regen/ecocredit/v1/query.proto | 2 +- proto/regen/ecocredit/v1/state.proto | 2 +- proto/regen/ecocredit/v1/tx.proto | 2 +- proto/regen/ecocredit/v1/types.proto | 2 +- proto/regen/ecocredit/v1alpha1/events.proto | 2 - proto/regen/ecocredit/v1alpha1/genesis.proto | 2 - proto/regen/ecocredit/v1alpha1/query.proto | 2 - proto/regen/ecocredit/v1alpha1/tx.proto | 2 - proto/regen/ecocredit/v1alpha1/types.proto | 2 - x/basket/spec/protobuf.md | 514 -- x/ecocredit/basket/events.pb.go | 15 +- x/ecocredit/basket/query.pb.go | 118 +- x/ecocredit/basket/query.pb.gw.go | 24 +- x/ecocredit/basket/state.pb.go | 1139 +++- x/ecocredit/basket/tx.pb.go | 44 +- x/ecocredit/basket/types.pb.go | 847 +-- x/ecocredit/basket/v1/events.pb.go | 1060 ---- x/ecocredit/basket/v1/query.pb.go | 2084 ------- x/ecocredit/basket/v1/query.pb.gw.go | 514 -- x/ecocredit/basket/v1/state.pb.go | 1157 ---- x/ecocredit/basket/v1/tx.pb.go | 2164 ------- x/ecocredit/basket/v1/types.pb.go | 635 -- x/ecocredit/{v1 => core}/events.pb.go | 67 +- x/ecocredit/{v1 => core}/query.pb.go | 138 +- x/ecocredit/{v1 => core}/query.pb.gw.go | 4 +- x/ecocredit/{v1 => core}/state.pb.go | 82 +- x/ecocredit/{v1 => core}/tx.pb.go | 127 +- x/ecocredit/{v1 => core}/types.pb.go | 50 +- x/ecocredit/marketplace/{v1 => }/events.pb.go | 82 +- x/ecocredit/marketplace/{v1 => }/query.pb.go | 114 +- .../marketplace/{v1 => }/query.pb.gw.go | 4 +- x/ecocredit/marketplace/{v1 => }/state.pb.go | 98 +- x/ecocredit/marketplace/{v1 => }/tx.pb.go | 116 +- x/ecocredit/marketplace/{v1 => }/types.pb.go | 60 +- x/ecocredit/orderbook/memory.pb.go | 1335 +++++ x/ecocredit/server/core/cancel.go | 16 +- x/ecocredit/server/core/cancel_test.go | 27 +- x/ecocredit/server/core/create_batch.go | 27 +- x/ecocredit/server/core/create_batch_test.go | 35 +- x/ecocredit/server/core/create_class.go | 18 +- x/ecocredit/server/core/create_class_test.go | 19 +- x/ecocredit/server/core/create_project.go | 16 +- .../server/core/create_project_test.go | 29 +- x/ecocredit/server/core/keeper.go | 7 +- x/ecocredit/server/core/keeper_test.go | 34 +- x/ecocredit/server/core/query_balance.go | 10 +- x/ecocredit/server/core/query_balance_test.go | 21 +- x/ecocredit/server/core/query_batch_info.go | 9 +- .../server/core/query_batch_info_test.go | 17 +- x/ecocredit/server/core/query_batches.go | 16 +- x/ecocredit/server/core/query_batches_test.go | 25 +- x/ecocredit/server/core/query_class_info.go | 9 +- .../server/core/query_class_info_test.go | 19 +- .../server/core/query_class_issuers.go | 12 +- .../server/core/query_class_issuers_test.go | 19 +- x/ecocredit/server/core/query_classes.go | 16 +- x/ecocredit/server/core/query_classes_test.go | 19 +- x/ecocredit/server/core/query_credit_types.go | 15 +- .../server/core/query_credit_types_test.go | 16 +- x/ecocredit/server/core/query_params.go | 14 +- x/ecocredit/server/core/query_params_test.go | 29 +- x/ecocredit/server/core/query_project_info.go | 9 +- .../server/core/query_project_info_test.go | 17 +- x/ecocredit/server/core/query_projects.go | 16 +- .../server/core/query_projects_test.go | 25 +- x/ecocredit/server/core/query_supply.go | 7 +- x/ecocredit/server/core/query_supply_test.go | 19 +- x/ecocredit/server/core/query_utils.go | 5 +- x/ecocredit/server/core/retire.go | 16 +- x/ecocredit/server/core/retire_test.go | 37 +- x/ecocredit/server/core/send.go | 22 +- x/ecocredit/server/core/send_test.go | 23 +- x/ecocredit/server/core/update_class.go | 22 +- x/ecocredit/server/core/update_class_test.go | 53 +- x/ecocredit/server/core/utils.go | 2 + x/ecocredit/v1alpha1/events.pb.go | 1930 ------ x/ecocredit/v1alpha1/genesis.pb.go | 1261 ---- x/ecocredit/v1alpha1/query.pb.go | 3608 ----------- x/ecocredit/v1alpha1/query.pb.gw.go | 846 --- x/ecocredit/v1alpha1/tx.pb.go | 5254 ----------------- x/ecocredit/v1alpha1/types.pb.go | 2170 ------- 93 files changed, 3487 insertions(+), 24983 deletions(-) delete mode 100644 x/basket/spec/protobuf.md delete mode 100644 x/ecocredit/basket/v1/events.pb.go delete mode 100644 x/ecocredit/basket/v1/query.pb.go delete mode 100644 x/ecocredit/basket/v1/query.pb.gw.go delete mode 100644 x/ecocredit/basket/v1/state.pb.go delete mode 100644 x/ecocredit/basket/v1/tx.pb.go delete mode 100644 x/ecocredit/basket/v1/types.pb.go rename x/ecocredit/{v1 => core}/events.pb.go (94%) rename x/ecocredit/{v1 => core}/query.pb.go (95%) rename x/ecocredit/{v1 => core}/query.pb.gw.go (99%) rename x/ecocredit/{v1 => core}/state.pb.go (95%) rename x/ecocredit/{v1 => core}/tx.pb.go (96%) rename x/ecocredit/{v1 => core}/types.pb.go (84%) rename x/ecocredit/marketplace/{v1 => }/events.pb.go (93%) rename x/ecocredit/marketplace/{v1 => }/query.pb.go (95%) rename x/ecocredit/marketplace/{v1 => }/query.pb.gw.go (99%) rename x/ecocredit/marketplace/{v1 => }/state.pb.go (91%) rename x/ecocredit/marketplace/{v1 => }/tx.pb.go (94%) rename x/ecocredit/marketplace/{v1 => }/types.pb.go (92%) create mode 100644 x/ecocredit/orderbook/memory.pb.go delete mode 100644 x/ecocredit/v1alpha1/events.pb.go delete mode 100644 x/ecocredit/v1alpha1/genesis.pb.go delete mode 100644 x/ecocredit/v1alpha1/query.pb.go delete mode 100644 x/ecocredit/v1alpha1/query.pb.gw.go delete mode 100644 x/ecocredit/v1alpha1/tx.pb.go delete mode 100644 x/ecocredit/v1alpha1/types.pb.go diff --git a/proto/regen/ecocredit/basket/v1/events.proto b/proto/regen/ecocredit/basket/v1/events.proto index a9f76c059d..90ce764625 100644 --- a/proto/regen/ecocredit/basket/v1/events.proto +++ b/proto/regen/ecocredit/basket/v1/events.proto @@ -4,7 +4,7 @@ package regen.ecocredit.basket.v1; import "regen/ecocredit/basket/v1/types.proto"; -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/basket/v1"; +option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/basket"; // EventCreate is an event emitted when a basket is created. message EventCreate { diff --git a/proto/regen/ecocredit/basket/v1/query.proto b/proto/regen/ecocredit/basket/v1/query.proto index 7ffd4f2f89..40278af850 100644 --- a/proto/regen/ecocredit/basket/v1/query.proto +++ b/proto/regen/ecocredit/basket/v1/query.proto @@ -6,7 +6,7 @@ import "google/api/annotations.proto"; import "regen/ecocredit/basket/v1/state.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/basket/v1"; +option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/basket"; // Msg is the regen.ecocredit.basket.v1beta1 Query service. service Query { diff --git a/proto/regen/ecocredit/basket/v1/state.proto b/proto/regen/ecocredit/basket/v1/state.proto index a23dbd5891..d9226836b4 100644 --- a/proto/regen/ecocredit/basket/v1/state.proto +++ b/proto/regen/ecocredit/basket/v1/state.proto @@ -6,7 +6,7 @@ import "cosmos/orm/v1alpha1/orm.proto"; import "google/protobuf/timestamp.proto"; import "regen/ecocredit/basket/v1/types.proto"; -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/basket/v1"; +option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/basket"; // Basket represents a basket in state. message Basket { diff --git a/proto/regen/ecocredit/basket/v1/tx.proto b/proto/regen/ecocredit/basket/v1/tx.proto index 61eb10c84d..e598051a62 100644 --- a/proto/regen/ecocredit/basket/v1/tx.proto +++ b/proto/regen/ecocredit/basket/v1/tx.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package regen.ecocredit.basket.v1; -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/basket/v1"; +option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/basket"; import "gogoproto/gogo.proto"; import "regen/ecocredit/basket/v1/types.proto"; diff --git a/proto/regen/ecocredit/basket/v1/types.proto b/proto/regen/ecocredit/basket/v1/types.proto index e1971ead40..83f0529769 100644 --- a/proto/regen/ecocredit/basket/v1/types.proto +++ b/proto/regen/ecocredit/basket/v1/types.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package regen.ecocredit.basket.v1; -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/basket/v1"; +option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/basket"; import "google/protobuf/timestamp.proto"; import "google/protobuf/duration.proto"; diff --git a/proto/regen/ecocredit/marketplace/v1/events.proto b/proto/regen/ecocredit/marketplace/v1/events.proto index 3cc6263909..bf49af5911 100644 --- a/proto/regen/ecocredit/marketplace/v1/events.proto +++ b/proto/regen/ecocredit/marketplace/v1/events.proto @@ -6,7 +6,7 @@ import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/marketplace/v1"; +option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/marketplace"; // EventSell is an event emitted when a sell order is created. message EventSell { diff --git a/proto/regen/ecocredit/marketplace/v1/query.proto b/proto/regen/ecocredit/marketplace/v1/query.proto index 0c59472055..9ab6a0410f 100644 --- a/proto/regen/ecocredit/marketplace/v1/query.proto +++ b/proto/regen/ecocredit/marketplace/v1/query.proto @@ -6,7 +6,7 @@ import "google/api/annotations.proto"; import "regen/ecocredit/marketplace/v1/state.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/marketplace/v1"; +option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/marketplace"; // Msg is the regen.ecocredit.marketplace.v1 Query service. service Query { diff --git a/proto/regen/ecocredit/marketplace/v1/state.proto b/proto/regen/ecocredit/marketplace/v1/state.proto index bf23aec773..72790c0bfe 100644 --- a/proto/regen/ecocredit/marketplace/v1/state.proto +++ b/proto/regen/ecocredit/marketplace/v1/state.proto @@ -6,7 +6,7 @@ import "google/protobuf/timestamp.proto"; import "cosmos/orm/v1alpha1/orm.proto"; import "regen/ecocredit/marketplace/v1/types.proto"; -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/marketplace/v1"; +option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/marketplace"; // SellOrder represents the information for a sell order. message SellOrder { diff --git a/proto/regen/ecocredit/marketplace/v1/tx.proto b/proto/regen/ecocredit/marketplace/v1/tx.proto index 92dbfd7c8b..4c2c20ffa4 100644 --- a/proto/regen/ecocredit/marketplace/v1/tx.proto +++ b/proto/regen/ecocredit/marketplace/v1/tx.proto @@ -7,7 +7,7 @@ import "cosmos/base/v1beta1/coin.proto"; import "google/protobuf/timestamp.proto"; import "regen/ecocredit/marketplace/v1/types.proto"; -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/marketplace/v1"; +option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/marketplace"; // Msg is the regen.ecocredit.marketplace.v1 Msg service. service Msg { diff --git a/proto/regen/ecocredit/marketplace/v1/types.proto b/proto/regen/ecocredit/marketplace/v1/types.proto index 18ea47d5b5..5ea369236e 100644 --- a/proto/regen/ecocredit/marketplace/v1/types.proto +++ b/proto/regen/ecocredit/marketplace/v1/types.proto @@ -4,7 +4,7 @@ package regen.ecocredit.marketplace.v1; import "google/protobuf/timestamp.proto"; -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/marketplace/v1"; +option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/marketplace"; // Filter is used to create filtered buy orders which match credit batch // sell orders based on selection criteria rather than matching individual diff --git a/proto/regen/ecocredit/orderbook/v1alpha1/memory.proto b/proto/regen/ecocredit/orderbook/v1alpha1/memory.proto index 8f546faa68..2b17c94c5d 100644 --- a/proto/regen/ecocredit/orderbook/v1alpha1/memory.proto +++ b/proto/regen/ecocredit/orderbook/v1alpha1/memory.proto @@ -5,6 +5,8 @@ package regen.ecocredit.orderbook.v1alpha1; import "google/protobuf/timestamp.proto"; import "cosmos/orm/v1alpha1/orm.proto"; +option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/orderbook"; + // BuyOrderSellOrderMatch defines the data the FIFO/price-time-priority matching // algorithm used to actually match buy and sell orders. message BuyOrderSellOrderMatch { diff --git a/proto/regen/ecocredit/v1/events.proto b/proto/regen/ecocredit/v1/events.proto index ef89dd7a05..8efee9885c 100644 --- a/proto/regen/ecocredit/v1/events.proto +++ b/proto/regen/ecocredit/v1/events.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package regen.ecocredit.v1; -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/v1"; +option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/core"; // EventCreateClass is an event emitted when a credit class is created. message EventCreateClass { diff --git a/proto/regen/ecocredit/v1/query.proto b/proto/regen/ecocredit/v1/query.proto index 826c985522..5e63fc4060 100644 --- a/proto/regen/ecocredit/v1/query.proto +++ b/proto/regen/ecocredit/v1/query.proto @@ -7,7 +7,7 @@ import "regen/ecocredit/v1/state.proto"; import "regen/ecocredit/v1/types.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/v1"; +option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/core"; // Msg is the regen.ecocredit.v1 Query service. service Query { diff --git a/proto/regen/ecocredit/v1/state.proto b/proto/regen/ecocredit/v1/state.proto index ac09575c12..ea1912a9a1 100644 --- a/proto/regen/ecocredit/v1/state.proto +++ b/proto/regen/ecocredit/v1/state.proto @@ -5,7 +5,7 @@ package regen.ecocredit.v1; import "cosmos/orm/v1alpha1/orm.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/v1"; +option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/core"; // CreditType defines the measurement unit/precision of a certain credit type // (e.g. carbon, biodiversity...) diff --git a/proto/regen/ecocredit/v1/tx.proto b/proto/regen/ecocredit/v1/tx.proto index 136792605b..6c0d7ee69b 100644 --- a/proto/regen/ecocredit/v1/tx.proto +++ b/proto/regen/ecocredit/v1/tx.proto @@ -5,7 +5,7 @@ package regen.ecocredit.v1; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/v1"; +option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/core"; // Msg is the regen.ecocredit.v1 Msg service. service Msg { diff --git a/proto/regen/ecocredit/v1/types.proto b/proto/regen/ecocredit/v1/types.proto index 5656f39e3e..b76444883b 100644 --- a/proto/regen/ecocredit/v1/types.proto +++ b/proto/regen/ecocredit/v1/types.proto @@ -6,7 +6,7 @@ import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; import "regen/ecocredit/v1/state.proto"; -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/v1"; +option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/core"; // Params defines the updatable global parameters of the ecocredit module for // use with the x/params module. diff --git a/proto/regen/ecocredit/v1alpha1/events.proto b/proto/regen/ecocredit/v1alpha1/events.proto index a2954e9c0f..a117834e0f 100644 --- a/proto/regen/ecocredit/v1alpha1/events.proto +++ b/proto/regen/ecocredit/v1alpha1/events.proto @@ -2,8 +2,6 @@ syntax = "proto3"; package regen.ecocredit.v1alpha1; -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/v1alpha1"; - // EventCreateClass is an event emitted when a credit class is created. message EventCreateClass { diff --git a/proto/regen/ecocredit/v1alpha1/genesis.proto b/proto/regen/ecocredit/v1alpha1/genesis.proto index 3dd92fcad0..35c3ffb049 100644 --- a/proto/regen/ecocredit/v1alpha1/genesis.proto +++ b/proto/regen/ecocredit/v1alpha1/genesis.proto @@ -4,8 +4,6 @@ package regen.ecocredit.v1alpha1; import "regen/ecocredit/v1alpha1/types.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/v1alpha1"; - // GenesisState defines ecocredit module's genesis state. message GenesisState { // Params contains the updateable global parameters for use with the x/params diff --git a/proto/regen/ecocredit/v1alpha1/query.proto b/proto/regen/ecocredit/v1alpha1/query.proto index 5e7b93caad..be3a0abdb3 100644 --- a/proto/regen/ecocredit/v1alpha1/query.proto +++ b/proto/regen/ecocredit/v1alpha1/query.proto @@ -5,8 +5,6 @@ import "google/api/annotations.proto"; import "regen/ecocredit/v1alpha1/types.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/v1alpha1"; - // Msg is the regen.ecocredit.v1alpha1 Query service. service Query { // Classes queries for all credit classes with pagination. diff --git a/proto/regen/ecocredit/v1alpha1/tx.proto b/proto/regen/ecocredit/v1alpha1/tx.proto index 4fe7e25b86..ce5355c585 100644 --- a/proto/regen/ecocredit/v1alpha1/tx.proto +++ b/proto/regen/ecocredit/v1alpha1/tx.proto @@ -5,8 +5,6 @@ package regen.ecocredit.v1alpha1; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/v1alpha1"; - // Msg is the regen.ecocredit.v1alpha1 Msg service. service Msg { diff --git a/proto/regen/ecocredit/v1alpha1/types.proto b/proto/regen/ecocredit/v1alpha1/types.proto index 94a2c3c746..98edcc8032 100644 --- a/proto/regen/ecocredit/v1alpha1/types.proto +++ b/proto/regen/ecocredit/v1alpha1/types.proto @@ -6,8 +6,6 @@ import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "github.com/regen-network/regen-ledger/x/ecocredit/v1alpha1"; - // ClassInfo represents the high-level on-chain information for a credit class. message ClassInfo { diff --git a/x/basket/spec/protobuf.md b/x/basket/spec/protobuf.md deleted file mode 100644 index b97033c971..0000000000 --- a/x/basket/spec/protobuf.md +++ /dev/null @@ -1,514 +0,0 @@ - -# Protobuf Documentation - - -## Table of Contents - -- [regen/ecocredit/basket/v1/types.proto](#regen/ecocredit/basket/v1/types.proto) - - [Basket](#regen.ecocredit.basket.v1.Basket) - - [BasketBalance](#regen.ecocredit.basket.v1.BasketBalance) - - [BasketCredit](#regen.ecocredit.basket.v1.BasketCredit) - - [DateCriteria](#regen.ecocredit.basket.v1.DateCriteria) - -- [regen/ecocredit/basket/v1/events.proto](#regen/ecocredit/basket/v1/events.proto) - - [EventCreate](#regen.ecocredit.basket.v1.EventCreate) - - [EventPut](#regen.ecocredit.basket.v1.EventPut) - - [EventTake](#regen.ecocredit.basket.v1.EventTake) - -- [regen/ecocredit/basket/v1/query.proto](#regen/ecocredit/basket/v1/query.proto) - - [QueryBasketBalanceRequest](#regen.ecocredit.basket.v1.QueryBasketBalanceRequest) - - [QueryBasketBalanceResponse](#regen.ecocredit.basket.v1.QueryBasketBalanceResponse) - - [QueryBasketBalancesRequest](#regen.ecocredit.basket.v1.QueryBasketBalancesRequest) - - [QueryBasketBalancesResponse](#regen.ecocredit.basket.v1.QueryBasketBalancesResponse) - - [QueryBasketRequest](#regen.ecocredit.basket.v1.QueryBasketRequest) - - [QueryBasketResponse](#regen.ecocredit.basket.v1.QueryBasketResponse) - - [QueryBasketsRequest](#regen.ecocredit.basket.v1.QueryBasketsRequest) - - [QueryBasketsResponse](#regen.ecocredit.basket.v1.QueryBasketsResponse) - - - [Query](#regen.ecocredit.basket.v1.Query) - -- [regen/ecocredit/basket/v1/tx.proto](#regen/ecocredit/basket/v1/tx.proto) - - [MsgCreate](#regen.ecocredit.basket.v1.MsgCreate) - - [MsgCreateResponse](#regen.ecocredit.basket.v1.MsgCreateResponse) - - [MsgPut](#regen.ecocredit.basket.v1.MsgPut) - - [MsgPutResponse](#regen.ecocredit.basket.v1.MsgPutResponse) - - [MsgTake](#regen.ecocredit.basket.v1.MsgTake) - - [MsgTakeResponse](#regen.ecocredit.basket.v1.MsgTakeResponse) - - - [Msg](#regen.ecocredit.basket.v1.Msg) - -- [Scalar Value Types](#scalar-value-types) - - - - -

Top

- -## regen/ecocredit/basket/v1/types.proto - - - - - -### Basket -Basket represents a basket in state. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [uint64](#uint64) | | id is the uint64 ID of the basket. It is used internally for reducing storage space. | -| basket_denom | [string](#string) | | basket_denom is the basket bank denom. | -| name | [string](#string) | | name is the unique name of the basket specified in MsgCreate. Basket names must be unique across all credit types and choices of exponent above and beyond the uniqueness constraint on basket_denom. | -| disable_auto_retire | [bool](#bool) | | disable_auto_retire indicates whether or not the credits will be retired upon withdraw from the basket. | -| credit_type_abbrev | [string](#string) | | credit_type_abbrev is the abbreviation of the credit type this basket is able to hold. | -| date_criteria | [DateCriteria](#regen.ecocredit.basket.v1.DateCriteria) | | date_criteria is the date criteria for batches admitted to the basket. | -| exponent | [uint32](#uint32) | | exponent is the exponent for converting credits to/from basket tokens. | - - - - - - - - -### BasketBalance -BasketBalance stores the amount of credits from a batch in a basket - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| basket_id | [uint64](#uint64) | | basket_id is the ID of the basket | -| batch_denom | [string](#string) | | batch_denom is the denom of the credit batch | -| balance | [string](#string) | | balance is the amount of ecocredits held in the basket | -| batch_start_date | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | batch_start_date is the start date of the batch. This field is used to create an index which is used to remove the oldest credits first. | - - - - - - - - -### BasketCredit -BasketCredit represents the information for a credit batch inside a basket. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| batch_denom | [string](#string) | | batch_denom is the unique ID of the credit batch. | -| amount | [string](#string) | | amount is the number of credits being put into or taken out of the basket. Decimal values are acceptable within the precision of the corresponding credit type for this batch. | - - - - - - - - -### DateCriteria -DateCriteria represents the information for credit acceptance in a basket. -At most, only one of the values should be set. -NOTE: gogo proto `oneof` is not compatible with Amino signing, hence we directly define -both `start_date_window` and `min_start_date`. In the future, with pulsar, this should change -and we should use `oneof`. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| min_start_date | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | min_start_date (optional) is the earliest start date for batches of credits allowed into the basket. At most only one of `start_date_window` and `min_start_date` can be set. | -| start_date_window | [google.protobuf.Duration](#google.protobuf.Duration) | | start_date_window (optional) is a duration of time measured into the past which sets a cutoff for batch start dates when adding new credits to the basket. Based on the current block timestamp, credits whose start date is before `block_timestamp - batch_date_window` will not be allowed into the basket. At most only one of `start_date_window` and `min_start_date` can be set. | - - - - - - - - - - - - - - - - -

Top

- -## regen/ecocredit/basket/v1/events.proto - - - - - -### EventCreate -EventCreate is an event emitted when a basket is created. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| basket_denom | [string](#string) | | basket_denom is the basket bank denom. | -| curator | [string](#string) | | curator is the address of the basket curator who is able to change certain basket settings. | - - - - - - - - -### EventPut -EventPut is an event emitted when credits are put into a basket in return -for basket tokens. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| owner | [string](#string) | | owner is the owner of the credits put into the basket. | -| basket_denom | [string](#string) | | basket_denom is the basket bank denom that the credits were added to. | -| credits | [BasketCredit](#regen.ecocredit.basket.v1.BasketCredit) | repeated | credits are the credits that were added to the basket. | -| amount | [string](#string) | | amount is the integer number of basket tokens converted from credits. | - - - - - - - - -### EventTake -EventTake is an event emitted when credits are taken from a basket starting -from the oldest credits first. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| owner | [string](#string) | | owner is the owner of the credits taken from the basket. | -| basket_denom | [string](#string) | | basket_denom is the basket bank denom that credits were taken from. | -| credits | [BasketCredit](#regen.ecocredit.basket.v1.BasketCredit) | repeated | credits are the credits that were taken from the basket. | -| amount | [string](#string) | | amount is the integer number of basket tokens converted to credits. | - - - - - - - - - - - - - - - - -

Top

- -## regen/ecocredit/basket/v1/query.proto - - - - - -### QueryBasketBalanceRequest -QueryBasketBalanceRequest is the Query/BasketBalance request type. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| basket_denom | [string](#string) | | basket_denom is the denom of the basket. | -| batch_denom | [string](#string) | | batch_denom is the denom of the credit batch. | - - - - - - - - -### QueryBasketBalanceResponse -QueryBasketBalanceResponse is the Query/BasketBalance response type. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| balance | [string](#string) | | balance is the amount of the queried credit batch in the basket. | - - - - - - - - -### QueryBasketBalancesRequest -QueryBasketBalancesRequest is the Query/BasketBalances request type. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| basket_denom | [string](#string) | | basket_denom is the denom of the basket. | -| pagination | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - - - - - - - - -### QueryBasketBalancesResponse -QueryBasketBalancesResponse is the Query/BasketBalances response type. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| balances | [BasketBalance](#regen.ecocredit.basket.v1.BasketBalance) | repeated | balances is a list of credit balances in the basket. | -| pagination | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | - - - - - - - - -### QueryBasketRequest -QueryBasketRequest is the Query/Basket request type. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| basket_denom | [string](#string) | | basket_denom represents the denom of the basket to query. | - - - - - - - - -### QueryBasketResponse -QueryBasketResponse is the Query/Basket response type. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| basket | [Basket](#regen.ecocredit.basket.v1.Basket) | | basket is the queried basket. | -| classes | [string](#string) | repeated | classes are the credit classes that can be deposited in the basket. | - - - - - - - - -### QueryBasketsRequest -QueryBasketsRequest is the Query/Baskets request type. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| pagination | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - - - - - - - - -### QueryBasketsResponse -QueryBasketsResponse is the Query/Baskets response type. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| baskets | [Basket](#regen.ecocredit.basket.v1.Basket) | repeated | baskets are the fetched baskets. | -| pagination | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | - - - - - - - - - - - - - - -### Query -Msg is the regen.ecocredit.basket.v1beta1 Query service. - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Basket | [QueryBasketRequest](#regen.ecocredit.basket.v1.QueryBasketRequest) | [QueryBasketResponse](#regen.ecocredit.basket.v1.QueryBasketResponse) | Basket queries one basket by denom. | -| Baskets | [QueryBasketsRequest](#regen.ecocredit.basket.v1.QueryBasketsRequest) | [QueryBasketsResponse](#regen.ecocredit.basket.v1.QueryBasketsResponse) | Baskets lists all baskets in the ecocredit module. | -| BasketBalances | [QueryBasketBalancesRequest](#regen.ecocredit.basket.v1.QueryBasketBalancesRequest) | [QueryBasketBalancesResponse](#regen.ecocredit.basket.v1.QueryBasketBalancesResponse) | BasketBalances lists the balance of each credit batch in the basket. | -| BasketBalance | [QueryBasketBalanceRequest](#regen.ecocredit.basket.v1.QueryBasketBalanceRequest) | [QueryBasketBalanceResponse](#regen.ecocredit.basket.v1.QueryBasketBalanceResponse) | BasketBalance queries the balance of a specific credit batch in the basket. | - - - - - - -

Top

- -## regen/ecocredit/basket/v1/tx.proto - - - - - -### MsgCreate -MsgCreate is the Msg/Create request type. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| curator | [string](#string) | | curator is the address of the basket curator who is able to change certain basket settings. | -| name | [string](#string) | | name will be used to together with prefix to create a bank denom for this basket token. It can be between 3-8 alphanumeric characters, with the first character being alphabetic. - -The bank denom will be formed from name, credit type and exponent and be of the form `eco..` where prefix is derived from exponent. | -| description | [string](#string) | | description is a human-readable description of the basket denom that should be at most 256 characters. | -| exponent | [uint32](#uint32) | | exponent is the exponent that will be used for converting credits to basket tokens and for bank denom metadata. It also limits the precision of credit amounts when putting credits into a basket. An exponent of 6 will mean that 10^6 units of a basket token will be issued for 1.0 credits and that this should be displayed as one unit in user interfaces. It also means that the maximum precision of credit amounts is 6 decimal places so that the need to round is eliminated. The exponent must be >= the precision of the credit type at the time the basket is created and be of one of the following values 0, 1, 2, 3, 6, 9, 12, 15, 18, 21, or 24 which correspond to the exponents which have an official SI prefix. - -The exponent will be used to form the prefix part of the bank denom and will be mapped as follows: 0 - no prefix 1 - d (deci) 2 - c (centi) 3 - m (milli) 6 - u (micro) 9 - n (nano) 12 - p (pico) 15 - f (femto) 18 - a (atto) 21 - z (zepto) 24 - y (yocto) | -| disable_auto_retire | [bool](#bool) | | disable_auto_retire allows auto-retirement to be disabled. The credits will be auto-retired if disable_auto_retire is false unless the credits were previously put into the basket by the address picking them from the basket, in which case they will remain tradable. | -| credit_type_abbrev | [string](#string) | | credit_type_abbrev is the abbreviation of the credit type this basket is able to hold. | -| allowed_classes | [string](#string) | repeated | allowed_classes are the credit classes allowed to be put in the basket | -| date_criteria | [DateCriteria](#regen.ecocredit.basket.v1.DateCriteria) | | date_criteria is the date criteria for batches admitted to the basket. At most, only one of the fields in the date_criteria should be set. | -| fee | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | fee is the fee that the curator will pay to create the basket. It must be >= the required Params.basket_creation_fee. We include the fee explicitly here so that the curator explicitly acknowledges paying this fee and is not surprised to learn that the paid a big fee and didn't know beforehand. | - - - - - - - - -### MsgCreateResponse -MsgCreateResponse is the Msg/Create response type. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| basket_denom | [string](#string) | | basket_denom is the unique denomination ID of the newly created basket. | - - - - - - - - -### MsgPut -MsgPut is the Msg/Put request type. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| owner | [string](#string) | | owner is the owner of credits being put into the basket. | -| basket_denom | [string](#string) | | basket_denom is the basket denom to add credits to. | -| credits | [BasketCredit](#regen.ecocredit.basket.v1.BasketCredit) | repeated | credits are credits to add to the basket. If they do not match the basket's admission criteria the operation will fail. If there are any "dust" credits left over when converting credits to basket tokens, these credits will not be converted to basket tokens and instead remain with the owner. | - - - - - - - - -### MsgPutResponse -MsgPutResponse is the Msg/Put response type. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| amount_received | [string](#string) | | amount_received is the integer amount of basket tokens received. | - - - - - - - - -### MsgTake -MsgTake is the Msg/Take request type. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| owner | [string](#string) | | owner is the owner of the basket tokens. | -| basket_denom | [string](#string) | | basket_denom is the basket bank denom to take credits from. | -| amount | [string](#string) | | amount is the integer number of basket tokens to convert into credits. | -| retirement_location | [string](#string) | | retirement_location is the optional retirement location for the credits which will be used only if retire_on_take is true for this basket. | -| retire_on_take | [bool](#bool) | | retire_on_take is a boolean that dictates whether the ecocredits received in exchange for the basket tokens will be received as retired or tradable credits. | - - - - - - - - -### MsgTakeResponse -MsgTakeResponse is the Msg/Take response type. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| credits | [BasketCredit](#regen.ecocredit.basket.v1.BasketCredit) | repeated | credits are the credits taken out of the basket. | - - - - - - - - - - - - - - -### Msg -Msg is the regen.ecocredit.basket.v1beta1 Msg service. - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Create | [MsgCreate](#regen.ecocredit.basket.v1.MsgCreate) | [MsgCreateResponse](#regen.ecocredit.basket.v1.MsgCreateResponse) | Create creates a bank denom which wraps credits. | -| Put | [MsgPut](#regen.ecocredit.basket.v1.MsgPut) | [MsgPutResponse](#regen.ecocredit.basket.v1.MsgPutResponse) | Put puts credits into a basket in return for basket tokens. | -| Take | [MsgTake](#regen.ecocredit.basket.v1.MsgTake) | [MsgTakeResponse](#regen.ecocredit.basket.v1.MsgTakeResponse) | Take takes credits from a basket starting from the oldest credits first. | - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | -| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | -| double | | double | double | float | float64 | double | float | Float | -| float | | float | float | float | float32 | float | float | Float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | -| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | - diff --git a/x/ecocredit/basket/events.pb.go b/x/ecocredit/basket/events.pb.go index 78d2e79a32..8d68ee5f11 100644 --- a/x/ecocredit/basket/events.pb.go +++ b/x/ecocredit/basket/events.pb.go @@ -599,10 +599,7 @@ func (m *EventCreate) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { @@ -782,10 +779,7 @@ func (m *EventPut) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { @@ -965,10 +959,7 @@ func (m *EventTake) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { diff --git a/x/ecocredit/basket/query.pb.go b/x/ecocredit/basket/query.pb.go index 9de4c077f3..4beeead959 100644 --- a/x/ecocredit/basket/query.pb.go +++ b/x/ecocredit/basket/query.pb.go @@ -458,45 +458,45 @@ func init() { } var fileDescriptor_a83a50529e6be723 = []byte{ - // 602 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x3f, 0x6f, 0xd3, 0x4e, - 0x18, 0xce, 0xa5, 0x6a, 0xf2, 0xeb, 0xe5, 0x07, 0xc3, 0xc1, 0x90, 0x1a, 0x64, 0x52, 0x8b, 0x3f, - 0x51, 0xa5, 0xde, 0x29, 0x2d, 0x2d, 0x14, 0x98, 0xa2, 0x0a, 0x10, 0x53, 0xf1, 0x88, 0x84, 0xaa, - 0xb3, 0x73, 0x72, 0x43, 0x13, 0x5f, 0xea, 0xbb, 0x04, 0x2a, 0xd4, 0x85, 0x85, 0x15, 0x09, 0x89, - 0x89, 0x89, 0x99, 0x6f, 0xc1, 0xc2, 0x84, 0x2a, 0xb1, 0x30, 0x30, 0xa0, 0x84, 0x0f, 0x82, 0x7c, - 0x77, 0x0e, 0x71, 0xd3, 0x36, 0x76, 0xc5, 0x78, 0x6f, 0x9f, 0xe7, 0x7d, 0x9f, 0xe7, 0xf1, 0xfb, - 0x36, 0xf0, 0x46, 0xc4, 0x02, 0x16, 0x12, 0xe6, 0x73, 0x3f, 0x62, 0xad, 0xb6, 0x24, 0x1e, 0x15, - 0x7b, 0x4c, 0x92, 0x41, 0x83, 0xec, 0xf7, 0x59, 0x74, 0x80, 0x7b, 0x11, 0x97, 0x1c, 0x2d, 0x2a, - 0x18, 0x1e, 0xc3, 0xb0, 0x86, 0xe1, 0x41, 0xc3, 0xba, 0x1a, 0x70, 0x1e, 0x74, 0x18, 0xa1, 0xbd, - 0x36, 0xa1, 0x61, 0xc8, 0x25, 0x95, 0x6d, 0x1e, 0x0a, 0x4d, 0xb4, 0xce, 0xe8, 0x2f, 0x0f, 0x7a, - 0x2c, 0x81, 0x2d, 0xfb, 0x5c, 0x74, 0xb9, 0x88, 0xff, 0xca, 0xf4, 0x60, 0x32, 0x68, 0x78, 0x4c, - 0xd2, 0x06, 0xe9, 0xd1, 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 0xf0, - 0x6e, 0x64, 0x17, 0x8e, 0x46, 0x76, 0xe1, 0xc7, 0xc8, 0x2e, 0x3c, 0xbb, 0x1b, 0xb4, 0xe5, 0x6e, - 0xdf, 0xc3, 0x3e, 0xef, 0xea, 0x69, 0x2b, 0x21, 0x93, 0x2f, 0x79, 0xb4, 0x67, 0x5e, 0x1d, 0xd6, - 0x0a, 0x58, 0x44, 0x5e, 0x4d, 0x89, 0xf0, 0x4a, 0xea, 0xe7, 0x6a, 0xed, 0x4f, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xc4, 0x84, 0xc3, 0x22, 0x63, 0x07, 0x00, 0x00, + // 600 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0xce, 0xa5, 0x6a, 0x42, 0x2f, 0xc0, 0x70, 0x30, 0xa4, 0x06, 0x99, 0xd4, 0xe2, 0x47, 0x54, + 0xa9, 0x77, 0x4a, 0x4b, 0x0b, 0x05, 0xa6, 0xa8, 0x02, 0xc4, 0x54, 0x3c, 0x22, 0xa1, 0xea, 0xec, + 0x9c, 0xdc, 0xd0, 0xc4, 0x97, 0xfa, 0x2e, 0x01, 0x84, 0xba, 0xb0, 0xb0, 0x22, 0x21, 0x31, 0x31, + 0x31, 0xf3, 0x5f, 0xb0, 0x30, 0xa1, 0x4a, 0x2c, 0x0c, 0x0c, 0x28, 0xe1, 0x0f, 0x41, 0xbe, 0x3b, + 0x87, 0xb8, 0x69, 0x1b, 0xbb, 0x62, 0xbc, 0xd7, 0xef, 0x7b, 0xef, 0xfb, 0x3e, 0xbf, 0xd7, 0xc0, + 0x1b, 0x11, 0x0b, 0x58, 0x48, 0x98, 0xcf, 0xfd, 0x88, 0xb5, 0xda, 0x92, 0x78, 0x54, 0xec, 0x31, + 0x49, 0x06, 0x0d, 0xb2, 0xdf, 0x67, 0xd1, 0x6b,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xef, 0xc8, 0x11, 0x59, 0x1b, 0x79, 0x69, 0x46, 0x6d, 0x53, 0xa9, 0x7d, 0x80, 0xee, 0xe5, + 0x4e, 0x95, 0x8c, 0xf7, 0xfd, 0x3b, 0x80, 0x17, 0x52, 0xed, 0xd1, 0xed, 0x5c, 0x6a, 0x12, 0x0f, + 0xeb, 0x39, 0x59, 0xc6, 0xc2, 0xb6, 0xb2, 0xf0, 0x04, 0x3d, 0x3e, 0xbb, 0x85, 0xb8, 0x3e, 0xbe, + 0x93, 0x83, 0xa6, 0xfb, 0x6d, 0x68, 0x83, 0xc3, 0xa1, 0x0d, 0x7e, 0x0f, 0x6d, 0xf0, 0x7e, 0x64, + 0x17, 0x0e, 0x47, 0x76, 0xe1, 0xe7, 0xc8, 0x2e, 0x3c, 0xbb, 0x1b, 0xb4, 0xe5, 0x6e, 0xdf, 0xc3, + 0x3e, 0xef, 0xea, 0x69, 0x2b, 0x21, 0x93, 0x2f, 0x79, 0xb4, 0x67, 0x5e, 0x1d, 0xd6, 0x0a, 0x58, + 0x44, 0x5e, 0x4d, 0x89, 0xf0, 0x4a, 0xea, 0xe7, 0x6a, 0xed, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x25, 0xf3, 0xc7, 0xef, 0x63, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1225,10 +1225,7 @@ func (m *QueryBasketRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -1346,10 +1343,7 @@ func (m *QueryBasketResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -1435,10 +1429,7 @@ func (m *QueryBasketsRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -1558,10 +1549,7 @@ func (m *QueryBasketsResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -1679,10 +1667,7 @@ func (m *QueryBasketBalancesRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -1802,10 +1787,7 @@ func (m *QueryBasketBalancesResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -1919,10 +1901,7 @@ func (m *QueryBasketBalanceRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -2004,10 +1983,7 @@ func (m *QueryBasketBalanceResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { diff --git a/x/ecocredit/basket/query.pb.gw.go b/x/ecocredit/basket/query.pb.gw.go index 4a8578bbfe..210400ead3 100644 --- a/x/ecocredit/basket/query.pb.gw.go +++ b/x/ecocredit/basket/query.pb.gw.go @@ -20,6 +20,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -30,6 +31,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join func request_Query_Basket_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryBasketRequest @@ -272,12 +274,14 @@ func local_request_Query_BasketBalance_0(ctx context.Context, marshaler runtime. // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Basket_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -285,6 +289,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Basket_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -298,6 +303,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Baskets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -305,6 +312,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Baskets_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -318,6 +326,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_BasketBalances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -325,6 +335,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_BasketBalances_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -338,6 +349,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_BasketBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -345,6 +358,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_BasketBalance_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -480,13 +494,13 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Basket_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"regen", "ecocredit", "basket", "v1", "baskets", "basket_denom"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Basket_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"regen", "ecocredit", "basket", "v1", "baskets", "basket_denom"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Baskets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"regen", "ecocredit", "basket", "v1", "baskets"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Baskets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"regen", "ecocredit", "basket", "v1", "baskets"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_BasketBalances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"regen", "ecocredit", "basket", "v1", "baskets", "basket_denom", "balances"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_BasketBalances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"regen", "ecocredit", "basket", "v1", "baskets", "basket_denom", "balances"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_BasketBalance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"regen", "ecocredit", "basket", "v1", "baskets", "basket_denom", "balances", "batch_denom"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_BasketBalance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"regen", "ecocredit", "basket", "v1", "baskets", "basket_denom", "balances", "batch_denom"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/ecocredit/basket/state.pb.go b/x/ecocredit/basket/state.pb.go index c111795884..1a92af70a4 100644 --- a/x/ecocredit/basket/state.pb.go +++ b/x/ecocredit/basket/state.pb.go @@ -5,8 +5,12 @@ package basket import ( fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1alpha1" proto "github.com/gogo/protobuf/proto" + types "github.com/gogo/protobuf/types" + io "io" math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -20,19 +24,1134 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Basket represents a basket in state. +type Basket struct { + // id is the uint64 ID of the basket. It is used internally for reducing + // storage space. + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // basket_denom is the basket bank denom. + BasketDenom string `protobuf:"bytes,2,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` + // name is the unique name of the basket specified in MsgCreate. Basket + // names must be unique across all credit types and choices of exponent + // above and beyond the uniqueness constraint on basket_denom. + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + // disable_auto_retire indicates whether or not the credits will be retired upon withdraw from the basket. + DisableAutoRetire bool `protobuf:"varint,4,opt,name=disable_auto_retire,json=disableAutoRetire,proto3" json:"disable_auto_retire,omitempty"` + // credit_type_abbrev is the abbreviation of the credit type this basket is able to hold. + CreditTypeAbbrev string `protobuf:"bytes,5,opt,name=credit_type_abbrev,json=creditTypeAbbrev,proto3" json:"credit_type_abbrev,omitempty"` + // date_criteria is the date criteria for batches admitted to the basket. + DateCriteria *DateCriteria `protobuf:"bytes,6,opt,name=date_criteria,json=dateCriteria,proto3" json:"date_criteria,omitempty"` + // exponent is the exponent for converting credits to/from basket tokens. + Exponent uint32 `protobuf:"varint,7,opt,name=exponent,proto3" json:"exponent,omitempty"` +} + +func (m *Basket) Reset() { *m = Basket{} } +func (m *Basket) String() string { return proto.CompactTextString(m) } +func (*Basket) ProtoMessage() {} +func (*Basket) Descriptor() ([]byte, []int) { + return fileDescriptor_c416a19075224f85, []int{0} +} +func (m *Basket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Basket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Basket.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Basket) XXX_Merge(src proto.Message) { + xxx_messageInfo_Basket.Merge(m, src) +} +func (m *Basket) XXX_Size() int { + return m.Size() +} +func (m *Basket) XXX_DiscardUnknown() { + xxx_messageInfo_Basket.DiscardUnknown(m) +} + +var xxx_messageInfo_Basket proto.InternalMessageInfo + +func (m *Basket) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *Basket) GetBasketDenom() string { + if m != nil { + return m.BasketDenom + } + return "" +} + +func (m *Basket) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Basket) GetDisableAutoRetire() bool { + if m != nil { + return m.DisableAutoRetire + } + return false +} + +func (m *Basket) GetCreditTypeAbbrev() string { + if m != nil { + return m.CreditTypeAbbrev + } + return "" +} + +func (m *Basket) GetDateCriteria() *DateCriteria { + if m != nil { + return m.DateCriteria + } + return nil +} + +func (m *Basket) GetExponent() uint32 { + if m != nil { + return m.Exponent + } + return 0 +} + +// BasketClass describes a credit class that can be deposited in a basket. +type BasketClass struct { + // basket_id is the ID of the basket + BasketId uint64 `protobuf:"varint,1,opt,name=basket_id,json=basketId,proto3" json:"basket_id,omitempty"` + // class_id is the id of the credit class that is allowed to be deposited in the basket + ClassId string `protobuf:"bytes,2,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` +} + +func (m *BasketClass) Reset() { *m = BasketClass{} } +func (m *BasketClass) String() string { return proto.CompactTextString(m) } +func (*BasketClass) ProtoMessage() {} +func (*BasketClass) Descriptor() ([]byte, []int) { + return fileDescriptor_c416a19075224f85, []int{1} +} +func (m *BasketClass) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BasketClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BasketClass.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BasketClass) XXX_Merge(src proto.Message) { + xxx_messageInfo_BasketClass.Merge(m, src) +} +func (m *BasketClass) XXX_Size() int { + return m.Size() +} +func (m *BasketClass) XXX_DiscardUnknown() { + xxx_messageInfo_BasketClass.DiscardUnknown(m) +} + +var xxx_messageInfo_BasketClass proto.InternalMessageInfo + +func (m *BasketClass) GetBasketId() uint64 { + if m != nil { + return m.BasketId + } + return 0 +} + +func (m *BasketClass) GetClassId() string { + if m != nil { + return m.ClassId + } + return "" +} + +// BasketBalance stores the amount of credits from a batch in a basket +type BasketBalance struct { + // basket_id is the ID of the basket + BasketId uint64 `protobuf:"varint,1,opt,name=basket_id,json=basketId,proto3" json:"basket_id,omitempty"` + // batch_denom is the denom of the credit batch + BatchDenom string `protobuf:"bytes,2,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` + // balance is the amount of ecocredits held in the basket + Balance string `protobuf:"bytes,3,opt,name=balance,proto3" json:"balance,omitempty"` + // batch_start_date is the start date of the batch. This field is used + // to create an index which is used to remove the oldest credits first. + BatchStartDate *types.Timestamp `protobuf:"bytes,4,opt,name=batch_start_date,json=batchStartDate,proto3" json:"batch_start_date,omitempty"` +} + +func (m *BasketBalance) Reset() { *m = BasketBalance{} } +func (m *BasketBalance) String() string { return proto.CompactTextString(m) } +func (*BasketBalance) ProtoMessage() {} +func (*BasketBalance) Descriptor() ([]byte, []int) { + return fileDescriptor_c416a19075224f85, []int{2} +} +func (m *BasketBalance) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BasketBalance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BasketBalance.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BasketBalance) XXX_Merge(src proto.Message) { + xxx_messageInfo_BasketBalance.Merge(m, src) +} +func (m *BasketBalance) XXX_Size() int { + return m.Size() +} +func (m *BasketBalance) XXX_DiscardUnknown() { + xxx_messageInfo_BasketBalance.DiscardUnknown(m) +} + +var xxx_messageInfo_BasketBalance proto.InternalMessageInfo + +func (m *BasketBalance) GetBasketId() uint64 { + if m != nil { + return m.BasketId + } + return 0 +} + +func (m *BasketBalance) GetBatchDenom() string { + if m != nil { + return m.BatchDenom + } + return "" +} + +func (m *BasketBalance) GetBalance() string { + if m != nil { + return m.Balance + } + return "" +} + +func (m *BasketBalance) GetBatchStartDate() *types.Timestamp { + if m != nil { + return m.BatchStartDate + } + return nil +} + +func init() { + proto.RegisterType((*Basket)(nil), "regen.ecocredit.basket.v1.Basket") + proto.RegisterType((*BasketClass)(nil), "regen.ecocredit.basket.v1.BasketClass") + proto.RegisterType((*BasketBalance)(nil), "regen.ecocredit.basket.v1.BasketBalance") +} + func init() { proto.RegisterFile("regen/ecocredit/basket/v1/state.proto", fileDescriptor_c416a19075224f85) } var fileDescriptor_c416a19075224f85 = []byte{ - // 144 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2d, 0x4a, 0x4d, 0x4f, - 0xcd, 0xd3, 0x4f, 0x4d, 0xce, 0x4f, 0x2e, 0x4a, 0x4d, 0xc9, 0x2c, 0xd1, 0x4f, 0x4a, 0x2c, 0xce, - 0x4e, 0x2d, 0xd1, 0x2f, 0x33, 0xd4, 0x2f, 0x2e, 0x49, 0x2c, 0x49, 0xd5, 0x2b, 0x28, 0xca, 0x2f, - 0xc9, 0x17, 0x92, 0x04, 0x2b, 0xd3, 0x83, 0x2b, 0xd3, 0x83, 0x28, 0xd3, 0x2b, 0x33, 0x74, 0x0a, - 0x3a, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, - 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x8b, 0xf4, 0xcc, 0x92, 0x8c, - 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0xb0, 0x7e, 0xdd, 0xbc, 0xd4, 0x92, 0xf2, 0xfc, 0xa2, - 0x6c, 0x28, 0x2f, 0x27, 0x35, 0x25, 0x3d, 0xb5, 0x48, 0xbf, 0x02, 0xc3, 0xf6, 0x24, 0x36, 0xb0, - 0xad, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x38, 0xc6, 0xf3, 0x6e, 0x9e, 0x00, 0x00, 0x00, + // 549 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0xed, 0xa6, 0x25, 0x4d, 0x27, 0x6d, 0x65, 0x16, 0x10, 0xdb, 0x20, 0xdc, 0x10, 0x09, 0x11, + 0xa1, 0x62, 0x93, 0x72, 0x41, 0xe1, 0x94, 0x34, 0x97, 0x4a, 0x9c, 0x4c, 0x4f, 0x5c, 0xac, 0xb5, + 0x3d, 0x24, 0x56, 0x6d, 0xaf, 0xb5, 0xde, 0x84, 0xf6, 0x27, 0x10, 0x5f, 0xc0, 0xf7, 0xc0, 0xad, + 0x12, 0x17, 0x8e, 0x28, 0xf9, 0x01, 0xc4, 0x17, 0x20, 0xef, 0x3a, 0x49, 0x0b, 0xa2, 0xb7, 0xbc, + 0x79, 0xef, 0x79, 0x66, 0xdf, 0x4c, 0xe0, 0xa9, 0xc4, 0x31, 0x66, 0x2e, 0x86, 0x22, 0x94, 0x18, + 0xc5, 0xca, 0x0d, 0x78, 0x71, 0x8e, 0xca, 0x9d, 0xf5, 0xdc, 0x42, 0x71, 0x85, 0x4e, 0x2e, 0x85, + 0x12, 0xf4, 0x40, 0xcb, 0x9c, 0x95, 0xcc, 0x31, 0x32, 0x67, 0xd6, 0x6b, 0x3d, 0x0e, 0x45, 0x91, + 0x8a, 0xc2, 0x15, 0x32, 0x75, 0x67, 0x3d, 0x9e, 0xe4, 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f, 0xbc, 0x7f, 0x3d, 0x8e, 0xd5, 0x64, 0x1a, 0x38, 0xa1, 0x48, 0x5d, + 0x7d, 0x02, 0x2f, 0x32, 0x54, 0x1f, 0x85, 0x3c, 0xaf, 0x50, 0x82, 0xd1, 0x18, 0xa5, 0x7b, 0xf1, + 0xcf, 0x1f, 0x21, 0xa8, 0xeb, 0xd1, 0x5f, 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0x21, 0x6b, 0x6c, + 0x9b, 0xab, 0x03, 0x00, 0x00, +} + +func (m *Basket) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Basket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Basket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Exponent != 0 { + i = encodeVarintState(dAtA, i, uint64(m.Exponent)) + i-- + dAtA[i] = 0x38 + } + if m.DateCriteria != nil { + { + size, err := m.DateCriteria.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintState(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if len(m.CreditTypeAbbrev) > 0 { + i -= len(m.CreditTypeAbbrev) + copy(dAtA[i:], m.CreditTypeAbbrev) + i = encodeVarintState(dAtA, i, uint64(len(m.CreditTypeAbbrev))) + i-- + dAtA[i] = 0x2a + } + if m.DisableAutoRetire { + i-- + if m.DisableAutoRetire { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintState(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x1a + } + if len(m.BasketDenom) > 0 { + i -= len(m.BasketDenom) + copy(dAtA[i:], m.BasketDenom) + i = encodeVarintState(dAtA, i, uint64(len(m.BasketDenom))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintState(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *BasketClass) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BasketClass) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BasketClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ClassId) > 0 { + i -= len(m.ClassId) + copy(dAtA[i:], m.ClassId) + i = encodeVarintState(dAtA, i, uint64(len(m.ClassId))) + i-- + dAtA[i] = 0x12 + } + if m.BasketId != 0 { + i = encodeVarintState(dAtA, i, uint64(m.BasketId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *BasketBalance) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BasketBalance) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BasketBalance) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BatchStartDate != nil { + { + size, err := m.BatchStartDate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintState(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.Balance) > 0 { + i -= len(m.Balance) + copy(dAtA[i:], m.Balance) + i = encodeVarintState(dAtA, i, uint64(len(m.Balance))) + i-- + dAtA[i] = 0x1a + } + if len(m.BatchDenom) > 0 { + i -= len(m.BatchDenom) + copy(dAtA[i:], m.BatchDenom) + i = encodeVarintState(dAtA, i, uint64(len(m.BatchDenom))) + i-- + dAtA[i] = 0x12 + } + if m.BasketId != 0 { + i = encodeVarintState(dAtA, i, uint64(m.BasketId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintState(dAtA []byte, offset int, v uint64) int { + offset -= sovState(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Basket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovState(uint64(m.Id)) + } + l = len(m.BasketDenom) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + if m.DisableAutoRetire { + n += 2 + } + l = len(m.CreditTypeAbbrev) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + if m.DateCriteria != nil { + l = m.DateCriteria.Size() + n += 1 + l + sovState(uint64(l)) + } + if m.Exponent != 0 { + n += 1 + sovState(uint64(m.Exponent)) + } + return n +} + +func (m *BasketClass) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BasketId != 0 { + n += 1 + sovState(uint64(m.BasketId)) + } + l = len(m.ClassId) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + return n +} + +func (m *BasketBalance) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BasketId != 0 { + n += 1 + sovState(uint64(m.BasketId)) + } + l = len(m.BatchDenom) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + l = len(m.Balance) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + if m.BatchStartDate != nil { + l = m.BatchStartDate.Size() + n += 1 + l + sovState(uint64(l)) + } + return n } + +func sovState(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozState(x uint64) (n int) { + return sovState(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Basket) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Basket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Basket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BasketDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BasketDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DisableAutoRetire", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DisableAutoRetire = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreditTypeAbbrev", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CreditTypeAbbrev = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DateCriteria", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DateCriteria == nil { + m.DateCriteria = &DateCriteria{} + } + if err := m.DateCriteria.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Exponent", wireType) + } + m.Exponent = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Exponent |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipState(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthState + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BasketClass) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BasketClass: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BasketClass: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BasketId", wireType) + } + m.BasketId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BasketId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipState(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthState + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BasketBalance) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BasketBalance: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BasketBalance: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BasketId", wireType) + } + m.BasketId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BasketId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BatchDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Balance = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BatchStartDate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BatchStartDate == nil { + m.BatchStartDate = &types.Timestamp{} + } + if err := m.BatchStartDate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipState(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthState + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipState(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowState + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowState + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowState + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthState + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupState + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthState + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthState = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowState = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupState = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/ecocredit/basket/tx.pb.go b/x/ecocredit/basket/tx.pb.go index 3899eca597..808b0012d6 100644 --- a/x/ecocredit/basket/tx.pb.go +++ b/x/ecocredit/basket/tx.pb.go @@ -30,7 +30,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// MsgCreate is the Msg/Create request type. +// MsgCreateBasket is the Msg/CreateBasket request type. type MsgCreate struct { // curator is the address of the basket curator who is able to change certain // basket settings. @@ -57,7 +57,7 @@ type MsgCreate struct { // following values 0, 1, 2, 3, 6, 9, 12, 15, 18, 21, or 24 which correspond // to the exponents which have an official SI prefix. // - // The exponent will be used to form the prefix part of the bank denom + // The exponent will be used to form the prefix part of the the bank denom // and will be mapped as follows: // 0 - no prefix // 1 - d (deci) @@ -189,7 +189,7 @@ func (m *MsgCreate) GetFee() github_com_cosmos_cosmos_sdk_types.Coins { return nil } -// MsgCreateResponse is the Msg/Create response type. +// MsgCreateBasketResponse is the Msg/CreateBasket response type. type MsgCreateResponse struct { // basket_denom is the unique denomination ID of the newly created basket. BasketDenom string `protobuf:"bytes,1,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` @@ -235,7 +235,7 @@ func (m *MsgCreateResponse) GetBasketDenom() string { return "" } -// MsgPut is the Msg/Put request type. +// MsgAddToBasket is the Msg/AddToBasket request type. type MsgPut struct { // owner is the owner of credits being put into the basket. Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` @@ -302,7 +302,7 @@ func (m *MsgPut) GetCredits() []*BasketCredit { return nil } -// MsgPutResponse is the Msg/Put response type. +// MsgAddToBasketResponse is the Msg/AddToBasket response type. type MsgPutResponse struct { // amount_received is the integer amount of basket tokens received. AmountReceived string `protobuf:"bytes,1,opt,name=amount_received,json=amountReceived,proto3" json:"amount_received,omitempty"` @@ -348,7 +348,7 @@ func (m *MsgPutResponse) GetAmountReceived() string { return "" } -// MsgTake is the Msg/Take request type. +// MsgTakeFromBasket is the Msg/TakeFromBasket request type. type MsgTake struct { // owner is the owner of the basket tokens. Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` @@ -433,7 +433,7 @@ func (m *MsgTake) GetRetireOnTake() bool { return false } -// MsgTakeResponse is the Msg/Take response type. +// MsgTakeFromBasketResponse is the Msg/TakeFromBasket response type. type MsgTakeResponse struct { // credits are the credits taken out of the basket. Credits []*BasketCredit `protobuf:"bytes,1,rep,name=credits,proto3" json:"credits,omitempty"` @@ -1469,10 +1469,7 @@ func (m *MsgCreate) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTx } if (iNdEx + skippy) > l { @@ -1554,10 +1551,7 @@ func (m *MsgCreateResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTx } if (iNdEx + skippy) > l { @@ -1705,10 +1699,7 @@ func (m *MsgPut) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTx } if (iNdEx + skippy) > l { @@ -1790,10 +1781,7 @@ func (m *MsgPutResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTx } if (iNdEx + skippy) > l { @@ -1991,10 +1979,7 @@ func (m *MsgTake) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTx } if (iNdEx + skippy) > l { @@ -2078,10 +2063,7 @@ func (m *MsgTakeResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTx } if (iNdEx + skippy) > l { diff --git a/x/ecocredit/basket/types.pb.go b/x/ecocredit/basket/types.pb.go index 4514fdcd29..7f490acbab 100644 --- a/x/ecocredit/basket/types.pb.go +++ b/x/ecocredit/basket/types.pb.go @@ -145,188 +145,9 @@ func (m *DateCriteria) GetStartDateWindow() *types.Duration { return nil } -// Basket represents a basket in state. -type Basket struct { - // id is the uint64 ID of the basket. It is used internally for reducing - // storage space. - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // basket_denom is the basket bank denom. - BasketDenom string `protobuf:"bytes,2,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` - // name is the unique name of the basket specified in MsgCreate. Basket - // names must be unique across all credit types and choices of exponent - // above and beyond the uniqueness constraint on basket_denom. - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - // disable_auto_retire indicates whether or not the credits will be retired upon withdraw from the basket. - DisableAutoRetire bool `protobuf:"varint,4,opt,name=disable_auto_retire,json=disableAutoRetire,proto3" json:"disable_auto_retire,omitempty"` - // credit_type_abbrev is the abbreviation of the credit type this basket is able to hold. - CreditTypeAbbrev string `protobuf:"bytes,5,opt,name=credit_type_abbrev,json=creditTypeAbbrev,proto3" json:"credit_type_abbrev,omitempty"` - // date_criteria is the date criteria for batches admitted to the basket. - DateCriteria *DateCriteria `protobuf:"bytes,6,opt,name=date_criteria,json=dateCriteria,proto3" json:"date_criteria,omitempty"` - // exponent is the exponent for converting credits to/from basket tokens. - Exponent uint32 `protobuf:"varint,7,opt,name=exponent,proto3" json:"exponent,omitempty"` -} - -func (m *Basket) Reset() { *m = Basket{} } -func (m *Basket) String() string { return proto.CompactTextString(m) } -func (*Basket) ProtoMessage() {} -func (*Basket) Descriptor() ([]byte, []int) { - return fileDescriptor_e6c256e957c69c4d, []int{2} -} -func (m *Basket) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Basket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Basket.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Basket) XXX_Merge(src proto.Message) { - xxx_messageInfo_Basket.Merge(m, src) -} -func (m *Basket) XXX_Size() int { - return m.Size() -} -func (m *Basket) XXX_DiscardUnknown() { - xxx_messageInfo_Basket.DiscardUnknown(m) -} - -var xxx_messageInfo_Basket proto.InternalMessageInfo - -func (m *Basket) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *Basket) GetBasketDenom() string { - if m != nil { - return m.BasketDenom - } - return "" -} - -func (m *Basket) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Basket) GetDisableAutoRetire() bool { - if m != nil { - return m.DisableAutoRetire - } - return false -} - -func (m *Basket) GetCreditTypeAbbrev() string { - if m != nil { - return m.CreditTypeAbbrev - } - return "" -} - -func (m *Basket) GetDateCriteria() *DateCriteria { - if m != nil { - return m.DateCriteria - } - return nil -} - -func (m *Basket) GetExponent() uint32 { - if m != nil { - return m.Exponent - } - return 0 -} - -// BasketBalance stores the amount of credits from a batch in a basket -type BasketBalance struct { - // basket_id is the ID of the basket - BasketId uint64 `protobuf:"varint,1,opt,name=basket_id,json=basketId,proto3" json:"basket_id,omitempty"` - // batch_denom is the denom of the credit batch - BatchDenom string `protobuf:"bytes,2,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` - // balance is the amount of ecocredits held in the basket - Balance string `protobuf:"bytes,3,opt,name=balance,proto3" json:"balance,omitempty"` - // batch_start_date is the start date of the batch. This field is used - // to create an index which is used to remove the oldest credits first. - BatchStartDate *types.Timestamp `protobuf:"bytes,4,opt,name=batch_start_date,json=batchStartDate,proto3" json:"batch_start_date,omitempty"` -} - -func (m *BasketBalance) Reset() { *m = BasketBalance{} } -func (m *BasketBalance) String() string { return proto.CompactTextString(m) } -func (*BasketBalance) ProtoMessage() {} -func (*BasketBalance) Descriptor() ([]byte, []int) { - return fileDescriptor_e6c256e957c69c4d, []int{3} -} -func (m *BasketBalance) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BasketBalance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BasketBalance.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BasketBalance) XXX_Merge(src proto.Message) { - xxx_messageInfo_BasketBalance.Merge(m, src) -} -func (m *BasketBalance) XXX_Size() int { - return m.Size() -} -func (m *BasketBalance) XXX_DiscardUnknown() { - xxx_messageInfo_BasketBalance.DiscardUnknown(m) -} - -var xxx_messageInfo_BasketBalance proto.InternalMessageInfo - -func (m *BasketBalance) GetBasketId() uint64 { - if m != nil { - return m.BasketId - } - return 0 -} - -func (m *BasketBalance) GetBatchDenom() string { - if m != nil { - return m.BatchDenom - } - return "" -} - -func (m *BasketBalance) GetBalance() string { - if m != nil { - return m.Balance - } - return "" -} - -func (m *BasketBalance) GetBatchStartDate() *types.Timestamp { - if m != nil { - return m.BatchStartDate - } - return nil -} - func init() { proto.RegisterType((*BasketCredit)(nil), "regen.ecocredit.basket.v1.BasketCredit") proto.RegisterType((*DateCriteria)(nil), "regen.ecocredit.basket.v1.DateCriteria") - proto.RegisterType((*Basket)(nil), "regen.ecocredit.basket.v1.Basket") - proto.RegisterType((*BasketBalance)(nil), "regen.ecocredit.basket.v1.BasketBalance") } func init() { @@ -334,40 +155,27 @@ func init() { } var fileDescriptor_e6c256e957c69c4d = []byte{ - // 517 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x53, 0xcb, 0x6e, 0xd3, 0x40, - 0x14, 0x8d, 0x43, 0x48, 0xd3, 0xc9, 0x83, 0x76, 0x90, 0x90, 0x1b, 0x24, 0x37, 0x44, 0x42, 0x64, - 0x01, 0x63, 0xb5, 0x6c, 0x58, 0xd2, 0x34, 0x08, 0x21, 0xb1, 0x32, 0x95, 0x90, 0xd8, 0x58, 0x63, - 0xcf, 0x25, 0x1d, 0x35, 0x9e, 0x89, 0xc6, 0xe3, 0xa4, 0xfd, 0x0b, 0x76, 0xfd, 0x0a, 0xfe, 0x83, - 0x65, 0x97, 0x2c, 0x51, 0xf2, 0x23, 0x28, 0x77, 0x9c, 0x10, 0x35, 0x42, 0xdd, 0xf9, 0xbe, 0xce, - 0xdc, 0x73, 0xee, 0x31, 0x79, 0x69, 0x60, 0x0c, 0x2a, 0x84, 0x54, 0xa7, 0x06, 0x84, 0xb4, 0x61, - 0xc2, 0xf3, 0x2b, 0xb0, 0xe1, 0xec, 0x24, 0xb4, 0x37, 0x53, 0xc8, 0xd9, 0xd4, 0x68, 0xab, 0xe9, - 0x11, 0xb6, 0xb1, 0x4d, 0x1b, 0x73, 0x6d, 0x6c, 0x76, 0xd2, 0x3d, 0x1e, 0x6b, 0x3d, 0x9e, 0x40, - 0x88, 0x8d, 0x49, 0xf1, 0x3d, 0xb4, 0x32, 0x83, 0xdc, 0xf2, 0x6c, 0xea, 0x66, 0xbb, 0xc1, 0xfd, - 0x06, 0x51, 0x18, 0x6e, 0xa5, 0x56, 0xae, 0xde, 0xff, 0x48, 0x5a, 0x43, 0x44, 0x3b, 0x47, 0x68, - 0x7a, 0x4c, 0x9a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 0x7f, 0x8c, 0x88, 0x07, 0xae, 0x72, - 0x71, 0x33, 0x85, 0x33, 0xcc, 0xd3, 0xcf, 0xa4, 0x8d, 0x84, 0xd3, 0x52, 0x49, 0xbf, 0x8e, 0x94, - 0x5f, 0xb1, 0xff, 0xda, 0x80, 0x6d, 0x0b, 0x1f, 0xb5, 0xc4, 0xf6, 0x19, 0xba, 0xa4, 0x01, 0xd7, - 0x53, 0xad, 0x40, 0x59, 0x7f, 0xaf, 0xe7, 0x0d, 0xda, 0xd1, 0x26, 0xee, 0xff, 0xf4, 0x48, 0xdb, - 0x29, 0x33, 0xe4, 0x13, 0xae, 0x52, 0xa0, 0xcf, 0xc9, 0x7e, 0x29, 0xc8, 0x46, 0xa7, 0x86, 0x4b, - 0x7c, 0x12, 0xf7, 0xbd, 0x51, 0xdd, 0xf1, 0x86, 0x4f, 0xf6, 0x12, 0x07, 0x54, 0xca, 0xb5, 0x0e, - 0xe9, 0x88, 0x1c, 0xb8, 0xd1, 0x2d, 0x3b, 0xd4, 0x1e, 0xb4, 0x43, 0x07, 0x67, 0x36, 0x86, 0x18, - 0x46, 0xbf, 0x16, 0x81, 0x77, 0xb7, 0x08, 0xbc, 0x3f, 0x8b, 0xc0, 0xfb, 0xb1, 0x0c, 0x2a, 0x77, - 0xcb, 0xa0, 0xf2, 0x7b, 0x19, 0x54, 0xbe, 0xbd, 0x1b, 0x4b, 0x7b, 0x59, 0x24, 0x2c, 0xd5, 0x59, - 0x88, 0x32, 0xbd, 0x51, 0x60, 0xe7, 0xda, 0x5c, 0x95, 0xd1, 0x04, 0xc4, 0x18, 0x4c, 0x78, 0xbd, - 0xf3, 0xaf, 0x25, 0x75, 0x7c, 0xf7, 0xed, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x24, 0x26, 0x0a, - 0x3a, 0x8c, 0x03, 0x00, 0x00, + // 318 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x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 0xbc, + 0x96, 0xd1, 0x0d, 0x3d, 0x32, 0xda, 0x26, 0x05, 0x4a, 0x8f, 0x89, 0x92, 0x08, 0x01, 0xd6, 0x18, + 0x74, 0x78, 0x15, 0x89, 0xef, 0x23, 0xf1, 0x87, 0x7d, 0xe6, 0xb8, 0x69, 0xb4, 0xbd, 0xdf, 0x1a, + 0xb6, 0xa4, 0xe8, 0x96, 0x9e, 0xfc, 0xba, 0x93, 0xa5, 0xb6, 0xca, 0x2d, 0xc3, 0xd6, 0xc6, 0xa0, + 0x7d, 0x00, 0x19, 0xef, 0xde, 0x15, 0x1f, 0x17, 0x7b, 0xc0, 0x63, 0x70, 0x0c, 0xe3, 0x8f, 0x35, + 0x23, 0xab, 0x35, 0x23, 0x5f, 0x6b, 0x46, 0xde, 0x36, 0xac, 0xb6, 0xda, 0xb0, 0xda, 0xe7, 0x86, + 0xd5, 0x9e, 0xae, 0x73, 0x8d, 0x93, 0x32, 0xe5, 0x99, 0x33, 0x22, 0xfc, 0xf1, 0xa5, 0x05, 0x5c, + 0x3a, 0x3f, 0xdd, 0x55, 0x33, 0x50, 0x39, 0x78, 0xf1, 0x72, 0x70, 0xa1, 0xb4, 0x1e, 0xf6, 0x5e, + 0x7d, 0x07, 0x00, 0x00, 0xff, 0xff, 0x06, 0xdb, 0x38, 0x47, 0xc2, 0x01, 0x00, 0x00, } func (m *BasketCredit) Marshal() (dAtA []byte, err error) { @@ -454,136 +262,6 @@ func (m *DateCriteria) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Basket) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Basket) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Basket) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Exponent != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Exponent)) - i-- - dAtA[i] = 0x38 - } - if m.DateCriteria != nil { - { - size, err := m.DateCriteria.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if len(m.CreditTypeAbbrev) > 0 { - i -= len(m.CreditTypeAbbrev) - copy(dAtA[i:], m.CreditTypeAbbrev) - i = encodeVarintTypes(dAtA, i, uint64(len(m.CreditTypeAbbrev))) - i-- - dAtA[i] = 0x2a - } - if m.DisableAutoRetire { - i-- - if m.DisableAutoRetire { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - } - if len(m.BasketDenom) > 0 { - i -= len(m.BasketDenom) - copy(dAtA[i:], m.BasketDenom) - i = encodeVarintTypes(dAtA, i, uint64(len(m.BasketDenom))) - i-- - dAtA[i] = 0x12 - } - if m.Id != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *BasketBalance) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BasketBalance) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BasketBalance) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BatchStartDate != nil { - { - size, err := m.BatchStartDate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.Balance) > 0 { - i -= len(m.Balance) - copy(dAtA[i:], m.Balance) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Balance))) - i-- - dAtA[i] = 0x1a - } - if len(m.BatchDenom) > 0 { - i -= len(m.BatchDenom) - copy(dAtA[i:], m.BatchDenom) - i = encodeVarintTypes(dAtA, i, uint64(len(m.BatchDenom))) - i-- - dAtA[i] = 0x12 - } - if m.BasketId != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.BasketId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { offset -= sovTypes(v) base := offset @@ -629,64 +307,6 @@ func (m *DateCriteria) Size() (n int) { return n } -func (m *Basket) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovTypes(uint64(m.Id)) - } - l = len(m.BasketDenom) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.DisableAutoRetire { - n += 2 - } - l = len(m.CreditTypeAbbrev) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.DateCriteria != nil { - l = m.DateCriteria.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Exponent != 0 { - n += 1 + sovTypes(uint64(m.Exponent)) - } - return n -} - -func (m *BasketBalance) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BasketId != 0 { - n += 1 + sovTypes(uint64(m.BasketId)) - } - l = len(m.BatchDenom) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Balance) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.BatchStartDate != nil { - l = m.BatchStartDate.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - func sovTypes(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -792,10 +412,7 @@ func (m *BasketCredit) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -917,425 +534,7 @@ func (m *DateCriteria) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Basket) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Basket: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Basket: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BasketDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BasketDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DisableAutoRetire", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DisableAutoRetire = bool(v != 0) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreditTypeAbbrev", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CreditTypeAbbrev = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DateCriteria", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DateCriteria == nil { - m.DateCriteria = &DateCriteria{} - } - if err := m.DateCriteria.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Exponent", wireType) - } - m.Exponent = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Exponent |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BasketBalance) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BasketBalance: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BasketBalance: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BasketId", wireType) - } - m.BasketId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BasketId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Balance = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchStartDate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BatchStartDate == nil { - m.BatchStartDate = &types.Timestamp{} - } - if err := m.BatchStartDate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { diff --git a/x/ecocredit/basket/v1/events.pb.go b/x/ecocredit/basket/v1/events.pb.go deleted file mode 100644 index 44b137f28a..0000000000 --- a/x/ecocredit/basket/v1/events.pb.go +++ /dev/null @@ -1,1060 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: regen/ecocredit/basket/v1/events.proto - -package v1 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// EventCreate is an event emitted when a basket is created. -type EventCreate struct { - // basket_denom is the basket bank denom. - BasketDenom string `protobuf:"bytes,1,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` - // curator is the address of the basket curator who is able to change certain - // basket settings. - Curator string `protobuf:"bytes,2,opt,name=curator,proto3" json:"curator,omitempty"` -} - -func (m *EventCreate) Reset() { *m = EventCreate{} } -func (m *EventCreate) String() string { return proto.CompactTextString(m) } -func (*EventCreate) ProtoMessage() {} -func (*EventCreate) Descriptor() ([]byte, []int) { - return fileDescriptor_bc7fc2fbcbd93cbc, []int{0} -} -func (m *EventCreate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventCreate.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventCreate) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventCreate.Merge(m, src) -} -func (m *EventCreate) XXX_Size() int { - return m.Size() -} -func (m *EventCreate) XXX_DiscardUnknown() { - xxx_messageInfo_EventCreate.DiscardUnknown(m) -} - -var xxx_messageInfo_EventCreate proto.InternalMessageInfo - -func (m *EventCreate) GetBasketDenom() string { - if m != nil { - return m.BasketDenom - } - return "" -} - -func (m *EventCreate) GetCurator() string { - if m != nil { - return m.Curator - } - return "" -} - -// EventPut is an event emitted when credits are put into a basket in return -// for basket tokens. -type EventPut struct { - // owner is the owner of the credits put into the basket. - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - // basket_denom is the basket bank denom that the credits were added to. - BasketDenom string `protobuf:"bytes,2,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` - // credits are the credits that were added to the basket. - Credits []*BasketCredit `protobuf:"bytes,3,rep,name=credits,proto3" json:"credits,omitempty"` - // amount is the integer number of basket tokens converted from credits. - Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (m *EventPut) Reset() { *m = EventPut{} } -func (m *EventPut) String() string { return proto.CompactTextString(m) } -func (*EventPut) ProtoMessage() {} -func (*EventPut) Descriptor() ([]byte, []int) { - return fileDescriptor_bc7fc2fbcbd93cbc, []int{1} -} -func (m *EventPut) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventPut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventPut.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventPut) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventPut.Merge(m, src) -} -func (m *EventPut) XXX_Size() int { - return m.Size() -} -func (m *EventPut) XXX_DiscardUnknown() { - xxx_messageInfo_EventPut.DiscardUnknown(m) -} - -var xxx_messageInfo_EventPut proto.InternalMessageInfo - -func (m *EventPut) GetOwner() string { - if m != nil { - return m.Owner - } - return "" -} - -func (m *EventPut) GetBasketDenom() string { - if m != nil { - return m.BasketDenom - } - return "" -} - -func (m *EventPut) GetCredits() []*BasketCredit { - if m != nil { - return m.Credits - } - return nil -} - -func (m *EventPut) GetAmount() string { - if m != nil { - return m.Amount - } - return "" -} - -// EventTake is an event emitted when credits are taken from a basket starting -// from the oldest credits first. -type EventTake struct { - // owner is the owner of the credits taken from the basket. - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - // basket_denom is the basket bank denom that credits were taken from. - BasketDenom string `protobuf:"bytes,2,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` - // credits are the credits that were taken from the basket. - Credits []*BasketCredit `protobuf:"bytes,3,rep,name=credits,proto3" json:"credits,omitempty"` - // amount is the integer number of basket tokens converted to credits. - Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (m *EventTake) Reset() { *m = EventTake{} } -func (m *EventTake) String() string { return proto.CompactTextString(m) } -func (*EventTake) ProtoMessage() {} -func (*EventTake) Descriptor() ([]byte, []int) { - return fileDescriptor_bc7fc2fbcbd93cbc, []int{2} -} -func (m *EventTake) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventTake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventTake.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventTake) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventTake.Merge(m, src) -} -func (m *EventTake) XXX_Size() int { - return m.Size() -} -func (m *EventTake) XXX_DiscardUnknown() { - xxx_messageInfo_EventTake.DiscardUnknown(m) -} - -var xxx_messageInfo_EventTake proto.InternalMessageInfo - -func (m *EventTake) GetOwner() string { - if m != nil { - return m.Owner - } - return "" -} - -func (m *EventTake) GetBasketDenom() string { - if m != nil { - return m.BasketDenom - } - return "" -} - -func (m *EventTake) GetCredits() []*BasketCredit { - if m != nil { - return m.Credits - } - return nil -} - -func (m *EventTake) GetAmount() string { - if m != nil { - return m.Amount - } - return "" -} - -func init() { - proto.RegisterType((*EventCreate)(nil), "regen.ecocredit.basket.v1.EventCreate") - proto.RegisterType((*EventPut)(nil), "regen.ecocredit.basket.v1.EventPut") - proto.RegisterType((*EventTake)(nil), "regen.ecocredit.basket.v1.EventTake") -} - -func init() { - proto.RegisterFile("regen/ecocredit/basket/v1/events.proto", fileDescriptor_bc7fc2fbcbd93cbc) -} - -var fileDescriptor_bc7fc2fbcbd93cbc = []byte{ - // 297 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2b, 0x4a, 0x4d, 0x4f, - 0xcd, 0xd3, 0x4f, 0x4d, 0xce, 0x4f, 0x2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, 0x3b, 0x30, - 0x24, 0x31, 0x3b, 0x75, 0x30, 0xba, 0xd0, 0x29, 0xf4, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, - 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, - 0xe5, 0x18, 0xa2, 0xac, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xc1, - 0xb6, 0xe9, 0xe6, 0xa5, 0x96, 0x94, 0xe7, 0x17, 0x65, 0x43, 0x79, 0x39, 0xa9, 0x29, 0xe9, 0xa9, - 0x45, 0xfa, 0x15, 0xd8, 0x62, 0x3c, 0x89, 0x0d, 0x1c, 0xd9, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x9c, 0x74, 0x27, 0x90, 0x58, 0x02, 0x00, 0x00, -} - -func (m *EventCreate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventCreate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventCreate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Curator) > 0 { - i -= len(m.Curator) - copy(dAtA[i:], m.Curator) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Curator))) - i-- - dAtA[i] = 0x12 - } - if len(m.BasketDenom) > 0 { - i -= len(m.BasketDenom) - copy(dAtA[i:], m.BasketDenom) - i = encodeVarintEvents(dAtA, i, uint64(len(m.BasketDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventPut) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventPut) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventPut) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Amount) > 0 { - i -= len(m.Amount) - copy(dAtA[i:], m.Amount) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Amount))) - i-- - dAtA[i] = 0x22 - } - if len(m.Credits) > 0 { - for iNdEx := len(m.Credits) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Credits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.BasketDenom) > 0 { - i -= len(m.BasketDenom) - copy(dAtA[i:], m.BasketDenom) - i = encodeVarintEvents(dAtA, i, uint64(len(m.BasketDenom))) - i-- - dAtA[i] = 0x12 - } - if len(m.Owner) > 0 { - i -= len(m.Owner) - copy(dAtA[i:], m.Owner) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Owner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventTake) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventTake) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventTake) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Amount) > 0 { - i -= len(m.Amount) - copy(dAtA[i:], m.Amount) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Amount))) - i-- - dAtA[i] = 0x22 - } - if len(m.Credits) > 0 { - for iNdEx := len(m.Credits) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Credits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.BasketDenom) > 0 { - i -= len(m.BasketDenom) - copy(dAtA[i:], m.BasketDenom) - i = encodeVarintEvents(dAtA, i, uint64(len(m.BasketDenom))) - i-- - dAtA[i] = 0x12 - } - if len(m.Owner) > 0 { - i -= len(m.Owner) - copy(dAtA[i:], m.Owner) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Owner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { - offset -= sovEvents(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *EventCreate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BasketDenom) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.Curator) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - return n -} - -func (m *EventPut) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Owner) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.BasketDenom) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - if len(m.Credits) > 0 { - for _, e := range m.Credits { - l = e.Size() - n += 1 + l + sovEvents(uint64(l)) - } - } - l = len(m.Amount) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - return n -} - -func (m *EventTake) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Owner) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.BasketDenom) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - if len(m.Credits) > 0 { - for _, e := range m.Credits { - l = e.Size() - n += 1 + l + sovEvents(uint64(l)) - } - } - l = len(m.Amount) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - return n -} - -func sovEvents(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozEvents(x uint64) (n int) { - return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *EventCreate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventCreate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventCreate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BasketDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BasketDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Curator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Curator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventPut) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventPut: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventPut: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Owner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BasketDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BasketDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Credits = append(m.Credits, &BasketCredit{}) - if err := m.Credits[len(m.Credits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventTake) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventTake: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventTake: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Owner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BasketDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BasketDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Credits = append(m.Credits, &BasketCredit{}) - if err := m.Credits[len(m.Credits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEvents(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvents - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvents - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvents - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthEvents - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEvents - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthEvents - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/ecocredit/basket/v1/query.pb.go b/x/ecocredit/basket/v1/query.pb.go deleted file mode 100644 index 12fee948ef..0000000000 --- a/x/ecocredit/basket/v1/query.pb.go +++ /dev/null @@ -1,2084 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: regen/ecocredit/basket/v1/query.proto - -package v1 - -import ( - context "context" - fmt "fmt" - query "github.com/cosmos/cosmos-sdk/types/query" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryBasketRequest is the Query/Basket request type. -type QueryBasketRequest struct { - // basket_denom represents the denom of the basket to query. - BasketDenom string `protobuf:"bytes,1,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` -} - -func (m *QueryBasketRequest) Reset() { *m = QueryBasketRequest{} } -func (m *QueryBasketRequest) String() string { return proto.CompactTextString(m) } -func (*QueryBasketRequest) ProtoMessage() {} -func (*QueryBasketRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a83a50529e6be723, []int{0} -} -func (m *QueryBasketRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBasketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBasketRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBasketRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBasketRequest.Merge(m, src) -} -func (m *QueryBasketRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryBasketRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBasketRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBasketRequest proto.InternalMessageInfo - -func (m *QueryBasketRequest) GetBasketDenom() string { - if m != nil { - return m.BasketDenom - } - return "" -} - -// QueryBasketResponse is the Query/Basket response type. -type QueryBasketResponse struct { - // basket is the queried basket. - Basket *Basket `protobuf:"bytes,1,opt,name=basket,proto3" json:"basket,omitempty"` - // classes are the credit classes that can be deposited in the basket. - Classes []string `protobuf:"bytes,2,rep,name=classes,proto3" json:"classes,omitempty"` -} - -func (m *QueryBasketResponse) Reset() { *m = QueryBasketResponse{} } -func (m *QueryBasketResponse) String() string { return proto.CompactTextString(m) } -func (*QueryBasketResponse) ProtoMessage() {} -func (*QueryBasketResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a83a50529e6be723, []int{1} -} -func (m *QueryBasketResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBasketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBasketResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBasketResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBasketResponse.Merge(m, src) -} -func (m *QueryBasketResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryBasketResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBasketResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBasketResponse proto.InternalMessageInfo - -func (m *QueryBasketResponse) GetBasket() *Basket { - if m != nil { - return m.Basket - } - return nil -} - -func (m *QueryBasketResponse) GetClasses() []string { - if m != nil { - return m.Classes - } - return nil -} - -// QueryBasketsRequest is the Query/Baskets request type. -type QueryBasketsRequest struct { - // pagination defines an optional pagination for the request. - Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryBasketsRequest) Reset() { *m = QueryBasketsRequest{} } -func (m *QueryBasketsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryBasketsRequest) ProtoMessage() {} -func (*QueryBasketsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a83a50529e6be723, []int{2} -} -func (m *QueryBasketsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBasketsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBasketsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBasketsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBasketsRequest.Merge(m, src) -} -func (m *QueryBasketsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryBasketsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBasketsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBasketsRequest proto.InternalMessageInfo - -func (m *QueryBasketsRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryBasketsResponse is the Query/Baskets response type. -type QueryBasketsResponse struct { - // baskets are the fetched baskets. - Baskets []*Basket `protobuf:"bytes,1,rep,name=baskets,proto3" json:"baskets,omitempty"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryBasketsResponse) Reset() { *m = QueryBasketsResponse{} } -func (m *QueryBasketsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryBasketsResponse) ProtoMessage() {} -func (*QueryBasketsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a83a50529e6be723, []int{3} -} -func (m *QueryBasketsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBasketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBasketsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBasketsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBasketsResponse.Merge(m, src) -} -func (m *QueryBasketsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryBasketsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBasketsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBasketsResponse proto.InternalMessageInfo - -func (m *QueryBasketsResponse) GetBaskets() []*Basket { - if m != nil { - return m.Baskets - } - return nil -} - -func (m *QueryBasketsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryBasketBalancesRequest is the Query/BasketBalances request type. -type QueryBasketBalancesRequest struct { - // basket_denom is the denom of the basket. - BasketDenom string `protobuf:"bytes,1,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryBasketBalancesRequest) Reset() { *m = QueryBasketBalancesRequest{} } -func (m *QueryBasketBalancesRequest) String() string { return proto.CompactTextString(m) } -func (*QueryBasketBalancesRequest) ProtoMessage() {} -func (*QueryBasketBalancesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a83a50529e6be723, []int{4} -} -func (m *QueryBasketBalancesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBasketBalancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBasketBalancesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBasketBalancesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBasketBalancesRequest.Merge(m, src) -} -func (m *QueryBasketBalancesRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryBasketBalancesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBasketBalancesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBasketBalancesRequest proto.InternalMessageInfo - -func (m *QueryBasketBalancesRequest) GetBasketDenom() string { - if m != nil { - return m.BasketDenom - } - return "" -} - -func (m *QueryBasketBalancesRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryBasketBalancesResponse is the Query/BasketBalances response type. -type QueryBasketBalancesResponse struct { - // balances is a list of credit balances in the basket. - Balances []*BasketBalance `protobuf:"bytes,1,rep,name=balances,proto3" json:"balances,omitempty"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryBasketBalancesResponse) Reset() { *m = QueryBasketBalancesResponse{} } -func (m *QueryBasketBalancesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryBasketBalancesResponse) ProtoMessage() {} -func (*QueryBasketBalancesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a83a50529e6be723, []int{5} -} -func (m *QueryBasketBalancesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBasketBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBasketBalancesResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBasketBalancesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBasketBalancesResponse.Merge(m, src) -} -func (m *QueryBasketBalancesResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryBasketBalancesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBasketBalancesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBasketBalancesResponse proto.InternalMessageInfo - -func (m *QueryBasketBalancesResponse) GetBalances() []*BasketBalance { - if m != nil { - return m.Balances - } - return nil -} - -func (m *QueryBasketBalancesResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryBasketBalanceRequest is the Query/BasketBalance request type. -type QueryBasketBalanceRequest struct { - // basket_denom is the denom of the basket. - BasketDenom string `protobuf:"bytes,1,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` - // batch_denom is the denom of the credit batch. - BatchDenom string `protobuf:"bytes,2,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` -} - -func (m *QueryBasketBalanceRequest) Reset() { *m = QueryBasketBalanceRequest{} } -func (m *QueryBasketBalanceRequest) String() string { return proto.CompactTextString(m) } -func (*QueryBasketBalanceRequest) ProtoMessage() {} -func (*QueryBasketBalanceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a83a50529e6be723, []int{6} -} -func (m *QueryBasketBalanceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBasketBalanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBasketBalanceRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBasketBalanceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBasketBalanceRequest.Merge(m, src) -} -func (m *QueryBasketBalanceRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryBasketBalanceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBasketBalanceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBasketBalanceRequest proto.InternalMessageInfo - -func (m *QueryBasketBalanceRequest) GetBasketDenom() string { - if m != nil { - return m.BasketDenom - } - return "" -} - -func (m *QueryBasketBalanceRequest) GetBatchDenom() string { - if m != nil { - return m.BatchDenom - } - return "" -} - -// QueryBasketBalanceResponse is the Query/BasketBalance response type. -type QueryBasketBalanceResponse struct { - // balance is the amount of the queried credit batch in the basket. - Balance string `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` -} - -func (m *QueryBasketBalanceResponse) Reset() { *m = QueryBasketBalanceResponse{} } -func (m *QueryBasketBalanceResponse) String() string { return proto.CompactTextString(m) } -func (*QueryBasketBalanceResponse) ProtoMessage() {} -func (*QueryBasketBalanceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a83a50529e6be723, []int{7} -} -func (m *QueryBasketBalanceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBasketBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBasketBalanceResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBasketBalanceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBasketBalanceResponse.Merge(m, src) -} -func (m *QueryBasketBalanceResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryBasketBalanceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBasketBalanceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBasketBalanceResponse proto.InternalMessageInfo - -func (m *QueryBasketBalanceResponse) GetBalance() string { - if m != nil { - return m.Balance - } - return "" -} - -func init() { - proto.RegisterType((*QueryBasketRequest)(nil), "regen.ecocredit.basket.v1.QueryBasketRequest") - proto.RegisterType((*QueryBasketResponse)(nil), "regen.ecocredit.basket.v1.QueryBasketResponse") - proto.RegisterType((*QueryBasketsRequest)(nil), "regen.ecocredit.basket.v1.QueryBasketsRequest") - proto.RegisterType((*QueryBasketsResponse)(nil), "regen.ecocredit.basket.v1.QueryBasketsResponse") - proto.RegisterType((*QueryBasketBalancesRequest)(nil), "regen.ecocredit.basket.v1.QueryBasketBalancesRequest") - proto.RegisterType((*QueryBasketBalancesResponse)(nil), "regen.ecocredit.basket.v1.QueryBasketBalancesResponse") - proto.RegisterType((*QueryBasketBalanceRequest)(nil), "regen.ecocredit.basket.v1.QueryBasketBalanceRequest") - proto.RegisterType((*QueryBasketBalanceResponse)(nil), "regen.ecocredit.basket.v1.QueryBasketBalanceResponse") -} - -func init() { - proto.RegisterFile("regen/ecocredit/basket/v1/query.proto", fileDescriptor_a83a50529e6be723) -} - -var fileDescriptor_a83a50529e6be723 = []byte{ - // 603 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x3f, 0x6f, 0x13, 0x4f, - 0x10, 0xf5, 0x3a, 0x8a, 0xfd, 0xcb, 0xfa, 0x07, 0xc5, 0x42, 0xe1, 0x1c, 0xe8, 0x70, 0x4e, 0xfc, - 0xb1, 0x22, 0xe5, 0x56, 0x4e, 0x48, 0x50, 0x08, 0x95, 0x15, 0x01, 0xa2, 0x0a, 0x96, 0x68, 0x90, - 0x50, 0xb4, 0x77, 0x1e, 0x5d, 0x4c, 0xec, 0x5b, 0xe7, 0x76, 0x6d, 0x40, 0x28, 0x0d, 0x0d, 0x2d, - 0x12, 0x12, 0x15, 0x15, 0x35, 0xdf, 0x82, 0x86, 0x0a, 0x45, 0xa2, 0xa1, 0xa0, 0x40, 0x36, 0x1f, - 0x04, 0xdd, 0xee, 0x9e, 0xf1, 0x25, 0x4e, 0x7c, 0x8e, 0x28, 0x77, 0xf2, 0xde, 0xcc, 0x7b, 0xef, - 0x66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, 0x19, - 0x6f, 0x74, 0x2e, 0x2b, 0x9d, 0xd7, 0x89, 0x33, 0x5d, 0x27, 0xf9, 0x82, 0xf0, 0xc5, 0xf4, 0x2a, - 0x92, 0xf5, 0x6c, 0xf3, 0x8e, 0x1d, 0x91, 0xb5, 0x31, 0x2b, 0xcd, 0xa8, 0xad, 0x2b, 0xb5, 0xf7, - 0xc8, 0xdd, 0x99, 0x53, 0xa5, 0xa3, 0x7d, 0xff, 0x86, 0xf0, 0x85, 0x54, 0x7b, 0x72, 0x7b, 0x26, - 0x35, 0x89, 0x87, 0xf5, 0x19, 0x59, 0xc6, 0xc2, 0x8e, 0xb2, 0xf0, 0x88, 0x3c, 0x3c, 0xbf, 0x85, - 0xb8, 0x3e, 0xba, 0x93, 0xc3, 0xfa, 0x93, 0xaf, 0x03, 0x1b, 0x1d, 0x0d, 0x6c, 0xf4, 0x6b, 0x60, - 0xa3, 0x77, 0x43, 0x3b, 0x77, 0x34, 0xb4, 0x73, 0x3f, 0x86, 0x76, 0xee, 0xe9, 0x56, 0xd0, 0x92, - 0x7b, 0x3d, 0xcf, 0xf5, 0x79, 0x47, 0x4f, 0x5b, 0x09, 0x41, 0xbe, 0xe0, 0xd1, 0xbe, 0x79, 0xb5, - 0xa1, 0x19, 0x40, 0x44, 0x5f, 0x4e, 0x12, 0xe1, 0x15, 0xd4, 0x2f, 0xd6, 0xda, 0x9f, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x5e, 0xaf, 0x58, 0x7f, 0x66, 0x07, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // Basket queries one basket by denom. - Basket(ctx context.Context, in *QueryBasketRequest, opts ...grpc.CallOption) (*QueryBasketResponse, error) - // Baskets lists all baskets in the ecocredit module. - Baskets(ctx context.Context, in *QueryBasketsRequest, opts ...grpc.CallOption) (*QueryBasketsResponse, error) - // BasketBalances lists the balance of each credit batch in the basket. - BasketBalances(ctx context.Context, in *QueryBasketBalancesRequest, opts ...grpc.CallOption) (*QueryBasketBalancesResponse, error) - // BasketBalance queries the balance of a specific credit batch in the basket. - BasketBalance(ctx context.Context, in *QueryBasketBalanceRequest, opts ...grpc.CallOption) (*QueryBasketBalanceResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Basket(ctx context.Context, in *QueryBasketRequest, opts ...grpc.CallOption) (*QueryBasketResponse, error) { - out := new(QueryBasketResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.basket.v1.Query/Basket", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Baskets(ctx context.Context, in *QueryBasketsRequest, opts ...grpc.CallOption) (*QueryBasketsResponse, error) { - out := new(QueryBasketsResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.basket.v1.Query/Baskets", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) BasketBalances(ctx context.Context, in *QueryBasketBalancesRequest, opts ...grpc.CallOption) (*QueryBasketBalancesResponse, error) { - out := new(QueryBasketBalancesResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.basket.v1.Query/BasketBalances", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) BasketBalance(ctx context.Context, in *QueryBasketBalanceRequest, opts ...grpc.CallOption) (*QueryBasketBalanceResponse, error) { - out := new(QueryBasketBalanceResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.basket.v1.Query/BasketBalance", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // Basket queries one basket by denom. - Basket(context.Context, *QueryBasketRequest) (*QueryBasketResponse, error) - // Baskets lists all baskets in the ecocredit module. - Baskets(context.Context, *QueryBasketsRequest) (*QueryBasketsResponse, error) - // BasketBalances lists the balance of each credit batch in the basket. - BasketBalances(context.Context, *QueryBasketBalancesRequest) (*QueryBasketBalancesResponse, error) - // BasketBalance queries the balance of a specific credit batch in the basket. - BasketBalance(context.Context, *QueryBasketBalanceRequest) (*QueryBasketBalanceResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) Basket(ctx context.Context, req *QueryBasketRequest) (*QueryBasketResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Basket not implemented") -} -func (*UnimplementedQueryServer) Baskets(ctx context.Context, req *QueryBasketsRequest) (*QueryBasketsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Baskets not implemented") -} -func (*UnimplementedQueryServer) BasketBalances(ctx context.Context, req *QueryBasketBalancesRequest) (*QueryBasketBalancesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BasketBalances not implemented") -} -func (*UnimplementedQueryServer) BasketBalance(ctx context.Context, req *QueryBasketBalanceRequest) (*QueryBasketBalanceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BasketBalance not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_Basket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBasketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Basket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.basket.v1.Query/Basket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Basket(ctx, req.(*QueryBasketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Baskets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBasketsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Baskets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.basket.v1.Query/Baskets", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Baskets(ctx, req.(*QueryBasketsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_BasketBalances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBasketBalancesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BasketBalances(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.basket.v1.Query/BasketBalances", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BasketBalances(ctx, req.(*QueryBasketBalancesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_BasketBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBasketBalanceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BasketBalance(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.basket.v1.Query/BasketBalance", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BasketBalance(ctx, req.(*QueryBasketBalanceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "regen.ecocredit.basket.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Basket", - Handler: _Query_Basket_Handler, - }, - { - MethodName: "Baskets", - Handler: _Query_Baskets_Handler, - }, - { - MethodName: "BasketBalances", - Handler: _Query_BasketBalances_Handler, - }, - { - MethodName: "BasketBalance", - Handler: _Query_BasketBalance_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "regen/ecocredit/basket/v1/query.proto", -} - -func (m *QueryBasketRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBasketRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBasketRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BasketDenom) > 0 { - i -= len(m.BasketDenom) - copy(dAtA[i:], m.BasketDenom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.BasketDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryBasketResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBasketResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBasketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Classes) > 0 { - for iNdEx := len(m.Classes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Classes[iNdEx]) - copy(dAtA[i:], m.Classes[iNdEx]) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Classes[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if m.Basket != nil { - { - size, err := m.Basket.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryBasketsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBasketsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBasketsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryBasketsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBasketsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBasketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Baskets) > 0 { - for iNdEx := len(m.Baskets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Baskets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryBasketBalancesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBasketBalancesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBasketBalancesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.BasketDenom) > 0 { - i -= len(m.BasketDenom) - copy(dAtA[i:], m.BasketDenom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.BasketDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryBasketBalancesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBasketBalancesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBasketBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Balances) > 0 { - for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Balances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryBasketBalanceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBasketBalanceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBasketBalanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BatchDenom) > 0 { - i -= len(m.BatchDenom) - copy(dAtA[i:], m.BatchDenom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.BatchDenom))) - i-- - dAtA[i] = 0x12 - } - if len(m.BasketDenom) > 0 { - i -= len(m.BasketDenom) - copy(dAtA[i:], m.BasketDenom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.BasketDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryBasketBalanceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBasketBalanceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBasketBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Balance) > 0 { - i -= len(m.Balance) - copy(dAtA[i:], m.Balance) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Balance))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryBasketRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BasketDenom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryBasketResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Basket != nil { - l = m.Basket.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if len(m.Classes) > 0 { - for _, s := range m.Classes { - l = len(s) - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *QueryBasketsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryBasketsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Baskets) > 0 { - for _, e := range m.Baskets { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryBasketBalancesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BasketDenom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryBasketBalancesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Balances) > 0 { - for _, e := range m.Balances { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryBasketBalanceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BasketDenom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.BatchDenom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryBasketBalanceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Balance) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryBasketRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBasketRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBasketRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BasketDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BasketDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryBasketResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBasketResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBasketResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Basket", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Basket == nil { - m.Basket = &Basket{} - } - if err := m.Basket.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Classes", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Classes = append(m.Classes, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryBasketsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBasketsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBasketsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryBasketsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBasketsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBasketsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Baskets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Baskets = append(m.Baskets, &Basket{}) - if err := m.Baskets[len(m.Baskets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryBasketBalancesRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBasketBalancesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBasketBalancesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BasketDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BasketDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryBasketBalancesResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBasketBalancesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBasketBalancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Balances = append(m.Balances, &BasketBalance{}) - if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryBasketBalanceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBasketBalanceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBasketBalanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BasketDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BasketDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryBasketBalanceResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBasketBalanceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBasketBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Balance = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/ecocredit/basket/v1/query.pb.gw.go b/x/ecocredit/basket/v1/query.pb.gw.go deleted file mode 100644 index 6fa89bf7c1..0000000000 --- a/x/ecocredit/basket/v1/query.pb.gw.go +++ /dev/null @@ -1,514 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: regen/ecocredit/basket/v1/query.proto - -/* -Package v1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package v1 - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - -func request_Query_Basket_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBasketRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["basket_denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "basket_denom") - } - - protoReq.BasketDenom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "basket_denom", err) - } - - msg, err := client.Basket(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Basket_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBasketRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["basket_denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "basket_denom") - } - - protoReq.BasketDenom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "basket_denom", err) - } - - msg, err := server.Basket(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_Baskets_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_Baskets_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBasketsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Baskets_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.Baskets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Baskets_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBasketsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Baskets_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.Baskets(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_BasketBalances_0 = &utilities.DoubleArray{Encoding: map[string]int{"basket_denom": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_Query_BasketBalances_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBasketBalancesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["basket_denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "basket_denom") - } - - protoReq.BasketDenom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "basket_denom", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_BasketBalances_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.BasketBalances(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_BasketBalances_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBasketBalancesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["basket_denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "basket_denom") - } - - protoReq.BasketDenom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "basket_denom", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_BasketBalances_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.BasketBalances(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_BasketBalance_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBasketBalanceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["basket_denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "basket_denom") - } - - protoReq.BasketDenom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "basket_denom", err) - } - - val, ok = pathParams["batch_denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "batch_denom") - } - - protoReq.BatchDenom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "batch_denom", err) - } - - msg, err := client.BasketBalance(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_BasketBalance_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBasketBalanceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["basket_denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "basket_denom") - } - - protoReq.BasketDenom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "basket_denom", err) - } - - val, ok = pathParams["batch_denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "batch_denom") - } - - protoReq.BatchDenom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "batch_denom", err) - } - - msg, err := server.BasketBalance(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". -// UnaryRPC :call QueryServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. -func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - - mux.Handle("GET", pattern_Query_Basket_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Basket_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Basket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Baskets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Baskets_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Baskets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_BasketBalances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_BasketBalances_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_BasketBalances_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_BasketBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_BasketBalance_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_BasketBalance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterQueryHandler(ctx, mux, conn) -} - -// RegisterQueryHandler registers the http handlers for service Query to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) -} - -// RegisterQueryHandlerClient registers the http handlers for service Query -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "QueryClient" to call the correct interceptors. -func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - - mux.Handle("GET", pattern_Query_Basket_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Basket_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Basket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Baskets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Baskets_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Baskets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_BasketBalances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_BasketBalances_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_BasketBalances_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_BasketBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_BasketBalance_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_BasketBalance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Query_Basket_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"regen", "ecocredit", "basket", "v1", "baskets", "basket_denom"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_Baskets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"regen", "ecocredit", "basket", "v1", "baskets"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_BasketBalances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"regen", "ecocredit", "basket", "v1", "baskets", "basket_denom", "balances"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_BasketBalance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"regen", "ecocredit", "basket", "v1", "baskets", "basket_denom", "balances", "batch_denom"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Query_Basket_0 = runtime.ForwardResponseMessage - - forward_Query_Baskets_0 = runtime.ForwardResponseMessage - - forward_Query_BasketBalances_0 = runtime.ForwardResponseMessage - - forward_Query_BasketBalance_0 = runtime.ForwardResponseMessage -) diff --git a/x/ecocredit/basket/v1/state.pb.go b/x/ecocredit/basket/v1/state.pb.go deleted file mode 100644 index 6cf9ed7445..0000000000 --- a/x/ecocredit/basket/v1/state.pb.go +++ /dev/null @@ -1,1157 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: regen/ecocredit/basket/v1/state.proto - -package v1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1alpha1" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Basket represents a basket in state. -type Basket struct { - // id is the uint64 ID of the basket. It is used internally for reducing - // storage space. - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // basket_denom is the basket bank denom. - BasketDenom string `protobuf:"bytes,2,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` - // name is the unique name of the basket specified in MsgCreate. Basket - // names must be unique across all credit types and choices of exponent - // above and beyond the uniqueness constraint on basket_denom. - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - // disable_auto_retire indicates whether or not the credits will be retired upon withdraw from the basket. - DisableAutoRetire bool `protobuf:"varint,4,opt,name=disable_auto_retire,json=disableAutoRetire,proto3" json:"disable_auto_retire,omitempty"` - // credit_type_abbrev is the abbreviation of the credit type this basket is able to hold. - CreditTypeAbbrev string `protobuf:"bytes,5,opt,name=credit_type_abbrev,json=creditTypeAbbrev,proto3" json:"credit_type_abbrev,omitempty"` - // date_criteria is the date criteria for batches admitted to the basket. - DateCriteria *DateCriteria `protobuf:"bytes,6,opt,name=date_criteria,json=dateCriteria,proto3" json:"date_criteria,omitempty"` - // exponent is the exponent for converting credits to/from basket tokens. - Exponent uint32 `protobuf:"varint,7,opt,name=exponent,proto3" json:"exponent,omitempty"` -} - -func (m *Basket) Reset() { *m = Basket{} } -func (m *Basket) String() string { return proto.CompactTextString(m) } -func (*Basket) ProtoMessage() {} -func (*Basket) Descriptor() ([]byte, []int) { - return fileDescriptor_c416a19075224f85, []int{0} -} -func (m *Basket) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Basket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Basket.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Basket) XXX_Merge(src proto.Message) { - xxx_messageInfo_Basket.Merge(m, src) -} -func (m *Basket) XXX_Size() int { - return m.Size() -} -func (m *Basket) XXX_DiscardUnknown() { - xxx_messageInfo_Basket.DiscardUnknown(m) -} - -var xxx_messageInfo_Basket proto.InternalMessageInfo - -func (m *Basket) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *Basket) GetBasketDenom() string { - if m != nil { - return m.BasketDenom - } - return "" -} - -func (m *Basket) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Basket) GetDisableAutoRetire() bool { - if m != nil { - return m.DisableAutoRetire - } - return false -} - -func (m *Basket) GetCreditTypeAbbrev() string { - if m != nil { - return m.CreditTypeAbbrev - } - return "" -} - -func (m *Basket) GetDateCriteria() *DateCriteria { - if m != nil { - return m.DateCriteria - } - return nil -} - -func (m *Basket) GetExponent() uint32 { - if m != nil { - return m.Exponent - } - return 0 -} - -// BasketClass describes a credit class that can be deposited in a basket. -type BasketClass struct { - // basket_id is the ID of the basket - BasketId uint64 `protobuf:"varint,1,opt,name=basket_id,json=basketId,proto3" json:"basket_id,omitempty"` - // class_id is the id of the credit class that is allowed to be deposited in the basket - ClassId string `protobuf:"bytes,2,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` -} - -func (m *BasketClass) Reset() { *m = BasketClass{} } -func (m *BasketClass) String() string { return proto.CompactTextString(m) } -func (*BasketClass) ProtoMessage() {} -func (*BasketClass) Descriptor() ([]byte, []int) { - return fileDescriptor_c416a19075224f85, []int{1} -} -func (m *BasketClass) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BasketClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BasketClass.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BasketClass) XXX_Merge(src proto.Message) { - xxx_messageInfo_BasketClass.Merge(m, src) -} -func (m *BasketClass) XXX_Size() int { - return m.Size() -} -func (m *BasketClass) XXX_DiscardUnknown() { - xxx_messageInfo_BasketClass.DiscardUnknown(m) -} - -var xxx_messageInfo_BasketClass proto.InternalMessageInfo - -func (m *BasketClass) GetBasketId() uint64 { - if m != nil { - return m.BasketId - } - return 0 -} - -func (m *BasketClass) GetClassId() string { - if m != nil { - return m.ClassId - } - return "" -} - -// BasketBalance stores the amount of credits from a batch in a basket -type BasketBalance struct { - // basket_id is the ID of the basket - BasketId uint64 `protobuf:"varint,1,opt,name=basket_id,json=basketId,proto3" json:"basket_id,omitempty"` - // batch_denom is the denom of the credit batch - BatchDenom string `protobuf:"bytes,2,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` - // balance is the amount of ecocredits held in the basket - Balance string `protobuf:"bytes,3,opt,name=balance,proto3" json:"balance,omitempty"` - // batch_start_date is the start date of the batch. This field is used - // to create an index which is used to remove the oldest credits first. - BatchStartDate *types.Timestamp `protobuf:"bytes,4,opt,name=batch_start_date,json=batchStartDate,proto3" json:"batch_start_date,omitempty"` -} - -func (m *BasketBalance) Reset() { *m = BasketBalance{} } -func (m *BasketBalance) String() string { return proto.CompactTextString(m) } -func (*BasketBalance) ProtoMessage() {} -func (*BasketBalance) Descriptor() ([]byte, []int) { - return fileDescriptor_c416a19075224f85, []int{2} -} -func (m *BasketBalance) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BasketBalance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BasketBalance.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BasketBalance) XXX_Merge(src proto.Message) { - xxx_messageInfo_BasketBalance.Merge(m, src) -} -func (m *BasketBalance) XXX_Size() int { - return m.Size() -} -func (m *BasketBalance) XXX_DiscardUnknown() { - xxx_messageInfo_BasketBalance.DiscardUnknown(m) -} - -var xxx_messageInfo_BasketBalance proto.InternalMessageInfo - -func (m *BasketBalance) GetBasketId() uint64 { - if m != nil { - return m.BasketId - } - return 0 -} - -func (m *BasketBalance) GetBatchDenom() string { - if m != nil { - return m.BatchDenom - } - return "" -} - -func (m *BasketBalance) GetBalance() string { - if m != nil { - return m.Balance - } - return "" -} - -func (m *BasketBalance) GetBatchStartDate() *types.Timestamp { - if m != nil { - return m.BatchStartDate - } - return nil -} - -func init() { - proto.RegisterType((*Basket)(nil), "regen.ecocredit.basket.v1.Basket") - proto.RegisterType((*BasketClass)(nil), "regen.ecocredit.basket.v1.BasketClass") - proto.RegisterType((*BasketBalance)(nil), "regen.ecocredit.basket.v1.BasketBalance") -} - -func init() { - proto.RegisterFile("regen/ecocredit/basket/v1/state.proto", fileDescriptor_c416a19075224f85) -} - -var fileDescriptor_c416a19075224f85 = []byte{ - // 551 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0xc1, 0x6e, 0xd3, 0x4c, - 0x10, 0xee, 0xa6, 0xfd, 0xd3, 0x74, 0xd2, 0x56, 0xfe, 0x17, 0x10, 0xdb, 0x20, 0xdc, 0x10, 0x09, - 0x11, 0xa1, 0x62, 0x93, 0x72, 0x4b, 0x4f, 0x49, 0x73, 0xa9, 0xc4, 0xc9, 0x94, 0x0b, 0x17, 0x6b, - 0x6d, 0x0f, 0x89, 0x55, 0xdb, 0x6b, 0xad, 0x37, 0xa1, 0x7d, 0x09, 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 0x48, 0x47, 0x60, 0x19, 0x6b, 0xa1, 0xb8, 0x54, - 0x7e, 0x19, 0x9d, 0xde, 0x63, 0xf3, 0xb8, 0xe5, 0x98, 0xfb, 0x73, 0x96, 0xf7, 0xe7, 0x9c, 0x2f, - 0xef, 0xcf, 0xdb, 0xd7, 0x9e, 0x37, 0xa5, 0xa5, 0x8c, 0xbe, 0x3f, 0xd0, 0xef, 0x39, 0x81, 0x87, - 0xf0, 0x60, 0xfd, 0x9e, 0x1b, 0x23, 0x51, 0x1b, 0x5a, 0x7f, 0x12, 0xeb, 0x86, 0x16, 0x61, 0x9b, - 0xc3, 0xb7, 0x5f, 0xe6, 0x36, 0xb9, 0x9e, 0xdb, 0xe4, 0xc7, 0xdc, 0x26, 0x9f, 0x16, 0xf6, 0xc6, - 0xf5, 0xc2, 0xde, 0xf8, 0xbe, 0xb0, 0x37, 0xde, 0x9d, 0x8c, 0x63, 0x35, 0x99, 0x06, 0x4e, 0x28, - 0x52, 0x57, 0x9f, 0xc0, 0x8b, 0x0c, 0xd5, 0x07, 0x21, 0x2f, 0x2a, 0x94, 0x60, 0x34, 0x46, 0xe9, - 0x5e, 0xfe, 0xed, 0x8f, 0x10, 0xd4, 0xf5, 0xf4, 0xaf, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x84, - 0x7d, 0xcd, 0x80, 0xae, 0x03, 0x00, 0x00, -} - -func (m *Basket) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Basket) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Basket) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Exponent != 0 { - i = encodeVarintState(dAtA, i, uint64(m.Exponent)) - i-- - dAtA[i] = 0x38 - } - if m.DateCriteria != nil { - { - size, err := m.DateCriteria.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintState(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if len(m.CreditTypeAbbrev) > 0 { - i -= len(m.CreditTypeAbbrev) - copy(dAtA[i:], m.CreditTypeAbbrev) - i = encodeVarintState(dAtA, i, uint64(len(m.CreditTypeAbbrev))) - i-- - dAtA[i] = 0x2a - } - if m.DisableAutoRetire { - i-- - if m.DisableAutoRetire { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintState(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - } - if len(m.BasketDenom) > 0 { - i -= len(m.BasketDenom) - copy(dAtA[i:], m.BasketDenom) - i = encodeVarintState(dAtA, i, uint64(len(m.BasketDenom))) - i-- - dAtA[i] = 0x12 - } - if m.Id != 0 { - i = encodeVarintState(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *BasketClass) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BasketClass) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BasketClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ClassId) > 0 { - i -= len(m.ClassId) - copy(dAtA[i:], m.ClassId) - i = encodeVarintState(dAtA, i, uint64(len(m.ClassId))) - i-- - dAtA[i] = 0x12 - } - if m.BasketId != 0 { - i = encodeVarintState(dAtA, i, uint64(m.BasketId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *BasketBalance) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BasketBalance) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BasketBalance) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BatchStartDate != nil { - { - size, err := m.BatchStartDate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintState(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.Balance) > 0 { - i -= len(m.Balance) - copy(dAtA[i:], m.Balance) - i = encodeVarintState(dAtA, i, uint64(len(m.Balance))) - i-- - dAtA[i] = 0x1a - } - if len(m.BatchDenom) > 0 { - i -= len(m.BatchDenom) - copy(dAtA[i:], m.BatchDenom) - i = encodeVarintState(dAtA, i, uint64(len(m.BatchDenom))) - i-- - dAtA[i] = 0x12 - } - if m.BasketId != 0 { - i = encodeVarintState(dAtA, i, uint64(m.BasketId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintState(dAtA []byte, offset int, v uint64) int { - offset -= sovState(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Basket) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovState(uint64(m.Id)) - } - l = len(m.BasketDenom) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - if m.DisableAutoRetire { - n += 2 - } - l = len(m.CreditTypeAbbrev) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - if m.DateCriteria != nil { - l = m.DateCriteria.Size() - n += 1 + l + sovState(uint64(l)) - } - if m.Exponent != 0 { - n += 1 + sovState(uint64(m.Exponent)) - } - return n -} - -func (m *BasketClass) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BasketId != 0 { - n += 1 + sovState(uint64(m.BasketId)) - } - l = len(m.ClassId) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - return n -} - -func (m *BasketBalance) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BasketId != 0 { - n += 1 + sovState(uint64(m.BasketId)) - } - l = len(m.BatchDenom) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - l = len(m.Balance) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - if m.BatchStartDate != nil { - l = m.BatchStartDate.Size() - n += 1 + l + sovState(uint64(l)) - } - return n -} - -func sovState(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozState(x uint64) (n int) { - return sovState(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Basket) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Basket: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Basket: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BasketDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BasketDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DisableAutoRetire", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DisableAutoRetire = bool(v != 0) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreditTypeAbbrev", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CreditTypeAbbrev = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DateCriteria", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DateCriteria == nil { - m.DateCriteria = &DateCriteria{} - } - if err := m.DateCriteria.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Exponent", wireType) - } - m.Exponent = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Exponent |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipState(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthState - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BasketClass) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BasketClass: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BasketClass: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BasketId", wireType) - } - m.BasketId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BasketId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipState(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthState - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BasketBalance) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BasketBalance: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BasketBalance: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BasketId", wireType) - } - m.BasketId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BasketId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Balance = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchStartDate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BatchStartDate == nil { - m.BatchStartDate = &types.Timestamp{} - } - if err := m.BatchStartDate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipState(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthState - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipState(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowState - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowState - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowState - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthState - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupState - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthState - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthState = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowState = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupState = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/ecocredit/basket/v1/tx.pb.go b/x/ecocredit/basket/v1/tx.pb.go deleted file mode 100644 index 5a57b9aef1..0000000000 --- a/x/ecocredit/basket/v1/tx.pb.go +++ /dev/null @@ -1,2164 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: regen/ecocredit/basket/v1/tx.proto - -package v1 - -import ( - context "context" - fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// MsgCreateBasket is the Msg/CreateBasket request type. -type MsgCreate struct { - // curator is the address of the basket curator who is able to change certain - // basket settings. - Curator string `protobuf:"bytes,1,opt,name=curator,proto3" json:"curator,omitempty"` - // name will be used to together with prefix to create a bank denom for this - // basket token. It can be between 3-8 alphanumeric characters, with the - // first character being alphabetic. - // - // The bank denom will be formed from name, credit type and exponent and be - // of the form `eco..` where prefix - // is derived from exponent. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // description is a human-readable description of the basket denom that should - // be at most 256 characters. - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // exponent is the exponent that will be used for converting credits to basket - // tokens and for bank denom metadata. It also limits the precision of - // credit amounts when putting credits into a basket. An exponent of 6 will - // mean that 10^6 units of a basket token will be issued for 1.0 credits and that - // this should be displayed as one unit in user interfaces. It also means - // that the maximum precision of credit amounts is 6 decimal places so that - // the need to round is eliminated. The exponent must be >= the precision of - // the credit type at the time the basket is created and be of one of the - // following values 0, 1, 2, 3, 6, 9, 12, 15, 18, 21, or 24 which correspond - // to the exponents which have an official SI prefix. - // - // The exponent will be used to form the prefix part of the the bank denom - // and will be mapped as follows: - // 0 - no prefix - // 1 - d (deci) - // 2 - c (centi) - // 3 - m (milli) - // 6 - u (micro) - // 9 - n (nano) - // 12 - p (pico) - // 15 - f (femto) - // 18 - a (atto) - // 21 - z (zepto) - // 24 - y (yocto) - Exponent uint32 `protobuf:"varint,4,opt,name=exponent,proto3" json:"exponent,omitempty"` - // disable_auto_retire allows auto-retirement to be disabled. - // The credits will be auto-retired if disable_auto_retire is - // false unless the credits were previously put into the basket by the - // address picking them from the basket, in which case they will remain - // tradable. - DisableAutoRetire bool `protobuf:"varint,5,opt,name=disable_auto_retire,json=disableAutoRetire,proto3" json:"disable_auto_retire,omitempty"` - // credit_type_abbrev is the abbreviation of the credit type this basket is - // able to hold. - CreditTypeAbbrev string `protobuf:"bytes,6,opt,name=credit_type_abbrev,json=creditTypeAbbrev,proto3" json:"credit_type_abbrev,omitempty"` - // allowed_classes are the credit classes allowed to be put in the basket - AllowedClasses []string `protobuf:"bytes,7,rep,name=allowed_classes,json=allowedClasses,proto3" json:"allowed_classes,omitempty"` - // date_criteria is the date criteria for batches admitted to the basket. - // At most, only one of the fields in the date_criteria should be set. - DateCriteria *DateCriteria `protobuf:"bytes,8,opt,name=date_criteria,json=dateCriteria,proto3" json:"date_criteria,omitempty"` - // fee is the fee that the curator will pay to create the basket. It must be - // >= the required Params.basket_creation_fee. We include the fee explicitly - // here so that the curator explicitly acknowledges paying this fee and - // is not surprised to learn that the paid a big fee and didn't know - // beforehand. - Fee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,9,rep,name=fee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"fee"` -} - -func (m *MsgCreate) Reset() { *m = MsgCreate{} } -func (m *MsgCreate) String() string { return proto.CompactTextString(m) } -func (*MsgCreate) ProtoMessage() {} -func (*MsgCreate) Descriptor() ([]byte, []int) { - return fileDescriptor_a60f962a3c61f018, []int{0} -} -func (m *MsgCreate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreate.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCreate) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreate.Merge(m, src) -} -func (m *MsgCreate) XXX_Size() int { - return m.Size() -} -func (m *MsgCreate) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreate.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreate proto.InternalMessageInfo - -func (m *MsgCreate) GetCurator() string { - if m != nil { - return m.Curator - } - return "" -} - -func (m *MsgCreate) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *MsgCreate) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *MsgCreate) GetExponent() uint32 { - if m != nil { - return m.Exponent - } - return 0 -} - -func (m *MsgCreate) GetDisableAutoRetire() bool { - if m != nil { - return m.DisableAutoRetire - } - return false -} - -func (m *MsgCreate) GetCreditTypeAbbrev() string { - if m != nil { - return m.CreditTypeAbbrev - } - return "" -} - -func (m *MsgCreate) GetAllowedClasses() []string { - if m != nil { - return m.AllowedClasses - } - return nil -} - -func (m *MsgCreate) GetDateCriteria() *DateCriteria { - if m != nil { - return m.DateCriteria - } - return nil -} - -func (m *MsgCreate) GetFee() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.Fee - } - return nil -} - -// MsgCreateBasketResponse is the Msg/CreateBasket response type. -type MsgCreateResponse struct { - // basket_denom is the unique denomination ID of the newly created basket. - BasketDenom string `protobuf:"bytes,1,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` -} - -func (m *MsgCreateResponse) Reset() { *m = MsgCreateResponse{} } -func (m *MsgCreateResponse) String() string { return proto.CompactTextString(m) } -func (*MsgCreateResponse) ProtoMessage() {} -func (*MsgCreateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a60f962a3c61f018, []int{1} -} -func (m *MsgCreateResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCreateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateResponse.Merge(m, src) -} -func (m *MsgCreateResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateResponse proto.InternalMessageInfo - -func (m *MsgCreateResponse) GetBasketDenom() string { - if m != nil { - return m.BasketDenom - } - return "" -} - -// MsgAddToBasket is the Msg/AddToBasket request type. -type MsgPut struct { - // owner is the owner of credits being put into the basket. - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - // basket_denom is the basket denom to add credits to. - BasketDenom string `protobuf:"bytes,2,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` - // credits are credits to add to the basket. If they do not match the basket's - // admission criteria the operation will fail. If there are any "dust" credits - // left over when converting credits to basket tokens, these credits will - // not be converted to basket tokens and instead remain with the owner. - Credits []*BasketCredit `protobuf:"bytes,3,rep,name=credits,proto3" json:"credits,omitempty"` -} - -func (m *MsgPut) Reset() { *m = MsgPut{} } -func (m *MsgPut) String() string { return proto.CompactTextString(m) } -func (*MsgPut) ProtoMessage() {} -func (*MsgPut) Descriptor() ([]byte, []int) { - return fileDescriptor_a60f962a3c61f018, []int{2} -} -func (m *MsgPut) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgPut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgPut.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgPut) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgPut.Merge(m, src) -} -func (m *MsgPut) XXX_Size() int { - return m.Size() -} -func (m *MsgPut) XXX_DiscardUnknown() { - xxx_messageInfo_MsgPut.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgPut proto.InternalMessageInfo - -func (m *MsgPut) GetOwner() string { - if m != nil { - return m.Owner - } - return "" -} - -func (m *MsgPut) GetBasketDenom() string { - if m != nil { - return m.BasketDenom - } - return "" -} - -func (m *MsgPut) GetCredits() []*BasketCredit { - if m != nil { - return m.Credits - } - return nil -} - -// MsgAddToBasketResponse is the Msg/AddToBasket response type. -type MsgPutResponse struct { - // amount_received is the integer amount of basket tokens received. - AmountReceived string `protobuf:"bytes,1,opt,name=amount_received,json=amountReceived,proto3" json:"amount_received,omitempty"` -} - -func (m *MsgPutResponse) Reset() { *m = MsgPutResponse{} } -func (m *MsgPutResponse) String() string { return proto.CompactTextString(m) } -func (*MsgPutResponse) ProtoMessage() {} -func (*MsgPutResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a60f962a3c61f018, []int{3} -} -func (m *MsgPutResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgPutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgPutResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgPutResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgPutResponse.Merge(m, src) -} -func (m *MsgPutResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgPutResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgPutResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgPutResponse proto.InternalMessageInfo - -func (m *MsgPutResponse) GetAmountReceived() string { - if m != nil { - return m.AmountReceived - } - return "" -} - -// MsgTakeFromBasket is the Msg/TakeFromBasket request type. -type MsgTake struct { - // owner is the owner of the basket tokens. - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - // basket_denom is the basket bank denom to take credits from. - BasketDenom string `protobuf:"bytes,2,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` - // amount is the integer number of basket tokens to convert into credits. - Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` - // retirement_location is the optional retirement location for the credits - // which will be used only if retire_on_take is true for this basket. - RetirementLocation string `protobuf:"bytes,4,opt,name=retirement_location,json=retirementLocation,proto3" json:"retirement_location,omitempty"` - // retire_on_take is a boolean that dictates whether the ecocredits - // received in exchange for the basket tokens will be received as - // retired or tradable credits. - RetireOnTake bool `protobuf:"varint,5,opt,name=retire_on_take,json=retireOnTake,proto3" json:"retire_on_take,omitempty"` -} - -func (m *MsgTake) Reset() { *m = MsgTake{} } -func (m *MsgTake) String() string { return proto.CompactTextString(m) } -func (*MsgTake) ProtoMessage() {} -func (*MsgTake) Descriptor() ([]byte, []int) { - return fileDescriptor_a60f962a3c61f018, []int{4} -} -func (m *MsgTake) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgTake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgTake.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgTake) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgTake.Merge(m, src) -} -func (m *MsgTake) XXX_Size() int { - return m.Size() -} -func (m *MsgTake) XXX_DiscardUnknown() { - xxx_messageInfo_MsgTake.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgTake proto.InternalMessageInfo - -func (m *MsgTake) GetOwner() string { - if m != nil { - return m.Owner - } - return "" -} - -func (m *MsgTake) GetBasketDenom() string { - if m != nil { - return m.BasketDenom - } - return "" -} - -func (m *MsgTake) GetAmount() string { - if m != nil { - return m.Amount - } - return "" -} - -func (m *MsgTake) GetRetirementLocation() string { - if m != nil { - return m.RetirementLocation - } - return "" -} - -func (m *MsgTake) GetRetireOnTake() bool { - if m != nil { - return m.RetireOnTake - } - return false -} - -// MsgTakeFromBasketResponse is the Msg/TakeFromBasket response type. -type MsgTakeResponse struct { - // credits are the credits taken out of the basket. - Credits []*BasketCredit `protobuf:"bytes,1,rep,name=credits,proto3" json:"credits,omitempty"` -} - -func (m *MsgTakeResponse) Reset() { *m = MsgTakeResponse{} } -func (m *MsgTakeResponse) String() string { return proto.CompactTextString(m) } -func (*MsgTakeResponse) ProtoMessage() {} -func (*MsgTakeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a60f962a3c61f018, []int{5} -} -func (m *MsgTakeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgTakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgTakeResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgTakeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgTakeResponse.Merge(m, src) -} -func (m *MsgTakeResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgTakeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgTakeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgTakeResponse proto.InternalMessageInfo - -func (m *MsgTakeResponse) GetCredits() []*BasketCredit { - if m != nil { - return m.Credits - } - return nil -} - -func init() { - proto.RegisterType((*MsgCreate)(nil), "regen.ecocredit.basket.v1.MsgCreate") - proto.RegisterType((*MsgCreateResponse)(nil), "regen.ecocredit.basket.v1.MsgCreateResponse") - proto.RegisterType((*MsgPut)(nil), "regen.ecocredit.basket.v1.MsgPut") - proto.RegisterType((*MsgPutResponse)(nil), "regen.ecocredit.basket.v1.MsgPutResponse") - proto.RegisterType((*MsgTake)(nil), "regen.ecocredit.basket.v1.MsgTake") - proto.RegisterType((*MsgTakeResponse)(nil), "regen.ecocredit.basket.v1.MsgTakeResponse") -} - -func init() { - proto.RegisterFile("regen/ecocredit/basket/v1/tx.proto", fileDescriptor_a60f962a3c61f018) -} - -var fileDescriptor_a60f962a3c61f018 = []byte{ - // 686 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4f, 0x4f, 0xdb, 0x48, - 0x14, 0x8f, 0x71, 0x48, 0xc8, 0x04, 0xc2, 0x32, 0xa0, 0x95, 0xc9, 0x21, 0x04, 0x8b, 0x15, 0xd9, - 0x15, 0xd8, 0x1b, 0x56, 0x5a, 0xa9, 0xea, 0x09, 0xc2, 0x91, 0xa8, 0xc8, 0xa5, 0x3d, 0x54, 0xad, - 0xac, 0x89, 0xfd, 0xea, 0x5a, 0x49, 0x66, 0xa2, 0x99, 0x49, 0x80, 0x7b, 0x3f, 0x00, 0x9f, 0xa3, - 0x3d, 0xf5, 0x5b, 0x70, 0xe4, 0xd8, 0x53, 0x5b, 0xc1, 0x17, 0xa9, 0x3c, 0x33, 0x71, 0x23, 0xd1, - 0x86, 0x8a, 0x93, 0xe7, 0xfd, 0xde, 0xef, 0xfd, 0xfc, 0xfe, 0xcd, 0x20, 0x97, 0x43, 0x02, 0xd4, - 0x87, 0x88, 0x45, 0x1c, 0xe2, 0x54, 0xfa, 0x3d, 0x22, 0xfa, 0x20, 0xfd, 0x49, 0xdb, 0x97, 0x17, - 0xde, 0x88, 0x33, 0xc9, 0xf0, 0xa6, 0xe2, 0x78, 0x39, 0xc7, 0xd3, 0x1c, 0x6f, 0xd2, 0xae, 0x6f, - 0x24, 0x2c, 0x61, 0x8a, 0xe5, 0x67, 0x27, 0x1d, 0x50, 0xff, 0x6b, 0x8e, 0xe8, 0xe5, 0x08, 0x84, - 0xa1, 0x35, 0x22, 0x26, 0x86, 0x4c, 0x64, 0x5e, 0xf0, 0x27, 0xed, 0x1e, 0x48, 0xd2, 0xf6, 0x23, - 0x96, 0x52, 0xed, 0x77, 0x3f, 0xda, 0xa8, 0xd2, 0x15, 0x49, 0x87, 0x03, 0x91, 0x80, 0x1d, 0x54, - 0x8e, 0xc6, 0x9c, 0x48, 0xc6, 0x1d, 0xab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 0xd3, 0x3d, 0x43, 0xab, 0x26, 0xe5, 0xbc, 0xde, 0x99, 0x26, - 0x5a, 0x8f, 0x6b, 0xe2, 0xc1, 0xd5, 0x02, 0xb2, 0xbb, 0x22, 0xc1, 0xaf, 0x51, 0xc9, 0xdc, 0xda, - 0x9d, 0x39, 0x1a, 0xf9, 0xba, 0xd4, 0xf7, 0x7e, 0x87, 0x95, 0x27, 0xfa, 0x1c, 0xd9, 0xd9, 0xb6, - 0x6c, 0xcf, 0x0f, 0x3a, 0x1d, 0xcb, 0xfa, 0xdf, 0x0f, 0x52, 0x72, 0xd1, 0x97, 0xa8, 0xa8, 0x06, - 0xe8, 0xce, 0x0f, 0xc9, 0x38, 0xf5, 0x7f, 0x1e, 0xe6, 0x4c, 0x75, 0x8f, 0x5e, 0x5c, 0xdf, 0x36, - 0xac, 0x9b, 0xdb, 0x86, 0xf5, 0xed, 0xb6, 0x61, 0x5d, 0xdd, 0x35, 0x0a, 0x37, 0x77, 0x8d, 0xc2, - 0xe7, 0xbb, 0x46, 0xe1, 0xd5, 0xd3, 0x99, 0xfb, 0xa5, 0xf4, 0xf6, 0x29, 0xc8, 0x73, 0xc6, 0xfb, - 0xc6, 0x1a, 0x40, 0x9c, 0x00, 0xf7, 0x2f, 0x7e, 0xf6, 0x8e, 0xf6, 0x4a, 0xea, 0x89, 0xfc, 0xef, - 0x7b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbf, 0x2e, 0x2f, 0x20, 0xc0, 0x05, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MsgClient interface { - // Create creates a bank denom which wraps credits. - Create(ctx context.Context, in *MsgCreate, opts ...grpc.CallOption) (*MsgCreateResponse, error) - // Put puts credits into a basket in return for basket tokens. - Put(ctx context.Context, in *MsgPut, opts ...grpc.CallOption) (*MsgPutResponse, error) - // Take takes credits from a basket starting from the oldest - // credits first. - Take(ctx context.Context, in *MsgTake, opts ...grpc.CallOption) (*MsgTakeResponse, error) -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) Create(ctx context.Context, in *MsgCreate, opts ...grpc.CallOption) (*MsgCreateResponse, error) { - out := new(MsgCreateResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.basket.v1.Msg/Create", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) Put(ctx context.Context, in *MsgPut, opts ...grpc.CallOption) (*MsgPutResponse, error) { - out := new(MsgPutResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.basket.v1.Msg/Put", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) Take(ctx context.Context, in *MsgTake, opts ...grpc.CallOption) (*MsgTakeResponse, error) { - out := new(MsgTakeResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.basket.v1.Msg/Take", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { - // Create creates a bank denom which wraps credits. - Create(context.Context, *MsgCreate) (*MsgCreateResponse, error) - // Put puts credits into a basket in return for basket tokens. - Put(context.Context, *MsgPut) (*MsgPutResponse, error) - // Take takes credits from a basket starting from the oldest - // credits first. - Take(context.Context, *MsgTake) (*MsgTakeResponse, error) -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (*UnimplementedMsgServer) Create(ctx context.Context, req *MsgCreate) (*MsgCreateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") -} -func (*UnimplementedMsgServer) Put(ctx context.Context, req *MsgPut) (*MsgPutResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Put not implemented") -} -func (*UnimplementedMsgServer) Take(ctx context.Context, req *MsgTake) (*MsgTakeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Take not implemented") -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -func _Msg_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreate) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Create(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.basket.v1.Msg/Create", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Create(ctx, req.(*MsgCreate)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_Put_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgPut) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Put(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.basket.v1.Msg/Put", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Put(ctx, req.(*MsgPut)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_Take_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgTake) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Take(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.basket.v1.Msg/Take", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Take(ctx, req.(*MsgTake)) - } - return interceptor(ctx, in, info, handler) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "regen.ecocredit.basket.v1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Create", - Handler: _Msg_Create_Handler, - }, - { - MethodName: "Put", - Handler: _Msg_Put_Handler, - }, - { - MethodName: "Take", - Handler: _Msg_Take_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "regen/ecocredit/basket/v1/tx.proto", -} - -func (m *MsgCreate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCreate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Fee) > 0 { - for iNdEx := len(m.Fee) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Fee[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - } - if m.DateCriteria != nil { - { - size, err := m.DateCriteria.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if len(m.AllowedClasses) > 0 { - for iNdEx := len(m.AllowedClasses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AllowedClasses[iNdEx]) - copy(dAtA[i:], m.AllowedClasses[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.AllowedClasses[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(m.CreditTypeAbbrev) > 0 { - i -= len(m.CreditTypeAbbrev) - copy(dAtA[i:], m.CreditTypeAbbrev) - i = encodeVarintTx(dAtA, i, uint64(len(m.CreditTypeAbbrev))) - i-- - dAtA[i] = 0x32 - } - if m.DisableAutoRetire { - i-- - if m.DisableAutoRetire { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.Exponent != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.Exponent)) - i-- - dAtA[i] = 0x20 - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintTx(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x1a - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.Curator) > 0 { - i -= len(m.Curator) - copy(dAtA[i:], m.Curator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Curator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgCreateResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCreateResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BasketDenom) > 0 { - i -= len(m.BasketDenom) - copy(dAtA[i:], m.BasketDenom) - i = encodeVarintTx(dAtA, i, uint64(len(m.BasketDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgPut) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgPut) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgPut) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Credits) > 0 { - for iNdEx := len(m.Credits) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Credits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.BasketDenom) > 0 { - i -= len(m.BasketDenom) - copy(dAtA[i:], m.BasketDenom) - i = encodeVarintTx(dAtA, i, uint64(len(m.BasketDenom))) - i-- - dAtA[i] = 0x12 - } - if len(m.Owner) > 0 { - i -= len(m.Owner) - copy(dAtA[i:], m.Owner) - i = encodeVarintTx(dAtA, i, uint64(len(m.Owner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgPutResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgPutResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgPutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AmountReceived) > 0 { - i -= len(m.AmountReceived) - copy(dAtA[i:], m.AmountReceived) - i = encodeVarintTx(dAtA, i, uint64(len(m.AmountReceived))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgTake) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgTake) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgTake) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RetireOnTake { - i-- - if m.RetireOnTake { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if len(m.RetirementLocation) > 0 { - i -= len(m.RetirementLocation) - copy(dAtA[i:], m.RetirementLocation) - i = encodeVarintTx(dAtA, i, uint64(len(m.RetirementLocation))) - i-- - dAtA[i] = 0x22 - } - if len(m.Amount) > 0 { - i -= len(m.Amount) - copy(dAtA[i:], m.Amount) - i = encodeVarintTx(dAtA, i, uint64(len(m.Amount))) - i-- - dAtA[i] = 0x1a - } - if len(m.BasketDenom) > 0 { - i -= len(m.BasketDenom) - copy(dAtA[i:], m.BasketDenom) - i = encodeVarintTx(dAtA, i, uint64(len(m.BasketDenom))) - i-- - dAtA[i] = 0x12 - } - if len(m.Owner) > 0 { - i -= len(m.Owner) - copy(dAtA[i:], m.Owner) - i = encodeVarintTx(dAtA, i, uint64(len(m.Owner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgTakeResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgTakeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgTakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Credits) > 0 { - for iNdEx := len(m.Credits) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Credits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgCreate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Curator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.Exponent != 0 { - n += 1 + sovTx(uint64(m.Exponent)) - } - if m.DisableAutoRetire { - n += 2 - } - l = len(m.CreditTypeAbbrev) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.AllowedClasses) > 0 { - for _, s := range m.AllowedClasses { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - if m.DateCriteria != nil { - l = m.DateCriteria.Size() - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Fee) > 0 { - for _, e := range m.Fee { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func (m *MsgCreateResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BasketDenom) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgPut) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Owner) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.BasketDenom) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Credits) > 0 { - for _, e := range m.Credits { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func (m *MsgPutResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AmountReceived) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgTake) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Owner) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.BasketDenom) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Amount) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.RetirementLocation) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.RetireOnTake { - n += 2 - } - return n -} - -func (m *MsgTakeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Credits) > 0 { - for _, e := range m.Credits { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgCreate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCreate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Curator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Curator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Exponent", wireType) - } - m.Exponent = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Exponent |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DisableAutoRetire", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DisableAutoRetire = bool(v != 0) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreditTypeAbbrev", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CreditTypeAbbrev = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowedClasses", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AllowedClasses = append(m.AllowedClasses, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DateCriteria", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DateCriteria == nil { - m.DateCriteria = &DateCriteria{} - } - if err := m.DateCriteria.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Fee = append(m.Fee, types.Coin{}) - if err := m.Fee[len(m.Fee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCreateResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCreateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BasketDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BasketDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgPut) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgPut: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgPut: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Owner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BasketDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BasketDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Credits = append(m.Credits, &BasketCredit{}) - if err := m.Credits[len(m.Credits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgPutResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgPutResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgPutResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AmountReceived", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AmountReceived = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgTake) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgTake: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgTake: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Owner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BasketDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BasketDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetirementLocation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RetirementLocation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RetireOnTake", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RetireOnTake = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgTakeResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgTakeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgTakeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Credits = append(m.Credits, &BasketCredit{}) - if err := m.Credits[len(m.Credits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTx(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTx - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTx - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTx - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/ecocredit/basket/v1/types.pb.go b/x/ecocredit/basket/v1/types.pb.go deleted file mode 100644 index 1f0839c16e..0000000000 --- a/x/ecocredit/basket/v1/types.pb.go +++ /dev/null @@ -1,635 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: regen/ecocredit/basket/v1/types.proto - -package v1 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// BasketCredit represents the information for a credit batch inside a basket. -type BasketCredit struct { - // batch_denom is the unique ID of the credit batch. - BatchDenom string `protobuf:"bytes,1,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` - // amount is the number of credits being put into or taken out of the basket. - // Decimal values are acceptable within the precision of the corresponding - // credit type for this batch. - Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (m *BasketCredit) Reset() { *m = BasketCredit{} } -func (m *BasketCredit) String() string { return proto.CompactTextString(m) } -func (*BasketCredit) ProtoMessage() {} -func (*BasketCredit) Descriptor() ([]byte, []int) { - return fileDescriptor_e6c256e957c69c4d, []int{0} -} -func (m *BasketCredit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BasketCredit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BasketCredit.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BasketCredit) XXX_Merge(src proto.Message) { - xxx_messageInfo_BasketCredit.Merge(m, src) -} -func (m *BasketCredit) XXX_Size() int { - return m.Size() -} -func (m *BasketCredit) XXX_DiscardUnknown() { - xxx_messageInfo_BasketCredit.DiscardUnknown(m) -} - -var xxx_messageInfo_BasketCredit proto.InternalMessageInfo - -func (m *BasketCredit) GetBatchDenom() string { - if m != nil { - return m.BatchDenom - } - return "" -} - -func (m *BasketCredit) GetAmount() string { - if m != nil { - return m.Amount - } - return "" -} - -// DateCriteria represents the information for credit acceptance in a basket. -// At most, only one of the values should be set. -// NOTE: gogo proto `oneof` is not compatible with Amino signing, hence we directly define -// both `start_date_window` and `min_start_date`. In the future, with pulsar, this should change -// and we should use `oneof`. -type DateCriteria struct { - // min_start_date (optional) is the earliest start date for batches of credits allowed - // into the basket. - // At most only one of `start_date_window` and `min_start_date` can be set. - MinStartDate *types.Timestamp `protobuf:"bytes,1,opt,name=min_start_date,json=minStartDate,proto3" json:"min_start_date,omitempty"` - // start_date_window (optional) is a duration of time measured into the past which sets - // a cutoff for batch start dates when adding new credits to the basket. - // Based on the current block timestamp, credits whose start date is before - // `block_timestamp - batch_date_window` will not be allowed into the basket. - // At most only one of `start_date_window` and `min_start_date` can be set. - StartDateWindow *types.Duration `protobuf:"bytes,2,opt,name=start_date_window,json=startDateWindow,proto3" json:"start_date_window,omitempty"` -} - -func (m *DateCriteria) Reset() { *m = DateCriteria{} } -func (m *DateCriteria) String() string { return proto.CompactTextString(m) } -func (*DateCriteria) ProtoMessage() {} -func (*DateCriteria) Descriptor() ([]byte, []int) { - return fileDescriptor_e6c256e957c69c4d, []int{1} -} -func (m *DateCriteria) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DateCriteria) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DateCriteria.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DateCriteria) XXX_Merge(src proto.Message) { - xxx_messageInfo_DateCriteria.Merge(m, src) -} -func (m *DateCriteria) XXX_Size() int { - return m.Size() -} -func (m *DateCriteria) XXX_DiscardUnknown() { - xxx_messageInfo_DateCriteria.DiscardUnknown(m) -} - -var xxx_messageInfo_DateCriteria proto.InternalMessageInfo - -func (m *DateCriteria) GetMinStartDate() *types.Timestamp { - if m != nil { - return m.MinStartDate - } - return nil -} - -func (m *DateCriteria) GetStartDateWindow() *types.Duration { - if m != nil { - return m.StartDateWindow - } - return nil -} - -func init() { - proto.RegisterType((*BasketCredit)(nil), "regen.ecocredit.basket.v1.BasketCredit") - proto.RegisterType((*DateCriteria)(nil), "regen.ecocredit.basket.v1.DateCriteria") -} - -func init() { - proto.RegisterFile("regen/ecocredit/basket/v1/types.proto", fileDescriptor_e6c256e957c69c4d) -} - -var fileDescriptor_e6c256e957c69c4d = []byte{ - // 317 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xc1, 0x4e, 0x02, 0x31, - 0x10, 0x86, 0xa9, 0x07, 0x12, 0x0b, 0xd1, 0xb8, 0x07, 0x03, 0x1c, 0x8a, 0x21, 0x31, 0xf1, 0x62, - 0x1b, 0xf0, 0xe8, 0xc5, 0x00, 0xc6, 0x3b, 0x6a, 0x4c, 0xbc, 0x6c, 0xba, 0xdb, 0x71, 0x69, 0xa0, - 0x2d, 0xe9, 0xce, 0x82, 0xbe, 0x85, 0x37, 0x5f, 0xc9, 0x23, 0x47, 0x8f, 0x06, 0x5e, 0xc4, 0xd0, - 0x05, 0x4d, 0xd4, 0xe3, 0xcc, 0xfc, 0xff, 0x37, 0x7f, 0x3b, 0xf4, 0xd4, 0x43, 0x06, 0x56, 0x40, - 0xea, 0x52, 0x0f, 0x4a, 0xa3, 0x48, 0x64, 0x3e, 0x01, 0x14, 0xf3, 0xae, 0xc0, 0x97, 0x19, 0xe4, - 0x7c, 0xe6, 0x1d, 0xba, 0xa8, 0x19, 0x64, 0xfc, 0x5b, 0xc6, 0x4b, 0x19, 0x9f, 0x77, 0x5b, 0xed, - 0xcc, 0xb9, 0x6c, 0x0a, 0x22, 0x08, 0x93, 0xe2, 0x49, 0xa0, 0x36, 0x90, 0xa3, 0x34, 0xb3, 0xd2, - 0xdb, 0x62, 0xbf, 0x05, 0xaa, 0xf0, 0x12, 0xb5, 0xb3, 0xe5, 0xbc, 0x73, 0x43, 0xeb, 0xfd, 0x40, - 0x1b, 0x04, 0x74, 0xd4, 0xa6, 0xb5, 0x44, 0x62, 0x3a, 0x8e, 0x15, 0x58, 0x67, 0x1a, 0xe4, 0x84, - 0x9c, 0xed, 0x8f, 0x68, 0x68, 0x0d, 0x37, 0x9d, 0xe8, 0x98, 0x56, 0xa5, 0x71, 0x85, 0xc5, 0xc6, - 0x5e, 0x98, 0x6d, 0xab, 0xce, 0x1b, 0xa1, 0xf5, 0xa1, 0x44, 0x18, 0x78, 0x8d, 0xe0, 0xb5, 0x8c, - 0xae, 0xe8, 0x81, 0xd1, 0x36, 0xce, 0x51, 0x7a, 0x8c, 0x95, 0x44, 0x08, 0xb0, 0x5a, 0xaf, 0xc5, - 0xcb, 0x48, 0x7c, 0x17, 0x89, 0xdf, 0xed, 0x32, 0x8f, 0xea, 0x46, 0xdb, 0xdb, 0x8d, 0x61, 0x43, - 0x8a, 0xae, 0xe9, 0xd1, 0x8f, 0x3b, 0x5e, 0x68, 0xab, 0xdc, 0x22, 0x6c, 0xad, 0xf5, 0x9a, 0x7f, - 0x20, 0xc3, 0xed, 0xbb, 0x46, 0x87, 0xf9, 0x0e, 0xf0, 0x10, 0x1c, 0xfd, 0xfb, 0xf7, 0x15, 0x23, - 0xcb, 0x15, 0x23, 0x9f, 0x2b, 0x46, 0x5e, 0xd7, 0xac, 0xb2, 0x5c, 0xb3, 0xca, 0xc7, 0x9a, 0x55, - 0x1e, 0x2f, 0x33, 0x8d, 0xe3, 0x22, 0xe1, 0xa9, 0x33, 0x22, 0xfc, 0xf1, 0xb9, 0x05, 0x5c, 0x38, - 0x3f, 0xd9, 0x56, 0x53, 0x50, 0x19, 0x78, 0xf1, 0xfc, 0xdf, 0x85, 0x92, 0x6a, 0x58, 0x7d, 0xf1, - 0x15, 0x00, 0x00, 0xff, 0xff, 0x68, 0x16, 0x0c, 0x35, 0xc5, 0x01, 0x00, 0x00, -} - -func (m *BasketCredit) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BasketCredit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BasketCredit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Amount) > 0 { - i -= len(m.Amount) - copy(dAtA[i:], m.Amount) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Amount))) - i-- - dAtA[i] = 0x12 - } - if len(m.BatchDenom) > 0 { - i -= len(m.BatchDenom) - copy(dAtA[i:], m.BatchDenom) - i = encodeVarintTypes(dAtA, i, uint64(len(m.BatchDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DateCriteria) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DateCriteria) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DateCriteria) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.StartDateWindow != nil { - { - size, err := m.StartDateWindow.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.MinStartDate != nil { - { - size, err := m.MinStartDate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { - offset -= sovTypes(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *BasketCredit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BatchDenom) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Amount) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *DateCriteria) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MinStartDate != nil { - l = m.MinStartDate.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.StartDateWindow != nil { - l = m.StartDateWindow.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func sovTypes(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *BasketCredit) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BasketCredit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BasketCredit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DateCriteria) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DateCriteria: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DateCriteria: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinStartDate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MinStartDate == nil { - m.MinStartDate = &types.Timestamp{} - } - if err := m.MinStartDate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartDateWindow", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StartDateWindow == nil { - m.StartDateWindow = &types.Duration{} - } - if err := m.StartDateWindow.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTypes(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTypes - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTypes - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTypes - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/ecocredit/v1/events.pb.go b/x/ecocredit/core/events.pb.go similarity index 94% rename from x/ecocredit/v1/events.pb.go rename to x/ecocredit/core/events.pb.go index c06d65d9b6..814517abd1 100644 --- a/x/ecocredit/v1/events.pb.go +++ b/x/ecocredit/core/events.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: regen/ecocredit/v1/events.proto -package v1 +package core import ( fmt "fmt" @@ -522,38 +522,39 @@ func init() { func init() { proto.RegisterFile("regen/ecocredit/v1/events.proto", fileDescriptor_e32415575ff8b4b2) } var fileDescriptor_e32415575ff8b4b2 = []byte{ - // 496 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xcf, 0x6e, 0xd3, 0x40, - 0x10, 0xc6, 0xe3, 0x94, 0xe6, 0xcf, 0x24, 0xb4, 0xd5, 0x0a, 0x21, 0x83, 0xc0, 0xa5, 0x96, 0x10, - 0x70, 0x20, 0x51, 0x05, 0x2f, 0x40, 0x53, 0x0e, 0x95, 0x10, 0x42, 0x3d, 0x72, 0x89, 0xd6, 0xbb, - 0xa3, 0x74, 0xa9, 0xb3, 0x1b, 0xad, 0x27, 0x81, 0x03, 0xaf, 0x80, 0x04, 0x6f, 0xc5, 0xb1, 0xc7, - 0x1e, 0x51, 0xf2, 0x22, 0xc8, 0xbb, 0xeb, 0x04, 0x87, 0x82, 0x10, 0xb7, 0xfd, 0xbe, 0x9d, 0xcc, - 0xcc, 0xf7, 0x73, 0x6c, 0x38, 0xb4, 0x38, 0x41, 0x3d, 0x44, 0x61, 0x84, 0x45, 0xa9, 0x68, 0xb8, - 0x38, 0x1e, 0xe2, 0x02, 0x35, 0x15, 0x83, 0x99, 0x35, 0x64, 0x18, 0x73, 0x05, 0x83, 0x75, 0xc1, - 0x60, 0x71, 0x9c, 0x8e, 0xe0, 0xe0, 0x75, 0x59, 0x33, 0xb2, 0xc8, 0x09, 0x47, 0x39, 0x2f, 0x0a, - 0x76, 0x0f, 0x3a, 0xa2, 0x3c, 0x8c, 0x95, 0x8c, 0xa3, 0x47, 0xd1, 0xd3, 0xee, 0x79, 0xdb, 0xe9, - 0x33, 0xc9, 0xee, 0xc0, 0x2e, 0x97, 0x53, 0xa5, 0xe3, 0xa6, 0xf3, 0xbd, 0x48, 0xbf, 0x45, 0xc0, - 0x7e, 0xe9, 0xf2, 0xce, 0x9a, 0x0f, 0x28, 0x88, 0x3d, 0x04, 0x98, 0xf9, 0xe3, 0xa6, 0x53, 0x37, - 0x38, 0x67, 0xb2, 0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d, 0x41, 0x3f, 0xe3, 0xc5, 0x25, 0x52, - 0x98, 0xe8, 0x01, 0xf5, 0xbc, 0xe7, 0x46, 0xa6, 0x9f, 0xa1, 0x17, 0x92, 0x95, 0x3f, 0x64, 0x31, - 0xb4, 0x7d, 0x8b, 0x2a, 0x59, 0x25, 0xff, 0xe9, 0x19, 0x87, 0x5d, 0xc2, 0x33, 0xf6, 0x8a, 0xdd, - 0x87, 0xce, 0xd6, 0xff, 0x6d, 0xad, 0x53, 0x19, 0xa6, 0x8f, 0xb8, 0x16, 0x98, 0x97, 0xf8, 0x84, - 0x3b, 0xe5, 0xeb, 0xf9, 0x1b, 0xe3, 0xbf, 0x37, 0x38, 0x79, 0xfb, 0x7d, 0x99, 0x44, 0x57, 0xcb, - 0x24, 0xfa, 0xb1, 0x4c, 0xa2, 0xaf, 0xab, 0xa4, 0x71, 0xb5, 0x4a, 0x1a, 0xd7, 0xab, 0xa4, 0xf1, - 0xfe, 0xe5, 0x44, 0xd1, 0xc5, 0x3c, 0x1b, 0x08, 0x33, 0x1d, 0xba, 0x17, 0xfc, 0xb9, 0x46, 0xfa, - 0x68, 0xec, 0x65, 0x50, 0x39, 0xca, 0x09, 0xda, 0xe1, 0xa7, 0xda, 0x87, 0x21, 0x6b, 0xb9, 0x4f, - 0xc2, 0x8b, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xbb, 0xa9, 0xe4, 0x8d, 0x35, 0x04, 0x00, 0x00, + // 500 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x4f, 0x6f, 0xd3, 0x4c, + 0x10, 0xc6, 0xe3, 0xf4, 0x6d, 0xfe, 0x4c, 0xf2, 0xb6, 0xd5, 0x0a, 0x21, 0x83, 0xc0, 0xa5, 0x96, + 0x10, 0x70, 0x20, 0x56, 0x85, 0xc4, 0x9d, 0xa6, 0x1c, 0x2a, 0x71, 0xa8, 0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f4, 0xf2, 0xaa, 0x66, 0x24, 0x51, 0x9b, 0x49, 0x58, 0x08, 0x9c, 0x75, 0x5a, + 0x39, 0xbf, 0xdd, 0xe9, 0x08, 0xfa, 0x64, 0x88, 0x17, 0x23, 0x3e, 0x31, 0x33, 0x4d, 0x61, 0x9f, + 0x9e, 0xf3, 0xde, 0x38, 0xab, 0x02, 0x51, 0x12, 0xb7, 0x34, 0x92, 0x9c, 0x30, 0xde, 0xf5, 0x20, + 0x9c, 0x73, 0xca, 0x09, 0xab, 0xad, 0x50, 0x4b, 0x7f, 0xd9, 0xf2, 0x5b, 0xa1, 0x96, 0xee, 0xea, + 0xae, 0xc0, 0xed, 0x3b, 0x03, 0x6f, 0xd1, 0xee, 0x6c, 0xd1, 0x4e, 0x6f, 0x22, 0xe8, 0x3b, 0x1e, + 0x17, 0x28, 0x50, 0xcd, 0xb1, 0xca, 0x53, 0xa2, 0x96, 0x68, 0x03, 0x89, 0xa0, 0xd8, 0x23, 0xe8, + 0x5a, 0x14, 0x6a, 0xaa, 0x50, 0x53, 0xc0, 0xb0, 0x36, 0xb6, 0x31, 0xed, 0xfc, 0x82, 0xe9, 0x19, + 0xec, 0x93, 0xe5, 0x92, 0xe7, 0x05, 0x6e, 0x12, 0xd9, 0xab, 0xed, 0x00, 0xe5, 0x29, 0xec, 0x59, + 0x24, 0x65, 0x51, 0xd6, 0x75, 0x1e, 0xcc, 0xff, 0xc1, 0x0d, 0x65, 0x47, 0xd0, 0xcf, 0x79, 0x79, + 0x85, 0x14, 0x26, 0x7a, 0x40, 0x3d, 0xef, 0xb9, 0x91, 0xe9, 0x67, 0xe8, 0x85, 0x64, 0xd5, 0x0f, + 0x59, 0x0c, 0x6d, 0xdf, 0xa2, 0x4e, 0x56, 0xcb, 0xbf, 0x7a, 0xc6, 0x61, 0x97, 0xf0, 0x8c, 0xbd, + 0x62, 0x0f, 0xa1, 0xb3, 0xf5, 0x7f, 0x5b, 0xe9, 0x54, 0x86, 0xe9, 0x43, 0xae, 0x05, 0x16, 0x15, + 0x3e, 0xe1, 0x4e, 0xc5, 0x6a, 0xfe, 0xda, 0xf8, 0xe7, 0x0d, 0x4e, 0xce, 0xbf, 0x2f, 0x92, 0xe8, + 0x7a, 0x91, 0x44, 0x3f, 0x16, 0x49, 0xf4, 0x75, 0x99, 0x34, 0xae, 0x97, 0x49, 0xe3, 0x66, 0x99, + 0x34, 0xde, 0xbf, 0x1e, 0x2b, 0xba, 0x9c, 0xe5, 0x03, 0x61, 0x26, 0x99, 0x7b, 0xc1, 0x5f, 0x6a, + 0xa4, 0x8f, 0xc6, 0x5e, 0x05, 0x55, 0xa0, 0x1c, 0xa3, 0xcd, 0x3e, 0xdd, 0xfa, 0x30, 0x08, 0x63, + 0x31, 0x6f, 0xb9, 0x8f, 0xc2, 0xab, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x16, 0xb0, 0x24, 0x26, + 0x37, 0x04, 0x00, 0x00, } func (m *EventCreateClass) Marshal() (dAtA []byte, err error) { diff --git a/x/ecocredit/v1/query.pb.go b/x/ecocredit/core/query.pb.go similarity index 95% rename from x/ecocredit/v1/query.pb.go rename to x/ecocredit/core/query.pb.go index 36384f74bc..329404d502 100644 --- a/x/ecocredit/v1/query.pb.go +++ b/x/ecocredit/core/query.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: regen/ecocredit/v1/query.proto -package v1 +package core import ( context "context" @@ -1153,75 +1153,75 @@ func init() { func init() { proto.RegisterFile("regen/ecocredit/v1/query.proto", fileDescriptor_c85efa417eafb74b) } var fileDescriptor_c85efa417eafb74b = []byte{ - // 1081 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x97, 0xdf, 0x6f, 0x1b, 0x45, - 0x10, 0xc7, 0x73, 0x29, 0x24, 0xf1, 0x38, 0xb4, 0x68, 0x69, 0x21, 0x31, 0x8d, 0x1b, 0x1d, 0x22, - 0x71, 0xda, 0xe6, 0xb6, 0x76, 0x80, 0x16, 0x55, 0x3c, 0xb4, 0x41, 0xa0, 0x08, 0x09, 0x82, 0xe1, - 0x09, 0xa9, 0x8a, 0xce, 0xe7, 0x8d, 0x7b, 0x60, 0xdf, 0x5e, 0xef, 0xce, 0x81, 0x28, 0x18, 0x09, - 0xfe, 0x82, 0x8a, 0x0a, 0x51, 0x09, 0xf1, 0x80, 0xf8, 0x67, 0x78, 0xac, 0xc4, 0x0b, 0x8f, 0x28, - 0xe1, 0xff, 0x00, 0x79, 0x76, 0xf6, 0x7e, 0x38, 0x97, 0xf3, 0x09, 0x45, 0x7d, 0xf3, 0xed, 0xcd, - 0xec, 0x7c, 0x66, 0x66, 0x77, 0xbe, 0x3e, 0xa8, 0x07, 0xa2, 0x27, 0x3c, 0x2e, 0x1c, 0xe9, 0x04, - 0xa2, 0xeb, 0x46, 0xfc, 0xa0, 0xc9, 0x1f, 0x0d, 0x45, 0x70, 0x68, 0xf9, 0x81, 0x8c, 0x24, 0x63, - 0xf8, 0xde, 0x8a, 0xdf, 0x5b, 0x07, 0xcd, 0xda, 0xd5, 0x9e, 0x94, 0xbd, 0xbe, 0xe0, 0xb6, 0xef, + // 1083 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x97, 0x51, 0x6f, 0xdb, 0x54, + 0x14, 0xc7, 0xeb, 0x0e, 0xda, 0xe6, 0xa4, 0x6c, 0xe8, 0xb2, 0x41, 0x1b, 0xd6, 0xac, 0x32, 0xa2, + 0x4d, 0xb7, 0xd5, 0x77, 0x49, 0xc5, 0x36, 0x34, 0xf1, 0xb0, 0x15, 0x81, 0x2a, 0x1e, 0x08, 0x81, + 0x27, 0xa4, 0xa9, 0x72, 0x9c, 0xdb, 0xcc, 0x90, 0xf8, 0x7a, 0xb6, 0x53, 0xa8, 0x4a, 0x90, 0xe0, + 0x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xb0, 0xa0, 0xc5, 0x88, 0x9d, 0xdd, 0x96, 0x09, 0xad, 0xac, 0x6d, 0x94, 0xb0, 0x24, - 0xb2, 0xdb, 0x48, 0xd6, 0x64, 0xbc, 0x24, 0x59, 0xac, 0x6a, 0xbf, 0x18, 0x50, 0x4d, 0xe9, 0x02, - 0xbb, 0x31, 0x2d, 0x66, 0xba, 0xb3, 0x37, 0xcb, 0x19, 0x13, 0x63, 0x13, 0x19, 0x6f, 0xb0, 0x8d, - 0x3c, 0x46, 0x0d, 0xc4, 0x8f, 0x12, 0xe5, 0x19, 0xb1, 0x9f, 0x0d, 0x98, 0x27, 0x71, 0x28, 0x38, - 0xf7, 0x59, 0xf5, 0x2a, 0x38, 0xf7, 0x13, 0x3a, 0x63, 0xbe, 0x8b, 0x44, 0x5b, 0xac, 0x59, 0x9a, - 0x88, 0x6b, 0xa5, 0xf9, 0xc9, 0x80, 0x4a, 0x3c, 0xad, 0x0b, 0x6e, 0xc3, 0xa4, 0x80, 0x14, 0xdc, - 0x86, 0x53, 0x8a, 0x51, 0x5c, 0x31, 0x22, 0xe1, 0x47, 0xa9, 0x89, 0x3a, 0x62, 0xbf, 0x61, 0xc5, - 0x70, 0xb6, 0x17, 0x56, 0x2c, 0xad, 0x27, 0x85, 0x15, 0xcb, 0xc8, 0x84, 0xb9, 0x8d, 0x44, 0xef, - 0xb1, 0xbb, 0xa5, 0x89, 0x78, 0x47, 0x6d, 0xc1, 0x8f, 0x48, 0xa3, 0x46, 0xec, 0x89, 0x01, 0x73, - 0x34, 0x87, 0xd7, 0xce, 0x8c, 0x9c, 0x11, 0x8e, 0xda, 0xfa, 0x54, 0x3b, 0x02, 0xbc, 0x83, 0x80, - 0x2d, 0x76, 0xab, 0x3c, 0xa0, 0xd2, 0x89, 0xf1, 0x7c, 0xab, 0xa6, 0x06, 0x79, 0xc1, 0x4d, 0x38, - 0xad, 0x04, 0x05, 0x37, 0x21, 0x47, 0x1b, 0xcc, 0x06, 0x42, 0x9a, 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, 0x83, 0xbc, 0xe0, 0x26, 0x9c, + 0x55, 0x82, 0x82, 0x9b, 0x90, 0xa3, 0x0d, 0x66, 0x03, 0x21, 0x4d, 0xb6, 0x9e, 0x7b, 0x5b, 0xf1, + 0xd7, 0x36, 0xaa, 0x06, 0x1b, 0xc3, 0x82, 0xfa, 0xa4, 0x2b, 0xa8, 0x54, 0xe6, 0xeb, 0xb1, 0xa0, + 0x52, 0xd9, 0xef, 0x49, 0xd3, 0x44, 0x88, 0xab, 0xac, 0x96, 0x7b, 0xf8, 0xd1, 0xf6, 0x41, 0xfb, + 0xf7, 0x93, 0xba, 0xf1, 0xfc, 0xa4, 0x6e, 0xfc, 0x75, 0x52, 0x37, 0x9e, 0x9c, 0xd6, 0xe7, 0x9e, + 0x9f, 0xd6, 0xe7, 0xfe, 0x3c, 0xad, 0xcf, 0x7d, 0x7e, 0xbb, 0xef, 0x46, 0x8f, 0x46, 0x5d, 0xcb, + 0x91, 0x43, 0xe5, 0xbf, 0xed, 0x89, 0xe8, 0x2b, 0x19, 0x7c, 0x49, 0x4f, 0x03, 0xd1, 0xeb, 0x8b, + 0x80, 0x7f, 0xad, 0x6d, 0xeb, 0xc8, 0x40, 0x74, 0x17, 0xf0, 0xcb, 0x77, 0xe7, 0xdf, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xaf, 0x48, 0x66, 0xcc, 0xb9, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/ecocredit/v1/query.pb.gw.go b/x/ecocredit/core/query.pb.gw.go similarity index 99% rename from x/ecocredit/v1/query.pb.gw.go rename to x/ecocredit/core/query.pb.gw.go index 34eaf2e40c..bfbab2c4b4 100644 --- a/x/ecocredit/v1/query.pb.gw.go +++ b/x/ecocredit/core/query.pb.gw.go @@ -2,11 +2,11 @@ // source: regen/ecocredit/v1/query.proto /* -Package v1 is a reverse proxy. +Package core is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package v1 +package core import ( "context" diff --git a/x/ecocredit/v1/state.pb.go b/x/ecocredit/core/state.pb.go similarity index 95% rename from x/ecocredit/v1/state.pb.go rename to x/ecocredit/core/state.pb.go index 7a08d0b4b6..c4a105c304 100644 --- a/x/ecocredit/v1/state.pb.go +++ b/x/ecocredit/core/state.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: regen/ecocredit/v1/state.proto -package v1 +package core import ( fmt "fmt" @@ -749,45 +749,45 @@ func init() { func init() { proto.RegisterFile("regen/ecocredit/v1/state.proto", fileDescriptor_6cfdca0a4aaabb36) } var fileDescriptor_6cfdca0a4aaabb36 = []byte{ - // 857 bytes of a gzipped FileDescriptorProto + // 860 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x55, 0xcd, 0x6e, 0xe4, 0x44, 0x10, 0x4e, 0x7b, 0x26, 0x33, 0x99, 0x9a, 0x3f, 0xa7, 0x09, 0x8b, 0x09, 0xec, 0xec, 0xca, 0xe2, - 0x67, 0x57, 0x84, 0xb1, 0x26, 0x80, 0x04, 0x96, 0x38, 0x90, 0xec, 0x25, 0x12, 0x42, 0x68, 0xd8, - 0x13, 0x12, 0x1a, 0xf5, 0xb8, 0x7b, 0x27, 0x0e, 0xb6, 0xdb, 0xd8, 0x3d, 0x61, 0xf3, 0x12, 0x88, - 0x07, 0x40, 0xbc, 0x01, 0xdc, 0x91, 0x38, 0x23, 0x8e, 0x2b, 0x71, 0xe1, 0x88, 0x92, 0x37, 0xe0, - 0x09, 0x50, 0x57, 0xb7, 0x9d, 0x71, 0x88, 0xb2, 0xb7, 0xae, 0xaf, 0xab, 0xea, 0xfb, 0xea, 0xa7, - 0x6d, 0x98, 0x14, 0x62, 0x25, 0xb2, 0x40, 0x44, 0x32, 0x2a, 0x04, 0x8f, 0x55, 0x70, 0x3e, 0x0b, - 0x4a, 0xc5, 0x94, 0x98, 0xe6, 0x85, 0x54, 0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0x6e, 0x3b, 0xe3, 0x10, 0x65, 0x6f, 0x5d, 0x5f, 0x57, 0xd5, 0xf7, 0xd5, 0x4f, + 0xdb, 0x30, 0x29, 0xc4, 0x4a, 0x64, 0x81, 0x88, 0x64, 0x54, 0x08, 0x1e, 0xab, 0xe0, 0x7c, 0x16, + 0x94, 0x8a, 0x29, 0x31, 0xcd, 0x0b, 0xa9, 0x24, 0xa5, 0x78, 0x3f, 0xad, 0xef, 0xa7, 0xe7, 0xb3, + 0xfd, 0xfb, 0x91, 0x2c, 0x53, 0x59, 0x06, 0xb2, 0x48, 0x83, 0xf3, 0x19, 0x4b, 0xf2, 0x53, 0x36, + 0xd3, 0x86, 0x09, 0xd9, 0x7f, 0xb0, 0x92, 0x72, 0x95, 0x88, 0x00, 0xad, 0xe5, 0xfa, 0x79, 0xa0, + 0xe2, 0x54, 0x94, 0x8a, 0xa5, 0xb9, 0x71, 0xf0, 0x7f, 0x22, 0x00, 0xc7, 0x98, 0xed, 0xd9, 0x45, + 0x2e, 0xa8, 0x0f, 0x03, 0xb6, 0x5c, 0x16, 0xe2, 0x3c, 0x66, 0x2a, 0x96, 0x99, 0x47, 0x1e, 0x92, + 0x47, 0xbd, 0x79, 0x03, 0xa3, 0x14, 0xda, 0x19, 0x4b, 0x85, 0xe7, 0xe0, 0x1d, 0x9e, 0x35, 0xb6, + 0xce, 0x62, 0xe5, 0xb5, 0x0c, 0xa6, 0xcf, 0xf4, 0x6d, 0xe8, 0xe5, 0x85, 0x88, 0xe2, 0x52, 0x27, + 0x6a, 0x3f, 0x24, 0x8f, 0x86, 0xf3, 0x6b, 0x20, 0x7c, 0xe7, 0xdf, 0x9f, 0xff, 0xfa, 0xa1, 0x35, + 0x81, 0x51, 0x93, 0x91, 0x82, 0xc9, 0xee, 0x12, 0x8f, 0x78, 0xc4, 0xff, 0x9d, 0x40, 0xef, 0x38, + 0x61, 0x65, 0x79, 0x92, 0x3d, 0x97, 0x74, 0x04, 0x4e, 0xcc, 0x51, 0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 0x7f, 0x06, 0x63, 0xbb, 0x67, - 0x35, 0xe1, 0x1d, 0xbb, 0xfc, 0x0e, 0x8c, 0x91, 0xea, 0x7f, 0x43, 0x43, 0x05, 0xd5, 0xc2, 0xf2, + 0x26, 0x37, 0x97, 0x98, 0xfa, 0x30, 0xcc, 0xc4, 0x0b, 0xb5, 0xb8, 0x31, 0xfc, 0xbe, 0x06, 0xcd, + 0x8e, 0xf2, 0xf0, 0x0d, 0x94, 0xb6, 0x0b, 0xc3, 0x66, 0xb2, 0x8e, 0x7f, 0x06, 0x63, 0xbb, 0x67, + 0x35, 0xe1, 0x1d, 0xbb, 0xfc, 0x1e, 0x8c, 0x91, 0xea, 0x7f, 0x43, 0x43, 0x05, 0xd5, 0xc2, 0xf2, 0x70, 0x0f, 0xe9, 0x46, 0x00, 0x1b, 0xa9, 0xba, 0xfe, 0x19, 0x0c, 0x71, 0x15, 0x6a, 0xa6, 0xe6, 0xf8, 0x4d, 0x65, 0x1b, 0xe3, 0xaf, 0x0a, 0x33, 0x4d, 0x6c, 0x16, 0x66, 0x76, 0x8a, 0x87, 0xf7, 0x90, 0xc9, 0x85, 0x41, 0x23, 0xd5, 0x8e, 0xff, 0x0b, 0x81, 0x01, 0xfa, 0x1c, 0xb1, 0x84, 0x69, @@ -795,15 +795,15 @@ var fileDescriptor_6cfdca0a4aaabb36 = []byte{ 0xd0, 0x5d, 0x9a, 0xec, 0x7a, 0xbf, 0x54, 0xc1, 0x38, 0x5b, 0x26, 0xd5, 0x53, 0xab, 0x6d, 0x9d, 0xb0, 0x10, 0x2a, 0x2e, 0x04, 0xb7, 0x4f, 0xa9, 0x32, 0xc3, 0x43, 0xd4, 0x74, 0x00, 0x14, 0x5c, 0xcb, 0x71, 0x50, 0x11, 0xd0, 0x3d, 0x70, 0xab, 0xf3, 0x81, 0xbd, 0x74, 0x89, 0xd7, 0xf3, 0x7f, - 0x23, 0xd0, 0x37, 0xcd, 0x59, 0xe7, 0x79, 0x72, 0xd1, 0x10,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0x42, 0xfe, 0xb9, 0x9c, 0x90, 0x1f, 0xaf, 0x26, 0x5b, 0x2f, + 0xaf, 0x26, 0x5b, 0x7f, 0x5f, 0x4d, 0xb6, 0xbe, 0xfe, 0x64, 0x15, 0xab, 0xd3, 0xf5, 0x72, 0x1a, + 0xc9, 0x34, 0xc0, 0x5f, 0xdc, 0x87, 0x99, 0x50, 0xdf, 0xcb, 0xe2, 0x5b, 0x6b, 0x25, 0x82, 0xaf, + 0x44, 0x11, 0xbc, 0xd8, 0xf8, 0x33, 0x46, 0xb2, 0x10, 0xcb, 0x0e, 0x3e, 0xb3, 0x8f, 0xfe, 0x0b, + 0x00, 0x00, 0xff, 0xff, 0x61, 0x0a, 0x8c, 0x5c, 0x38, 0x07, 0x00, 0x00, } func (m *CreditType) Marshal() (dAtA []byte, err error) { diff --git a/x/ecocredit/v1/tx.pb.go b/x/ecocredit/core/tx.pb.go similarity index 96% rename from x/ecocredit/v1/tx.pb.go rename to x/ecocredit/core/tx.pb.go index cc591b7218..98afd5b93d 100644 --- a/x/ecocredit/v1/tx.pb.go +++ b/x/ecocredit/core/tx.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: regen/ecocredit/v1/tx.proto -package v1 +package core import ( context "context" @@ -1347,70 +1347,71 @@ func init() { func init() { proto.RegisterFile("regen/ecocredit/v1/tx.proto", fileDescriptor_2b8ae49f50a3ddbd) } var fileDescriptor_2b8ae49f50a3ddbd = []byte{ - // 1006 bytes of a gzipped FileDescriptorProto + // 1010 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcd, 0x6e, 0xdb, 0x46, 0x10, 0x36, 0x25, 0x47, 0xb2, 0x46, 0x95, 0xed, 0xac, 0x53, 0x43, 0xa5, 0xab, 0x1f, 0xb0, 0x0d, - 0xe2, 0xa4, 0x29, 0x59, 0x3b, 0xbd, 0x04, 0x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0x30, 0xea, 0x0f, 0x5f, 0xf1, - 0xbb, 0xb0, 0xa1, 0x32, 0x4a, 0x4b, 0x6d, 0x5d, 0x1a, 0x50, 0xe9, 0xc4, 0x5e, 0x57, 0x80, 0x93, - 0x5a, 0x9e, 0x86, 0x83, 0x89, 0x5a, 0x4a, 0x89, 0x7c, 0x77, 0x53, 0xad, 0x82, 0xa8, 0xd6, 0x17, - 0x73, 0xaa, 0x25, 0x79, 0x6c, 0xf9, 0x98, 0xae, 0x58, 0x72, 0x79, 0x74, 0x94, 0x32, 0x23, 0x2d, - 0x9b, 0xc7, 0x50, 0xcb, 0x78, 0x2d, 0x2e, 0xe7, 0x36, 0x94, 0x32, 0x55, 0x54, 0x92, 0xb5, 0x05, - 0x77, 0x75, 0x24, 0x3a, 0xcf, 0x37, 0x32, 0xcf, 0xa3, 0xe4, 0x62, 0x0c, 0xde, 0x3f, 0x4f, 0xc9, - 0x63, 0xcb, 0xc7, 0xad, 0xce, 0x38, 0x86, 0x5a, 0xc6, 0xf2, 0xbe, 0xb9, 0x48, 0x32, 0x9d, 0x8b, - 0x0b, 0x5b, 0x9d, 0xd8, 0xfb, 0x71, 0xc4, 0xd2, 0xcd, 0x71, 0x20, 0x96, 0xd6, 0xec, 0x55, 0x96, - 0xb3, 0x04, 0x76, 0xa0, 0x12, 0xe0, 0x79, 0x4f, 0x3a, 0xa9, 0xf7, 0x11, 0xe0, 0xb9, 0x60, 0xb3, - 0x1a, 0xb0, 0x33, 0xe3, 0x10, 0x1d, 0xc3, 0x85, 0x01, 0x1f, 0x67, 0xed, 0x27, 0x6a, 0x43, 0xbe, - 0x73, 0x18, 0x2d, 0xa8, 0x52, 0xc6, 0x7a, 0xe9, 0xc2, 0x2d, 0x8a, 0x85, 0x0b, 0x94, 0xb1, 0x94, - 0x51, 0x5c, 0x87, 0x61, 0x78, 0x86, 0x1a, 0xb3, 0x2a, 0x30, 0x35, 0xa9, 0x55, 0x30, 0xab, 0x05, - 0x8d, 0x99, 0x11,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0xfc, 0x73, 0xdd, 0x5c, 0xf9, 0xe9, 0x6b, 0xcf, - 0xe7, 0xa7, 0xe3, 0xbe, 0xed, 0x86, 0x43, 0x47, 0xf0, 0x7e, 0x19, 0x20, 0x3f, 0x0f, 0xa3, 0xdf, - 0x94, 0x34, 0x40, 0xe6, 0x61, 0xe4, 0xbc, 0xca, 0xfc, 0x67, 0xd2, 0x2f, 0x89, 0x6f, 0xb1, 0x27, - 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x5f, 0xd2, 0x52, 0x66, 0xb6, 0x0c, 0x00, 0x00, + 0xe2, 0xa4, 0x29, 0x59, 0x3b, 0x40, 0x81, 0xa0, 0x87, 0xc2, 0x76, 0x0a, 0xd8, 0x40, 0x54, 0x04, + 0x6a, 0x7a, 0x29, 0x50, 0x08, 0x2b, 0xee, 0x94, 0x66, 0x2b, 0x91, 0x02, 0xb9, 0xb2, 0x93, 0x57, + 0xe8, 0xc9, 0xef, 0x51, 0xa0, 0xbd, 0xe4, 0x21, 0x7a, 0xf4, 0xb1, 0xb7, 0x06, 0xf6, 0xb1, 0x2f, + 0x51, 0x70, 0x77, 0xb9, 0x16, 0x65, 0x89, 0x52, 0x90, 0x43, 0x2e, 0xa2, 0x67, 0xe6, 0x9b, 0x6f, + 0x67, 0x86, 0xb3, 0x33, 0x34, 0xec, 0x44, 0xe8, 0x61, 0xe0, 0xa0, 0x1b, 0xba, 0x11, 0x32, 0x9f, + 0x3b, 0x67, 0x7b, 0x0e, 0x7f, 0x65, 0x8f, 0xa2, 0x90, 0x87, 0x84, 0x08, 0xa3, 0xad, 0x8d, 0xf6, + 0xd9, 0x9e, 0x79, 0xcf, 0x0b, 0xbd, 0x50, 0x98, 0x9d, 0xe4, 0x2f, 0x89, 0x34, 0x5b, 0x5e, 0x18, + 0x7a, 0x03, 0x74, 0x84, 0xd4, 0x1f, 0xff, 0xe2, 0x70, 0x7f, 0x88, 0x31, 0xa7, 0xc3, 0x91, 0x04, + 0x58, 0xbf,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9a, 0x06, 0x9a, + 0xce, 0x92, 0x40, 0x7d, 0x5a, 0x04, 0x64, 0xc6, 0xdd, 0x7d, 0xb8, 0x98, 0x46, 0x41, 0xcd, 0xbd, + 0xa5, 0xa1, 0xfa, 0xcc, 0x31, 0x6c, 0xcd, 0xba, 0x7c, 0x8f, 0x16, 0x33, 0xa5, 0x58, 0x73, 0x7f, + 0x79, 0x6c, 0x7a, 0xec, 0xe1, 0x8b, 0xbf, 0xaf, 0x9a, 0xc6, 0xe5, 0x55, 0xd3, 0x78, 0x7b, 0xd5, + 0x34, 0x2e, 0xae, 0x9b, 0x2b, 0x97, 0xd7, 0xcd, 0x95, 0x7f, 0xae, 0x9b, 0x2b, 0x3f, 0x7d, 0xed, + 0xf9, 0xfc, 0x74, 0xdc, 0xb7, 0xdd, 0x70, 0xe8, 0x08, 0xde, 0x2f, 0x03, 0xe4, 0xe7, 0x61, 0xf4, + 0x9b, 0x92, 0x06, 0xc8, 0x3c, 0x8c, 0x9c, 0x57, 0x13, 0xff, 0x99, 0xb8, 0x61, 0x84, 0xfd, 0x92, + 0xf8, 0x1a, 0x7b, 0xf2, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfc, 0xc5, 0xe1, 0xdb, 0xb8, 0x0c, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/ecocredit/v1/types.pb.go b/x/ecocredit/core/types.pb.go similarity index 84% rename from x/ecocredit/v1/types.pb.go rename to x/ecocredit/core/types.pb.go index 47ef960d9f..1cf8ab0c07 100644 --- a/x/ecocredit/v1/types.pb.go +++ b/x/ecocredit/core/types.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: regen/ecocredit/v1/types.proto -package v1 +package core import ( fmt "fmt" @@ -108,30 +108,30 @@ func init() { func init() { proto.RegisterFile("regen/ecocredit/v1/types.proto", fileDescriptor_7b044b6b740b984f) } var fileDescriptor_7b044b6b740b984f = []byte{ - // 354 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x41, 0x4e, 0xeb, 0x30, - 0x10, 0x86, 0x93, 0xf6, 0xa9, 0x7a, 0x2f, 0x7d, 0x42, 0x25, 0xaa, 0x50, 0xe8, 0xc2, 0xad, 0x58, - 0x45, 0x42, 0xb5, 0x09, 0xf4, 0x02, 0x34, 0x82, 0x25, 0x42, 0x11, 0x2b, 0x36, 0x95, 0xe3, 0x0c, - 0x21, 0x6a, 0x1a, 0x57, 0xb6, 0xdb, 0xd2, 0x5b, 0x70, 0x09, 0x36, 0x9c, 0xa4, 0xcb, 0x2e, 0x59, - 0x01, 0x6a, 0x2f, 0x82, 0xe2, 0x98, 0x0a, 0x04, 0x2b, 0x8f, 0xe7, 0x9b, 0xf1, 0x3f, 0xff, 0xd8, - 0x41, 0x02, 0x52, 0x28, 0x08, 0x30, 0xce, 0x04, 0x24, 0x99, 0x22, 0xf3, 0x80, 0xa8, 0xe5, 0x14, - 0x24, 0x9e, 0x0a, 0xae, 0xb8, 0xeb, 0x6a, 0x8e, 0x77, 0x1c, 0xcf, 0x83, 0x4e, 0x3b, 0xe5, 0x29, - 0xd7, 0x98, 0x94, 0x51, 0x55, 0xd9, 0x41, 0x8c, 0xcb, 0x09, 0x97, 0x24, 0xa6, 0x12, 0xc8, 0x3c, - 0x88, 0x41, 0xd1, 0x80, 0x30, 0x9e, 0x15, 0x9f, 0xfc, 0x17, 0x25, 0xa9, 0xa8, 0x82, 0x8a, 0x1f, - 0x3d, 0xd5, 0x9c, 0xc6, 0x35, 0x15, 0x74, 0x22, 0xdd, 0x99, 0xd3, 0xaa, 0x6a, 0x46, 0x2c, 0xa7, - 0x52, 0x8e, 0xee, 0x00, 0x3c, 0xbb, 0x57, 0xf7, 0x9b, 0xa7, 0x87, 0xb8, 0x52, 0xc1, 0xa5, 0x0a, - 0x36, 0x2a, 0x38, 0xe4, 0x59, 0x31, 0x3c, 0x59, 0xbd, 0x76, 0xad, 0xe7, 0xb7, 0xae, 0x9f, 0x66, - 0xea, 0x7e, 0x16, 0x63, 0xc6, 0x27, 0xc4, 0x8c, 0x54, 0x1d, 0x7d, 0x99, 0x8c, 0x8d, 0xb7, 0xb2, - 0x41, 0x46, 0x7b, 0x95, 0x48, 0x58, 0x6a, 0x5c, 0x02, 0xb8, 0x03, 0xe7, 0x80, 0xe6, 0x39, 0x5f, - 0x40, 0x62, 0x74, 0x99, 0x00, 0xaa, 0xb8, 0x90, 0x5e, 0xad, 0x57, 0xf7, 0xff, 0x45, 0x6d, 0x43, - 0x75, 0x43, 0x68, 0x98, 0x7b, 0xec, 0xec, 0xeb, 0x7c, 0x9e, 0x49, 0x35, 0x82, 0x82, 0xc6, 0x39, - 0x24, 0x5e, 0xbd, 0x67, 0xfb, 0x7f, 0xa3, 0xd6, 0x0e, 0x5c, 0x54, 0x79, 0xf7, 0xdc, 0xf9, 0x6f, - 0x9c, 0xe9, 0x41, 0xbc, 0x3f, 0xda, 0x15, 0xc2, 0x3f, 0xb7, 0x8c, 0x43, 0x1d, 0xdd, 0x2c, 0xa7, - 0x10, 0x35, 0xd9, 0x2e, 0x96, 0xc3, 0xab, 0xd5, 0x06, 0xd9, 0xeb, 0x0d, 0xb2, 0xdf, 0x37, 0xc8, - 0x7e, 0xdc, 0x22, 0x6b, 0xbd, 0x45, 0xd6, 0xcb, 0x16, 0x59, 0xb7, 0x83, 0x2f, 0xce, 0xf5, 0x83, - 0xfd, 0x02, 0xd4, 0x82, 0x8b, 0xb1, 0xb9, 0xe5, 0x90, 0xa4, 0x20, 0xc8, 0xc3, 0xb7, 0x3f, 0x88, - 0x1b, 0x7a, 0xfd, 0x67, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc5, 0xe6, 0x9d, 0xd8, 0x0a, 0x02, - 0x00, 0x00, + // 356 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xc1, 0x4e, 0xf2, 0x40, + 0x10, 0xc7, 0x5b, 0xf8, 0x42, 0xbe, 0xaf, 0x7c, 0x31, 0xd8, 0x10, 0x53, 0x39, 0x2c, 0xc4, 0x53, + 0x13, 0xc3, 0xae, 0x55, 0xe3, 0x5d, 0x1a, 0x3d, 0x93, 0xc6, 0x93, 0x17, 0xb2, 0xdd, 0x8e, 0xb5, + 0xa1, 0x74, 0xc9, 0xee, 0x02, 0xf2, 0x16, 0xbe, 0x84, 0x17, 0x9f, 0x84, 0x23, 0x47, 0x4f, 0x6a, + 0xe0, 0x45, 0x4c, 0xb7, 0x2b, 0x21, 0xd1, 0xd3, 0xce, 0xce, 0x6f, 0x66, 0xff, 0xf3, 0xdf, 0x71, + 0x90, 0x80, 0x14, 0x0a, 0x02, 0x8c, 0x33, 0x01, 0x49, 0xa6, 0xc8, 0x3c, 0x20, 0x6a, 0x39, 0x05, + 0x89, 0xa7, 0x82, 0x2b, 0xee, 0xba, 0x9a, 0xe3, 0x1d, 0xc7, 0xf3, 0xa0, 0xd3, 0x4e, 0x79, 0xca, + 0x35, 0x26, 0x65, 0x54, 0x55, 0x76, 0x10, 0xe3, 0x72, 0xc2, 0x25, 0x89, 0xa9, 0x04, 0x32, 0x0f, + 0x62, 0x50, 0x34, 0x20, 0x8c, 0x67, 0xc5, 0x37, 0xff, 0x45, 0x49, 0x2a, 0xaa, 0xa0, 0xe2, 0x27, + 0x2f, 0x35, 0xa7, 0x31, 0xa4, 0x82, 0x4e, 0xa4, 0x3b, 0x73, 0x5a, 0x55, 0xcd, 0x88, 0xe5, 0x54, + 0xca, 0xd1, 0x03, 0x80, 0x67, 0xf7, 0xea, 0x7e, 0xf3, 0xfc, 0x18, 0x57, 0x2a, 0xb8, 0x54, 0xc1, + 0x46, 0x05, 0x87, 0x3c, 0x2b, 0x06, 0x67, 0xab, 0xf7, 0xae, 0xf5, 0xfa, 0xd1, 0xf5, 0xd3, 0x4c, + 0x3d, 0xce, 0x62, 0xcc, 0xf8, 0x84, 0x98, 0x91, 0xaa, 0xa3, 0x2f, 0x93, 0xb1, 0xf1, 0x56, 0x36, + 0xc8, 0xe8, 0xa0, 0x12, 0x09, 0x4b, 0x8d, 0x5b, 0x00, 0xf7, 0xd2, 0x39, 0xa2, 0x79, 0xce, 0x17, + 0x90, 0x18, 0x5d, 0x26, 0x80, 0x2a, 0x2e, 0xa4, 0x57, 0xeb, 0xd5, 0xfd, 0x7f, 0x51, 0xdb, 0x50, + 0xdd, 0x10, 0x1a, 0xe6, 0x9e, 0x3a, 0x87, 0x3a, 0x9f, 0x67, 0x52, 0x8d, 0xa0, 0xa0, 0x71, 0x0e, + 0x89, 0x57, 0xef, 0xd9, 0xfe, 0xdf, 0xa8, 0xb5, 0x03, 0x37, 0x55, 0xde, 0xbd, 0x76, 0xfe, 0x1b, + 0x67, 0x7a, 0x10, 0xef, 0x8f, 0x76, 0x85, 0xf0, 0xcf, 0x5f, 0xc6, 0xa1, 0x8e, 0xee, 0x96, 0x53, + 0x88, 0x9a, 0x6c, 0x17, 0xcb, 0xc1, 0x70, 0xb5, 0x41, 0xf6, 0x7a, 0x83, 0xec, 0xcf, 0x0d, 0xb2, + 0x9f, 0xb7, 0xc8, 0x5a, 0x6f, 0x91, 0xf5, 0xb6, 0x45, 0xd6, 0xfd, 0xd5, 0x9e, 0x73, 0xfd, 0x60, + 0xbf, 0x00, 0xb5, 0xe0, 0x62, 0x6c, 0x6e, 0x39, 0x24, 0x29, 0x08, 0xf2, 0xb4, 0xb7, 0x03, 0xc6, + 0x05, 0xc4, 0x0d, 0xbd, 0x80, 0x8b, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, 0xed, 0xfb, 0x71, + 0x0c, 0x02, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/x/ecocredit/marketplace/v1/events.pb.go b/x/ecocredit/marketplace/events.pb.go similarity index 93% rename from x/ecocredit/marketplace/v1/events.pb.go rename to x/ecocredit/marketplace/events.pb.go index 741e3dc351..8d60247701 100644 --- a/x/ecocredit/marketplace/v1/events.pb.go +++ b/x/ecocredit/marketplace/events.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: regen/ecocredit/marketplace/v1/events.proto -package v1 +package marketplace import ( fmt "fmt" @@ -510,46 +510,46 @@ var fileDescriptor_68b71b54d42cf1d9 = []byte{ // 674 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0x4f, 0x6f, 0xd3, 0x30, 0x18, 0xc6, 0x97, 0xae, 0xdd, 0x5a, 0x77, 0x45, 0xc2, 0xeb, 0xa1, 0xeb, 0x21, 0x2b, 0xe5, 0x52, - 0x09, 0x91, 0x30, 0x90, 0x38, 0x20, 0x21, 0xed, 0x0f, 0x03, 0x4d, 0x42, 0x62, 0x04, 0xb8, 0xec, - 0x12, 0x39, 0xc9, 0xbb, 0xce, 0xaa, 0x63, 0x07, 0xc7, 0x59, 0xd7, 0x0f, 0xc0, 0x11, 0x69, 0x1f, - 0x8b, 0x03, 0x87, 0x1d, 0x38, 0x70, 0x03, 0x6d, 0x5f, 0x04, 0xd9, 0x49, 0xff, 0x6c, 0xd3, 0xd4, - 0x6a, 0xe2, 0xd6, 0xd7, 0xef, 0xe3, 0xf8, 0xc9, 0xef, 0x7d, 0xea, 0xa0, 0x27, 0x12, 0xfa, 0xc0, - 0x5d, 0x08, 0x45, 0x28, 0x21, 0xa2, 0xca, 0x8d, 0x89, 0x1c, 0x80, 0x4a, 0x18, 0x09, 0xc1, 0x3d, - 0xdd, 0x72, 0xe1, 0x14, 0xb8, 0x4a, 0x9d, 0x44, 0x0a, 0x25, 0xb0, 0x6d, 0xc4, 0xce, 0x44, 0xec, - 0xcc, 0x88, 0x9d, 0xd3, 0xad, 0x76, 0xb3, 0x2f, 0xfa, 0xc2, 0x48,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x97, 0xc8, 0x49, 0xde, 0x75, 0x56, 0x1d, 0x3b, 0x38, 0xce, 0xba, 0x7e, 0x00, 0x8e, 0x48, 0xfb, + 0x58, 0x1c, 0x38, 0xec, 0xc0, 0x81, 0x1b, 0x68, 0xfb, 0x22, 0xc8, 0x4e, 0xfa, 0x67, 0x1b, 0xa8, + 0xd5, 0xc4, 0xad, 0xaf, 0xdf, 0xc7, 0xf1, 0x93, 0xdf, 0xfb, 0xd4, 0x41, 0x0f, 0x24, 0xf4, 0x81, + 0xbb, 0x10, 0x8a, 0x50, 0x42, 0x44, 0x95, 0x1b, 0x13, 0x39, 0x00, 0x95, 0x30, 0x12, 0x82, 0x7b, + 0xb2, 0xe5, 0xc2, 0x09, 0x70, 0x95, 0x3a, 0x89, 0x14, 0x4a, 0x60, 0xdb, 0x88, 0x9d, 0x89, 0xd8, + 0x99, 0x11, 0x3b, 0x27, 0x5b, 0xed, 0x66, 0x5f, 0xf4, 0x85, 0x91, 0xba, 0xfa, 0x57, 0xbe, 0xab, + 0x6d, 0x87, 0x22, 0x8d, 0x45, 0xea, 0x06, 0x24, 0xd5, 0x8f, 0x0c, 0x40, 0x91, 0x2d, 0x37, 0x14, + 0x94, 0x17, 0xfd, 0xcd, 0xbe, 0x10, 0x7d, 0x06, 0xae, 0xa9, 0x82, 0xec, 0xc8, 0x55, 0x34, 0x86, + 0x54, 0x91, 0x38, 0xc9, 0x05, 0xdd, 0xaf, 0x25, 0x54, 0xdb, 0xd7, 0x3e, 0xde, 0x01, 0x63, 0x78, + 0x03, 0x55, 0x85, 0x8c, 0x40, 0xfa, 0x34, 0x6a, 0x59, 0x1d, 0xab, 0x57, 0xf6, 0x56, 0x4d, 0x7d, + 0x10, 0xe1, 0x4d, 0x54, 0x0f, 0x88, 0x0a, 0x8f, 0xfd, 0x08, 0xb8, 0x88, 0x5b, 0xa5, 0x8e, 0xd5, + 0xab, 0x79, 0xc8, 0x2c, 0xbd, 0xd0, 0x2b, 0xb8, 0x8d, 0x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x79, 0x8d, 0x86, 0x37, 0xa9, 0x77, 0x3f, 0x7e, 0xbb, 0xb0, 0xad, + 0xf3, 0x0b, 0xdb, 0xfa, 0x7d, 0x61, 0x5b, 0x67, 0x97, 0xf6, 0xd2, 0xf9, 0xa5, 0xbd, 0xf4, 0xf3, + 0xd2, 0x5e, 0xfa, 0xb4, 0xdd, 0xa7, 0xea, 0x38, 0x0b, 0x9c, 0x50, 0xc4, 0xae, 0xb9, 0xc6, 0x1f, + 0x72, 0x50, 0x43, 0x21, 0x07, 0x45, 0xc5, 0x20, 0xea, 0x83, 0x74, 0x4f, 0xff, 0xfe, 0x29, 0x08, + 0x56, 0xcc, 0x08, 0x9f, 0xfc, 0x09, 0x00, 0x00, 0xff, 0xff, 0x15, 0xd1, 0xf6, 0x7b, 0x30, 0x06, 0x00, 0x00, } diff --git a/x/ecocredit/marketplace/v1/query.pb.go b/x/ecocredit/marketplace/query.pb.go similarity index 95% rename from x/ecocredit/marketplace/v1/query.pb.go rename to x/ecocredit/marketplace/query.pb.go index 16fd4d13f6..32dda6d500 100644 --- a/x/ecocredit/marketplace/v1/query.pb.go +++ b/x/ecocredit/marketplace/query.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: regen/ecocredit/marketplace/v1/query.proto -package v1 +package marketplace import ( context "context" @@ -870,63 +870,63 @@ func init() { } var fileDescriptor_1f2df4a89dfae849 = []byte{ - // 885 bytes of a gzipped FileDescriptorProto + // 887 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x97, 0x4b, 0x6f, 0xeb, 0x44, - 0x14, 0xc7, 0x3b, 0xe5, 0x75, 0x73, 0x72, 0xcb, 0x62, 0x80, 0x4b, 0xb1, 0x90, 0x6f, 0x64, 0xa0, - 0x2d, 0xa8, 0xf1, 0x28, 0x85, 0x3e, 0x91, 0x9a, 0x36, 0x3c, 0x4a, 0xd9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 0x72, 0xf3, 0xca, 0x27, 0xbf, 0x5e, + 0xaa, 0xe8, 0xe2, 0x52, 0x45, 0x7f, 0x5d, 0xaa, 0xe8, 0xeb, 0x2b, 0x75, 0xee, 0xe2, 0x4a, 0x9d, + 0xfb, 0xe3, 0x4a, 0x9d, 0xfb, 0xf4, 0xad, 0x46, 0xd3, 0x3b, 0xe8, 0x18, 0x7a, 0xdd, 0x69, 0xf9, + 0x91, 0x8a, 0x36, 0xf3, 0x8e, 0x1d, 0xf7, 0x50, 0xfe, 0xb2, 0x98, 0xd9, 0x60, 0x2e, 0xf9, 0x22, + 0xf9, 0x73, 0xd8, 0x78, 0x52, 0x7c, 0xda, 0xbe, 0xfe, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x98, + 0x67, 0xdd, 0x9f, 0x9e, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/ecocredit/marketplace/v1/query.pb.gw.go b/x/ecocredit/marketplace/query.pb.gw.go similarity index 99% rename from x/ecocredit/marketplace/v1/query.pb.gw.go rename to x/ecocredit/marketplace/query.pb.gw.go index c9b35fec49..1c60c3f09e 100644 --- a/x/ecocredit/marketplace/v1/query.pb.gw.go +++ b/x/ecocredit/marketplace/query.pb.gw.go @@ -2,11 +2,11 @@ // source: regen/ecocredit/marketplace/v1/query.proto /* -Package v1 is a reverse proxy. +Package marketplace is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package v1 +package marketplace import ( "context" diff --git a/x/ecocredit/marketplace/v1/state.pb.go b/x/ecocredit/marketplace/state.pb.go similarity index 91% rename from x/ecocredit/marketplace/v1/state.pb.go rename to x/ecocredit/marketplace/state.pb.go index 0aebdf5896..5cc9a1965e 100644 --- a/x/ecocredit/marketplace/v1/state.pb.go +++ b/x/ecocredit/marketplace/state.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: regen/ecocredit/marketplace/v1/state.proto -package v1 +package marketplace import ( fmt "fmt" @@ -562,54 +562,54 @@ func init() { } var fileDescriptor_718b9cb8f10a9f3c = []byte{ - // 748 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcb, 0x8e, 0xdb, 0x36, - 0x14, 0x35, 0xe5, 0xb1, 0x63, 0xd1, 0x76, 0xe0, 0x30, 0x83, 0x40, 0x75, 0x1b, 0xc7, 0x70, 0x1f, - 0x30, 0xda, 0x46, 0xaa, 0xa7, 0x5d, 0x79, 0x95, 0x0c, 0x8a, 0x20, 0xb3, 0x08, 0x3a, 0x50, 0xb2, - 0xca, 0x46, 0xa0, 0xc4, 0x6b, 0x0f, 0x61, 0x4a, 0x54, 0x29, 0x6a, 0x32, 0xee, 0x47, 0x14, 0xdd, - 0x17, 0xe8, 0x5f, 0x14, 0xfd, 0x85, 0x2e, 0x03, 0x74, 0xd3, 0x65, 0xe1, 0xf9, 0x83, 0x7e, 0x41, - 0x21, 0xea, 0x31, 0xae, 0xfb, 0x08, 0xd0, 0x66, 0x79, 0x78, 0xcf, 0xe5, 0xbd, 0x3c, 0xe7, 0x48, - 0xf8, 0x63, 0x05, 0x6b, 0x48, 0x3c, 0x88, 0x64, 0xa4, 0x80, 0x71, 0xed, 0xc5, 0x54, 0x6d, 0x40, - 0xa7, 0x82, 0x46, 0xe0, 0x5d, 0x2e, 0xbc, 0x4c, 0x53, 0x0d, 0x6e, 0xaa, 0xa4, 0x96, 0x64, 0x62, - 0xb8, 0x6e, 0xc3, 0x75, 0xf7, 0xb8, 0xee, 0xe5, 0x62, 0xfc, 0x60, 0x2d, 0xe5, 0x5a, 0x80, 0x67, - 0xd8, 0x61, 0xbe, 0xf2, 0x34, 0x8f, 0x21, 0xd3, 0x34, 0x4e, 0xcb, 0x0b, 0xc6, 0xf7, 0x23, 0x99, - 0xc5, 0x32, 0xf3, 0xa4, 0x8a, 0xbd, 0xcb, 0x05, 0x15, 0xe9, 0x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0x26, 0xa0, 0x5f, 0x49, 0xb5, 0xa9, 0x90, - 0x00, 0xb6, 0x06, 0xe5, 0x5d, 0xfd, 0xe3, 0xcf, 0x35, 0xec, 0x9a, 0x48, 0x7e, 0xfe, 0x47, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x1e, 0x9a, 0xda, 0xab, 0x11, 0x06, 0x00, 0x00, + // 749 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xdd, 0x8e, 0xdb, 0x44, + 0x14, 0xce, 0x38, 0x9b, 0x34, 0x9e, 0x24, 0x55, 0x3a, 0x5d, 0x55, 0x26, 0xd0, 0x34, 0x0a, 0x3f, + 0x8a, 0x80, 0xda, 0x64, 0xe1, 0x2a, 0x12, 0x12, 0x5d, 0xa1, 0xaa, 0x7b, 0x51, 0xb1, 0x72, 0x2b, + 0x21, 0x71, 0x63, 0x8d, 0x3d, 0x27, 0xd9, 0x51, 0xc6, 0x1e, 0x33, 0x1e, 0x6f, 0x37, 0x3c, 0x04, + 0xe2, 0x1e, 0x89, 0xb7, 0x40, 0xbc, 0x02, 0x97, 0x95, 0xb8, 0xe1, 0x12, 0x65, 0xdf, 0x80, 0x27, + 0x40, 0x1e, 0xff, 0x6c, 0x08, 0x15, 0x95, 0xa0, 0x97, 0xdf, 0x9c, 0xef, 0xcc, 0x39, 0xf3, 0x7d, + 0x9f, 0x8d, 0x3f, 0x54, 0xb0, 0x86, 0xc4, 0x83, 0x48, 0x46, 0x0a, 0x18, 0xd7, 0x5e, 0x4c, 0xd5, + 0x06, 0x74, 0x2a, 0x68, 0x04, 0xde, 0xe5, 0xc2, 0xcb, 0x34, 0xd5, 0xe0, 0xa6, 0x4a, 0x6a, 0x49, + 0x26, 0x86, 0xeb, 0x36, 0x5c, 0x77, 0x8f, 0xeb, 0x5e, 0x2e, 0xc6, 0x0f, 0xd6, 0x52, 0xae, 0x05, + 0x78, 0x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0xf5, 0xa4, 0xf5, 0xf2, 0x7a, 0xd2, 0xfa, 0xfd, 0x7a, 0xd2, 0xfa, 0xe6, 0xf3, + 0x35, 0xd7, 0x17, 0x79, 0xe8, 0x46, 0x32, 0xf6, 0x8c, 0xc3, 0x0f, 0x13, 0xd0, 0x2f, 0xa4, 0xda, + 0x54, 0x48, 0x00, 0x5b, 0x83, 0xf2, 0xae, 0x5e, 0xfd, 0x73, 0x0d, 0xbb, 0x26, 0x8f, 0x9f, 0xfe, + 0x15, 0x00, 0x00, 0xff, 0xff, 0xc9, 0xd1, 0xbe, 0x70, 0x0e, 0x06, 0x00, 0x00, } func (m *SellOrder) Marshal() (dAtA []byte, err error) { diff --git a/x/ecocredit/marketplace/v1/tx.pb.go b/x/ecocredit/marketplace/tx.pb.go similarity index 94% rename from x/ecocredit/marketplace/v1/tx.pb.go rename to x/ecocredit/marketplace/tx.pb.go index 38f34095f5..cc6788eeac 100644 --- a/x/ecocredit/marketplace/v1/tx.pb.go +++ b/x/ecocredit/marketplace/tx.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: regen/ecocredit/marketplace/v1/tx.proto -package v1 +package marketplace import ( context "context" @@ -835,65 +835,65 @@ func init() { } var fileDescriptor_68c9b4e4b7fcb584 = []byte{ - // 916 bytes of a gzipped FileDescriptorProto + // 917 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, 0x17, 0xf7, 0xc6, 0x8e, 0x93, 0x3c, 0xc7, 0xf9, 0xf6, 0x3b, 0xc9, 0xc1, 0x2c, 0xc2, 0x71, 0x4d, - 0xd5, 0x5a, 0x88, 0xce, 0x36, 0x29, 0x2a, 0x08, 0x84, 0x94, 0x98, 0xb6, 0x14, 0x09, 0x8b, 0xb2, - 0x09, 0x97, 0x4a, 0x68, 0xd9, 0x1f, 0x2f, 0xdb, 0x51, 0xc6, 0x3b, 0xcb, 0xce, 0x6c, 0x13, 0xc3, - 0x0d, 0x21, 0x71, 0x80, 0x43, 0xff, 0x2c, 0xc4, 0xa9, 0x37, 0xb8, 0x81, 0x92, 0x13, 0x17, 0xfe, - 0x06, 0xb4, 0xb3, 0x3f, 0x92, 0xb8, 0x2d, 0x71, 0x7c, 0xf3, 0x7b, 0xef, 0xf3, 0xde, 0xbc, 0xf9, - 0x7c, 0xe6, 0xbd, 0x35, 0xdc, 0x4a, 0x30, 0xc4, 0xc8, 0x42, 0x5f, 0xf8, 0x09, 0x06, 0x4c, 0x59, - 0x63, 0x37, 0x39, 0x44, 0x15, 0x73, 0xd7, 0x47, 0xeb, 0xd9, 0x96, 0xa5, 0x8e, 0x69, 0x9c, 0x08, - 0x25, 0x48, 0x57, 0x03, 0x69, 0x05, 0xa4, 0xe7, 0x80, 0xf4, 0xd9, 0x96, 0xb9, 0x11, 0x8a, 0x50, - 0x68, 0xa8, 0x95, 0xfd, 0xca, 0xb3, 0xcc, 0xae, 0x2f, 0xe4, 0x58, 0x48, 0xcb, 0x73, 0x65, 0x56, - 0xce, 0x43, 0xe5, 0x6e, 0x59, 0xbe, 0x60, 0x51, 0x11, 0xdf, 0x0c, 0x85, 0x08, 0x39, 0x5a, 0xda, - 0xf2, 0xd2, 0x03, 0x4b, 0xb1, 0x31, 0x4a, 0xe5, 0x8e, 0xe3, 0x02, 0xf0, 0xce, 0x65, 0xfd, 0x4d, - 0x62, 0x94, 0x39, 0xb6, 0xff, 0xfb, 0x02, 0x2c, 0x8d, 0x64, 0xb8, 0x87, 0x9c, 0x93, 0x0d, 0x58, - 0x14, 0x47, 0x11, 0x26, 0x1d, 0xa3, 0x67, 0x0c, 0x56, 0xec, 0xdc, 0x20, 0x0f, 0xa0, 0x29, 0x92, - 0x00, 0x13, 0xd9, 0x59, 0xe8, 0xd5, 0x07, 0xad, 0xed, 0xdb, 0xf4, 0xbf, 0x6f, 0x45, 0x8b, 0x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 0xf5, 0x6c, + 0x73, 0xdc, 0x9c, 0x6d, 0x80, 0x4d, 0x3a, 0x1b, 0xae, 0x2a, 0xff, 0x1d, 0xb4, 0xcf, 0xcb, 0x7e, + 0x67, 0x86, 0x02, 0xe7, 0x32, 0xcc, 0xf7, 0xae, 0x9a, 0x51, 0x1e, 0x3e, 0xfc, 0xe2, 0x97, 0xe3, + 0xae, 0xf1, 0xf2, 0xb8, 0x6b, 0xfc, 0x79, 0xdc, 0x35, 0x5e, 0x9c, 0x74, 0x6b, 0x2f, 0x4f, 0xba, + 0xb5, 0xdf, 0x4f, 0xba, 0xb5, 0x2f, 0xef, 0x87, 0x4c, 0x3d, 0x4b, 0x3d, 0xea, 0x8b, 0xb1, 0xa5, + 0xab, 0xdf, 0x8e, 0x50, 0x1d, 0x8a, 0xe4, 0xa0, 0xb0, 0x38, 0x06, 0x21, 0x26, 0xd6, 0xd1, 0xc5, + 0xff, 0x60, 0xbc, 0xa6, 0x1e, 0xd4, 0xbb, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x21, 0x19, 0x42, + 0xef, 0x87, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/ecocredit/marketplace/v1/types.pb.go b/x/ecocredit/marketplace/types.pb.go similarity index 92% rename from x/ecocredit/marketplace/v1/types.pb.go rename to x/ecocredit/marketplace/types.pb.go index 974cb29420..ddec5519e1 100644 --- a/x/ecocredit/marketplace/v1/types.pb.go +++ b/x/ecocredit/marketplace/types.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: regen/ecocredit/marketplace/v1/types.proto -package v1 +package marketplace import ( fmt "fmt" @@ -387,35 +387,35 @@ func init() { var fileDescriptor_eff2ca0c007ee426 = []byte{ // 465 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0x4f, 0x6e, 0xd3, 0x40, -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0x80, 0x74, - 0x57, 0x16, 0x57, 0x6c, 0xa2, 0xdc, 0xff, 0x72, 0x13, 0xee, 0x3d, 0x54, 0x83, 0xf3, 0xcf, 0xb3, - 0xc0, 0x9b, 0xce, 0x02, 0xef, 0xdb, 0x2c, 0xf0, 0x3e, 0xcc, 0x83, 0xd6, 0x74, 0x1e, 0xb4, 0xbe, - 0xce, 0x83, 0xd6, 0xf9, 0x49, 0xa4, 0xf1, 0xe2, 0x2a, 0x64, 0xd2, 0x24, 0xdc, 0x9d, 0xc9, 0x61, - 0x0a, 0xf8, 0xce, 0xd8, 0xcb, 0xea, 0x15, 0x83, 0x8a, 0xc0, 0xf2, 0xc9, 0x6f, 0xbf, 0x74, 0xb8, - 0xe9, 0x38, 0x1f, 0xfc, 0x08, 0x00, 0x00, 0xff, 0xff, 0x5b, 0xe2, 0x9c, 0x0f, 0xfb, 0x03, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0xdf, 0x6a, 0x13, 0x41, + 0x14, 0xc6, 0xb3, 0x9b, 0x52, 0xd3, 0x69, 0xd3, 0xca, 0x5c, 0x69, 0xc0, 0x55, 0x72, 0x55, 0x0b, + 0x9d, 0xa1, 0xf5, 0x56, 0x51, 0x52, 0x15, 0x03, 0x5e, 0x48, 0x2a, 0x0a, 0x22, 0x84, 0xd9, 0x99, + 0xe3, 0x76, 0xec, 0xee, 0xce, 0x32, 0x7b, 0x5a, 0xe3, 0x5b, 0xf8, 0x10, 0x3e, 0x80, 0x8f, 0xe1, + 0x65, 0x6f, 0x04, 0x2f, 0x25, 0x79, 0x01, 0x1f, 0x41, 0x76, 0x76, 0x37, 0xd9, 0x48, 0x30, 0x8a, + 0x97, 0xf3, 0x71, 0xbe, 0x8f, 0xdf, 0xf9, 0x33, 0xe4, 0xc0, 0x42, 0x04, 0x29, 0x07, 0x69, 0xa4, + 0x05, 0xa5, 0x91, 0x27, 0xc2, 0x9e, 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 0xf4, 0xee, 0xa2, 0xdd, + 0xd8, 0x48, 0x81, 0xda, 0xa4, 0xae, 0xdd, 0xad, 0x39, 0xfb, 0xf3, 0x4a, 0xa6, 0x8f, 0xc8, 0x6e, + 0xa2, 0xd3, 0x71, 0x8e, 0xc2, 0xe2, 0x58, 0x09, 0x84, 0x8a, 0xbd, 0xc7, 0xca, 0x23, 0x60, 0xf5, + 0x11, 0xb0, 0x97, 0xf5, 0x11, 0x8c, 0x76, 0x12, 0x9d, 0x9e, 0x16, 0x86, 0xc7, 0x02, 0x81, 0xde, + 0x27, 0x3b, 0x89, 0x98, 0x8c, 0x21, 0x55, 0xa5, 0x7f, 0x63, 0xad, 0x9f, 0x24, 0x62, 0xf2, 0x24, + 0x55, 0x85, 0xbb, 0xff, 0xc5, 0x23, 0x7b, 0xbf, 0x8d, 0x98, 0xde, 0x22, 0xa4, 0xc6, 0x9f, 0xf7, + 0xb6, 0x55, 0x29, 0x43, 0xb5, 0x02, 0xd9, 0xff, 0x4f, 0xe4, 0xf6, 0x3f, 0x21, 0x1f, 0x90, 0xee, + 0xd2, 0xe2, 0x8a, 0x4d, 0x94, 0xfb, 0x5f, 0x6c, 0xc2, 0xbd, 0x87, 0x6a, 0xf0, 0xfa, 0xeb, 0x34, + 0xf0, 0xae, 0xa6, 0x81, 0xf7, 0x63, 0x1a, 0x78, 0x9f, 0x66, 0x41, 0xeb, 0x6a, 0x16, 0xb4, 0xbe, + 0xcf, 0x82, 0xd6, 0x9b, 0x07, 0x91, 0xc6, 0xb3, 0x8b, 0x90, 0x49, 0x93, 0x70, 0x77, 0x26, 0x87, + 0x29, 0xe0, 0x07, 0x63, 0xcf, 0xab, 0x57, 0x0c, 0x2a, 0x02, 0xcb, 0x27, 0xab, 0xbf, 0x74, 0xb8, + 0xe9, 0x20, 0xef, 0xfd, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x3d, 0x56, 0xea, 0xf8, 0x03, 0x00, 0x00, } diff --git a/x/ecocredit/orderbook/memory.pb.go b/x/ecocredit/orderbook/memory.pb.go new file mode 100644 index 0000000000..74c2ee1bf3 --- /dev/null +++ b/x/ecocredit/orderbook/memory.pb.go @@ -0,0 +1,1335 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: regen/ecocredit/orderbook/v1alpha1/memory.proto + +package orderbook + +import ( + encoding_binary "encoding/binary" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1alpha1" + proto "github.com/gogo/protobuf/proto" + types "github.com/gogo/protobuf/types" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// BuyOrderSellOrderMatch defines the data the FIFO/price-time-priority matching +// algorithm used to actually match buy and sell orders. +type BuyOrderSellOrderMatch struct { + // market_id defines the market within which this match exists. + MarketId uint64 `protobuf:"varint,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // buy_order_id is the buy order ID. + BuyOrderId uint64 `protobuf:"varint,2,opt,name=buy_order_id,json=buyOrderId,proto3" json:"buy_order_id,omitempty"` + // sell_order_id is the sell order ID. + SellOrderId uint64 `protobuf:"varint,3,opt,name=sell_order_id,json=sellOrderId,proto3" json:"sell_order_id,omitempty"` + // bid_price_complement is the the complement (^ operator) of the bid price encoded as a uint32 (which should have sufficient precision) - effectively ~price * 10^exponent (usually 10^6). The complement is used so that bids can be sorted high to low. + BidPriceComplement uint32 `protobuf:"fixed32,4,opt,name=bid_price_complement,json=bidPriceComplement,proto3" json:"bid_price_complement,omitempty"` + // ask_price is the ask price encoded to a uint32. Ask prices are sorted low to high. + AskPrice uint32 `protobuf:"fixed32,5,opt,name=ask_price,json=askPrice,proto3" json:"ask_price,omitempty"` +} + +func (m *BuyOrderSellOrderMatch) Reset() { *m = BuyOrderSellOrderMatch{} } +func (m *BuyOrderSellOrderMatch) String() string { return proto.CompactTextString(m) } +func (*BuyOrderSellOrderMatch) ProtoMessage() {} +func (*BuyOrderSellOrderMatch) Descriptor() ([]byte, []int) { + return fileDescriptor_6c0285db5dc9271c, []int{0} +} +func (m *BuyOrderSellOrderMatch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BuyOrderSellOrderMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BuyOrderSellOrderMatch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BuyOrderSellOrderMatch) XXX_Merge(src proto.Message) { + xxx_messageInfo_BuyOrderSellOrderMatch.Merge(m, src) +} +func (m *BuyOrderSellOrderMatch) XXX_Size() int { + return m.Size() +} +func (m *BuyOrderSellOrderMatch) XXX_DiscardUnknown() { + xxx_messageInfo_BuyOrderSellOrderMatch.DiscardUnknown(m) +} + +var xxx_messageInfo_BuyOrderSellOrderMatch proto.InternalMessageInfo + +func (m *BuyOrderSellOrderMatch) GetMarketId() uint64 { + if m != nil { + return m.MarketId + } + return 0 +} + +func (m *BuyOrderSellOrderMatch) GetBuyOrderId() uint64 { + if m != nil { + return m.BuyOrderId + } + return 0 +} + +func (m *BuyOrderSellOrderMatch) GetSellOrderId() uint64 { + if m != nil { + return m.SellOrderId + } + return 0 +} + +func (m *BuyOrderSellOrderMatch) GetBidPriceComplement() uint32 { + if m != nil { + return m.BidPriceComplement + } + return 0 +} + +func (m *BuyOrderSellOrderMatch) GetAskPrice() uint32 { + if m != nil { + return m.AskPrice + } + return 0 +} + +// BuyOrderClassSelector indexes a buy order with class selector. +type BuyOrderClassSelector struct { + // buy_order_id is the buy order ID. + BuyOrderId uint64 `protobuf:"varint,1,opt,name=buy_order_id,json=buyOrderId,proto3" json:"buy_order_id,omitempty"` + // class_id is the class ID. + ClassId uint64 `protobuf:"varint,2,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` + // project_location is the project location in the selector's criteria. + ProjectLocation string `protobuf:"bytes,3,opt,name=project_location,json=projectLocation,proto3" json:"project_location,omitempty"` + // min_start_date is the minimum start date in the selector's criteria. + MinStartDate *types.Timestamp `protobuf:"bytes,4,opt,name=min_start_date,json=minStartDate,proto3" json:"min_start_date,omitempty"` + // max_end_date is the maximum end date in the selector's criteria. + MaxEndDate *types.Timestamp `protobuf:"bytes,5,opt,name=max_end_date,json=maxEndDate,proto3" json:"max_end_date,omitempty"` +} + +func (m *BuyOrderClassSelector) Reset() { *m = BuyOrderClassSelector{} } +func (m *BuyOrderClassSelector) String() string { return proto.CompactTextString(m) } +func (*BuyOrderClassSelector) ProtoMessage() {} +func (*BuyOrderClassSelector) Descriptor() ([]byte, []int) { + return fileDescriptor_6c0285db5dc9271c, []int{1} +} +func (m *BuyOrderClassSelector) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BuyOrderClassSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BuyOrderClassSelector.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BuyOrderClassSelector) XXX_Merge(src proto.Message) { + xxx_messageInfo_BuyOrderClassSelector.Merge(m, src) +} +func (m *BuyOrderClassSelector) XXX_Size() int { + return m.Size() +} +func (m *BuyOrderClassSelector) XXX_DiscardUnknown() { + xxx_messageInfo_BuyOrderClassSelector.DiscardUnknown(m) +} + +var xxx_messageInfo_BuyOrderClassSelector proto.InternalMessageInfo + +func (m *BuyOrderClassSelector) GetBuyOrderId() uint64 { + if m != nil { + return m.BuyOrderId + } + return 0 +} + +func (m *BuyOrderClassSelector) GetClassId() uint64 { + if m != nil { + return m.ClassId + } + return 0 +} + +func (m *BuyOrderClassSelector) GetProjectLocation() string { + if m != nil { + return m.ProjectLocation + } + return "" +} + +func (m *BuyOrderClassSelector) GetMinStartDate() *types.Timestamp { + if m != nil { + return m.MinStartDate + } + return nil +} + +func (m *BuyOrderClassSelector) GetMaxEndDate() *types.Timestamp { + if m != nil { + return m.MaxEndDate + } + return nil +} + +// BuyOrderProjectSelector indexes a buy order with project selector. +type BuyOrderProjectSelector struct { + // buy_order_id is the buy order ID. + BuyOrderId uint64 `protobuf:"varint,1,opt,name=buy_order_id,json=buyOrderId,proto3" json:"buy_order_id,omitempty"` + // project_id is the project ID. + ProjectId uint64 `protobuf:"varint,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // min_start_date is the minimum start date in the selector's criteria. + MinStartDate *types.Timestamp `protobuf:"bytes,3,opt,name=min_start_date,json=minStartDate,proto3" json:"min_start_date,omitempty"` + // max_end_date is the maximum end date in the selector's criteria. + MaxEndDate *types.Timestamp `protobuf:"bytes,4,opt,name=max_end_date,json=maxEndDate,proto3" json:"max_end_date,omitempty"` +} + +func (m *BuyOrderProjectSelector) Reset() { *m = BuyOrderProjectSelector{} } +func (m *BuyOrderProjectSelector) String() string { return proto.CompactTextString(m) } +func (*BuyOrderProjectSelector) ProtoMessage() {} +func (*BuyOrderProjectSelector) Descriptor() ([]byte, []int) { + return fileDescriptor_6c0285db5dc9271c, []int{2} +} +func (m *BuyOrderProjectSelector) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BuyOrderProjectSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BuyOrderProjectSelector.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BuyOrderProjectSelector) XXX_Merge(src proto.Message) { + xxx_messageInfo_BuyOrderProjectSelector.Merge(m, src) +} +func (m *BuyOrderProjectSelector) XXX_Size() int { + return m.Size() +} +func (m *BuyOrderProjectSelector) XXX_DiscardUnknown() { + xxx_messageInfo_BuyOrderProjectSelector.DiscardUnknown(m) +} + +var xxx_messageInfo_BuyOrderProjectSelector proto.InternalMessageInfo + +func (m *BuyOrderProjectSelector) GetBuyOrderId() uint64 { + if m != nil { + return m.BuyOrderId + } + return 0 +} + +func (m *BuyOrderProjectSelector) GetProjectId() uint64 { + if m != nil { + return m.ProjectId + } + return 0 +} + +func (m *BuyOrderProjectSelector) GetMinStartDate() *types.Timestamp { + if m != nil { + return m.MinStartDate + } + return nil +} + +func (m *BuyOrderProjectSelector) GetMaxEndDate() *types.Timestamp { + if m != nil { + return m.MaxEndDate + } + return nil +} + +// BuyOrderBatchSelector indexes a buy order with batch selector. +type BuyOrderBatchSelector struct { + // buy_order_id is the buy order ID. + BuyOrderId uint64 `protobuf:"varint,1,opt,name=buy_order_id,json=buyOrderId,proto3" json:"buy_order_id,omitempty"` + // batch_id is the batch ID. + BatchId uint64 `protobuf:"varint,2,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"` +} + +func (m *BuyOrderBatchSelector) Reset() { *m = BuyOrderBatchSelector{} } +func (m *BuyOrderBatchSelector) String() string { return proto.CompactTextString(m) } +func (*BuyOrderBatchSelector) ProtoMessage() {} +func (*BuyOrderBatchSelector) Descriptor() ([]byte, []int) { + return fileDescriptor_6c0285db5dc9271c, []int{3} +} +func (m *BuyOrderBatchSelector) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BuyOrderBatchSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BuyOrderBatchSelector.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BuyOrderBatchSelector) XXX_Merge(src proto.Message) { + xxx_messageInfo_BuyOrderBatchSelector.Merge(m, src) +} +func (m *BuyOrderBatchSelector) XXX_Size() int { + return m.Size() +} +func (m *BuyOrderBatchSelector) XXX_DiscardUnknown() { + xxx_messageInfo_BuyOrderBatchSelector.DiscardUnknown(m) +} + +var xxx_messageInfo_BuyOrderBatchSelector proto.InternalMessageInfo + +func (m *BuyOrderBatchSelector) GetBuyOrderId() uint64 { + if m != nil { + return m.BuyOrderId + } + return 0 +} + +func (m *BuyOrderBatchSelector) GetBatchId() uint64 { + if m != nil { + return m.BatchId + } + return 0 +} + +func init() { + proto.RegisterType((*BuyOrderSellOrderMatch)(nil), "regen.ecocredit.orderbook.v1alpha1.BuyOrderSellOrderMatch") + proto.RegisterType((*BuyOrderClassSelector)(nil), "regen.ecocredit.orderbook.v1alpha1.BuyOrderClassSelector") + proto.RegisterType((*BuyOrderProjectSelector)(nil), "regen.ecocredit.orderbook.v1alpha1.BuyOrderProjectSelector") + proto.RegisterType((*BuyOrderBatchSelector)(nil), "regen.ecocredit.orderbook.v1alpha1.BuyOrderBatchSelector") +} + +func init() { + proto.RegisterFile("regen/ecocredit/orderbook/v1alpha1/memory.proto", fileDescriptor_6c0285db5dc9271c) +} + +var fileDescriptor_6c0285db5dc9271c = []byte{ + // 610 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x4d, 0x6e, 0xd3, 0x40, + 0x14, 0xc7, 0x3b, 0x4e, 0x4a, 0xdb, 0x69, 0x28, 0x66, 0x44, 0xa9, 0x1b, 0xa8, 0xa9, 0xbc, 0x6a, + 0xa5, 0xd6, 0xa6, 0x74, 0x57, 0x58, 0xa0, 0x16, 0x84, 0x2c, 0x81, 0xa8, 0x52, 0xd8, 0xb0, 0xb1, + 0xc6, 0x9e, 0x21, 0x31, 0xf1, 0x78, 0xac, 0xf1, 0x04, 0x12, 0x89, 0x15, 0x12, 0x5b, 0xe0, 0x04, + 0x9c, 0x81, 0x63, 0xb0, 0xa3, 0x12, 0x1b, 0x96, 0x28, 0xb9, 0x01, 0x27, 0x40, 0x1e, 0xc7, 0x76, + 0x42, 0x83, 0x50, 0xc4, 0xce, 0xf3, 0xde, 0xfb, 0xbf, 0x8f, 0xdf, 0x3c, 0x0f, 0x74, 0x04, 0x6d, + 0xd3, 0xd8, 0xa1, 0x01, 0x0f, 0x04, 0x25, 0xa1, 0x74, 0xb8, 0x20, 0x54, 0xf8, 0x9c, 0x77, 0x9d, + 0xd7, 0x07, 0x38, 0x4a, 0x3a, 0xf8, 0xc0, 0x61, 0x94, 0x71, 0x31, 0xb0, 0x13, 0xc1, 0x25, 0x47, + 0x96, 0x12, 0xd8, 0xa5, 0xc0, 0x2e, 0x05, 0x76, 0x21, 0x68, 0xde, 0x6a, 0x73, 0xde, 0x8e, 0xa8, + 0xa3, 0x14, 0x7e, 0xef, 0xa5, 0x23, 0x43, 0x46, 0x53, 0x89, 0x59, 0x92, 0x27, 0x69, 0x6e, 0x05, + 0x3c, 0x65, 0x3c, 0x75, 0xb8, 0x60, 0x55, 0x19, 0x2e, 0x58, 0xee, 0xb6, 0xbe, 0x69, 0xf0, 0xfa, + 0x71, 0x6f, 0xf0, 0x34, 0xcb, 0x7c, 0x46, 0xa3, 0x48, 0x7d, 0x3c, 0xc1, 0x32, 0xe8, 0xa0, 0x1b, + 0x70, 0x85, 0x61, 0xd1, 0xa5, 0xd2, 0x0b, 0x89, 0x01, 0xb6, 0xc1, 0x4e, 0xbd, 0xb5, 0x9c, 0x1b, + 0x5c, 0x82, 0xb6, 0x61, 0xc3, 0xef, 0x0d, 0x3c, 0xd5, 0x51, 0xe6, 0xd7, 0x94, 0x1f, 0xfa, 0xe3, + 0x54, 0x2e, 0x41, 0x16, 0xbc, 0x9c, 0xd2, 0x28, 0xaa, 0x42, 0x6a, 0x2a, 0x64, 0x35, 0x2d, 0xaa, + 0xb8, 0x04, 0xdd, 0x86, 0xd7, 0xfc, 0x90, 0x78, 0x89, 0x08, 0x03, 0xea, 0x05, 0x9c, 0x25, 0x11, + 0x65, 0x34,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 0x4c, 0x7d, 0xe4, 0xa8, 0x5b, 0xd8, 0x85, 0x1b, + 0x70, 0x7d, 0x0a, 0x64, 0x31, 0x1a, 0x6a, 0x54, 0x63, 0xea, 0xc0, 0xd0, 0xac, 0x8f, 0x1a, 0xdc, + 0x28, 0x90, 0x9d, 0xe6, 0xc3, 0xcc, 0x01, 0x6d, 0x0b, 0xc2, 0x82, 0x4c, 0x89, 0x6d, 0x65, 0x6c, + 0x71, 0xc9, 0x0c, 0x1a, 0xb5, 0xff, 0xa4, 0x51, 0x9f, 0x8b, 0xc6, 0xa1, 0xa2, 0xb1, 0x0f, 0x37, + 0xe1, 0xc6, 0x14, 0x8d, 0xaa, 0x67, 0xb4, 0x36, 0x39, 0x81, 0x0e, 0x8c, 0x9a, 0xf5, 0x1e, 0x54, + 0x4b, 0x74, 0x9c, 0xfd, 0x8d, 0xf3, 0x2d, 0x91, 0x9f, 0x49, 0x26, 0x96, 0x48, 0x9d, 0x5d, 0xf2, + 0xd7, 0x9b, 0x29, 0xe2, 0xb3, 0x9b, 0x29, 0xbe, 0x75, 0x60, 0xd4, 0x8f, 0x9f, 0x7f, 0x1d, 0x9a, + 0xe0, 0x7c, 0x68, 0x82, 0x9f, 0x43, 0x13, 0x7c, 0x1a, 0x99, 0x0b, 0xe7, 0x23, 0x73, 0xe1, 0xc7, + 0xc8, 0x5c, 0x78, 0x71, 0xb7, 0x1d, 0xca, 0x4e, 0xcf, 0xb7, 0x03, 0xce, 0xf2, 0x87, 0x6d, 0x3f, + 0xa6, 0xf2, 0x0d, 0x17, 0xdd, 0xf1, 0x29, 0xa2, 0xa4, 0x4d, 0x85, 0xd3, 0x9f, 0xf5, 0xde, 0xf9, + 0x97, 0x14, 0xb3, 0xc3, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5d, 0xf0, 0x53, 0xe9, 0x13, 0x05, + 0x00, 0x00, +} + +func (m *BuyOrderSellOrderMatch) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BuyOrderSellOrderMatch) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BuyOrderSellOrderMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AskPrice != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.AskPrice)) + i-- + dAtA[i] = 0x2d + } + if m.BidPriceComplement != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.BidPriceComplement)) + i-- + dAtA[i] = 0x25 + } + if m.SellOrderId != 0 { + i = encodeVarintMemory(dAtA, i, uint64(m.SellOrderId)) + i-- + dAtA[i] = 0x18 + } + if m.BuyOrderId != 0 { + i = encodeVarintMemory(dAtA, i, uint64(m.BuyOrderId)) + i-- + dAtA[i] = 0x10 + } + if m.MarketId != 0 { + i = encodeVarintMemory(dAtA, i, uint64(m.MarketId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *BuyOrderClassSelector) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BuyOrderClassSelector) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BuyOrderClassSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MaxEndDate != nil { + { + size, err := m.MaxEndDate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMemory(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.MinStartDate != nil { + { + size, err := m.MinStartDate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMemory(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.ProjectLocation) > 0 { + i -= len(m.ProjectLocation) + copy(dAtA[i:], m.ProjectLocation) + i = encodeVarintMemory(dAtA, i, uint64(len(m.ProjectLocation))) + i-- + dAtA[i] = 0x1a + } + if m.ClassId != 0 { + i = encodeVarintMemory(dAtA, i, uint64(m.ClassId)) + i-- + dAtA[i] = 0x10 + } + if m.BuyOrderId != 0 { + i = encodeVarintMemory(dAtA, i, uint64(m.BuyOrderId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *BuyOrderProjectSelector) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BuyOrderProjectSelector) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BuyOrderProjectSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MaxEndDate != nil { + { + size, err := m.MaxEndDate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMemory(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.MinStartDate != nil { + { + size, err := m.MinStartDate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMemory(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.ProjectId != 0 { + i = encodeVarintMemory(dAtA, i, uint64(m.ProjectId)) + i-- + dAtA[i] = 0x10 + } + if m.BuyOrderId != 0 { + i = encodeVarintMemory(dAtA, i, uint64(m.BuyOrderId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *BuyOrderBatchSelector) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BuyOrderBatchSelector) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BuyOrderBatchSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BatchId != 0 { + i = encodeVarintMemory(dAtA, i, uint64(m.BatchId)) + i-- + dAtA[i] = 0x10 + } + if m.BuyOrderId != 0 { + i = encodeVarintMemory(dAtA, i, uint64(m.BuyOrderId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintMemory(dAtA []byte, offset int, v uint64) int { + offset -= sovMemory(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *BuyOrderSellOrderMatch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MarketId != 0 { + n += 1 + sovMemory(uint64(m.MarketId)) + } + if m.BuyOrderId != 0 { + n += 1 + sovMemory(uint64(m.BuyOrderId)) + } + if m.SellOrderId != 0 { + n += 1 + sovMemory(uint64(m.SellOrderId)) + } + if m.BidPriceComplement != 0 { + n += 5 + } + if m.AskPrice != 0 { + n += 5 + } + return n +} + +func (m *BuyOrderClassSelector) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BuyOrderId != 0 { + n += 1 + sovMemory(uint64(m.BuyOrderId)) + } + if m.ClassId != 0 { + n += 1 + sovMemory(uint64(m.ClassId)) + } + l = len(m.ProjectLocation) + if l > 0 { + n += 1 + l + sovMemory(uint64(l)) + } + if m.MinStartDate != nil { + l = m.MinStartDate.Size() + n += 1 + l + sovMemory(uint64(l)) + } + if m.MaxEndDate != nil { + l = m.MaxEndDate.Size() + n += 1 + l + sovMemory(uint64(l)) + } + return n +} + +func (m *BuyOrderProjectSelector) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BuyOrderId != 0 { + n += 1 + sovMemory(uint64(m.BuyOrderId)) + } + if m.ProjectId != 0 { + n += 1 + sovMemory(uint64(m.ProjectId)) + } + if m.MinStartDate != nil { + l = m.MinStartDate.Size() + n += 1 + l + sovMemory(uint64(l)) + } + if m.MaxEndDate != nil { + l = m.MaxEndDate.Size() + n += 1 + l + sovMemory(uint64(l)) + } + return n +} + +func (m *BuyOrderBatchSelector) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BuyOrderId != 0 { + n += 1 + sovMemory(uint64(m.BuyOrderId)) + } + if m.BatchId != 0 { + n += 1 + sovMemory(uint64(m.BatchId)) + } + return n +} + +func sovMemory(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMemory(x uint64) (n int) { + return sovMemory(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *BuyOrderSellOrderMatch) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMemory + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BuyOrderSellOrderMatch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BuyOrderSellOrderMatch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + m.MarketId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMemory + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MarketId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BuyOrderId", wireType) + } + m.BuyOrderId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMemory + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BuyOrderId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SellOrderId", wireType) + } + m.SellOrderId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMemory + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SellOrderId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field BidPriceComplement", wireType) + } + m.BidPriceComplement = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.BidPriceComplement = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 5: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field AskPrice", wireType) + } + m.AskPrice = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.AskPrice = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + default: + iNdEx = preIndex + skippy, err := skipMemory(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMemory + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BuyOrderClassSelector) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMemory + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BuyOrderClassSelector: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BuyOrderClassSelector: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BuyOrderId", wireType) + } + m.BuyOrderId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMemory + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BuyOrderId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType) + } + m.ClassId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMemory + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ClassId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProjectLocation", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMemory + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMemory + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMemory + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProjectLocation = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinStartDate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMemory + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMemory + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMemory + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MinStartDate == nil { + m.MinStartDate = &types.Timestamp{} + } + if err := m.MinStartDate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxEndDate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMemory + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMemory + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMemory + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MaxEndDate == nil { + m.MaxEndDate = &types.Timestamp{} + } + if err := m.MaxEndDate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMemory(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMemory + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BuyOrderProjectSelector) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMemory + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BuyOrderProjectSelector: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BuyOrderProjectSelector: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BuyOrderId", wireType) + } + m.BuyOrderId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMemory + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BuyOrderId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProjectId", wireType) + } + m.ProjectId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMemory + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProjectId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinStartDate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMemory + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMemory + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMemory + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MinStartDate == nil { + m.MinStartDate = &types.Timestamp{} + } + if err := m.MinStartDate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxEndDate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMemory + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMemory + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMemory + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MaxEndDate == nil { + m.MaxEndDate = &types.Timestamp{} + } + if err := m.MaxEndDate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMemory(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMemory + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BuyOrderBatchSelector) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMemory + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BuyOrderBatchSelector: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BuyOrderBatchSelector: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BuyOrderId", wireType) + } + m.BuyOrderId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMemory + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BuyOrderId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BatchId", wireType) + } + m.BatchId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMemory + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BatchId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMemory(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMemory + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMemory(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMemory + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMemory + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMemory + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthMemory + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMemory + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMemory + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMemory = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMemory = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMemory = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/ecocredit/server/core/cancel.go b/x/ecocredit/server/core/cancel.go index b9265695b5..9ba723b172 100644 --- a/x/ecocredit/server/core/cancel.go +++ b/x/ecocredit/server/core/cancel.go @@ -2,15 +2,17 @@ package core import ( "context" + sdk "github.com/cosmos/cosmos-sdk/types" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" "github.com/regen-network/regen-ledger/types" "github.com/regen-network/regen-ledger/types/math" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) // Cancel credits, removing them from the supply and balance of the holder -func (k Keeper) Cancel(ctx context.Context, req *v1.MsgCancel) (*v1.MsgCancelResponse, error) { +func (k Keeper) Cancel(ctx context.Context, req *core.MsgCancel) (*core.MsgCancelResponse, error) { sdkCtx := types.UnwrapSDKContext(ctx) holder, err := sdk.AccAddressFromBech32(req.Holder) if err != nil { @@ -53,7 +55,7 @@ func (k Keeper) Cancel(ctx context.Context, req *v1.MsgCancel) (*v1.MsgCancelRes if err != nil { return nil, err } - if err = k.stateStore.BatchBalanceStore().Update(ctx, &ecocreditv1.BatchBalance{ + if err = k.stateStore.BatchBalanceStore().Update(ctx, &api.BatchBalance{ Address: holder, BatchId: batch.Id, Tradable: userBalTradable.String(), @@ -61,7 +63,7 @@ func (k Keeper) Cancel(ctx context.Context, req *v1.MsgCancel) (*v1.MsgCancelRes }); err != nil { return nil, err } - if err = k.stateStore.BatchSupplyStore().Update(ctx, &ecocreditv1.BatchSupply{ + if err = k.stateStore.BatchSupplyStore().Update(ctx, &api.BatchSupply{ BatchId: batch.Id, TradableAmount: supplyTradable.String(), RetiredAmount: batchSupply.RetiredAmount, @@ -69,7 +71,7 @@ func (k Keeper) Cancel(ctx context.Context, req *v1.MsgCancel) (*v1.MsgCancelRes }); err != nil { return nil, err } - if err = sdkCtx.EventManager().EmitTypedEvent(&v1.EventCancel{ + if err = sdkCtx.EventManager().EmitTypedEvent(&core.EventCancel{ Canceller: holder.String(), BatchDenom: credit.BatchDenom, Amount: credit.Amount, @@ -78,5 +80,5 @@ func (k Keeper) Cancel(ctx context.Context, req *v1.MsgCancel) (*v1.MsgCancelRes } sdkCtx.GasMeter().ConsumeGas(gasCostPerIteration, "cancel ecocredits") } - return &v1.MsgCancelResponse{}, nil + return &core.MsgCancelResponse{}, nil } diff --git a/x/ecocredit/server/core/cancel_test.go b/x/ecocredit/server/core/cancel_test.go index 60d326a3a0..72eb626fe4 100644 --- a/x/ecocredit/server/core/cancel_test.go +++ b/x/ecocredit/server/core/cancel_test.go @@ -1,12 +1,15 @@ package core import ( - "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" + "testing" + "github.com/golang/mock/gomock" - "github.com/regen-network/regen-ledger/x/ecocredit" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" "gotest.tools/v3/assert" - "testing" + + "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" + + "github.com/regen-network/regen-ledger/x/ecocredit" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) func TestCancel_Valid(t *testing.T) { @@ -22,9 +25,9 @@ func TestCancel_Valid(t *testing.T) { // Supply -> tradable: 10.5 , retired: 10.5 // s.addr balance -> tradable 10.5 , retired 10.5 - _, err := s.k.Cancel(s.ctx, &v1.MsgCancel{ + _, err := s.k.Cancel(s.ctx, &core.MsgCancel{ Holder: s.addr.String(), - Credits: []*v1.MsgCancel_CancelCredits{ + Credits: []*core.MsgCancel_CancelCredits{ { BatchDenom: batchDenom, Amount: "10.5", @@ -56,9 +59,9 @@ func TestCancel_InsufficientFunds(t *testing.T) { p.CreditTypes = []*ecocredit.CreditType{{Name: "carbon", Abbreviation: "C", Unit: "tonne", Precision: 6}} }).Times(1) - _, err := s.k.Cancel(s.ctx, &v1.MsgCancel{ + _, err := s.k.Cancel(s.ctx, &core.MsgCancel{ Holder: s.addr.String(), - Credits: []*v1.MsgCancel_CancelCredits{ + Credits: []*core.MsgCancel_CancelCredits{ { BatchDenom: "C01-20200101-20210101-01", Amount: "100000", @@ -79,9 +82,9 @@ func TestCancel_BadPrecision(t *testing.T) { p.CreditTypes = []*ecocredit.CreditType{{Name: "carbon", Abbreviation: "C", Unit: "tonne", Precision: 6}} }).Times(1) - _, err := s.k.Cancel(s.ctx, &v1.MsgCancel{ + _, err := s.k.Cancel(s.ctx, &core.MsgCancel{ Holder: s.addr.String(), - Credits: []*v1.MsgCancel_CancelCredits{ + Credits: []*core.MsgCancel_CancelCredits{ { BatchDenom: "C01-20200101-20210101-01", Amount: "10.5290385029385820935", @@ -96,9 +99,9 @@ func TestCancel_InvalidBatch(t *testing.T) { s := setupBase(t) s.setupClassProjectBatch(t) - _, err := s.k.Cancel(s.ctx, &v1.MsgCancel{ + _, err := s.k.Cancel(s.ctx, &core.MsgCancel{ Holder: s.addr.String(), - Credits: []*v1.MsgCancel_CancelCredits{ + Credits: []*core.MsgCancel_CancelCredits{ { BatchDenom: "C00-00000000-00000000-01", Amount: "100000", diff --git a/x/ecocredit/server/core/create_batch.go b/x/ecocredit/server/core/create_batch.go index 189a3c3482..77b1ba8c18 100644 --- a/x/ecocredit/server/core/create_batch.go +++ b/x/ecocredit/server/core/create_batch.go @@ -2,18 +2,21 @@ package core import ( "context" + + "google.golang.org/protobuf/types/known/timestamppb" + "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" sdk "github.com/cosmos/cosmos-sdk/types" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" "github.com/regen-network/regen-ledger/types/math" "github.com/regen-network/regen-ledger/x/ecocredit" - "github.com/regen-network/regen-ledger/x/ecocredit/v1" - "google.golang.org/protobuf/types/known/timestamppb" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) // CreateBatch creates a new batch of credits. // Credits in the batch must not have more decimal places than the credit type's specified precision. -func (k Keeper) CreateBatch(ctx context.Context, req *v1.MsgCreateBatch) (*v1.MsgCreateBatchResponse, error) { +func (k Keeper) CreateBatch(ctx context.Context, req *core.MsgCreateBatch) (*core.MsgCreateBatchResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) projectID := req.ProjectId @@ -43,7 +46,7 @@ func (k Keeper) CreateBatch(ctx context.Context, req *v1.MsgCreateBatch) (*v1.Ms } startDate, endDate := timestamppb.New(req.StartDate.UTC()), timestamppb.New(req.EndDate.UTC()) - rowID, err := k.stateStore.BatchInfoStore().InsertReturningID(ctx, &ecocreditv1.BatchInfo{ + rowID, err := k.stateStore.BatchInfoStore().InsertReturningID(ctx, &api.BatchInfo{ ProjectId: projectInfo.Id, BatchDenom: batchDenom, Metadata: req.Metadata, @@ -82,7 +85,7 @@ func (k Keeper) CreateBatch(ctx context.Context, req *v1.MsgCreateBatch) (*v1.Ms if err != nil { return nil, err } - if err = sdkCtx.EventManager().EmitTypedEvent(&v1.EventRetire{ + if err = sdkCtx.EventManager().EmitTypedEvent(&core.EventRetire{ Retirer: recipient.String(), BatchDenom: batchDenom, Amount: retired.String(), @@ -91,7 +94,7 @@ func (k Keeper) CreateBatch(ctx context.Context, req *v1.MsgCreateBatch) (*v1.Ms return nil, err } } - if err = k.stateStore.BatchBalanceStore().Insert(ctx, &ecocreditv1.BatchBalance{ + if err = k.stateStore.BatchBalanceStore().Insert(ctx, &api.BatchBalance{ Address: recipient, BatchId: rowID, Tradable: tradable.String(), @@ -100,7 +103,7 @@ func (k Keeper) CreateBatch(ctx context.Context, req *v1.MsgCreateBatch) (*v1.Ms return nil, err } - if err = sdkCtx.EventManager().EmitTypedEvent(&v1.EventReceive{ + if err = sdkCtx.EventManager().EmitTypedEvent(&core.EventReceive{ Recipient: recipient.String(), BatchDenom: batchDenom, RetiredAmount: retired.String(), @@ -112,7 +115,7 @@ func (k Keeper) CreateBatch(ctx context.Context, req *v1.MsgCreateBatch) (*v1.Ms sdkCtx.GasMeter().ConsumeGas(gasCostPerIteration, "batch issuance") } - if err = k.stateStore.BatchSupplyStore().Insert(ctx, &ecocreditv1.BatchSupply{ + if err = k.stateStore.BatchSupplyStore().Insert(ctx, &api.BatchSupply{ BatchId: rowID, TradableAmount: tradableSupply.String(), RetiredAmount: retiredSupply.String(), @@ -126,7 +129,7 @@ func (k Keeper) CreateBatch(ctx context.Context, req *v1.MsgCreateBatch) (*v1.Ms return nil, err } - if err = sdkCtx.EventManager().EmitTypedEvent(&v1.EventCreateBatch{ + if err = sdkCtx.EventManager().EmitTypedEvent(&core.EventCreateBatch{ ClassId: classInfo.Name, BatchDenom: batchDenom, Issuer: req.Issuer, @@ -139,7 +142,7 @@ func (k Keeper) CreateBatch(ctx context.Context, req *v1.MsgCreateBatch) (*v1.Ms return nil, err } - return &v1.MsgCreateBatchResponse{BatchDenom: batchDenom}, nil + return &core.MsgCreateBatchResponse{BatchDenom: batchDenom}, nil } // getBatchSeqNo gets the batch sequence number @@ -154,7 +157,7 @@ func (k Keeper) getBatchSeqNo(ctx context.Context, projectID string) (uint64, er seq = batchSeq.NextBatchId } - if err = k.stateStore.BatchSequenceStore().Save(ctx, &ecocreditv1.BatchSequence{ + if err = k.stateStore.BatchSequenceStore().Save(ctx, &api.BatchSequence{ ProjectId: projectID, NextBatchId: seq + 1, }); err != nil { diff --git a/x/ecocredit/server/core/create_batch_test.go b/x/ecocredit/server/core/create_batch_test.go index 6d84d2fad7..6396b359c7 100644 --- a/x/ecocredit/server/core/create_batch_test.go +++ b/x/ecocredit/server/core/create_batch_test.go @@ -2,15 +2,18 @@ package core import ( "context" + "testing" + "time" + + "github.com/golang/mock/gomock" + "gotest.tools/v3/assert" + "github.com/cosmos/cosmos-sdk/testutil/testdata" "github.com/cosmos/cosmos-sdk/types" - "github.com/golang/mock/gomock" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" "github.com/regen-network/regen-ledger/x/ecocredit" - "github.com/regen-network/regen-ledger/x/ecocredit/v1" - "gotest.tools/v3/assert" - "testing" - "time" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) func TestCreateBatch_Valid(t *testing.T) { @@ -27,10 +30,10 @@ func TestCreateBatch_Valid(t *testing.T) { }).Times(1) start, end := time.Now(), time.Now() - res, err := s.k.CreateBatch(s.ctx, &v1.MsgCreateBatch{ + res, err := s.k.CreateBatch(s.ctx, &core.MsgCreateBatch{ Issuer: s.addr.String(), ProjectId: "PRO", - Issuance: []*v1.MsgCreateBatch_BatchIssuance{ + Issuance: []*core.MsgCreateBatch_BatchIssuance{ { Recipient: s.addr.String(), TradableAmount: "10", @@ -91,10 +94,10 @@ func TestCreateBatch_BadPrecision(t *testing.T) { }).Times(1) start, end := time.Now(), time.Now() - _, err := s.k.CreateBatch(s.ctx, &v1.MsgCreateBatch{ + _, err := s.k.CreateBatch(s.ctx, &core.MsgCreateBatch{ Issuer: s.addr.String(), ProjectId: "PRO", - Issuance: []*v1.MsgCreateBatch_BatchIssuance{ + Issuance: []*core.MsgCreateBatch_BatchIssuance{ { Recipient: s.addr.String(), TradableAmount: "10.1234567891111", @@ -111,7 +114,7 @@ func TestCreateBatch_UnauthorizedIssuer(t *testing.T) { t.Parallel() s := setupBase(t) batchTestSetup(t, s.ctx, s.stateStore, s.addr) - _, err := s.k.CreateBatch(s.ctx, &v1.MsgCreateBatch{ + _, err := s.k.CreateBatch(s.ctx, &core.MsgCreateBatch{ ProjectId: "PRO", Issuer: types.AccAddress("FooBarBaz").String(), }) @@ -122,28 +125,28 @@ func TestCreateBatch_ProjectNotFound(t *testing.T) { t.Parallel() s := setupBase(t) - _, err := s.k.CreateBatch(s.ctx, &v1.MsgCreateBatch{ + _, err := s.k.CreateBatch(s.ctx, &core.MsgCreateBatch{ ProjectId: "none", }) assert.ErrorContains(t, err, "not found") } // creates a class "C01", with a single class issuer, and a project "PRO" -func batchTestSetup(t *testing.T, ctx context.Context, ss ecocreditv1.StateStore, addr types.AccAddress) (className, projectName string) { +func batchTestSetup(t *testing.T, ctx context.Context, ss api.StateStore, addr types.AccAddress) (className, projectName string) { className, projectName = "C01", "PRO" - cid, err := ss.ClassInfoStore().InsertReturningID(ctx, &ecocreditv1.ClassInfo{ + cid, err := ss.ClassInfoStore().InsertReturningID(ctx, &api.ClassInfo{ Name: className, Admin: addr, Metadata: nil, CreditType: "C", }) assert.NilError(t, err) - err = ss.ClassIssuerStore().Insert(ctx, &ecocreditv1.ClassIssuer{ + err = ss.ClassIssuerStore().Insert(ctx, &api.ClassIssuer{ ClassId: cid, Issuer: addr, }) assert.NilError(t, err) - _, err = ss.ProjectInfoStore().InsertReturningID(ctx, &ecocreditv1.ProjectInfo{ + _, err = ss.ProjectInfoStore().InsertReturningID(ctx, &api.ProjectInfo{ Name: projectName, ClassId: 1, ProjectLocation: "", diff --git a/x/ecocredit/server/core/create_class.go b/x/ecocredit/server/core/create_class.go index 73d166617e..1532f900f2 100644 --- a/x/ecocredit/server/core/create_class.go +++ b/x/ecocredit/server/core/create_class.go @@ -2,12 +2,14 @@ package core import ( "context" + "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" "github.com/regen-network/regen-ledger/x/ecocredit" - "github.com/regen-network/regen-ledger/x/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) // CreateClass creates a new class of ecocredit @@ -15,7 +17,7 @@ import ( // The admin is charged a fee for creating the class. This is controlled by // the global parameter CreditClassFee, which can be updated through the // governance process. -func (k Keeper) CreateClass(goCtx context.Context, req *v1.MsgCreateClass) (*v1.MsgCreateClassResponse, error) { +func (k Keeper) CreateClass(goCtx context.Context, req *core.MsgCreateClass) (*core.MsgCreateClassResponse, error) { sdkCtx := sdk.UnwrapSDKContext(goCtx) adminAddress, err := sdk.AccAddressFromBech32(req.Admin) if err != nil { @@ -51,7 +53,7 @@ func (k Keeper) CreateClass(goCtx context.Context, req *v1.MsgCreateClass) (*v1. } else { seq = classSeq.NextClassId } - if err = k.stateStore.ClassSequenceStore().Save(goCtx, &ecocreditv1.ClassSequence{ + if err = k.stateStore.ClassSequenceStore().Save(goCtx, &api.ClassSequence{ CreditType: creditType.Abbreviation, NextClassId: seq + 1, }); err != nil { @@ -60,7 +62,7 @@ func (k Keeper) CreateClass(goCtx context.Context, req *v1.MsgCreateClass) (*v1. classID := ecocredit.FormatClassID(creditType.Abbreviation, seq) - rowId, err := k.stateStore.ClassInfoStore().InsertReturningID(goCtx, &ecocreditv1.ClassInfo{ + rowId, err := k.stateStore.ClassInfoStore().InsertReturningID(goCtx, &api.ClassInfo{ Name: classID, Admin: adminAddress, Metadata: req.Metadata, @@ -75,7 +77,7 @@ func (k Keeper) CreateClass(goCtx context.Context, req *v1.MsgCreateClass) (*v1. if err != nil { return nil, err } - if err = k.stateStore.ClassIssuerStore().Insert(goCtx, &ecocreditv1.ClassIssuer{ + if err = k.stateStore.ClassIssuerStore().Insert(goCtx, &api.ClassIssuer{ ClassId: rowId, Issuer: issuer, }); err != nil { @@ -83,7 +85,7 @@ func (k Keeper) CreateClass(goCtx context.Context, req *v1.MsgCreateClass) (*v1. } } - err = sdkCtx.EventManager().EmitTypedEvent(&v1.EventCreateClass{ + err = sdkCtx.EventManager().EmitTypedEvent(&core.EventCreateClass{ ClassId: classID, Admin: req.Admin, }) @@ -91,7 +93,7 @@ func (k Keeper) CreateClass(goCtx context.Context, req *v1.MsgCreateClass) (*v1. return nil, err } - return &v1.MsgCreateClassResponse{ClassId: classID}, nil + return &core.MsgCreateClassResponse{ClassId: classID}, nil } func (k Keeper) isCreatorAllowListed(ctx sdk.Context, allowlist []string, designer sdk.AccAddress) bool { diff --git a/x/ecocredit/server/core/create_class_test.go b/x/ecocredit/server/core/create_class_test.go index 1094d345fc..623edc8c88 100644 --- a/x/ecocredit/server/core/create_class_test.go +++ b/x/ecocredit/server/core/create_class_test.go @@ -1,12 +1,15 @@ package core import ( - sdk "github.com/cosmos/cosmos-sdk/types" + "testing" + "github.com/golang/mock/gomock" - "github.com/regen-network/regen-ledger/x/ecocredit" - "github.com/regen-network/regen-ledger/x/ecocredit/v1" "gotest.tools/v3/assert" - "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/regen-network/regen-ledger/x/ecocredit" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) func TestCreateClass_Valid(t *testing.T) { @@ -22,7 +25,7 @@ func TestCreateClass_Valid(t *testing.T) { s.bankKeeper.EXPECT().SendCoinsFromAccountToModule(any, any, any, any).Return(nil).Times(1) s.bankKeeper.EXPECT().BurnCoins(any, any, any).Return(nil).Times(1) - res, err := s.k.CreateClass(s.ctx, &v1.MsgCreateClass{ + res, err := s.k.CreateClass(s.ctx, &core.MsgCreateClass{ Admin: s.addr.String(), Issuers: []string{s.addr.String()}, Metadata: nil, @@ -56,7 +59,7 @@ func TestCreateClass_Unauthorized(t *testing.T) { p.AllowlistEnabled = true p.AllowedClassCreators = append(p.AllowedClassCreators, "foo") }).Times(1) - _, err := s.k.CreateClass(s.ctx, &v1.MsgCreateClass{ + _, err := s.k.CreateClass(s.ctx, &core.MsgCreateClass{ Admin: s.addr.String(), Issuers: []string{s.addr.String()}, Metadata: nil, @@ -79,7 +82,7 @@ func TestCreateClass_Sequence(t *testing.T) { s.bankKeeper.EXPECT().SendCoinsFromAccountToModule(any, any, any, any).Return(nil).Times(2) s.bankKeeper.EXPECT().BurnCoins(any, any, any).Return(nil).Times(2) - res, err := s.k.CreateClass(s.ctx, &v1.MsgCreateClass{ + res, err := s.k.CreateClass(s.ctx, &core.MsgCreateClass{ Admin: s.addr.String(), Issuers: []string{s.addr.String()}, Metadata: nil, @@ -87,7 +90,7 @@ func TestCreateClass_Sequence(t *testing.T) { }) assert.NilError(t, err, "error creating class: %+w", err) - res2, err := s.k.CreateClass(s.ctx, &v1.MsgCreateClass{ + res2, err := s.k.CreateClass(s.ctx, &core.MsgCreateClass{ Admin: s.addr.String(), Issuers: []string{s.addr.String()}, Metadata: nil, diff --git a/x/ecocredit/server/core/create_project.go b/x/ecocredit/server/core/create_project.go index 2bb0de6544..c41e372be9 100644 --- a/x/ecocredit/server/core/create_project.go +++ b/x/ecocredit/server/core/create_project.go @@ -2,15 +2,17 @@ package core import ( "context" + "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" "github.com/regen-network/regen-ledger/types" "github.com/regen-network/regen-ledger/x/ecocredit" - "github.com/regen-network/regen-ledger/x/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) // CreateProject creates a new project for a specific credit class. -func (k Keeper) CreateProject(ctx context.Context, req *v1.MsgCreateProject) (*v1.MsgCreateProjectResponse, error) { +func (k Keeper) CreateProject(ctx context.Context, req *core.MsgCreateProject) (*core.MsgCreateProjectResponse, error) { sdkCtx := types.UnwrapSDKContext(ctx) classID := req.ClassId classInfo, err := k.stateStore.ClassInfoStore().GetByName(ctx, classID) @@ -38,7 +40,7 @@ func (k Keeper) CreateProject(ctx context.Context, req *v1.MsgCreateProject) (*v } } - if err = k.stateStore.ProjectInfoStore().Insert(ctx, &ecocreditv1.ProjectInfo{ + if err = k.stateStore.ProjectInfoStore().Insert(ctx, &api.ProjectInfo{ Name: projectID, ClassId: classInfo.Id, ProjectLocation: req.ProjectLocation, @@ -47,7 +49,7 @@ func (k Keeper) CreateProject(ctx context.Context, req *v1.MsgCreateProject) (*v return nil, err } - if err := sdkCtx.EventManager().EmitTypedEvent(&v1.EventCreateProject{ + if err := sdkCtx.EventManager().EmitTypedEvent(&core.EventCreateProject{ ClassId: classID, ProjectId: projectID, Issuer: req.Issuer, @@ -56,7 +58,7 @@ func (k Keeper) CreateProject(ctx context.Context, req *v1.MsgCreateProject) (*v return nil, err } - return &v1.MsgCreateProjectResponse{ + return &core.MsgCreateProjectResponse{ ProjectId: projectID, }, nil } @@ -75,7 +77,7 @@ func (k Keeper) genProjectID(ctx context.Context, classRowID uint64, classID str return "", err } - if err = k.stateStore.ProjectSequenceStore().Save(ctx, &ecocreditv1.ProjectSequence{ + if err = k.stateStore.ProjectSequenceStore().Save(ctx, &api.ProjectSequence{ ClassId: classRowID, NextProjectId: nextID + 1, }); err != nil { diff --git a/x/ecocredit/server/core/create_project_test.go b/x/ecocredit/server/core/create_project_test.go index a545e05428..2e450a770e 100644 --- a/x/ecocredit/server/core/create_project_test.go +++ b/x/ecocredit/server/core/create_project_test.go @@ -2,19 +2,22 @@ package core import ( "context" + "testing" + + "gotest.tools/v3/assert" + "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" "github.com/cosmos/cosmos-sdk/types" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - "github.com/regen-network/regen-ledger/x/ecocredit/v1" - "gotest.tools/v3/assert" - "testing" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) func TestCreateProject_ValidProjectState(t *testing.T) { t.Parallel() s := setupBase(t) makeClass(t, s.ctx, s.stateStore, s.addr) - res, err := s.k.CreateProject(s.ctx, &v1.MsgCreateProject{ + res, err := s.k.CreateProject(s.ctx, &core.MsgCreateProject{ Issuer: s.addr.String(), ClassId: "C01", Metadata: nil, @@ -33,7 +36,7 @@ func TestCreateProject_GeneratedProjectID(t *testing.T) { t.Parallel() s := setupBase(t) makeClass(t, s.ctx, s.stateStore, s.addr) - res, err := s.k.CreateProject(s.ctx, &v1.MsgCreateProject{ + res, err := s.k.CreateProject(s.ctx, &core.MsgCreateProject{ Issuer: s.addr.String(), ClassId: "C01", Metadata: nil, @@ -43,7 +46,7 @@ func TestCreateProject_GeneratedProjectID(t *testing.T) { assert.NilError(t, err) assert.Equal(t, res.ProjectId, "C0101", "got project id: %s", res.ProjectId) - res, err = s.k.CreateProject(s.ctx, &v1.MsgCreateProject{ + res, err = s.k.CreateProject(s.ctx, &core.MsgCreateProject{ Issuer: s.addr.String(), ClassId: "C01", Metadata: nil, @@ -57,7 +60,7 @@ func TestCreateProject_GeneratedProjectID(t *testing.T) { func TestCreateProject_BadClassID(t *testing.T) { t.Parallel() s := setupBase(t) - _, err := s.k.CreateProject(s.ctx, &v1.MsgCreateProject{ + _, err := s.k.CreateProject(s.ctx, &core.MsgCreateProject{ Issuer: s.addr.String(), ClassId: "NOPE", ProjectLocation: "US-NY", @@ -70,7 +73,7 @@ func TestCreateProject_NoDuplicates(t *testing.T) { t.Parallel() s := setupBase(t) makeClass(t, s.ctx, s.stateStore, s.addr) - _, err := s.k.CreateProject(s.ctx, &v1.MsgCreateProject{ + _, err := s.k.CreateProject(s.ctx, &core.MsgCreateProject{ Issuer: s.addr.String(), ClassId: "C01", ProjectLocation: "US-NY", @@ -78,7 +81,7 @@ func TestCreateProject_NoDuplicates(t *testing.T) { }) assert.NilError(t, err) - _, err = s.k.CreateProject(s.ctx, &v1.MsgCreateProject{ + _, err = s.k.CreateProject(s.ctx, &core.MsgCreateProject{ Issuer: s.addr.String(), ClassId: "C01", ProjectLocation: "US-NY", @@ -87,14 +90,14 @@ func TestCreateProject_NoDuplicates(t *testing.T) { assert.ErrorContains(t, err, ormerrors.UniqueKeyViolation.Error()) } -func makeClass(t *testing.T, ctx context.Context, ss ecocreditv1.StateStore, addr types.AccAddress) { - assert.NilError(t, ss.ClassInfoStore().Insert(ctx, &ecocreditv1.ClassInfo{ +func makeClass(t *testing.T, ctx context.Context, ss api.StateStore, addr types.AccAddress) { + assert.NilError(t, ss.ClassInfoStore().Insert(ctx, &api.ClassInfo{ Name: "C01", Admin: addr, Metadata: nil, CreditType: "C", })) - assert.NilError(t, ss.ClassIssuerStore().Insert(ctx, &ecocreditv1.ClassIssuer{ + assert.NilError(t, ss.ClassIssuerStore().Insert(ctx, &api.ClassIssuer{ ClassId: 1, Issuer: addr, })) diff --git a/x/ecocredit/server/core/keeper.go b/x/ecocredit/server/core/keeper.go index f8c970e924..567ed0b8b3 100644 --- a/x/ecocredit/server/core/keeper.go +++ b/x/ecocredit/server/core/keeper.go @@ -3,7 +3,8 @@ package core import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/params/types" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" "github.com/regen-network/regen-ledger/x/ecocredit" ) @@ -12,7 +13,7 @@ import ( const gasCostPerIteration = uint64(10) type Keeper struct { - stateStore ecocreditv1.StateStore + stateStore api.StateStore bankKeeper ecocredit.BankKeeper params ParamKeeper } @@ -21,7 +22,7 @@ type ParamKeeper interface { GetParamSet(ctx sdk.Context, ps types.ParamSet) } -func NewKeeper(ss ecocreditv1.StateStore, bk ecocredit.BankKeeper, params ParamKeeper) Keeper { +func NewKeeper(ss api.StateStore, bk ecocredit.BankKeeper, params ParamKeeper) Keeper { return Keeper{ stateStore: ss, bankKeeper: bk, diff --git a/x/ecocredit/server/core/keeper_test.go b/x/ecocredit/server/core/keeper_test.go index 4f652d9d13..eaf723e443 100644 --- a/x/ecocredit/server/core/keeper_test.go +++ b/x/ecocredit/server/core/keeper_test.go @@ -2,10 +2,10 @@ package core import ( "context" - "github.com/regen-network/regen-ledger/x/ecocredit/mocks" - "github.com/regen-network/regen-ledger/x/ecocredit/server" - mocks2 "github.com/regen-network/regen-ledger/x/ecocredit/server/core/mocks" - "github.com/tendermint/tendermint/libs/log" + "testing" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" "google.golang.org/protobuf/types/known/timestamppb" "gotest.tools/v3/assert" @@ -15,18 +15,20 @@ import ( "github.com/cosmos/cosmos-sdk/store" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/golang/mock/gomock" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - "testing" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/mocks" + "github.com/regen-network/regen-ledger/x/ecocredit/server" + mocks2 "github.com/regen-network/regen-ledger/x/ecocredit/server/core/mocks" ) type baseSuite struct { t *testing.T db ormdb.ModuleDB - stateStore ecocreditv1.StateStore + stateStore api.StateStore ctx context.Context k Keeper ctrl *gomock.Controller @@ -43,7 +45,7 @@ func setupBase(t *testing.T) *baseSuite { var err error s.db, err = ormdb.NewModuleDB(server.ModuleSchema, ormdb.ModuleDBOptions{}) assert.NilError(t, err) - s.stateStore, err = ecocreditv1.NewStateStore(s.db) + s.stateStore, err = api.NewStateStore(s.db) assert.NilError(t, err) db := dbm.NewMemDB() @@ -68,34 +70,34 @@ func setupBase(t *testing.T) *baseSuite { // setupClassProjectBatch setups a class "C01", a project "PRO", a batch "C01-20200101-20210101-01", and a // supply/balance of "10.5" for both retired and tradable. -func (s baseSuite) setupClassProjectBatch(t *testing.T) (className, projectName, batchDenom string){ +func (s baseSuite) setupClassProjectBatch(t *testing.T) (className, projectName, batchDenom string) { className, projectName, batchDenom = "C01", "PRO", "C01-20200101-20210101-01" - assert.NilError(t, s.stateStore.ClassInfoStore().Insert(s.ctx, &ecocreditv1.ClassInfo{ + assert.NilError(t, s.stateStore.ClassInfoStore().Insert(s.ctx, &api.ClassInfo{ Name: "C01", Admin: s.addr, Metadata: nil, CreditType: "C", })) - assert.NilError(t, s.stateStore.ProjectInfoStore().Insert(s.ctx, &ecocreditv1.ProjectInfo{ + assert.NilError(t, s.stateStore.ProjectInfoStore().Insert(s.ctx, &api.ProjectInfo{ Name: "PRO", ClassId: 1, ProjectLocation: "US-OR", Metadata: nil, })) - assert.NilError(t, s.stateStore.BatchInfoStore().Insert(s.ctx, &ecocreditv1.BatchInfo{ + assert.NilError(t, s.stateStore.BatchInfoStore().Insert(s.ctx, &api.BatchInfo{ ProjectId: 1, BatchDenom: "C01-20200101-20210101-01", Metadata: nil, StartDate: ×tamppb.Timestamp{Seconds: 2}, EndDate: ×tamppb.Timestamp{Seconds: 2}, })) - assert.NilError(t, s.stateStore.BatchSupplyStore().Insert(s.ctx, &ecocreditv1.BatchSupply{ + assert.NilError(t, s.stateStore.BatchSupplyStore().Insert(s.ctx, &api.BatchSupply{ BatchId: 1, TradableAmount: "10.5", RetiredAmount: "10.5", CancelledAmount: "", })) - assert.NilError(t, s.stateStore.BatchBalanceStore().Insert(s.ctx, &ecocreditv1.BatchBalance{ + assert.NilError(t, s.stateStore.BatchBalanceStore().Insert(s.ctx, &api.BatchBalance{ Address: s.addr, BatchId: 1, Tradable: "10.5", diff --git a/x/ecocredit/server/core/query_balance.go b/x/ecocredit/server/core/query_balance.go index cabd4df18c..a7b0ff33a9 100644 --- a/x/ecocredit/server/core/query_balance.go +++ b/x/ecocredit/server/core/query_balance.go @@ -2,14 +2,16 @@ package core import ( "context" + "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" sdk "github.com/cosmos/cosmos-sdk/types" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" + + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) // Balance queries the balance (both tradable and retired) of a given credit // batch for a given account. -func (k Keeper) Balance(ctx context.Context, req *v1.QueryBalanceRequest) (*v1.QueryBalanceResponse, error) { +func (k Keeper) Balance(ctx context.Context, req *core.QueryBalanceRequest) (*core.QueryBalanceResponse, error) { batch, err := k.stateStore.BatchInfoStore().GetByBatchDenom(ctx, req.BatchDenom) if err != nil { return nil, err @@ -22,14 +24,14 @@ func (k Keeper) Balance(ctx context.Context, req *v1.QueryBalanceRequest) (*v1.Q balance, err := k.stateStore.BatchBalanceStore().Get(ctx, addr, batch.Id) if err != nil { if ormerrors.IsNotFound(err) { - return &v1.QueryBalanceResponse{ + return &core.QueryBalanceResponse{ TradableAmount: "0", RetiredAmount: "0", }, nil } return nil, err } - return &v1.QueryBalanceResponse{ + return &core.QueryBalanceResponse{ TradableAmount: balance.Tradable, RetiredAmount: balance.Retired, }, nil diff --git a/x/ecocredit/server/core/query_balance_test.go b/x/ecocredit/server/core/query_balance_test.go index 5bf2fffe90..3d2e7ae207 100644 --- a/x/ecocredit/server/core/query_balance_test.go +++ b/x/ecocredit/server/core/query_balance_test.go @@ -1,11 +1,14 @@ package core import ( - "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" - "gotest.tools/v3/assert" "testing" + + "gotest.tools/v3/assert" + + "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) func TestQuery_Balance(t *testing.T) { @@ -17,14 +20,14 @@ func TestQuery_Balance(t *testing.T) { retired := "50.3214" // make a batch and give s.addr some balance - assert.NilError(t, s.stateStore.BatchInfoStore().Insert(s.ctx, &ecocreditv1.BatchInfo{ + assert.NilError(t, s.stateStore.BatchInfoStore().Insert(s.ctx, &api.BatchInfo{ ProjectId: 1, BatchDenom: batchDenom, Metadata: nil, StartDate: nil, EndDate: nil, })) - assert.NilError(t, s.stateStore.BatchBalanceStore().Insert(s.ctx, &ecocreditv1.BatchBalance{ + assert.NilError(t, s.stateStore.BatchBalanceStore().Insert(s.ctx, &api.BatchBalance{ Address: s.addr, BatchId: 1, Tradable: tradable, @@ -32,7 +35,7 @@ func TestQuery_Balance(t *testing.T) { })) // valid query - res, err := s.k.Balance(s.ctx, &v1.QueryBalanceRequest{ + res, err := s.k.Balance(s.ctx, &core.QueryBalanceRequest{ Account: s.addr.String(), BatchDenom: batchDenom, }) @@ -41,7 +44,7 @@ func TestQuery_Balance(t *testing.T) { assert.Equal(t, retired, res.RetiredAmount) // random addr should just give 0 - res, err = s.k.Balance(s.ctx, &v1.QueryBalanceRequest{ + res, err = s.k.Balance(s.ctx, &core.QueryBalanceRequest{ Account: noBalanceAddr.String(), BatchDenom: batchDenom, }) @@ -50,7 +53,7 @@ func TestQuery_Balance(t *testing.T) { assert.Equal(t, "0", res.RetiredAmount) // query with invalid batch should return not found - _, err = s.k.Balance(s.ctx, &v1.QueryBalanceRequest{ + _, err = s.k.Balance(s.ctx, &core.QueryBalanceRequest{ Account: s.addr.String(), BatchDenom: "A00-00000000-00000000-001", }) diff --git a/x/ecocredit/server/core/query_batch_info.go b/x/ecocredit/server/core/query_batch_info.go index 870effdbe3..b5a437d538 100644 --- a/x/ecocredit/server/core/query_batch_info.go +++ b/x/ecocredit/server/core/query_batch_info.go @@ -2,12 +2,13 @@ package core import ( "context" + "github.com/regen-network/regen-ledger/x/ecocredit" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) // BatchInfo queries for information on a credit batch. -func (k Keeper) BatchInfo(ctx context.Context, request *v1.QueryBatchInfoRequest) (*v1.QueryBatchInfoResponse, error) { +func (k Keeper) BatchInfo(ctx context.Context, request *core.QueryBatchInfoRequest) (*core.QueryBatchInfoResponse, error) { if err := ecocredit.ValidateDenom(request.BatchDenom); err != nil { return nil, err } @@ -17,9 +18,9 @@ func (k Keeper) BatchInfo(ctx context.Context, request *v1.QueryBatchInfoRequest return nil, err } - var bi v1.BatchInfo + var bi core.BatchInfo if err = PulsarToGogoSlow(batch, &bi); err != nil { return nil, err } - return &v1.QueryBatchInfoResponse{Info: &bi}, nil + return &core.QueryBatchInfoResponse{Info: &bi}, nil } diff --git a/x/ecocredit/server/core/query_batch_info_test.go b/x/ecocredit/server/core/query_batch_info_test.go index 43487c04bc..2f177b9994 100644 --- a/x/ecocredit/server/core/query_batch_info_test.go +++ b/x/ecocredit/server/core/query_batch_info_test.go @@ -1,18 +1,21 @@ package core import ( - "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" - "gotest.tools/v3/assert" "testing" + + "gotest.tools/v3/assert" + + "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) func TestQuery_BatchInfo(t *testing.T) { t.Parallel() s := setupBase(t) batchDenom := "C01-20200101-20220101-001" - assert.NilError(t, s.stateStore.BatchInfoStore().Insert(s.ctx, &ecocreditv1.BatchInfo{ + assert.NilError(t, s.stateStore.BatchInfoStore().Insert(s.ctx, &api.BatchInfo{ ProjectId: 1, BatchDenom: batchDenom, Metadata: nil, @@ -21,11 +24,11 @@ func TestQuery_BatchInfo(t *testing.T) { })) // invalid query - _, err := s.k.BatchInfo(s.ctx, &v1.QueryBatchInfoRequest{BatchDenom: "A00-00000000-00000000-000"}) + _, err := s.k.BatchInfo(s.ctx, &core.QueryBatchInfoRequest{BatchDenom: "A00-00000000-00000000-000"}) assert.ErrorContains(t, err, ormerrors.NotFound.Error()) // good query - res, err := s.k.BatchInfo(s.ctx, &v1.QueryBatchInfoRequest{BatchDenom: batchDenom}) + res, err := s.k.BatchInfo(s.ctx, &core.QueryBatchInfoRequest{BatchDenom: batchDenom}) assert.NilError(t, err) assert.Equal(t, uint64(1), res.Info.ProjectId) } diff --git a/x/ecocredit/server/core/query_batches.go b/x/ecocredit/server/core/query_batches.go index 2de295f911..9ef6ae8953 100644 --- a/x/ecocredit/server/core/query_batches.go +++ b/x/ecocredit/server/core/query_batches.go @@ -2,13 +2,15 @@ package core import ( "context" + "github.com/cosmos/cosmos-sdk/orm/model/ormlist" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) // Batches queries for all batches in the given credit class. -func (k Keeper) Batches(ctx context.Context, request *v1.QueryBatchesRequest) (*v1.QueryBatchesResponse, error) { +func (k Keeper) Batches(ctx context.Context, request *core.QueryBatchesRequest) (*core.QueryBatchesResponse, error) { pg, err := GogoPageReqToPulsarPageReq(request.Pagination) if err != nil { return nil, err @@ -17,18 +19,18 @@ func (k Keeper) Batches(ctx context.Context, request *v1.QueryBatchesRequest) (* if err != nil { return nil, err } - it, err := k.stateStore.BatchInfoStore().List(ctx, ecocreditv1.BatchInfoProjectIdIndexKey{}.WithProjectId(project.Id), ormlist.Paginate(pg)) + it, err := k.stateStore.BatchInfoStore().List(ctx, api.BatchInfoProjectIdIndexKey{}.WithProjectId(project.Id), ormlist.Paginate(pg)) if err != nil { return nil, err } - batches := make([]*v1.BatchInfo, 0) + batches := make([]*core.BatchInfo, 0) for it.Next() { batch, err := it.Value() if err != nil { return nil, err } - var bi v1.BatchInfo + var bi core.BatchInfo if err = PulsarToGogoSlow(batch, &bi); err != nil { return nil, err } @@ -38,7 +40,7 @@ func (k Keeper) Batches(ctx context.Context, request *v1.QueryBatchesRequest) (* if err != nil { return nil, err } - return &v1.QueryBatchesResponse{ + return &core.QueryBatchesResponse{ Batches: batches, Pagination: pr, }, nil diff --git a/x/ecocredit/server/core/query_batches_test.go b/x/ecocredit/server/core/query_batches_test.go index d967be975d..03f9c83249 100644 --- a/x/ecocredit/server/core/query_batches_test.go +++ b/x/ecocredit/server/core/query_batches_test.go @@ -1,12 +1,15 @@ package core import ( + "testing" + + "gotest.tools/v3/assert" + "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" "github.com/cosmos/cosmos-sdk/types/query" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" - "gotest.tools/v3/assert" - "testing" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) func TestQuery_Batches(t *testing.T) { @@ -14,20 +17,20 @@ func TestQuery_Batches(t *testing.T) { s := setupBase(t) // make a project and two batches - assert.NilError(t, s.stateStore.ProjectInfoStore().Insert(s.ctx, &ecocreditv1.ProjectInfo{ + assert.NilError(t, s.stateStore.ProjectInfoStore().Insert(s.ctx, &api.ProjectInfo{ Name: "P01", ClassId: 1, ProjectLocation: "US-CA", Metadata: nil, })) - assert.NilError(t, s.stateStore.BatchInfoStore().Insert(s.ctx, &ecocreditv1.BatchInfo{ + assert.NilError(t, s.stateStore.BatchInfoStore().Insert(s.ctx, &api.BatchInfo{ ProjectId: 1, BatchDenom: "C01-20200101-20220101-001", Metadata: nil, StartDate: nil, EndDate: nil, })) - assert.NilError(t, s.stateStore.BatchInfoStore().Insert(s.ctx, &ecocreditv1.BatchInfo{ + assert.NilError(t, s.stateStore.BatchInfoStore().Insert(s.ctx, &api.BatchInfo{ ProjectId: 1, BatchDenom: "C01-20200101-20220101-002", Metadata: nil, @@ -36,18 +39,18 @@ func TestQuery_Batches(t *testing.T) { })) // invalid query - _, err := s.k.Batches(s.ctx, &v1.QueryBatchesRequest{ProjectId: "F01"}) + _, err := s.k.Batches(s.ctx, &core.QueryBatchesRequest{ProjectId: "F01"}) assert.ErrorContains(t, err, ormerrors.NotFound.Error()) // base query - res, err := s.k.Batches(s.ctx, &v1.QueryBatchesRequest{ProjectId: "P01"}) + res, err := s.k.Batches(s.ctx, &core.QueryBatchesRequest{ProjectId: "P01"}) assert.NilError(t, err) assert.Equal(t, 2, len(res.Batches)) assert.Equal(t, "C01-20200101-20220101-001", res.Batches[0].BatchDenom) // paginated query - res, err = s.k.Batches(s.ctx, &v1.QueryBatchesRequest{ - ProjectId: "P01", + res, err = s.k.Batches(s.ctx, &core.QueryBatchesRequest{ + ProjectId: "P01", Pagination: &query.PageRequest{Limit: 1, CountTotal: true}, }) assert.NilError(t, err) diff --git a/x/ecocredit/server/core/query_class_info.go b/x/ecocredit/server/core/query_class_info.go index e7aa0d8354..e518ef97b4 100644 --- a/x/ecocredit/server/core/query_class_info.go +++ b/x/ecocredit/server/core/query_class_info.go @@ -2,18 +2,19 @@ package core import ( "context" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" + + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) // ClassInfo queries for information on a credit class. -func (k Keeper) ClassInfo(ctx context.Context, request *v1.QueryClassInfoRequest) (*v1.QueryClassInfoResponse, error) { +func (k Keeper) ClassInfo(ctx context.Context, request *core.QueryClassInfoRequest) (*core.QueryClassInfoResponse, error) { classInfo, err := k.stateStore.ClassInfoStore().GetByName(ctx, request.ClassId) if err != nil { return nil, err } - var ci v1.ClassInfo + var ci core.ClassInfo if err = PulsarToGogoSlow(classInfo, &ci); err != nil { return nil, err } - return &v1.QueryClassInfoResponse{Info: &ci}, nil + return &core.QueryClassInfoResponse{Info: &ci}, nil } diff --git a/x/ecocredit/server/core/query_class_info_test.go b/x/ecocredit/server/core/query_class_info_test.go index e7d18ef7dd..9acf5cab82 100644 --- a/x/ecocredit/server/core/query_class_info_test.go +++ b/x/ecocredit/server/core/query_class_info_test.go @@ -1,17 +1,20 @@ package core import ( - "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" - "gotest.tools/v3/assert" "testing" + + "gotest.tools/v3/assert" + + "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) func TestQuery_ClassInfo(t *testing.T) { t.Parallel() s := setupBase(t) - err := s.stateStore.ClassInfoStore().Insert(s.ctx, &ecocreditv1.ClassInfo{ + err := s.stateStore.ClassInfoStore().Insert(s.ctx, &api.ClassInfo{ Name: "C01", Admin: s.addr, Metadata: nil, @@ -20,12 +23,12 @@ func TestQuery_ClassInfo(t *testing.T) { assert.NilError(t, err) // query an invalid class - _, err = s.k.ClassInfo(s.ctx, &v1.QueryClassInfoRequest{ClassId: "C02"}) + _, err = s.k.ClassInfo(s.ctx, &core.QueryClassInfoRequest{ClassId: "C02"}) assert.ErrorContains(t, err, ormerrors.NotFound.Error()) // query a valid class - res, err := s.k.ClassInfo(s.ctx, &v1.QueryClassInfoRequest{ClassId: "C01"}) + res, err := s.k.ClassInfo(s.ctx, &core.QueryClassInfoRequest{ClassId: "C01"}) assert.NilError(t, err) assert.Equal(t, "C01", res.Info.Name) assert.DeepEqual(t, s.addr.Bytes(), res.Info.Admin) -} \ No newline at end of file +} diff --git a/x/ecocredit/server/core/query_class_issuers.go b/x/ecocredit/server/core/query_class_issuers.go index f95ac2011f..495342727b 100644 --- a/x/ecocredit/server/core/query_class_issuers.go +++ b/x/ecocredit/server/core/query_class_issuers.go @@ -2,14 +2,16 @@ package core import ( "context" + "github.com/cosmos/cosmos-sdk/orm/model/ormlist" sdk "github.com/cosmos/cosmos-sdk/types" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) // ClassIssuers returns a list of addresses that are allowed to issue batches from the given class. -func (k Keeper) ClassIssuers(ctx context.Context, request *v1.QueryClassIssuersRequest) (*v1.QueryClassIssuersResponse, error) { +func (k Keeper) ClassIssuers(ctx context.Context, request *core.QueryClassIssuersRequest) (*core.QueryClassIssuersResponse, error) { pg, err := GogoPageReqToPulsarPageReq(request.Pagination) if err != nil { return nil, err @@ -20,7 +22,7 @@ func (k Keeper) ClassIssuers(ctx context.Context, request *v1.QueryClassIssuersR return nil, err } - it, err := k.stateStore.ClassIssuerStore().List(ctx, ecocreditv1.ClassIssuerClassIdIssuerIndexKey{}.WithClassId(classInfo.Id), ormlist.Paginate(pg)) + it, err := k.stateStore.ClassIssuerStore().List(ctx, api.ClassIssuerClassIdIssuerIndexKey{}.WithClassId(classInfo.Id), ormlist.Paginate(pg)) if err != nil { return nil, err } @@ -37,7 +39,7 @@ func (k Keeper) ClassIssuers(ctx context.Context, request *v1.QueryClassIssuersR if err != nil { return nil, err } - return &v1.QueryClassIssuersResponse{ + return &core.QueryClassIssuersResponse{ Issuers: issuers, Pagination: pr, }, nil diff --git a/x/ecocredit/server/core/query_class_issuers_test.go b/x/ecocredit/server/core/query_class_issuers_test.go index 05d81eab97..898dd363f1 100644 --- a/x/ecocredit/server/core/query_class_issuers_test.go +++ b/x/ecocredit/server/core/query_class_issuers_test.go @@ -1,12 +1,15 @@ package core import ( + "testing" + + "gotest.tools/v3/assert" + "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" "github.com/cosmos/cosmos-sdk/types/query" + ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" - "gotest.tools/v3/assert" - "testing" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) func TestQuery_ClassIssuers(t *testing.T) { @@ -37,20 +40,20 @@ func TestQuery_ClassIssuers(t *testing.T) { })) // base request - res, err := s.k.ClassIssuers(s.ctx, &v1.QueryClassIssuersRequest{ClassId: "C01"}) + res, err := s.k.ClassIssuers(s.ctx, &core.QueryClassIssuersRequest{ClassId: "C01"}) assert.NilError(t, err) assert.Equal(t, len(issuers), len(res.Issuers)) // bad request - _, err = s.k.ClassIssuers(s.ctx, &v1.QueryClassIssuersRequest{ClassId: "F01"}) + _, err = s.k.ClassIssuers(s.ctx, &core.QueryClassIssuersRequest{ClassId: "F01"}) assert.ErrorContains(t, err, ormerrors.NotFound.Error()) // paginated request - res, err = s.k.ClassIssuers(s.ctx, &v1.QueryClassIssuersRequest{ - ClassId: "C01", + res, err = s.k.ClassIssuers(s.ctx, &core.QueryClassIssuersRequest{ + ClassId: "C01", Pagination: &query.PageRequest{Limit: 1, CountTotal: true}, }) assert.NilError(t, err) assert.Equal(t, 1, len(res.Issuers)) assert.Equal(t, uint64(3), res.Pagination.Total) -} \ No newline at end of file +} diff --git a/x/ecocredit/server/core/query_classes.go b/x/ecocredit/server/core/query_classes.go index d8fa2f6704..e91a6aa2ea 100644 --- a/x/ecocredit/server/core/query_classes.go +++ b/x/ecocredit/server/core/query_classes.go @@ -2,29 +2,31 @@ package core import ( "context" + "github.com/cosmos/cosmos-sdk/orm/model/ormlist" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) // Classes queries for all credit classes with pagination. -func (k Keeper) Classes(ctx context.Context, request *v1.QueryClassesRequest) (*v1.QueryClassesResponse, error) { +func (k Keeper) Classes(ctx context.Context, request *core.QueryClassesRequest) (*core.QueryClassesResponse, error) { pg, err := GogoPageReqToPulsarPageReq(request.Pagination) if err != nil { return nil, err } - it, err := k.stateStore.ClassInfoStore().List(ctx, &ecocreditv1.ClassInfoPrimaryKey{}, ormlist.Paginate(pg)) + it, err := k.stateStore.ClassInfoStore().List(ctx, &api.ClassInfoPrimaryKey{}, ormlist.Paginate(pg)) if err != nil { return nil, err } - infos := make([]*v1.ClassInfo, 0) + infos := make([]*core.ClassInfo, 0) for it.Next() { info, err := it.Value() if err != nil { return nil, err } - var ci v1.ClassInfo + var ci core.ClassInfo if err = PulsarToGogoSlow(info, &ci); err != nil { return nil, err } @@ -34,7 +36,7 @@ func (k Keeper) Classes(ctx context.Context, request *v1.QueryClassesRequest) (* if err != nil { return nil, err } - return &v1.QueryClassesResponse{ + return &core.QueryClassesResponse{ Classes: infos, Pagination: pr, }, err diff --git a/x/ecocredit/server/core/query_classes_test.go b/x/ecocredit/server/core/query_classes_test.go index ae595eeff9..c2911e8516 100644 --- a/x/ecocredit/server/core/query_classes_test.go +++ b/x/ecocredit/server/core/query_classes_test.go @@ -1,24 +1,27 @@ package core import ( - "github.com/cosmos/cosmos-sdk/types/query" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" - "gotest.tools/v3/assert" "testing" + + "gotest.tools/v3/assert" + + "github.com/cosmos/cosmos-sdk/types/query" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) func TestQuery_Classes(t *testing.T) { t.Parallel() s := setupBase(t) - err := s.stateStore.ClassInfoStore().Insert(s.ctx, &ecocreditv1.ClassInfo{ + err := s.stateStore.ClassInfoStore().Insert(s.ctx, &api.ClassInfo{ Name: "C01", Admin: s.addr, Metadata: nil, CreditType: "C", }) assert.NilError(t, err) - err = s.stateStore.ClassInfoStore().Insert(s.ctx, &ecocreditv1.ClassInfo{ + err = s.stateStore.ClassInfoStore().Insert(s.ctx, &api.ClassInfo{ Name: "C02", Admin: s.addr, Metadata: nil, @@ -27,14 +30,14 @@ func TestQuery_Classes(t *testing.T) { assert.NilError(t, err) // requesting all - res, err := s.k.Classes(s.ctx, &v1.QueryClassesRequest{}) + res, err := s.k.Classes(s.ctx, &core.QueryClassesRequest{}) assert.NilError(t, err) assert.Equal(t, 2, len(res.Classes)) assert.Equal(t, "C01", res.Classes[0].Name) assert.Equal(t, "C02", res.Classes[1].Name) // request with pagination - res, err = s.k.Classes(s.ctx, &v1.QueryClassesRequest{Pagination: &query.PageRequest{ + res, err = s.k.Classes(s.ctx, &core.QueryClassesRequest{Pagination: &query.PageRequest{ Limit: 1, CountTotal: true, Reverse: true, diff --git a/x/ecocredit/server/core/query_credit_types.go b/x/ecocredit/server/core/query_credit_types.go index b7edf96f72..12b7a4ebf3 100644 --- a/x/ecocredit/server/core/query_credit_types.go +++ b/x/ecocredit/server/core/query_credit_types.go @@ -2,14 +2,15 @@ package core import ( "context" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) // CreditTypes queries the list of allowed types that credit classes can have. -func (k Keeper) CreditTypes(ctx context.Context, _ *v1.QueryCreditTypesRequest) (*v1.QueryCreditTypesResponse, error) { - creditTypes := make([]*v1.CreditType, 0) - it, err := k.stateStore.CreditTypeStore().List(ctx, ecocreditv1.CreditTypePrimaryKey{}) +func (k Keeper) CreditTypes(ctx context.Context, _ *core.QueryCreditTypesRequest) (*core.QueryCreditTypesResponse, error) { + creditTypes := make([]*core.CreditType, 0) + it, err := k.stateStore.CreditTypeStore().List(ctx, api.CreditTypePrimaryKey{}) if err != nil { return nil, err } @@ -19,11 +20,11 @@ func (k Keeper) CreditTypes(ctx context.Context, _ *v1.QueryCreditTypesRequest) if err != nil { return nil, err } - var cType v1.CreditType + var cType core.CreditType if err = PulsarToGogoSlow(ct, &cType); err != nil { return nil, err } creditTypes = append(creditTypes, &cType) } - return &v1.QueryCreditTypesResponse{CreditTypes: creditTypes}, nil + return &core.QueryCreditTypesResponse{CreditTypes: creditTypes}, nil } diff --git a/x/ecocredit/server/core/query_credit_types_test.go b/x/ecocredit/server/core/query_credit_types_test.go index a9a7b7ee05..f53f474d0d 100644 --- a/x/ecocredit/server/core/query_credit_types_test.go +++ b/x/ecocredit/server/core/query_credit_types_test.go @@ -1,10 +1,12 @@ package core import ( - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" - "gotest.tools/v3/assert" "testing" + + "gotest.tools/v3/assert" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) func TestQuery_CreditTypes(t *testing.T) { @@ -12,13 +14,13 @@ func TestQuery_CreditTypes(t *testing.T) { s := setupBase(t) // insert a few credit types - assert.NilError(t, s.stateStore.CreditTypeStore().Insert(s.ctx, &ecocreditv1.CreditType{ + assert.NilError(t, s.stateStore.CreditTypeStore().Insert(s.ctx, &api.CreditType{ Abbreviation: "C", Name: "carbon", Unit: "a ton", Precision: 6, })) - assert.NilError(t, s.stateStore.CreditTypeStore().Insert(s.ctx, &ecocreditv1.CreditType{ + assert.NilError(t, s.stateStore.CreditTypeStore().Insert(s.ctx, &api.CreditType{ Abbreviation: "F", Name: "foobar", Unit: "foo per inch", @@ -26,9 +28,9 @@ func TestQuery_CreditTypes(t *testing.T) { })) // base query should return all types - res, err := s.k.CreditTypes(s.ctx, &v1.QueryCreditTypesRequest{}) + res, err := s.k.CreditTypes(s.ctx, &core.QueryCreditTypesRequest{}) assert.NilError(t, err) assert.Equal(t, 2, len(res.CreditTypes)) assert.Equal(t, uint32(6), res.CreditTypes[0].Precision) assert.Equal(t, "foobar", res.CreditTypes[1].Name) -} \ No newline at end of file +} diff --git a/x/ecocredit/server/core/query_params.go b/x/ecocredit/server/core/query_params.go index 916522723e..604536b2dc 100644 --- a/x/ecocredit/server/core/query_params.go +++ b/x/ecocredit/server/core/query_params.go @@ -2,33 +2,35 @@ package core import ( "context" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/regen-network/regen-ledger/x/ecocredit" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) // Params queries the ecocredit module parameters. // TODO: remove params https://github.com/regen-network/regen-ledger/issues/729 // Currently this is an ugly hack that grabs v1alpha types and converts them into v1beta types. // will be gone with #729. -func (k Keeper) Params(ctx context.Context, _ *v1.QueryParamsRequest) (*v1.QueryParamsResponse, error) { +func (k Keeper) Params(ctx context.Context, _ *core.QueryParamsRequest) (*core.QueryParamsResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) var params ecocredit.Params k.params.GetParamSet(sdkCtx, ¶ms) - v1beta1types := make([]*v1.CreditType, len(params.CreditTypes)) + v1beta1types := make([]*core.CreditType, len(params.CreditTypes)) for i, typ := range params.CreditTypes { - v1beta1types[i] = &v1.CreditType{ + v1beta1types[i] = &core.CreditType{ Abbreviation: typ.Abbreviation, Name: typ.Name, Unit: typ.Unit, Precision: typ.Precision, } } - v1beta1Params := v1.Params{ + v1beta1Params := core.Params{ CreditClassFee: params.CreditClassFee, AllowedClassCreators: params.AllowedClassCreators, AllowlistEnabled: params.AllowlistEnabled, CreditTypes: v1beta1types, } - return &v1.QueryParamsResponse{Params: &v1beta1Params}, nil + return &core.QueryParamsResponse{Params: &v1beta1Params}, nil } diff --git a/x/ecocredit/server/core/query_params_test.go b/x/ecocredit/server/core/query_params_test.go index 613754e753..2e2eb4f856 100644 --- a/x/ecocredit/server/core/query_params_test.go +++ b/x/ecocredit/server/core/query_params_test.go @@ -1,13 +1,16 @@ package core import ( - "github.com/cosmos/cosmos-sdk/types" + "testing" + "github.com/golang/mock/gomock" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - "github.com/regen-network/regen-ledger/x/ecocredit" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" "gotest.tools/v3/assert" - "testing" + + "github.com/cosmos/cosmos-sdk/types" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) func TestQuery_Params(t *testing.T) { @@ -15,7 +18,7 @@ func TestQuery_Params(t *testing.T) { s := setupBase(t) any := gomock.Any() - assert.NilError(t, s.stateStore.CreditTypeStore().Insert(s.ctx, &ecocreditv1.CreditType{ + assert.NilError(t, s.stateStore.CreditTypeStore().Insert(s.ctx, &api.CreditType{ Abbreviation: "C", Name: "carbon", Unit: "a ton", @@ -26,16 +29,16 @@ func TestQuery_Params(t *testing.T) { CreditClassFee: types.NewCoins(types.NewInt64Coin("foo", 30)), AllowedClassCreators: []string{s.addr.String()}, AllowlistEnabled: false, - CreditTypes: []*ecocredit.CreditType{{ + CreditTypes: []*ecocredit.CreditType{{ Abbreviation: "C", - Name: "carbon", - Unit: "a ton", - Precision: 6, + Name: "carbon", + Unit: "a ton", + Precision: 6, }}, }) - res, err := s.k.Params(s.ctx, &v1.QueryParamsRequest{}) + res, err := s.k.Params(s.ctx, &core.QueryParamsRequest{}) assert.NilError(t, err) - assert.Equal(t,false, res.Params.AllowlistEnabled) + assert.Equal(t, false, res.Params.AllowlistEnabled) assert.Equal(t, s.addr.String(), res.Params.AllowedClassCreators[0]) -} \ No newline at end of file +} diff --git a/x/ecocredit/server/core/query_project_info.go b/x/ecocredit/server/core/query_project_info.go index 66abb1c130..6334f9b598 100644 --- a/x/ecocredit/server/core/query_project_info.go +++ b/x/ecocredit/server/core/query_project_info.go @@ -2,18 +2,19 @@ package core import ( "context" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" + + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) // ProjectInfo queries project info from the given project name. -func (k Keeper) ProjectInfo(ctx context.Context, request *v1.QueryProjectInfoRequest) (*v1.QueryProjectInfoResponse, error) { +func (k Keeper) ProjectInfo(ctx context.Context, request *core.QueryProjectInfoRequest) (*core.QueryProjectInfoResponse, error) { pInfo, err := k.stateStore.ProjectInfoStore().GetByName(ctx, request.ProjectId) if err != nil { return nil, err } - var pi v1.ProjectInfo + var pi core.ProjectInfo if err = PulsarToGogoSlow(pInfo, &pi); err != nil { return nil, err } - return &v1.QueryProjectInfoResponse{Info: &pi}, nil + return &core.QueryProjectInfoResponse{Info: &pi}, nil } diff --git a/x/ecocredit/server/core/query_project_info_test.go b/x/ecocredit/server/core/query_project_info_test.go index 998bad72b0..80e2458128 100644 --- a/x/ecocredit/server/core/query_project_info_test.go +++ b/x/ecocredit/server/core/query_project_info_test.go @@ -1,11 +1,14 @@ package core import ( - "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" - "gotest.tools/v3/assert" "testing" + + "gotest.tools/v3/assert" + + "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) func TestQuery_ProjectInfo(t *testing.T) { @@ -13,7 +16,7 @@ func TestQuery_ProjectInfo(t *testing.T) { s := setupBase(t) // insert 1 project - err := s.stateStore.ProjectInfoStore().Insert(s.ctx, &ecocreditv1.ProjectInfo{ + err := s.stateStore.ProjectInfoStore().Insert(s.ctx, &api.ProjectInfo{ Name: "P01", ClassId: 1, ProjectLocation: "US-CA", @@ -22,11 +25,11 @@ func TestQuery_ProjectInfo(t *testing.T) { assert.NilError(t, err) // valid query - res, err := s.k.ProjectInfo(s.ctx, &v1.QueryProjectInfoRequest{ProjectId: "P01"}) + res, err := s.k.ProjectInfo(s.ctx, &core.QueryProjectInfoRequest{ProjectId: "P01"}) assert.NilError(t, err) assert.Equal(t, "P01", res.Info.Name) // invalid query - _, err = s.k.ProjectInfo(s.ctx, &v1.QueryProjectInfoRequest{ProjectId: "F01"}) + _, err = s.k.ProjectInfo(s.ctx, &core.QueryProjectInfoRequest{ProjectId: "F01"}) assert.ErrorContains(t, err, ormerrors.NotFound.Error()) } diff --git a/x/ecocredit/server/core/query_projects.go b/x/ecocredit/server/core/query_projects.go index 308fe9241c..fb661a3347 100644 --- a/x/ecocredit/server/core/query_projects.go +++ b/x/ecocredit/server/core/query_projects.go @@ -2,13 +2,15 @@ package core import ( "context" + "github.com/cosmos/cosmos-sdk/orm/model/ormlist" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) // Projects queries all projects from a given credit class. -func (k Keeper) Projects(ctx context.Context, request *v1.QueryProjectsRequest) (*v1.QueryProjectsResponse, error) { +func (k Keeper) Projects(ctx context.Context, request *core.QueryProjectsRequest) (*core.QueryProjectsResponse, error) { pg, err := GogoPageReqToPulsarPageReq(request.Pagination) if err != nil { return nil, err @@ -17,17 +19,17 @@ func (k Keeper) Projects(ctx context.Context, request *v1.QueryProjectsRequest) if err != nil { return nil, err } - it, err := k.stateStore.ProjectInfoStore().List(ctx, ecocreditv1.ProjectInfoClassIdNameIndexKey{}.WithClassId(cInfo.Id), ormlist.Paginate(pg)) + it, err := k.stateStore.ProjectInfoStore().List(ctx, api.ProjectInfoClassIdNameIndexKey{}.WithClassId(cInfo.Id), ormlist.Paginate(pg)) if err != nil { return nil, err } - projectInfos := make([]*v1.ProjectInfo, 0) + projectInfos := make([]*core.ProjectInfo, 0) for it.Next() { info, err := it.Value() if err != nil { return nil, err } - var pi v1.ProjectInfo + var pi core.ProjectInfo if err = PulsarToGogoSlow(info, &pi); err != nil { return nil, err } @@ -37,7 +39,7 @@ func (k Keeper) Projects(ctx context.Context, request *v1.QueryProjectsRequest) if err != nil { return nil, err } - return &v1.QueryProjectsResponse{ + return &core.QueryProjectsResponse{ Projects: projectInfos, Pagination: pr, }, nil diff --git a/x/ecocredit/server/core/query_projects_test.go b/x/ecocredit/server/core/query_projects_test.go index 932c69c224..b4499b08b2 100644 --- a/x/ecocredit/server/core/query_projects_test.go +++ b/x/ecocredit/server/core/query_projects_test.go @@ -1,12 +1,15 @@ package core import ( + "testing" + + "gotest.tools/v3/assert" + "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" "github.com/cosmos/cosmos-sdk/types/query" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" - "gotest.tools/v3/assert" - "testing" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) func TestQuery_Projects(t *testing.T) { @@ -14,21 +17,21 @@ func TestQuery_Projects(t *testing.T) { s := setupBase(t) // create a class and 2 projects from it - err := s.stateStore.ClassInfoStore().Insert(s.ctx, &ecocreditv1.ClassInfo{ + err := s.stateStore.ClassInfoStore().Insert(s.ctx, &api.ClassInfo{ Name: "C01", Admin: s.addr, Metadata: nil, CreditType: "C", }) assert.NilError(t, err) - err= s.stateStore.ProjectInfoStore().Insert(s.ctx, &ecocreditv1.ProjectInfo{ + err = s.stateStore.ProjectInfoStore().Insert(s.ctx, &api.ProjectInfo{ Name: "P01", ClassId: 1, ProjectLocation: "US-CA", Metadata: nil, }) assert.NilError(t, err) - err= s.stateStore.ProjectInfoStore().Insert(s.ctx, &ecocreditv1.ProjectInfo{ + err = s.stateStore.ProjectInfoStore().Insert(s.ctx, &api.ProjectInfo{ Name: "P02", ClassId: 1, ProjectLocation: "US-CA", @@ -37,21 +40,21 @@ func TestQuery_Projects(t *testing.T) { assert.NilError(t, err) // base query - res, err := s.k.Projects(s.ctx, &v1.QueryProjectsRequest{ClassId: "C01"}) + res, err := s.k.Projects(s.ctx, &core.QueryProjectsRequest{ClassId: "C01"}) assert.NilError(t, err) assert.Equal(t, 2, len(res.Projects)) assert.Equal(t, "US-CA", res.Projects[0].ProjectLocation) // invalid query - _, err = s.k.Projects(s.ctx, &v1.QueryProjectsRequest{ClassId: "F01"}) + _, err = s.k.Projects(s.ctx, &core.QueryProjectsRequest{ClassId: "F01"}) assert.ErrorContains(t, err, ormerrors.NotFound.Error()) // paginated query - res, err = s.k.Projects(s.ctx, &v1.QueryProjectsRequest{ + res, err = s.k.Projects(s.ctx, &core.QueryProjectsRequest{ ClassId: "C01", Pagination: &query.PageRequest{Limit: 1, CountTotal: true}, }) assert.NilError(t, err) assert.Equal(t, 1, len(res.Projects)) assert.Equal(t, uint64(2), res.Pagination.Total) -} \ No newline at end of file +} diff --git a/x/ecocredit/server/core/query_supply.go b/x/ecocredit/server/core/query_supply.go index ea46d69950..2652eacf0c 100644 --- a/x/ecocredit/server/core/query_supply.go +++ b/x/ecocredit/server/core/query_supply.go @@ -2,11 +2,12 @@ package core import ( "context" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" + + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) // Supply queries the supply (tradable, retired, cancelled) of a given credit batch. -func (k Keeper) Supply(ctx context.Context, request *v1.QuerySupplyRequest) (*v1.QuerySupplyResponse, error) { +func (k Keeper) Supply(ctx context.Context, request *core.QuerySupplyRequest) (*core.QuerySupplyResponse, error) { batch, err := k.stateStore.BatchInfoStore().GetByBatchDenom(ctx, request.BatchDenom) if err != nil { return nil, err @@ -17,7 +18,7 @@ func (k Keeper) Supply(ctx context.Context, request *v1.QuerySupplyRequest) (*v1 return nil, err } - return &v1.QuerySupplyResponse{ + return &core.QuerySupplyResponse{ TradableSupply: supply.TradableAmount, RetiredSupply: supply.RetiredAmount, CancelledAmount: supply.CancelledAmount, diff --git a/x/ecocredit/server/core/query_supply_test.go b/x/ecocredit/server/core/query_supply_test.go index 4dc79bd9a9..0e49c10c30 100644 --- a/x/ecocredit/server/core/query_supply_test.go +++ b/x/ecocredit/server/core/query_supply_test.go @@ -1,11 +1,14 @@ package core import ( - "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" - "gotest.tools/v3/assert" "testing" + + "gotest.tools/v3/assert" + + "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) func TestQuery_Supply(t *testing.T) { @@ -17,14 +20,14 @@ func TestQuery_Supply(t *testing.T) { cancelled := "0.3215" // make a batch and some supply - assert.NilError(t, s.stateStore.BatchInfoStore().Insert(s.ctx, &ecocreditv1.BatchInfo{ + assert.NilError(t, s.stateStore.BatchInfoStore().Insert(s.ctx, &api.BatchInfo{ ProjectId: 1, BatchDenom: batchDenom, Metadata: nil, StartDate: nil, EndDate: nil, })) - assert.NilError(t, s.stateStore.BatchSupplyStore().Insert(s.ctx, &ecocreditv1.BatchSupply{ + assert.NilError(t, s.stateStore.BatchSupplyStore().Insert(s.ctx, &api.BatchSupply{ BatchId: 1, TradableAmount: tradable, RetiredAmount: retired, @@ -32,13 +35,13 @@ func TestQuery_Supply(t *testing.T) { })) // valid query - res, err := s.k.Supply(s.ctx, &v1.QuerySupplyRequest{BatchDenom: batchDenom}) + res, err := s.k.Supply(s.ctx, &core.QuerySupplyRequest{BatchDenom: batchDenom}) assert.NilError(t, err) assert.Equal(t, tradable, res.TradableSupply) assert.Equal(t, retired, res.RetiredSupply) assert.Equal(t, cancelled, res.CancelledAmount) // bad denom query - _, err = s.k.Supply(s.ctx, &v1.QuerySupplyRequest{BatchDenom: "A00-00000000-00000000-001"}) + _, err = s.k.Supply(s.ctx, &core.QuerySupplyRequest{BatchDenom: "A00-00000000-00000000-001"}) assert.ErrorContains(t, err, ormerrors.NotFound.Error()) } diff --git a/x/ecocredit/server/core/query_utils.go b/x/ecocredit/server/core/query_utils.go index 923e085ac7..d1e25cbdd3 100644 --- a/x/ecocredit/server/core/query_utils.go +++ b/x/ecocredit/server/core/query_utils.go @@ -1,10 +1,11 @@ package core import ( - queryv1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/query/v1beta1" - "github.com/cosmos/cosmos-sdk/types/query" gogoproto "github.com/gogo/protobuf/proto" "google.golang.org/protobuf/proto" + + queryv1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/query/v1beta1" + "github.com/cosmos/cosmos-sdk/types/query" ) func GogoPageReqToPulsarPageReq(from *query.PageRequest) (*queryv1beta1.PageRequest, error) { diff --git a/x/ecocredit/server/core/retire.go b/x/ecocredit/server/core/retire.go index 3f146cbeb8..1b97e2dbb7 100644 --- a/x/ecocredit/server/core/retire.go +++ b/x/ecocredit/server/core/retire.go @@ -2,16 +2,18 @@ package core import ( "context" + sdk "github.com/cosmos/cosmos-sdk/types" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" "github.com/regen-network/regen-ledger/types" "github.com/regen-network/regen-ledger/types/math" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) // Retire credits to the specified location. // WARNING: retiring credits is permanent. Retired credits cannot be un-retired. -func (k Keeper) Retire(ctx context.Context, req *v1.MsgRetire) (*v1.MsgRetireResponse, error) { +func (k Keeper) Retire(ctx context.Context, req *core.MsgRetire) (*core.MsgRetireResponse, error) { sdkCtx := types.UnwrapSDKContext(ctx) holder, _ := sdk.AccAddressFromBech32(req.Holder) @@ -65,7 +67,7 @@ func (k Keeper) Retire(ctx context.Context, req *v1.MsgRetire) (*v1.MsgRetireRes return nil, err } - if err = k.stateStore.BatchBalanceStore().Update(ctx, &ecocreditv1.BatchBalance{ + if err = k.stateStore.BatchBalanceStore().Update(ctx, &api.BatchBalance{ Address: holder, BatchId: batch.Id, Tradable: userTradableBalance.String(), @@ -73,13 +75,13 @@ func (k Keeper) Retire(ctx context.Context, req *v1.MsgRetire) (*v1.MsgRetireRes }); err != nil { return nil, err } - err = k.stateStore.BatchSupplyStore().Update(ctx, &ecocreditv1.BatchSupply{ + err = k.stateStore.BatchSupplyStore().Update(ctx, &api.BatchSupply{ BatchId: batch.Id, TradableAmount: supplyTradable.String(), RetiredAmount: supplyRetired.String(), CancelledAmount: batchSupply.CancelledAmount, }) - if err = sdkCtx.EventManager().EmitTypedEvent(&v1.EventRetire{ + if err = sdkCtx.EventManager().EmitTypedEvent(&core.EventRetire{ Retirer: req.Holder, BatchDenom: credit.BatchDenom, Amount: credit.Amount, @@ -89,5 +91,5 @@ func (k Keeper) Retire(ctx context.Context, req *v1.MsgRetire) (*v1.MsgRetireRes } sdkCtx.GasMeter().ConsumeGas(gasCostPerIteration, "retire ecocredits") } - return &v1.MsgRetireResponse{}, nil + return &core.MsgRetireResponse{}, nil } diff --git a/x/ecocredit/server/core/retire_test.go b/x/ecocredit/server/core/retire_test.go index 6ec1972b22..84421b1c15 100644 --- a/x/ecocredit/server/core/retire_test.go +++ b/x/ecocredit/server/core/retire_test.go @@ -1,13 +1,16 @@ package core import ( + "testing" + + "github.com/golang/mock/gomock" + "gotest.tools/v3/assert" + "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/golang/mock/gomock" + "github.com/regen-network/regen-ledger/x/ecocredit" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" - "gotest.tools/v3/assert" - "testing" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) func TestRetire_Valid(t *testing.T) { @@ -27,9 +30,9 @@ func TestRetire_Valid(t *testing.T) { // starting balance -> 10.5 tradable, 10.5 retired // retire 10.0 -> 0.5 leftover in tradable, retired becomes 20.5 - _, err := s.k.Retire(s.ctx, &v1.MsgRetire{ + _, err := s.k.Retire(s.ctx, &core.MsgRetire{ Holder: s.addr.String(), - Credits: []*v1.MsgRetire_RetireCredits{ + Credits: []*core.MsgRetire_RetireCredits{ {BatchDenom: "C01-20200101-20210101-01", Amount: "10.0"}, }, Location: "US-NY", @@ -55,9 +58,9 @@ func TestRetire_Invalid(t *testing.T) { _, _, batchDenom := s.setupClassProjectBatch(t) // invalid batch denom - _, err := s.k.Retire(s.ctx, &v1.MsgRetire{ - Holder: s.addr.String(), - Credits: []*v1.MsgRetire_RetireCredits{ + _, err := s.k.Retire(s.ctx, &core.MsgRetire{ + Holder: s.addr.String(), + Credits: []*core.MsgRetire_RetireCredits{ {BatchDenom: "A00-00000000-00000000-01", Amount: "10.35"}, }, Location: "US-NY", @@ -70,22 +73,22 @@ func TestRetire_Invalid(t *testing.T) { }).Times(2) // out of precision - _, err = s.k.Retire(s.ctx, &v1.MsgRetire{ - Holder: s.addr.String(), - Credits: []*v1.MsgRetire_RetireCredits{ + _, err = s.k.Retire(s.ctx, &core.MsgRetire{ + Holder: s.addr.String(), + Credits: []*core.MsgRetire_RetireCredits{ {BatchDenom: batchDenom, Amount: "10.35250982359823095"}, }, Location: "US-NY", }) - assert.ErrorContains(t, err,"exceeds maximum decimal places") + assert.ErrorContains(t, err, "exceeds maximum decimal places") // not enough credits - _, err = s.k.Retire(s.ctx, &v1.MsgRetire{ - Holder: s.addr.String(), - Credits: []*v1.MsgRetire_RetireCredits{ + _, err = s.k.Retire(s.ctx, &core.MsgRetire{ + Holder: s.addr.String(), + Credits: []*core.MsgRetire_RetireCredits{ {BatchDenom: batchDenom, Amount: "150"}, }, Location: "US-NY", }) - assert.ErrorContains(t, err,errors.ErrInsufficientFunds.Error()) + assert.ErrorContains(t, err, errors.ErrInsufficientFunds.Error()) } diff --git a/x/ecocredit/server/core/send.go b/x/ecocredit/server/core/send.go index c2c9d59e55..260c147e0c 100644 --- a/x/ecocredit/server/core/send.go +++ b/x/ecocredit/server/core/send.go @@ -2,18 +2,20 @@ package core import ( "context" + "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" sdk "github.com/cosmos/cosmos-sdk/types" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" "github.com/regen-network/regen-ledger/types" "github.com/regen-network/regen-ledger/types/math" "github.com/regen-network/regen-ledger/x/ecocredit" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) // Send sends credits to a recipient. // Send also retires credits if the amount to retire is specified in the request. -func (k Keeper) Send(ctx context.Context, req *v1.MsgSend) (*v1.MsgSendResponse, error) { +func (k Keeper) Send(ctx context.Context, req *core.MsgSend) (*core.MsgSendResponse, error) { sdkCtx := types.UnwrapSDKContext(ctx) sender, _ := sdk.AccAddressFromBech32(req.Sender) recipient, _ := sdk.AccAddressFromBech32(req.Recipient) @@ -23,7 +25,7 @@ func (k Keeper) Send(ctx context.Context, req *v1.MsgSend) (*v1.MsgSendResponse, if err != nil { return nil, err } - if err = sdkCtx.EventManager().EmitTypedEvent(&v1.EventReceive{ + if err = sdkCtx.EventManager().EmitTypedEvent(&core.EventReceive{ Sender: req.Sender, Recipient: req.Recipient, BatchDenom: credit.BatchDenom, @@ -34,10 +36,10 @@ func (k Keeper) Send(ctx context.Context, req *v1.MsgSend) (*v1.MsgSendResponse, } sdkCtx.GasMeter().ConsumeGas(gasCostPerIteration, "send ecocredits") } - return &v1.MsgSendResponse{}, nil + return &core.MsgSendResponse{}, nil } -func (k Keeper) sendEcocredits(ctx context.Context, credit *v1.MsgSend_SendCredits, to, from sdk.AccAddress) error { +func (k Keeper) sendEcocredits(ctx context.Context, credit *core.MsgSend_SendCredits, to, from sdk.AccAddress) error { batch, err := k.stateStore.BatchInfoStore().GetByBatchDenom(ctx, credit.BatchDenom) if err != nil { return err @@ -63,7 +65,7 @@ func (k Keeper) sendEcocredits(ctx context.Context, credit *v1.MsgSend_SendCredi toBalance, err := k.stateStore.BatchBalanceStore().Get(ctx, to, batch.Id) if err != nil { if err == ormerrors.NotFound { - toBalance = &ecocreditv1.BatchBalance{ + toBalance = &api.BatchBalance{ Address: to, BatchId: batch.Id, Tradable: "0", @@ -114,7 +116,7 @@ func (k Keeper) sendEcocredits(ctx context.Context, credit *v1.MsgSend_SendCredi } } // update the "to" balance - if err := k.stateStore.BatchBalanceStore().Save(ctx, &ecocreditv1.BatchBalance{ + if err := k.stateStore.BatchBalanceStore().Save(ctx, &api.BatchBalance{ Address: to, BatchId: batch.Id, Tradable: toTradableBalance.String(), @@ -124,7 +126,7 @@ func (k Keeper) sendEcocredits(ctx context.Context, credit *v1.MsgSend_SendCredi } // update the "from" balance - if err := k.stateStore.BatchBalanceStore().Update(ctx, &ecocreditv1.BatchBalance{ + if err := k.stateStore.BatchBalanceStore().Update(ctx, &api.BatchBalance{ Address: from, BatchId: batch.Id, Tradable: fromTradableBalance.String(), @@ -134,7 +136,7 @@ func (k Keeper) sendEcocredits(ctx context.Context, credit *v1.MsgSend_SendCredi } // update the "retired" supply only if credits were retired if didRetire { - if err := k.stateStore.BatchSupplyStore().Update(ctx, &ecocreditv1.BatchSupply{ + if err := k.stateStore.BatchSupplyStore().Update(ctx, &api.BatchSupply{ BatchId: batch.Id, TradableAmount: batchSupplyTradable.String(), RetiredAmount: batchSupplyRetired.String(), diff --git a/x/ecocredit/server/core/send_test.go b/x/ecocredit/server/core/send_test.go index 8c4be41a95..05c987147b 100644 --- a/x/ecocredit/server/core/send_test.go +++ b/x/ecocredit/server/core/send_test.go @@ -1,12 +1,15 @@ package core import ( - "github.com/cosmos/cosmos-sdk/testutil/testdata" + "testing" + "github.com/golang/mock/gomock" - "github.com/regen-network/regen-ledger/x/ecocredit" - v1 "github.com/regen-network/regen-ledger/x/ecocredit/v1" "gotest.tools/v3/assert" - "testing" + + "github.com/cosmos/cosmos-sdk/testutil/testdata" + + "github.com/regen-network/regen-ledger/x/ecocredit" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) func TestSend_Valid(t *testing.T) { @@ -21,10 +24,10 @@ func TestSend_Valid(t *testing.T) { // s.Addr starting balance -> 10.5 tradable, 10.5 retired - _, err := s.k.Send(s.ctx, &v1.MsgSend{ + _, err := s.k.Send(s.ctx, &core.MsgSend{ Sender: s.addr.String(), Recipient: recipient.String(), - Credits: []*v1.MsgSend_SendCredits{ + Credits: []*core.MsgSend_SendCredits{ {BatchDenom: "C01-20200101-20210101-01", TradableAmount: "2.51"}, {BatchDenom: "C01-20200101-20210101-01", RetiredAmount: "1.30", RetirementLocation: "US-OR"}, }, @@ -68,20 +71,20 @@ func TestSend_Errors(t *testing.T) { }).Times(2) // test sending more than user balance - _, err := s.k.Send(s.ctx, &v1.MsgSend{ + _, err := s.k.Send(s.ctx, &core.MsgSend{ Sender: s.addr.String(), Recipient: recipient.String(), - Credits: []*v1.MsgSend_SendCredits{ + Credits: []*core.MsgSend_SendCredits{ {BatchDenom: "C01-20200101-20210101-01", TradableAmount: "1000000"}, }, }) assert.ErrorContains(t, err, "insufficient funds") // test sending more precise than the credit type - _, err = s.k.Send(s.ctx, &v1.MsgSend{ + _, err = s.k.Send(s.ctx, &core.MsgSend{ Sender: s.addr.String(), Recipient: recipient.String(), - Credits: []*v1.MsgSend_SendCredits{ + Credits: []*core.MsgSend_SendCredits{ {BatchDenom: "C01-20200101-20210101-01", TradableAmount: "10.325092385"}, }, }) diff --git a/x/ecocredit/server/core/update_class.go b/x/ecocredit/server/core/update_class.go index 602e9069c4..5fbf53e5ab 100644 --- a/x/ecocredit/server/core/update_class.go +++ b/x/ecocredit/server/core/update_class.go @@ -2,16 +2,18 @@ package core import ( "context" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - "github.com/regen-network/regen-ledger/x/ecocredit/v1" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) // UpdateClassAdmin updates the admin address for a class. // WARNING: this method will forfeit control of the entire class to the provided address. // double check your inputs to ensure you do not lose control of the class. -func (k Keeper) UpdateClassAdmin(ctx context.Context, req *v1.MsgUpdateClassAdmin) (*v1.MsgUpdateClassAdminResponse, error) { +func (k Keeper) UpdateClassAdmin(ctx context.Context, req *core.MsgUpdateClassAdmin) (*core.MsgUpdateClassAdminResponse, error) { reqAddr, err := sdk.AccAddressFromBech32(req.Admin) if err != nil { return nil, err @@ -34,11 +36,11 @@ func (k Keeper) UpdateClassAdmin(ctx context.Context, req *v1.MsgUpdateClassAdmi if err = k.stateStore.ClassInfoStore().Update(ctx, classInfo); err != nil { return nil, err } - return &v1.MsgUpdateClassAdminResponse{}, err + return &core.MsgUpdateClassAdminResponse{}, err } // UpdateClassIssuers updates a class's issuers by either adding more issuers, or removing issuers from the class issuer store. -func (k Keeper) UpdateClassIssuers(ctx context.Context, req *v1.MsgUpdateClassIssuers) (*v1.MsgUpdateClassIssuersResponse, error) { +func (k Keeper) UpdateClassIssuers(ctx context.Context, req *core.MsgUpdateClassIssuers) (*core.MsgUpdateClassIssuersResponse, error) { reqAddr, err := sdk.AccAddressFromBech32(req.Admin) if err != nil { return nil, err @@ -60,7 +62,7 @@ func (k Keeper) UpdateClassIssuers(ctx context.Context, req *v1.MsgUpdateClassIs if err != nil { return nil, err } - if err = k.stateStore.ClassIssuerStore().Delete(ctx, &ecocreditv1.ClassIssuer{ + if err = k.stateStore.ClassIssuerStore().Delete(ctx, &api.ClassIssuer{ ClassId: class.Id, Issuer: issuerAcc, }); err != nil { @@ -74,18 +76,18 @@ func (k Keeper) UpdateClassIssuers(ctx context.Context, req *v1.MsgUpdateClassIs if err != nil { return nil, err } - if err = k.stateStore.ClassIssuerStore().Insert(ctx, &ecocreditv1.ClassIssuer{ + if err = k.stateStore.ClassIssuerStore().Insert(ctx, &api.ClassIssuer{ ClassId: class.Id, Issuer: issuerAcc, }); err != nil { return nil, err } } - return &v1.MsgUpdateClassIssuersResponse{}, nil + return &core.MsgUpdateClassIssuersResponse{}, nil } // UpdateClassMetadata updates the metadata for the class. -func (k Keeper) UpdateClassMetadata(ctx context.Context, req *v1.MsgUpdateClassMetadata) (*v1.MsgUpdateClassMetadataResponse, error) { +func (k Keeper) UpdateClassMetadata(ctx context.Context, req *core.MsgUpdateClassMetadata) (*core.MsgUpdateClassMetadataResponse, error) { reqAddr, err := sdk.AccAddressFromBech32(req.Admin) if err != nil { return nil, err @@ -106,5 +108,5 @@ func (k Keeper) UpdateClassMetadata(ctx context.Context, req *v1.MsgUpdateClassM return nil, err } - return &v1.MsgUpdateClassMetadataResponse{}, err + return &core.MsgUpdateClassMetadataResponse{}, err } diff --git a/x/ecocredit/server/core/update_class_test.go b/x/ecocredit/server/core/update_class_test.go index 9e2242b903..f3e9a4f848 100644 --- a/x/ecocredit/server/core/update_class_test.go +++ b/x/ecocredit/server/core/update_class_test.go @@ -1,14 +1,17 @@ package core import ( + "testing" + + "gotest.tools/v3/assert" + "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" "github.com/cosmos/cosmos-sdk/testutil/testdata" "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - ecocreditv1 "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" - "github.com/regen-network/regen-ledger/x/ecocredit/v1" - "gotest.tools/v3/assert" - "testing" + + api "github.com/regen-network/regen-ledger/api/regen/ecocredit/v1" + "github.com/regen-network/regen-ledger/x/ecocredit/core" ) func TestUpdateClass_UpdateAdmin(t *testing.T) { @@ -18,7 +21,7 @@ func TestUpdateClass_UpdateAdmin(t *testing.T) { addrs := genAddrs(1) newAdmin := addrs[0] - err := s.stateStore.ClassInfoStore().Insert(s.ctx, &ecocreditv1.ClassInfo{ + err := s.stateStore.ClassInfoStore().Insert(s.ctx, &api.ClassInfo{ Name: "C01", Admin: s.addr, Metadata: nil, @@ -26,7 +29,7 @@ func TestUpdateClass_UpdateAdmin(t *testing.T) { }) assert.NilError(t, err) - _, err = s.k.UpdateClassAdmin(s.ctx, &v1.MsgUpdateClassAdmin{ + _, err = s.k.UpdateClassAdmin(s.ctx, &core.MsgUpdateClassAdmin{ Admin: s.addr.String(), ClassId: "C01", NewAdmin: newAdmin.String(), @@ -43,7 +46,7 @@ func TestUpdateClass_UpdateAdminErrs(t *testing.T) { s := setupBase(t) addr := genAddrs(1)[0] - err := s.stateStore.ClassInfoStore().Insert(s.ctx, &ecocreditv1.ClassInfo{ + err := s.stateStore.ClassInfoStore().Insert(s.ctx, &api.ClassInfo{ Name: "C01", Admin: s.addr, Metadata: nil, @@ -52,7 +55,7 @@ func TestUpdateClass_UpdateAdminErrs(t *testing.T) { assert.NilError(t, err) // try to update the admin with addr - _, err = s.k.UpdateClassAdmin(s.ctx, &v1.MsgUpdateClassAdmin{ + _, err = s.k.UpdateClassAdmin(s.ctx, &core.MsgUpdateClassAdmin{ Admin: addr.String(), ClassId: "C01", NewAdmin: addr.String(), @@ -60,7 +63,7 @@ func TestUpdateClass_UpdateAdminErrs(t *testing.T) { assert.ErrorContains(t, err, "unauthorized") // try to update a non-existent class - _, err = s.k.UpdateClassAdmin(s.ctx, &v1.MsgUpdateClassAdmin{ + _, err = s.k.UpdateClassAdmin(s.ctx, &core.MsgUpdateClassAdmin{ Admin: addr.String(), ClassId: "FOOBAR", NewAdmin: addr.String(), @@ -75,7 +78,7 @@ func TestUpdateClass_Issuers(t *testing.T) { addrs := genAddrs(3) // addrs to initially populate the class issuer store newAddrs := genAddrs(3) // addrs to add in an update call - err := s.stateStore.ClassInfoStore().Insert(s.ctx, &ecocreditv1.ClassInfo{ + err := s.stateStore.ClassInfoStore().Insert(s.ctx, &api.ClassInfo{ Name: "C01", Admin: s.addr, Metadata: nil, @@ -85,7 +88,7 @@ func TestUpdateClass_Issuers(t *testing.T) { // insert some addrs for _, addr := range addrs { - err := s.stateStore.ClassIssuerStore().Insert(s.ctx, &ecocreditv1.ClassIssuer{ + err := s.stateStore.ClassIssuerStore().Insert(s.ctx, &api.ClassIssuer{ ClassId: 1, Issuer: addr, }) @@ -97,7 +100,7 @@ func TestUpdateClass_Issuers(t *testing.T) { for i, newAddr := range newAddrs { addrStrs[i] = newAddr.String() } - _, err = s.k.UpdateClassIssuers(s.ctx, &v1.MsgUpdateClassIssuers{ + _, err = s.k.UpdateClassIssuers(s.ctx, &core.MsgUpdateClassIssuers{ Admin: s.addr.String(), ClassId: "C01", AddIssuers: addrStrs, @@ -107,7 +110,7 @@ func TestUpdateClass_Issuers(t *testing.T) { // check that the new addrs were added count := 0 - it, err := s.stateStore.ClassIssuerStore().List(s.ctx, ecocreditv1.ClassIssuerClassIdIssuerIndexKey{}.WithClassId(1)) + it, err := s.stateStore.ClassIssuerStore().List(s.ctx, api.ClassIssuerClassIdIssuerIndexKey{}.WithClassId(1)) assert.NilError(t, err) for it.Next() { count++ @@ -120,7 +123,7 @@ func TestUpdateClass_Issuers(t *testing.T) { for i, rmAddr := range removeAddrs { removeAddrStrs[i] = rmAddr.String() } - _, err = s.k.UpdateClassIssuers(s.ctx, &v1.MsgUpdateClassIssuers{ + _, err = s.k.UpdateClassIssuers(s.ctx, &core.MsgUpdateClassIssuers{ Admin: s.addr.String(), ClassId: "C01", AddIssuers: nil, @@ -129,7 +132,7 @@ func TestUpdateClass_Issuers(t *testing.T) { assert.NilError(t, err) // check that the removed addrs no longer exist - it, err = s.stateStore.ClassIssuerStore().List(s.ctx, ecocreditv1.ClassIssuerClassIdIssuerIndexKey{}.WithClassId(1)) + it, err = s.stateStore.ClassIssuerStore().List(s.ctx, api.ClassIssuerClassIdIssuerIndexKey{}.WithClassId(1)) assert.NilError(t, err) for it.Next() { val, err := it.Value() @@ -146,21 +149,21 @@ func TestUpdateClass_IssuersErrs(t *testing.T) { s := setupBase(t) addr := genAddrs(1)[0] - classRowId, err := s.stateStore.ClassInfoStore().InsertReturningID(s.ctx, &ecocreditv1.ClassInfo{ + classRowId, err := s.stateStore.ClassInfoStore().InsertReturningID(s.ctx, &api.ClassInfo{ Name: "C01", Admin: s.addr, Metadata: nil, CreditType: "C", }) assert.NilError(t, err) - err = s.stateStore.ClassIssuerStore().Insert(s.ctx, &ecocreditv1.ClassIssuer{ + err = s.stateStore.ClassIssuerStore().Insert(s.ctx, &api.ClassIssuer{ ClassId: classRowId, Issuer: s.addr, }) assert.NilError(t, err) // try to update without being admin - _, err = s.k.UpdateClassIssuers(s.ctx, &v1.MsgUpdateClassIssuers{ + _, err = s.k.UpdateClassIssuers(s.ctx, &core.MsgUpdateClassIssuers{ Admin: addr.String(), ClassId: "C01", AddIssuers: nil, @@ -169,7 +172,7 @@ func TestUpdateClass_IssuersErrs(t *testing.T) { assert.ErrorContains(t, err, sdkerrors.ErrUnauthorized.Error()) // try to update non-existent class - _, err = s.k.UpdateClassIssuers(s.ctx, &v1.MsgUpdateClassIssuers{ + _, err = s.k.UpdateClassIssuers(s.ctx, &core.MsgUpdateClassIssuers{ Admin: s.addr.String(), ClassId: "FOO", AddIssuers: nil, @@ -178,7 +181,7 @@ func TestUpdateClass_IssuersErrs(t *testing.T) { assert.ErrorContains(t, err, sdkerrors.ErrNotFound.Error()) // try to add an issuer that already exists - _, err = s.k.UpdateClassIssuers(s.ctx, &v1.MsgUpdateClassIssuers{ + _, err = s.k.UpdateClassIssuers(s.ctx, &core.MsgUpdateClassIssuers{ Admin: s.addr.String(), ClassId: "C01", AddIssuers: []string{s.addr.String()}, @@ -191,7 +194,7 @@ func TestUpdateClass_Metadata(t *testing.T) { t.Parallel() s := setupBase(t) - err := s.stateStore.ClassInfoStore().Insert(s.ctx, &ecocreditv1.ClassInfo{ + err := s.stateStore.ClassInfoStore().Insert(s.ctx, &api.ClassInfo{ Name: "C01", Admin: s.addr, Metadata: []byte("foobar"), @@ -199,7 +202,7 @@ func TestUpdateClass_Metadata(t *testing.T) { }) assert.NilError(t, err) - _, err = s.k.UpdateClassMetadata(s.ctx, &v1.MsgUpdateClassMetadata{ + _, err = s.k.UpdateClassMetadata(s.ctx, &core.MsgUpdateClassMetadata{ Admin: s.addr.String(), ClassId: "C01", Metadata: []byte("barfoo"), @@ -216,7 +219,7 @@ func TestUpdateClass_MetadataErrs(t *testing.T) { s := setupBase(t) addr := genAddrs(1)[0] - err := s.stateStore.ClassInfoStore().Insert(s.ctx, &ecocreditv1.ClassInfo{ + err := s.stateStore.ClassInfoStore().Insert(s.ctx, &api.ClassInfo{ Name: "C01", Admin: s.addr, Metadata: nil, @@ -225,7 +228,7 @@ func TestUpdateClass_MetadataErrs(t *testing.T) { assert.NilError(t, err) // try to update non-existent class - _, err = s.k.UpdateClassMetadata(s.ctx, &v1.MsgUpdateClassMetadata{ + _, err = s.k.UpdateClassMetadata(s.ctx, &core.MsgUpdateClassMetadata{ Admin: s.addr.String(), ClassId: "FOO", Metadata: nil, @@ -233,7 +236,7 @@ func TestUpdateClass_MetadataErrs(t *testing.T) { assert.ErrorContains(t, err, sdkerrors.ErrNotFound.Error()) // try to update class you are not the admin of - _, err = s.k.UpdateClassMetadata(s.ctx, &v1.MsgUpdateClassMetadata{ + _, err = s.k.UpdateClassMetadata(s.ctx, &core.MsgUpdateClassMetadata{ Admin: addr.String(), ClassId: "C01", Metadata: []byte("FOO"), diff --git a/x/ecocredit/server/core/utils.go b/x/ecocredit/server/core/utils.go index f6364f6322..5e17c12225 100644 --- a/x/ecocredit/server/core/utils.go +++ b/x/ecocredit/server/core/utils.go @@ -2,8 +2,10 @@ package core import ( "context" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/regen-network/regen-ledger/types/math" "github.com/regen-network/regen-ledger/x/ecocredit" ) diff --git a/x/ecocredit/v1alpha1/events.pb.go b/x/ecocredit/v1alpha1/events.pb.go deleted file mode 100644 index 6dc0987515..0000000000 --- a/x/ecocredit/v1alpha1/events.pb.go +++ /dev/null @@ -1,1930 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: regen/ecocredit/v1alpha1/events.proto - -package v1alpha1 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// EventCreateClass is an event emitted when a credit class is created. -type EventCreateClass struct { - // class_id is the unique ID of credit class. - ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` - // admin is the admin of the credit class. - Admin string `protobuf:"bytes,2,opt,name=admin,proto3" json:"admin,omitempty"` -} - -func (m *EventCreateClass) Reset() { *m = EventCreateClass{} } -func (m *EventCreateClass) String() string { return proto.CompactTextString(m) } -func (*EventCreateClass) ProtoMessage() {} -func (*EventCreateClass) Descriptor() ([]byte, []int) { - return fileDescriptor_5b6a013b00aef3af, []int{0} -} -func (m *EventCreateClass) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventCreateClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventCreateClass.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventCreateClass) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventCreateClass.Merge(m, src) -} -func (m *EventCreateClass) XXX_Size() int { - return m.Size() -} -func (m *EventCreateClass) XXX_DiscardUnknown() { - xxx_messageInfo_EventCreateClass.DiscardUnknown(m) -} - -var xxx_messageInfo_EventCreateClass proto.InternalMessageInfo - -func (m *EventCreateClass) GetClassId() string { - if m != nil { - return m.ClassId - } - return "" -} - -func (m *EventCreateClass) GetAdmin() string { - if m != nil { - return m.Admin - } - return "" -} - -// EventCreateBatch is an event emitted when a credit batch is created. -type EventCreateBatch struct { - // class_id is the unique ID of credit class. - ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` - // batch_denom is the unique ID of credit batch. - BatchDenom string `protobuf:"bytes,2,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` - // issuer is the account address of the issuer of the credit batch. - Issuer string `protobuf:"bytes,3,opt,name=issuer,proto3" json:"issuer,omitempty"` - // total_amount is the total number of credits in the credit batch. - TotalAmount string `protobuf:"bytes,4,opt,name=total_amount,json=totalAmount,proto3" json:"total_amount,omitempty"` - // start_date is the beginning of the period during which this credit batch - // was quantified and verified. - StartDate string `protobuf:"bytes,5,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` - // end_date is the end of the period during which this credit batch was - // quantified and verified. - EndDate string `protobuf:"bytes,6,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` - // project_location is the location of the project backing the credits in this - // batch. Full documentation can be found in MsgCreateBatch.project_location. - ProjectLocation string `protobuf:"bytes,7,opt,name=project_location,json=projectLocation,proto3" json:"project_location,omitempty"` -} - -func (m *EventCreateBatch) Reset() { *m = EventCreateBatch{} } -func (m *EventCreateBatch) String() string { return proto.CompactTextString(m) } -func (*EventCreateBatch) ProtoMessage() {} -func (*EventCreateBatch) Descriptor() ([]byte, []int) { - return fileDescriptor_5b6a013b00aef3af, []int{1} -} -func (m *EventCreateBatch) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventCreateBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventCreateBatch.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventCreateBatch) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventCreateBatch.Merge(m, src) -} -func (m *EventCreateBatch) XXX_Size() int { - return m.Size() -} -func (m *EventCreateBatch) XXX_DiscardUnknown() { - xxx_messageInfo_EventCreateBatch.DiscardUnknown(m) -} - -var xxx_messageInfo_EventCreateBatch proto.InternalMessageInfo - -func (m *EventCreateBatch) GetClassId() string { - if m != nil { - return m.ClassId - } - return "" -} - -func (m *EventCreateBatch) GetBatchDenom() string { - if m != nil { - return m.BatchDenom - } - return "" -} - -func (m *EventCreateBatch) GetIssuer() string { - if m != nil { - return m.Issuer - } - return "" -} - -func (m *EventCreateBatch) GetTotalAmount() string { - if m != nil { - return m.TotalAmount - } - return "" -} - -func (m *EventCreateBatch) GetStartDate() string { - if m != nil { - return m.StartDate - } - return "" -} - -func (m *EventCreateBatch) GetEndDate() string { - if m != nil { - return m.EndDate - } - return "" -} - -func (m *EventCreateBatch) GetProjectLocation() string { - if m != nil { - return m.ProjectLocation - } - return "" -} - -// EventReceive is an event emitted when credits are received either via -// creation of a new batch, transfer of credits, or taking credits from a -// basket. Each batch_denom created, transferred or taken from a baset will -// result in a separate EventReceive for easy indexing. -type EventReceive struct { - // sender is the sender of the credits in the case that this event is the - // result of a transfer. It will not be set when credits are received at - // initial issuance or taken from a basket. - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // recipient is the recipient of the credits. - Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` - // batch_denom is the unique ID of credit batch. - BatchDenom string `protobuf:"bytes,3,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` - // tradable_amount is the decimal number of tradable credits received. - TradableAmount string `protobuf:"bytes,4,opt,name=tradable_amount,json=tradableAmount,proto3" json:"tradable_amount,omitempty"` - // retired_amount is the decimal number of retired credits received. - RetiredAmount string `protobuf:"bytes,5,opt,name=retired_amount,json=retiredAmount,proto3" json:"retired_amount,omitempty"` - // basket_denom is the denom of the basket. when the basket_denom field is set, it indicates that this event was - // triggered by the transfer of credits from a basket. It will not be set if the credits were sent by a user, or - // by initial issuance. - BasketDenom string `protobuf:"bytes,6,opt,name=basket_denom,json=basketDenom,proto3" json:"basket_denom,omitempty"` -} - -func (m *EventReceive) Reset() { *m = EventReceive{} } -func (m *EventReceive) String() string { return proto.CompactTextString(m) } -func (*EventReceive) ProtoMessage() {} -func (*EventReceive) Descriptor() ([]byte, []int) { - return fileDescriptor_5b6a013b00aef3af, []int{2} -} -func (m *EventReceive) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventReceive) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventReceive.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventReceive) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventReceive.Merge(m, src) -} -func (m *EventReceive) XXX_Size() int { - return m.Size() -} -func (m *EventReceive) XXX_DiscardUnknown() { - xxx_messageInfo_EventReceive.DiscardUnknown(m) -} - -var xxx_messageInfo_EventReceive proto.InternalMessageInfo - -func (m *EventReceive) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -func (m *EventReceive) GetRecipient() string { - if m != nil { - return m.Recipient - } - return "" -} - -func (m *EventReceive) GetBatchDenom() string { - if m != nil { - return m.BatchDenom - } - return "" -} - -func (m *EventReceive) GetTradableAmount() string { - if m != nil { - return m.TradableAmount - } - return "" -} - -func (m *EventReceive) GetRetiredAmount() string { - if m != nil { - return m.RetiredAmount - } - return "" -} - -func (m *EventReceive) GetBasketDenom() string { - if m != nil { - return m.BasketDenom - } - return "" -} - -// EventRetire is an event emitted when credits are retired. When credits are -// retired from multiple batches in the same transaction, a separate event is -// emitted for each batch_denom. This allows for easier indexing. -type EventRetire struct { - // retirer is the account which has done the "retiring". This will be the - // account receiving credits in the case that credits were retired upon - // issuance using Msg/CreateBatch or retired upon transfer using Msg/Send. - Retirer string `protobuf:"bytes,1,opt,name=retirer,proto3" json:"retirer,omitempty"` - // batch_denom is the unique ID of credit batch. - BatchDenom string `protobuf:"bytes,2,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` - // amount is the decimal number of credits that have been retired. - Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` - // location is the location of the beneficiary or buyer of the retired - // credits. It is a string of the form - // [-[ ]], with the first two - // fields conforming to ISO 3166-2, and postal-code being up to 64 - // alphanumeric characters. - Location string `protobuf:"bytes,4,opt,name=location,proto3" json:"location,omitempty"` -} - -func (m *EventRetire) Reset() { *m = EventRetire{} } -func (m *EventRetire) String() string { return proto.CompactTextString(m) } -func (*EventRetire) ProtoMessage() {} -func (*EventRetire) Descriptor() ([]byte, []int) { - return fileDescriptor_5b6a013b00aef3af, []int{3} -} -func (m *EventRetire) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventRetire) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventRetire.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventRetire) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventRetire.Merge(m, src) -} -func (m *EventRetire) XXX_Size() int { - return m.Size() -} -func (m *EventRetire) XXX_DiscardUnknown() { - xxx_messageInfo_EventRetire.DiscardUnknown(m) -} - -var xxx_messageInfo_EventRetire proto.InternalMessageInfo - -func (m *EventRetire) GetRetirer() string { - if m != nil { - return m.Retirer - } - return "" -} - -func (m *EventRetire) GetBatchDenom() string { - if m != nil { - return m.BatchDenom - } - return "" -} - -func (m *EventRetire) GetAmount() string { - if m != nil { - return m.Amount - } - return "" -} - -func (m *EventRetire) GetLocation() string { - if m != nil { - return m.Location - } - return "" -} - -// EventCancel is an event emitted when credits are cancelled. When credits are -// cancelled from multiple batches in the same transaction, a separate event is -// emitted for each batch_denom. This allows for easier indexing. -type EventCancel struct { - // canceller is the account which has cancelled the credits, which should be - // the holder of the credits. - Canceller string `protobuf:"bytes,1,opt,name=canceller,proto3" json:"canceller,omitempty"` - // batch_denom is the unique ID of credit batch. - BatchDenom string `protobuf:"bytes,2,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` - // amount is the decimal number of credits that have been cancelled. - Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (m *EventCancel) Reset() { *m = EventCancel{} } -func (m *EventCancel) String() string { return proto.CompactTextString(m) } -func (*EventCancel) ProtoMessage() {} -func (*EventCancel) Descriptor() ([]byte, []int) { - return fileDescriptor_5b6a013b00aef3af, []int{4} -} -func (m *EventCancel) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventCancel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventCancel.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventCancel) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventCancel.Merge(m, src) -} -func (m *EventCancel) XXX_Size() int { - return m.Size() -} -func (m *EventCancel) XXX_DiscardUnknown() { - xxx_messageInfo_EventCancel.DiscardUnknown(m) -} - -var xxx_messageInfo_EventCancel proto.InternalMessageInfo - -func (m *EventCancel) GetCanceller() string { - if m != nil { - return m.Canceller - } - return "" -} - -func (m *EventCancel) GetBatchDenom() string { - if m != nil { - return m.BatchDenom - } - return "" -} - -func (m *EventCancel) GetAmount() string { - if m != nil { - return m.Amount - } - return "" -} - -func init() { - proto.RegisterType((*EventCreateClass)(nil), "regen.ecocredit.v1alpha1.EventCreateClass") - proto.RegisterType((*EventCreateBatch)(nil), "regen.ecocredit.v1alpha1.EventCreateBatch") - proto.RegisterType((*EventReceive)(nil), "regen.ecocredit.v1alpha1.EventReceive") - proto.RegisterType((*EventRetire)(nil), "regen.ecocredit.v1alpha1.EventRetire") - proto.RegisterType((*EventCancel)(nil), "regen.ecocredit.v1alpha1.EventCancel") -} - -func init() { - proto.RegisterFile("regen/ecocredit/v1alpha1/events.proto", fileDescriptor_5b6a013b00aef3af) -} - -var fileDescriptor_5b6a013b00aef3af = []byte{ - // 464 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xb1, 0x6e, 0x13, 0x41, - 0x10, 0x86, 0x7d, 0x84, 0xd8, 0xf1, 0xd8, 0x24, 0xd1, 0x0a, 0xa1, 0x03, 0xc1, 0x41, 0x2c, 0x45, - 0x40, 0x81, 0x4f, 0x11, 0x1d, 0x1d, 0x71, 0x28, 0x90, 0xa8, 0x22, 0x2a, 0x9a, 0xd3, 0xde, 0xee, - 0xc8, 0x5e, 0x72, 0xde, 0xb5, 0xf6, 0xc6, 0x86, 0x82, 0x87, 0xe0, 0xb1, 0x28, 0x53, 0xa6, 0x44, - 0x76, 0xcf, 0x33, 0xa0, 0x9b, 0xdd, 0x73, 0x14, 0x40, 0x08, 0xd1, 0xdd, 0xff, 0xed, 0x7f, 0x33, - 0xf3, 0xcf, 0x6a, 0xe1, 0xd8, 0xe3, 0x14, 0x6d, 0x8e, 0xca, 0x29, 0x8f, 0xda, 0x50, 0xbe, 0x3a, - 0x91, 0xd5, 0x62, 0x26, 0x4f, 0x72, 0x5c, 0xa1, 0xa5, 0x7a, 0xbc, 0xf0, 0x8e, 0x9c, 0x48, 0xd9, - 0x36, 0xde, 0xda, 0xc6, 0xad, 0x6d, 0x34, 0x81, 0xc3, 0x37, 0x8d, 0x73, 0xe2, 0x51, 0x12, 0x4e, - 0x2a, 0x59, 0xd7, 0xe2, 0x3e, 0xec, 0xa9, 0xe6, 0xa3, 0x30, 0x3a, 0x4d, 0x9e, 0x24, 0xcf, 0xfa, - 0xe7, 0x3d, 0xd6, 0x6f, 0xb5, 0xb8, 0x0b, 0xbb, 0x52, 0xcf, 0x8d, 0x4d, 0x6f, 0x31, 0x0f, 0x62, - 0xf4, 0x23, 0xb9, 0x51, 0xe5, 0x54, 0x92, 0x9a, 0xfd, 0xad, 0x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29, - 0xf4, 0x42, 0x89, 0x36, 0x59, 0x2b, 0xff, 0xe9, 0x12, 0xe3, 0x2c, 0xf1, 0x12, 0x83, 0x12, 0x0f, - 0x60, 0x6f, 0xbb, 0xdf, 0x90, 0x66, 0xab, 0x47, 0x3a, 0x76, 0x9f, 0x48, 0xab, 0xb0, 0x6a, 0xd6, - 0xa7, 0xf8, 0xab, 0xda, 0xf6, 0xbf, 0x06, 0xff, 0x3d, 0xc1, 0xe9, 0xfb, 0x6f, 0xeb, 0x2c, 0xb9, - 0x5c, 0x67, 0xc9, 0xf7, 0x75, 0x96, 0x7c, 0xdd, 0x64, 0x9d, 0xcb, 0x4d, 0xd6, 0xb9, 0xda, 0x64, - 0x9d, 0x0f, 0xaf, 0xa6, 0x86, 0x66, 0xcb, 0x72, 0xac, 0xdc, 0x3c, 0xe7, 0x37, 0xf3, 0xc2, 0x22, - 0x7d, 0x72, 0xfe, 0x22, 0xaa, 0x0a, 0xf5, 0x14, 0x7d, 0xfe, 0xf9, 0x0f, 0x2f, 0xae, 0xec, 0xf2, - 0x5b, 0x7b, 0xf9, 0x33, 0x00, 0x00, 0xff, 0xff, 0x5b, 0xc3, 0xe8, 0xf6, 0x94, 0x03, 0x00, 0x00, -} - -func (m *EventCreateClass) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventCreateClass) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventCreateClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Admin) > 0 { - i -= len(m.Admin) - copy(dAtA[i:], m.Admin) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Admin))) - i-- - dAtA[i] = 0x12 - } - if len(m.ClassId) > 0 { - i -= len(m.ClassId) - copy(dAtA[i:], m.ClassId) - i = encodeVarintEvents(dAtA, i, uint64(len(m.ClassId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventCreateBatch) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventCreateBatch) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventCreateBatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ProjectLocation) > 0 { - i -= len(m.ProjectLocation) - copy(dAtA[i:], m.ProjectLocation) - i = encodeVarintEvents(dAtA, i, uint64(len(m.ProjectLocation))) - i-- - dAtA[i] = 0x3a - } - if len(m.EndDate) > 0 { - i -= len(m.EndDate) - copy(dAtA[i:], m.EndDate) - i = encodeVarintEvents(dAtA, i, uint64(len(m.EndDate))) - i-- - dAtA[i] = 0x32 - } - if len(m.StartDate) > 0 { - i -= len(m.StartDate) - copy(dAtA[i:], m.StartDate) - i = encodeVarintEvents(dAtA, i, uint64(len(m.StartDate))) - i-- - dAtA[i] = 0x2a - } - if len(m.TotalAmount) > 0 { - i -= len(m.TotalAmount) - copy(dAtA[i:], m.TotalAmount) - i = encodeVarintEvents(dAtA, i, uint64(len(m.TotalAmount))) - i-- - dAtA[i] = 0x22 - } - if len(m.Issuer) > 0 { - i -= len(m.Issuer) - copy(dAtA[i:], m.Issuer) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Issuer))) - i-- - dAtA[i] = 0x1a - } - if len(m.BatchDenom) > 0 { - i -= len(m.BatchDenom) - copy(dAtA[i:], m.BatchDenom) - i = encodeVarintEvents(dAtA, i, uint64(len(m.BatchDenom))) - i-- - dAtA[i] = 0x12 - } - if len(m.ClassId) > 0 { - i -= len(m.ClassId) - copy(dAtA[i:], m.ClassId) - i = encodeVarintEvents(dAtA, i, uint64(len(m.ClassId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventReceive) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventReceive) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventReceive) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BasketDenom) > 0 { - i -= len(m.BasketDenom) - copy(dAtA[i:], m.BasketDenom) - i = encodeVarintEvents(dAtA, i, uint64(len(m.BasketDenom))) - i-- - dAtA[i] = 0x32 - } - if len(m.RetiredAmount) > 0 { - i -= len(m.RetiredAmount) - copy(dAtA[i:], m.RetiredAmount) - i = encodeVarintEvents(dAtA, i, uint64(len(m.RetiredAmount))) - i-- - dAtA[i] = 0x2a - } - if len(m.TradableAmount) > 0 { - i -= len(m.TradableAmount) - copy(dAtA[i:], m.TradableAmount) - i = encodeVarintEvents(dAtA, i, uint64(len(m.TradableAmount))) - i-- - dAtA[i] = 0x22 - } - if len(m.BatchDenom) > 0 { - i -= len(m.BatchDenom) - copy(dAtA[i:], m.BatchDenom) - i = encodeVarintEvents(dAtA, i, uint64(len(m.BatchDenom))) - i-- - dAtA[i] = 0x1a - } - if len(m.Recipient) > 0 { - i -= len(m.Recipient) - copy(dAtA[i:], m.Recipient) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Recipient))) - i-- - dAtA[i] = 0x12 - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventRetire) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventRetire) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventRetire) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Location) > 0 { - i -= len(m.Location) - copy(dAtA[i:], m.Location) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Location))) - i-- - dAtA[i] = 0x22 - } - if len(m.Amount) > 0 { - i -= len(m.Amount) - copy(dAtA[i:], m.Amount) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Amount))) - i-- - dAtA[i] = 0x1a - } - if len(m.BatchDenom) > 0 { - i -= len(m.BatchDenom) - copy(dAtA[i:], m.BatchDenom) - i = encodeVarintEvents(dAtA, i, uint64(len(m.BatchDenom))) - i-- - dAtA[i] = 0x12 - } - if len(m.Retirer) > 0 { - i -= len(m.Retirer) - copy(dAtA[i:], m.Retirer) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Retirer))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventCancel) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventCancel) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventCancel) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Amount) > 0 { - i -= len(m.Amount) - copy(dAtA[i:], m.Amount) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Amount))) - i-- - dAtA[i] = 0x1a - } - if len(m.BatchDenom) > 0 { - i -= len(m.BatchDenom) - copy(dAtA[i:], m.BatchDenom) - i = encodeVarintEvents(dAtA, i, uint64(len(m.BatchDenom))) - i-- - dAtA[i] = 0x12 - } - if len(m.Canceller) > 0 { - i -= len(m.Canceller) - copy(dAtA[i:], m.Canceller) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Canceller))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { - offset -= sovEvents(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *EventCreateClass) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClassId) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.Admin) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - return n -} - -func (m *EventCreateBatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClassId) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.BatchDenom) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.Issuer) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.TotalAmount) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.StartDate) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.EndDate) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.ProjectLocation) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - return n -} - -func (m *EventReceive) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.Recipient) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.BatchDenom) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.TradableAmount) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.RetiredAmount) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.BasketDenom) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - return n -} - -func (m *EventRetire) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Retirer) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.BatchDenom) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.Amount) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.Location) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - return n -} - -func (m *EventCancel) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Canceller) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.BatchDenom) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.Amount) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - return n -} - -func sovEvents(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozEvents(x uint64) (n int) { - return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *EventCreateClass) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventCreateClass: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventCreateClass: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Admin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventCreateBatch) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventCreateBatch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventCreateBatch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Issuer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Issuer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TotalAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartDate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StartDate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EndDate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EndDate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProjectLocation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProjectLocation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventReceive) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventReceive: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventReceive: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Recipient = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradableAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TradableAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetiredAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RetiredAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BasketDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BasketDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventRetire) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventRetire: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventRetire: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Retirer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Retirer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Location = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventCancel) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventCancel: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventCancel: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Canceller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Canceller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEvents(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvents - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvents - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvents - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthEvents - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEvents - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthEvents - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/ecocredit/v1alpha1/genesis.pb.go b/x/ecocredit/v1alpha1/genesis.pb.go deleted file mode 100644 index 9506870513..0000000000 --- a/x/ecocredit/v1alpha1/genesis.pb.go +++ /dev/null @@ -1,1261 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: regen/ecocredit/v1alpha1/genesis.proto - -package v1alpha1 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// GenesisState defines ecocredit module's genesis state. -type GenesisState struct { - // Params contains the updateable global parameters for use with the x/params - // module - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` - // class_info is the list of credit class info. - ClassInfo []*ClassInfo `protobuf:"bytes,2,rep,name=class_info,json=classInfo,proto3" json:"class_info,omitempty"` - // batch_info is the list of credit batch info. - BatchInfo []*BatchInfo `protobuf:"bytes,3,rep,name=batch_info,json=batchInfo,proto3" json:"batch_info,omitempty"` - // sequences is the list of credit type sequence. - Sequences []*CreditTypeSeq `protobuf:"bytes,4,rep,name=sequences,proto3" json:"sequences,omitempty"` - // balances is the list of credit batch tradable/retired units. - Balances []*Balance `protobuf:"bytes,5,rep,name=balances,proto3" json:"balances,omitempty"` - // supplies is the list of credit batch tradable/retired supply. - Supplies []*Supply `protobuf:"bytes,6,rep,name=supplies,proto3" json:"supplies,omitempty"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_2f9cb84fe1853321, []int{0} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func (m *GenesisState) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -func (m *GenesisState) GetClassInfo() []*ClassInfo { - if m != nil { - return m.ClassInfo - } - return nil -} - -func (m *GenesisState) GetBatchInfo() []*BatchInfo { - if m != nil { - return m.BatchInfo - } - return nil -} - -func (m *GenesisState) GetSequences() []*CreditTypeSeq { - if m != nil { - return m.Sequences - } - return nil -} - -func (m *GenesisState) GetBalances() []*Balance { - if m != nil { - return m.Balances - } - return nil -} - -func (m *GenesisState) GetSupplies() []*Supply { - if m != nil { - return m.Supplies - } - return nil -} - -// Balance represents tradable or retired units of a credit batch with an -// account address, batch_denom, and balance. -type Balance struct { - // address is the account address of the account holding credits. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // batch_denom is the unique ID of the credit batch. - BatchDenom string `protobuf:"bytes,2,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` - // tradable_balance is the tradable balance of the credit batch. - TradableBalance string `protobuf:"bytes,3,opt,name=tradable_balance,json=tradableBalance,proto3" json:"tradable_balance,omitempty"` - // retired_balance is the retired balance of the credit batch. - RetiredBalance string `protobuf:"bytes,4,opt,name=retired_balance,json=retiredBalance,proto3" json:"retired_balance,omitempty"` -} - -func (m *Balance) Reset() { *m = Balance{} } -func (m *Balance) String() string { return proto.CompactTextString(m) } -func (*Balance) ProtoMessage() {} -func (*Balance) Descriptor() ([]byte, []int) { - return fileDescriptor_2f9cb84fe1853321, []int{1} -} -func (m *Balance) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Balance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Balance.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Balance) XXX_Merge(src proto.Message) { - xxx_messageInfo_Balance.Merge(m, src) -} -func (m *Balance) XXX_Size() int { - return m.Size() -} -func (m *Balance) XXX_DiscardUnknown() { - xxx_messageInfo_Balance.DiscardUnknown(m) -} - -var xxx_messageInfo_Balance proto.InternalMessageInfo - -func (m *Balance) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *Balance) GetBatchDenom() string { - if m != nil { - return m.BatchDenom - } - return "" -} - -func (m *Balance) GetTradableBalance() string { - if m != nil { - return m.TradableBalance - } - return "" -} - -func (m *Balance) GetRetiredBalance() string { - if m != nil { - return m.RetiredBalance - } - return "" -} - -// Supply represents a tradable or retired supply of a credit batch. -type Supply struct { - // batch_denom is the unique ID of the credit batch. - BatchDenom string `protobuf:"bytes,1,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` - // tradable_supply is the tradable supply of the credit batch. - TradableSupply string `protobuf:"bytes,2,opt,name=tradable_supply,json=tradableSupply,proto3" json:"tradable_supply,omitempty"` - // retired_supply is the retired supply of the credit batch. - RetiredSupply string `protobuf:"bytes,3,opt,name=retired_supply,json=retiredSupply,proto3" json:"retired_supply,omitempty"` -} - -func (m *Supply) Reset() { *m = Supply{} } -func (m *Supply) String() string { return proto.CompactTextString(m) } -func (*Supply) ProtoMessage() {} -func (*Supply) Descriptor() ([]byte, []int) { - return fileDescriptor_2f9cb84fe1853321, []int{2} -} -func (m *Supply) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Supply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Supply.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Supply) XXX_Merge(src proto.Message) { - xxx_messageInfo_Supply.Merge(m, src) -} -func (m *Supply) XXX_Size() int { - return m.Size() -} -func (m *Supply) XXX_DiscardUnknown() { - xxx_messageInfo_Supply.DiscardUnknown(m) -} - -var xxx_messageInfo_Supply proto.InternalMessageInfo - -func (m *Supply) GetBatchDenom() string { - if m != nil { - return m.BatchDenom - } - return "" -} - -func (m *Supply) GetTradableSupply() string { - if m != nil { - return m.TradableSupply - } - return "" -} - -func (m *Supply) GetRetiredSupply() string { - if m != nil { - return m.RetiredSupply - } - return "" -} - -func init() { - proto.RegisterType((*GenesisState)(nil), "regen.ecocredit.v1alpha1.GenesisState") - proto.RegisterType((*Balance)(nil), "regen.ecocredit.v1alpha1.Balance") - proto.RegisterType((*Supply)(nil), "regen.ecocredit.v1alpha1.Supply") -} - -func init() { - proto.RegisterFile("regen/ecocredit/v1alpha1/genesis.proto", fileDescriptor_2f9cb84fe1853321) -} - -var fileDescriptor_2f9cb84fe1853321 = []byte{ - // 455 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xcf, 0x6e, 0xd3, 0x40, - 0x10, 0xc6, 0xe3, 0x26, 0xa4, 0xcd, 0x04, 0x5a, 0xb4, 0xe2, 0x60, 0xf5, 0xe0, 0x86, 0xf0, 0x27, - 0xe5, 0x80, 0xad, 0x96, 0x1b, 0x02, 0x0e, 0x06, 0x84, 0xb8, 0x21, 0xa7, 0x27, 0x2e, 0xd1, 0xda, - 0x9e, 0x3a, 0x16, 0x8e, 0xd7, 0xdd, 0xdd, 0x00, 0x7e, 0x0b, 0x8e, 0x88, 0x27, 0xea, 0x31, 0x47, - 0x4e, 0x08, 0x25, 0x2f, 0x82, 0xbc, 0x7f, 0x8c, 0x04, 0x24, 0xdc, 0x66, 0x26, 0xbf, 0xf9, 0xbe, - 0x2f, 0x63, 0x2d, 0x3c, 0xe4, 0x98, 0x61, 0x19, 0x60, 0xc2, 0x12, 0x8e, 0x69, 0x2e, 0x83, 0x8f, - 0x67, 0xb4, 0xa8, 0xe6, 0xf4, 0x2c, 0xc8, 0xb0, 0x44, 0x91, 0x0b, 0xbf, 0xe2, 0x4c, 0x32, 0xe2, - 0x2a, 0xce, 0x6f, 0x39, 0xdf, 0x72, 0xc7, 0xf7, 0xb7, 0x2a, 0xc8, 0xba, 0x42, 0xb3, 0x7f, 0x7c, - 0x27, 0x63, 0x19, 0x53, 0x65, 0xd0, 0x54, 0x7a, 0x3a, 0xfe, 0xd6, 0x85, 0x9b, 0x6f, 0xb4, 0xcf, - 0x54, 0x52, 0x89, 0xe4, 0x05, 0xf4, 0x2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ab, 0xa8, 0x23, 0x3b, 0xb7, - 0x2e, 0x13, 0x38, 0xe2, 0x28, 0x73, 0x8e, 0x69, 0x4b, 0xf6, 0x14, 0x79, 0x68, 0xc6, 0x06, 0x1c, - 0xd7, 0xd0, 0xd7, 0x71, 0xff, 0xb4, 0x77, 0xfe, 0xb2, 0x9f, 0x40, 0x6b, 0x33, 0x53, 0x7f, 0xad, - 0x36, 0x19, 0x0f, 0xed, 0xd8, 0x28, 0x3d, 0x00, 0xeb, 0x62, 0x39, 0x9d, 0xf2, 0x96, 0x99, 0x6a, - 0x2c, 0xbc, 0xb8, 0x5e, 0x7b, 0xce, 0x6a, 0xed, 0x39, 0x3f, 0xd7, 0x9e, 0xf3, 0x65, 0xe3, 0x75, - 0x56, 0x1b, 0xaf, 0xf3, 0x7d, 0xe3, 0x75, 0xde, 0x3f, 0xcd, 0x72, 0x39, 0x5f, 0xc6, 0x7e, 0xc2, - 0x16, 0x81, 0xba, 0xf2, 0xe3, 0x12, 0xe5, 0x27, 0xc6, 0x3f, 0x98, 0xae, 0xc0, 0x34, 0x43, 0x1e, - 0x7c, 0xfe, 0xc7, 0x53, 0x89, 0xfb, 0xea, 0x3d, 0x3c, 0xf9, 0x15, 0x00, 0x00, 0xff, 0xff, 0x29, - 0x14, 0x0b, 0x05, 0x8f, 0x03, 0x00, 0x00, -} - -func (m *GenesisState) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Supplies) > 0 { - for iNdEx := len(m.Supplies) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Supplies[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if len(m.Balances) > 0 { - for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Balances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if len(m.Sequences) > 0 { - for iNdEx := len(m.Sequences) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Sequences[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.BatchInfo) > 0 { - for iNdEx := len(m.BatchInfo) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.BatchInfo[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.ClassInfo) > 0 { - for iNdEx := len(m.ClassInfo) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ClassInfo[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Balance) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Balance) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Balance) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RetiredBalance) > 0 { - i -= len(m.RetiredBalance) - copy(dAtA[i:], m.RetiredBalance) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.RetiredBalance))) - i-- - dAtA[i] = 0x22 - } - if len(m.TradableBalance) > 0 { - i -= len(m.TradableBalance) - copy(dAtA[i:], m.TradableBalance) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.TradableBalance))) - i-- - dAtA[i] = 0x1a - } - if len(m.BatchDenom) > 0 { - i -= len(m.BatchDenom) - copy(dAtA[i:], m.BatchDenom) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.BatchDenom))) - i-- - dAtA[i] = 0x12 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Supply) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Supply) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Supply) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RetiredSupply) > 0 { - i -= len(m.RetiredSupply) - copy(dAtA[i:], m.RetiredSupply) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.RetiredSupply))) - i-- - dAtA[i] = 0x1a - } - if len(m.TradableSupply) > 0 { - i -= len(m.TradableSupply) - copy(dAtA[i:], m.TradableSupply) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.TradableSupply))) - i-- - dAtA[i] = 0x12 - } - if len(m.BatchDenom) > 0 { - i -= len(m.BatchDenom) - copy(dAtA[i:], m.BatchDenom) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.BatchDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovGenesis(uint64(l)) - if len(m.ClassInfo) > 0 { - for _, e := range m.ClassInfo { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.BatchInfo) > 0 { - for _, e := range m.BatchInfo { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.Sequences) > 0 { - for _, e := range m.Sequences { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.Balances) > 0 { - for _, e := range m.Balances { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.Supplies) > 0 { - for _, e := range m.Supplies { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - return n -} - -func (m *Balance) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.BatchDenom) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.TradableBalance) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.RetiredBalance) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - return n -} - -func (m *Supply) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BatchDenom) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.TradableSupply) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.RetiredSupply) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GenesisState) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassInfo = append(m.ClassInfo, &ClassInfo{}) - if err := m.ClassInfo[len(m.ClassInfo)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchInfo = append(m.BatchInfo, &BatchInfo{}) - if err := m.BatchInfo[len(m.BatchInfo)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequences", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sequences = append(m.Sequences, &CreditTypeSeq{}) - if err := m.Sequences[len(m.Sequences)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Balances = append(m.Balances, &Balance{}) - if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Supplies", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Supplies = append(m.Supplies, &Supply{}) - if err := m.Supplies[len(m.Supplies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Balance) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Balance: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Balance: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradableBalance", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TradableBalance = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetiredBalance", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RetiredBalance = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Supply) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Supply: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Supply: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradableSupply", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TradableSupply = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetiredSupply", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RetiredSupply = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/ecocredit/v1alpha1/query.pb.go b/x/ecocredit/v1alpha1/query.pb.go deleted file mode 100644 index b52c7ee7a1..0000000000 --- a/x/ecocredit/v1alpha1/query.pb.go +++ /dev/null @@ -1,3608 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: regen/ecocredit/v1alpha1/query.proto - -package v1alpha1 - -import ( - context "context" - fmt "fmt" - query "github.com/cosmos/cosmos-sdk/types/query" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryParamsRequest is the Query/Params request type. -type QueryParamsRequest struct { -} - -func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } -func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryParamsRequest) ProtoMessage() {} -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6a16cc4c1db940dc, []int{0} -} -func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsRequest.Merge(m, src) -} -func (m *QueryParamsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo - -// QueryParamsResponse is the Query/Params response type. -type QueryParamsResponse struct { - // params defines the parameters of the ecocredit module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } -func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsResponse) ProtoMessage() {} -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6a16cc4c1db940dc, []int{1} -} -func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsResponse.Merge(m, src) -} -func (m *QueryParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo - -func (m *QueryParamsResponse) GetParams() *Params { - if m != nil { - return m.Params - } - return nil -} - -// QueryClassesRequest is the Query/Classes request type. -type QueryClassesRequest struct { - // pagination defines an optional pagination for the request. - Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryClassesRequest) Reset() { *m = QueryClassesRequest{} } -func (m *QueryClassesRequest) String() string { return proto.CompactTextString(m) } -func (*QueryClassesRequest) ProtoMessage() {} -func (*QueryClassesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6a16cc4c1db940dc, []int{2} -} -func (m *QueryClassesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryClassesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryClassesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryClassesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryClassesRequest.Merge(m, src) -} -func (m *QueryClassesRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryClassesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryClassesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryClassesRequest proto.InternalMessageInfo - -func (m *QueryClassesRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryClassesResponse is the Query/Classes response type. -type QueryClassesResponse struct { - // classes are the fetched credit classes. - Classes []*ClassInfo `protobuf:"bytes,1,rep,name=classes,proto3" json:"classes,omitempty"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryClassesResponse) Reset() { *m = QueryClassesResponse{} } -func (m *QueryClassesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryClassesResponse) ProtoMessage() {} -func (*QueryClassesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6a16cc4c1db940dc, []int{3} -} -func (m *QueryClassesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryClassesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryClassesResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryClassesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryClassesResponse.Merge(m, src) -} -func (m *QueryClassesResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryClassesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryClassesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryClassesResponse proto.InternalMessageInfo - -func (m *QueryClassesResponse) GetClasses() []*ClassInfo { - if m != nil { - return m.Classes - } - return nil -} - -func (m *QueryClassesResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryClassInfoRequest is the Query/ClassInfo request type. -type QueryClassInfoRequest struct { - // class_id is the unique ID of credit class to query. - ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` -} - -func (m *QueryClassInfoRequest) Reset() { *m = QueryClassInfoRequest{} } -func (m *QueryClassInfoRequest) String() string { return proto.CompactTextString(m) } -func (*QueryClassInfoRequest) ProtoMessage() {} -func (*QueryClassInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6a16cc4c1db940dc, []int{4} -} -func (m *QueryClassInfoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryClassInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryClassInfoRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryClassInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryClassInfoRequest.Merge(m, src) -} -func (m *QueryClassInfoRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryClassInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryClassInfoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryClassInfoRequest proto.InternalMessageInfo - -func (m *QueryClassInfoRequest) GetClassId() string { - if m != nil { - return m.ClassId - } - return "" -} - -// QueryClassInfoResponse is the Query/ClassInfo request type. -type QueryClassInfoResponse struct { - // info is the ClassInfo for the credit class. - Info *ClassInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` -} - -func (m *QueryClassInfoResponse) Reset() { *m = QueryClassInfoResponse{} } -func (m *QueryClassInfoResponse) String() string { return proto.CompactTextString(m) } -func (*QueryClassInfoResponse) ProtoMessage() {} -func (*QueryClassInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6a16cc4c1db940dc, []int{5} -} -func (m *QueryClassInfoResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryClassInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryClassInfoResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryClassInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryClassInfoResponse.Merge(m, src) -} -func (m *QueryClassInfoResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryClassInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryClassInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryClassInfoResponse proto.InternalMessageInfo - -func (m *QueryClassInfoResponse) GetInfo() *ClassInfo { - if m != nil { - return m.Info - } - return nil -} - -// QueryBatchesRequest is the Query/Batches request type. -type QueryBatchesRequest struct { - // class_id is the unique ID of the credit class to query. - ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryBatchesRequest) Reset() { *m = QueryBatchesRequest{} } -func (m *QueryBatchesRequest) String() string { return proto.CompactTextString(m) } -func (*QueryBatchesRequest) ProtoMessage() {} -func (*QueryBatchesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6a16cc4c1db940dc, []int{6} -} -func (m *QueryBatchesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBatchesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBatchesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBatchesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBatchesRequest.Merge(m, src) -} -func (m *QueryBatchesRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryBatchesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBatchesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBatchesRequest proto.InternalMessageInfo - -func (m *QueryBatchesRequest) GetClassId() string { - if m != nil { - return m.ClassId - } - return "" -} - -func (m *QueryBatchesRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryBatchesResponse is the Query/Batches response type. -type QueryBatchesResponse struct { - // batches are the fetched credit batches within the class. - Batches []*BatchInfo `protobuf:"bytes,1,rep,name=batches,proto3" json:"batches,omitempty"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryBatchesResponse) Reset() { *m = QueryBatchesResponse{} } -func (m *QueryBatchesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryBatchesResponse) ProtoMessage() {} -func (*QueryBatchesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6a16cc4c1db940dc, []int{7} -} -func (m *QueryBatchesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBatchesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBatchesResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBatchesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBatchesResponse.Merge(m, src) -} -func (m *QueryBatchesResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryBatchesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBatchesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBatchesResponse proto.InternalMessageInfo - -func (m *QueryBatchesResponse) GetBatches() []*BatchInfo { - if m != nil { - return m.Batches - } - return nil -} - -func (m *QueryBatchesResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryBatchInfoRequest is the Query/BatchInfo request type. -type QueryBatchInfoRequest struct { - // batch_denom is the unique ID of credit batch to query. - BatchDenom string `protobuf:"bytes,1,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` -} - -func (m *QueryBatchInfoRequest) Reset() { *m = QueryBatchInfoRequest{} } -func (m *QueryBatchInfoRequest) String() string { return proto.CompactTextString(m) } -func (*QueryBatchInfoRequest) ProtoMessage() {} -func (*QueryBatchInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6a16cc4c1db940dc, []int{8} -} -func (m *QueryBatchInfoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBatchInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBatchInfoRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBatchInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBatchInfoRequest.Merge(m, src) -} -func (m *QueryBatchInfoRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryBatchInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBatchInfoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBatchInfoRequest proto.InternalMessageInfo - -func (m *QueryBatchInfoRequest) GetBatchDenom() string { - if m != nil { - return m.BatchDenom - } - return "" -} - -// QueryBatchInfoResponse is the Query/BatchInfo response type. -type QueryBatchInfoResponse struct { - // info is the BatchInfo for the credit batch. - Info *BatchInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` -} - -func (m *QueryBatchInfoResponse) Reset() { *m = QueryBatchInfoResponse{} } -func (m *QueryBatchInfoResponse) String() string { return proto.CompactTextString(m) } -func (*QueryBatchInfoResponse) ProtoMessage() {} -func (*QueryBatchInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6a16cc4c1db940dc, []int{9} -} -func (m *QueryBatchInfoResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBatchInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBatchInfoResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBatchInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBatchInfoResponse.Merge(m, src) -} -func (m *QueryBatchInfoResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryBatchInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBatchInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBatchInfoResponse proto.InternalMessageInfo - -func (m *QueryBatchInfoResponse) GetInfo() *BatchInfo { - if m != nil { - return m.Info - } - return nil -} - -// QueryBalanceRequest is the Query/Balance request type. -type QueryBalanceRequest struct { - // account is the address of the account whose balance is being queried. - Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` - // batch_denom is the unique ID of credit batch balance to query. - BatchDenom string `protobuf:"bytes,2,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` -} - -func (m *QueryBalanceRequest) Reset() { *m = QueryBalanceRequest{} } -func (m *QueryBalanceRequest) String() string { return proto.CompactTextString(m) } -func (*QueryBalanceRequest) ProtoMessage() {} -func (*QueryBalanceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6a16cc4c1db940dc, []int{10} -} -func (m *QueryBalanceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBalanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBalanceRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBalanceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBalanceRequest.Merge(m, src) -} -func (m *QueryBalanceRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryBalanceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBalanceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBalanceRequest proto.InternalMessageInfo - -func (m *QueryBalanceRequest) GetAccount() string { - if m != nil { - return m.Account - } - return "" -} - -func (m *QueryBalanceRequest) GetBatchDenom() string { - if m != nil { - return m.BatchDenom - } - return "" -} - -// QueryBalanceResponse is the Query/Balance response type. -type QueryBalanceResponse struct { - // tradable_amount is the decimal number of tradable credits. - TradableAmount string `protobuf:"bytes,1,opt,name=tradable_amount,json=tradableAmount,proto3" json:"tradable_amount,omitempty"` - // retired_amount is the decimal number of retired credits. - RetiredAmount string `protobuf:"bytes,2,opt,name=retired_amount,json=retiredAmount,proto3" json:"retired_amount,omitempty"` -} - -func (m *QueryBalanceResponse) Reset() { *m = QueryBalanceResponse{} } -func (m *QueryBalanceResponse) String() string { return proto.CompactTextString(m) } -func (*QueryBalanceResponse) ProtoMessage() {} -func (*QueryBalanceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6a16cc4c1db940dc, []int{11} -} -func (m *QueryBalanceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBalanceResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBalanceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBalanceResponse.Merge(m, src) -} -func (m *QueryBalanceResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryBalanceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBalanceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBalanceResponse proto.InternalMessageInfo - -func (m *QueryBalanceResponse) GetTradableAmount() string { - if m != nil { - return m.TradableAmount - } - return "" -} - -func (m *QueryBalanceResponse) GetRetiredAmount() string { - if m != nil { - return m.RetiredAmount - } - return "" -} - -// QuerySupplyRequest is the Query/Supply request type. -type QuerySupplyRequest struct { - // batch_denom is the unique ID of credit batch to query. - BatchDenom string `protobuf:"bytes,1,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` -} - -func (m *QuerySupplyRequest) Reset() { *m = QuerySupplyRequest{} } -func (m *QuerySupplyRequest) String() string { return proto.CompactTextString(m) } -func (*QuerySupplyRequest) ProtoMessage() {} -func (*QuerySupplyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6a16cc4c1db940dc, []int{12} -} -func (m *QuerySupplyRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QuerySupplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QuerySupplyRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QuerySupplyRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QuerySupplyRequest.Merge(m, src) -} -func (m *QuerySupplyRequest) XXX_Size() int { - return m.Size() -} -func (m *QuerySupplyRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QuerySupplyRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QuerySupplyRequest proto.InternalMessageInfo - -func (m *QuerySupplyRequest) GetBatchDenom() string { - if m != nil { - return m.BatchDenom - } - return "" -} - -// QuerySupplyResponse is the Query/Supply response type. -type QuerySupplyResponse struct { - // tradable_supply is the decimal number of tradable credits in the batch - // supply. - TradableSupply string `protobuf:"bytes,1,opt,name=tradable_supply,json=tradableSupply,proto3" json:"tradable_supply,omitempty"` - // retired_supply is the decimal number of retired credits in the batch - // supply. - RetiredSupply string `protobuf:"bytes,2,opt,name=retired_supply,json=retiredSupply,proto3" json:"retired_supply,omitempty"` -} - -func (m *QuerySupplyResponse) Reset() { *m = QuerySupplyResponse{} } -func (m *QuerySupplyResponse) String() string { return proto.CompactTextString(m) } -func (*QuerySupplyResponse) ProtoMessage() {} -func (*QuerySupplyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6a16cc4c1db940dc, []int{13} -} -func (m *QuerySupplyResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QuerySupplyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QuerySupplyResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QuerySupplyResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QuerySupplyResponse.Merge(m, src) -} -func (m *QuerySupplyResponse) XXX_Size() int { - return m.Size() -} -func (m *QuerySupplyResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QuerySupplyResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QuerySupplyResponse proto.InternalMessageInfo - -func (m *QuerySupplyResponse) GetTradableSupply() string { - if m != nil { - return m.TradableSupply - } - return "" -} - -func (m *QuerySupplyResponse) GetRetiredSupply() string { - if m != nil { - return m.RetiredSupply - } - return "" -} - -// QueryCreditTypesRequest is the Query/Credit_Types request type -type QueryCreditTypesRequest struct { -} - -func (m *QueryCreditTypesRequest) Reset() { *m = QueryCreditTypesRequest{} } -func (m *QueryCreditTypesRequest) String() string { return proto.CompactTextString(m) } -func (*QueryCreditTypesRequest) ProtoMessage() {} -func (*QueryCreditTypesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6a16cc4c1db940dc, []int{14} -} -func (m *QueryCreditTypesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryCreditTypesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryCreditTypesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryCreditTypesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCreditTypesRequest.Merge(m, src) -} -func (m *QueryCreditTypesRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryCreditTypesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCreditTypesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryCreditTypesRequest proto.InternalMessageInfo - -// QueryCreditTypesRequest is the Query/Credit_Types response type -type QueryCreditTypesResponse struct { - // list of credit types - CreditTypes []*CreditType `protobuf:"bytes,1,rep,name=credit_types,json=creditTypes,proto3" json:"credit_types,omitempty"` -} - -func (m *QueryCreditTypesResponse) Reset() { *m = QueryCreditTypesResponse{} } -func (m *QueryCreditTypesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryCreditTypesResponse) ProtoMessage() {} -func (*QueryCreditTypesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6a16cc4c1db940dc, []int{15} -} -func (m *QueryCreditTypesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryCreditTypesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryCreditTypesResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryCreditTypesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCreditTypesResponse.Merge(m, src) -} -func (m *QueryCreditTypesResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryCreditTypesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCreditTypesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryCreditTypesResponse proto.InternalMessageInfo - -func (m *QueryCreditTypesResponse) GetCreditTypes() []*CreditType { - if m != nil { - return m.CreditTypes - } - return nil -} - -func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "regen.ecocredit.v1alpha1.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "regen.ecocredit.v1alpha1.QueryParamsResponse") - proto.RegisterType((*QueryClassesRequest)(nil), "regen.ecocredit.v1alpha1.QueryClassesRequest") - proto.RegisterType((*QueryClassesResponse)(nil), "regen.ecocredit.v1alpha1.QueryClassesResponse") - proto.RegisterType((*QueryClassInfoRequest)(nil), "regen.ecocredit.v1alpha1.QueryClassInfoRequest") - proto.RegisterType((*QueryClassInfoResponse)(nil), "regen.ecocredit.v1alpha1.QueryClassInfoResponse") - proto.RegisterType((*QueryBatchesRequest)(nil), "regen.ecocredit.v1alpha1.QueryBatchesRequest") - proto.RegisterType((*QueryBatchesResponse)(nil), "regen.ecocredit.v1alpha1.QueryBatchesResponse") - proto.RegisterType((*QueryBatchInfoRequest)(nil), "regen.ecocredit.v1alpha1.QueryBatchInfoRequest") - proto.RegisterType((*QueryBatchInfoResponse)(nil), "regen.ecocredit.v1alpha1.QueryBatchInfoResponse") - proto.RegisterType((*QueryBalanceRequest)(nil), "regen.ecocredit.v1alpha1.QueryBalanceRequest") - proto.RegisterType((*QueryBalanceResponse)(nil), "regen.ecocredit.v1alpha1.QueryBalanceResponse") - proto.RegisterType((*QuerySupplyRequest)(nil), "regen.ecocredit.v1alpha1.QuerySupplyRequest") - proto.RegisterType((*QuerySupplyResponse)(nil), "regen.ecocredit.v1alpha1.QuerySupplyResponse") - proto.RegisterType((*QueryCreditTypesRequest)(nil), "regen.ecocredit.v1alpha1.QueryCreditTypesRequest") - proto.RegisterType((*QueryCreditTypesResponse)(nil), "regen.ecocredit.v1alpha1.QueryCreditTypesResponse") -} - -func init() { - proto.RegisterFile("regen/ecocredit/v1alpha1/query.proto", fileDescriptor_6a16cc4c1db940dc) -} - -var fileDescriptor_6a16cc4c1db940dc = []byte{ - // 870 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x4d, 0x4f, 0xdb, 0x48, - 0x18, 0xc7, 0x71, 0x76, 0x37, 0x59, 0x26, 0xbb, 0xac, 0x34, 0xcb, 0xee, 0x86, 0x68, 0x95, 0xa6, - 0x86, 0x42, 0x5a, 0x11, 0x4f, 0x93, 0x52, 0x40, 0x55, 0x5b, 0x09, 0xa8, 0x8a, 0x38, 0x15, 0x52, - 0x4e, 0x95, 0xaa, 0x68, 0xe2, 0x0c, 0xc1, 0x6a, 0xe2, 0x31, 0xb6, 0x43, 0x41, 0x88, 0x4b, 0xbf, - 0x40, 0x2b, 0x71, 0xef, 0xa9, 0x2f, 0xb7, 0x5e, 0xfa, 0x25, 0x7a, 0x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 0xe4, 0xc8, 0xb3, - 0xa8, 0x63, 0xfc, 0x4e, 0x41, 0x19, 0xf0, 0x91, 0x58, 0xf1, 0xc2, 0x56, 0x17, 0x2b, 0xde, 0x80, - 0x3d, 0xa9, 0x77, 0x05, 0xe0, 0x22, 0x5e, 0x18, 0x05, 0x90, 0x78, 0xee, 0xf4, 0x5e, 0x41, 0xe3, - 0xfe, 0xdd, 0x8e, 0xd5, 0x73, 0xd0, 0x7a, 0x62, 0xf5, 0x1c, 0x72, 0x1c, 0x75, 0x49, 0xe0, 0x56, - 0x30, 0x89, 0xc6, 0x05, 0x36, 0x72, 0x14, 0xb8, 0x91, 0xc7, 0xf8, 0xa3, 0x90, 0x54, 0x78, 0x43, - 0x02, 0x49, 0x83, 0xae, 0x94, 0x40, 0xd2, 0x90, 0xe5, 0xa8, 0x1b, 0x82, 0x71, 0x0d, 0xaf, 0x8c, - 0xc8, 0x48, 0x1a, 0xb2, 0x11, 0x39, 0x02, 0xd7, 0x3b, 0xc6, 0x6f, 0x15, 0x94, 0x06, 0x07, 0x98, - 0x8f, 0xa1, 0x08, 0x19, 0x52, 0xbe, 0x9c, 0x30, 0x1b, 0x90, 0xef, 0x0b, 0xe4, 0x65, 0xbc, 0x38, - 0x2a, 0xb2, 0x34, 0xa3, 0xde, 0xbd, 0xca, 0x06, 0x8c, 0x05, 0x57, 0xe2, 0x2e, 0xca, 0x90, 0x3f, - 0xe5, 0xab, 0xa3, 0x94, 0x00, 0xb6, 0x26, 0xb0, 0x4b, 0x78, 0xf6, 0x92, 0x1f, 0xaf, 0xf8, 0x2e, - 0x0b, 0x5f, 0xc3, 0x2f, 0x15, 0x94, 0x96, 0x0f, 0xb7, 0x58, 0x39, 0x43, 0xef, 0xc5, 0x58, 0x39, - 0xc3, 0xef, 0x48, 0xb5, 0x24, 0xb8, 0x54, 0x5c, 0x8c, 0xe6, 0x92, 0xef, 0xc6, 0xd5, 0xed, 0x4f, - 0x67, 0x05, 0xe5, 0xf4, 0xac, 0xa0, 0x7c, 0x3d, 0x2b, 0x28, 0xaf, 0xce, 0x0b, 0x63, 0xa7, 0xe7, - 0x85, 0xb1, 0x2f, 0xe7, 0x85, 0xb1, 0x27, 0x77, 0x5a, 0x86, 0xbb, 0xdb, 0x6d, 0x68, 0x3a, 0xef, - 0xc8, 0x2e, 0x65, 0x93, 0xb9, 0xcf, 0xb9, 0xfd, 0x0c, 0xbe, 0xda, 0xac, 0xd9, 0x62, 0x36, 0x39, - 0xb8, 0xa0, 0x79, 0x23, 0x2d, 0xde, 0xbe, 0xb7, 0xbe, 0x07, 0x00, 0x00, 0xff, 0xff, 0x15, 0x65, - 0x2d, 0xd8, 0xad, 0x0b, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // Classes queries for all credit classes with pagination. - Classes(ctx context.Context, in *QueryClassesRequest, opts ...grpc.CallOption) (*QueryClassesResponse, error) - // ClassInfo queries for information on a credit class. - ClassInfo(ctx context.Context, in *QueryClassInfoRequest, opts ...grpc.CallOption) (*QueryClassInfoResponse, error) - // Batches queries for all batches in the given credit class with pagination. - Batches(ctx context.Context, in *QueryBatchesRequest, opts ...grpc.CallOption) (*QueryBatchesResponse, error) - // BatchInfo queries for information on a credit batch. - BatchInfo(ctx context.Context, in *QueryBatchInfoRequest, opts ...grpc.CallOption) (*QueryBatchInfoResponse, error) - // Balance queries the balance (both tradable and retired) of a given credit - // batch for a given account. - Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) - // Supply queries the tradable and retired supply of a credit batch. - Supply(ctx context.Context, in *QuerySupplyRequest, opts ...grpc.CallOption) (*QuerySupplyResponse, error) - // CreditTypes returns the list of allowed types that credit classes can have. - // See Types/CreditType for more details. - CreditTypes(ctx context.Context, in *QueryCreditTypesRequest, opts ...grpc.CallOption) (*QueryCreditTypesResponse, error) - // Params queries the ecocredit module parameters. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Classes(ctx context.Context, in *QueryClassesRequest, opts ...grpc.CallOption) (*QueryClassesResponse, error) { - out := new(QueryClassesResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.v1alpha1.Query/Classes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ClassInfo(ctx context.Context, in *QueryClassInfoRequest, opts ...grpc.CallOption) (*QueryClassInfoResponse, error) { - out := new(QueryClassInfoResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.v1alpha1.Query/ClassInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Batches(ctx context.Context, in *QueryBatchesRequest, opts ...grpc.CallOption) (*QueryBatchesResponse, error) { - out := new(QueryBatchesResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.v1alpha1.Query/Batches", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) BatchInfo(ctx context.Context, in *QueryBatchInfoRequest, opts ...grpc.CallOption) (*QueryBatchInfoResponse, error) { - out := new(QueryBatchInfoResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.v1alpha1.Query/BatchInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) { - out := new(QueryBalanceResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.v1alpha1.Query/Balance", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Supply(ctx context.Context, in *QuerySupplyRequest, opts ...grpc.CallOption) (*QuerySupplyResponse, error) { - out := new(QuerySupplyResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.v1alpha1.Query/Supply", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) CreditTypes(ctx context.Context, in *QueryCreditTypesRequest, opts ...grpc.CallOption) (*QueryCreditTypesResponse, error) { - out := new(QueryCreditTypesResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.v1alpha1.Query/CreditTypes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.v1alpha1.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // Classes queries for all credit classes with pagination. - Classes(context.Context, *QueryClassesRequest) (*QueryClassesResponse, error) - // ClassInfo queries for information on a credit class. - ClassInfo(context.Context, *QueryClassInfoRequest) (*QueryClassInfoResponse, error) - // Batches queries for all batches in the given credit class with pagination. - Batches(context.Context, *QueryBatchesRequest) (*QueryBatchesResponse, error) - // BatchInfo queries for information on a credit batch. - BatchInfo(context.Context, *QueryBatchInfoRequest) (*QueryBatchInfoResponse, error) - // Balance queries the balance (both tradable and retired) of a given credit - // batch for a given account. - Balance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error) - // Supply queries the tradable and retired supply of a credit batch. - Supply(context.Context, *QuerySupplyRequest) (*QuerySupplyResponse, error) - // CreditTypes returns the list of allowed types that credit classes can have. - // See Types/CreditType for more details. - CreditTypes(context.Context, *QueryCreditTypesRequest) (*QueryCreditTypesResponse, error) - // Params queries the ecocredit module parameters. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) Classes(ctx context.Context, req *QueryClassesRequest) (*QueryClassesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Classes not implemented") -} -func (*UnimplementedQueryServer) ClassInfo(ctx context.Context, req *QueryClassInfoRequest) (*QueryClassInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ClassInfo not implemented") -} -func (*UnimplementedQueryServer) Batches(ctx context.Context, req *QueryBatchesRequest) (*QueryBatchesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Batches not implemented") -} -func (*UnimplementedQueryServer) BatchInfo(ctx context.Context, req *QueryBatchInfoRequest) (*QueryBatchInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BatchInfo not implemented") -} -func (*UnimplementedQueryServer) Balance(ctx context.Context, req *QueryBalanceRequest) (*QueryBalanceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Balance not implemented") -} -func (*UnimplementedQueryServer) Supply(ctx context.Context, req *QuerySupplyRequest) (*QuerySupplyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Supply not implemented") -} -func (*UnimplementedQueryServer) CreditTypes(ctx context.Context, req *QueryCreditTypesRequest) (*QueryCreditTypesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreditTypes not implemented") -} -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_Classes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryClassesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Classes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.v1alpha1.Query/Classes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Classes(ctx, req.(*QueryClassesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ClassInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryClassInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ClassInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.v1alpha1.Query/ClassInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ClassInfo(ctx, req.(*QueryClassInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Batches_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBatchesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Batches(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.v1alpha1.Query/Batches", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Batches(ctx, req.(*QueryBatchesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_BatchInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBatchInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BatchInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.v1alpha1.Query/BatchInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BatchInfo(ctx, req.(*QueryBatchInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Balance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBalanceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Balance(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.v1alpha1.Query/Balance", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Balance(ctx, req.(*QueryBalanceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Supply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QuerySupplyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Supply(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.v1alpha1.Query/Supply", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Supply(ctx, req.(*QuerySupplyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_CreditTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCreditTypesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).CreditTypes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.v1alpha1.Query/CreditTypes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CreditTypes(ctx, req.(*QueryCreditTypesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.v1alpha1.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "regen.ecocredit.v1alpha1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Classes", - Handler: _Query_Classes_Handler, - }, - { - MethodName: "ClassInfo", - Handler: _Query_ClassInfo_Handler, - }, - { - MethodName: "Batches", - Handler: _Query_Batches_Handler, - }, - { - MethodName: "BatchInfo", - Handler: _Query_BatchInfo_Handler, - }, - { - MethodName: "Balance", - Handler: _Query_Balance_Handler, - }, - { - MethodName: "Supply", - Handler: _Query_Supply_Handler, - }, - { - MethodName: "CreditTypes", - Handler: _Query_CreditTypes_Handler, - }, - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "regen/ecocredit/v1alpha1/query.proto", -} - -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Params != nil { - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryClassesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryClassesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryClassesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryClassesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryClassesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryClassesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Classes) > 0 { - for iNdEx := len(m.Classes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Classes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryClassInfoRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryClassInfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryClassInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ClassId) > 0 { - i -= len(m.ClassId) - copy(dAtA[i:], m.ClassId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ClassId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryClassInfoResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryClassInfoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryClassInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Info != nil { - { - size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryBatchesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBatchesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBatchesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.ClassId) > 0 { - i -= len(m.ClassId) - copy(dAtA[i:], m.ClassId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ClassId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryBatchesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBatchesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBatchesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Batches) > 0 { - for iNdEx := len(m.Batches) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Batches[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryBatchInfoRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBatchInfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBatchInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BatchDenom) > 0 { - i -= len(m.BatchDenom) - copy(dAtA[i:], m.BatchDenom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.BatchDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryBatchInfoResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBatchInfoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBatchInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Info != nil { - { - size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryBalanceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBalanceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBalanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BatchDenom) > 0 { - i -= len(m.BatchDenom) - copy(dAtA[i:], m.BatchDenom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.BatchDenom))) - i-- - dAtA[i] = 0x12 - } - if len(m.Account) > 0 { - i -= len(m.Account) - copy(dAtA[i:], m.Account) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Account))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryBalanceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBalanceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RetiredAmount) > 0 { - i -= len(m.RetiredAmount) - copy(dAtA[i:], m.RetiredAmount) - i = encodeVarintQuery(dAtA, i, uint64(len(m.RetiredAmount))) - i-- - dAtA[i] = 0x12 - } - if len(m.TradableAmount) > 0 { - i -= len(m.TradableAmount) - copy(dAtA[i:], m.TradableAmount) - i = encodeVarintQuery(dAtA, i, uint64(len(m.TradableAmount))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QuerySupplyRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QuerySupplyRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QuerySupplyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BatchDenom) > 0 { - i -= len(m.BatchDenom) - copy(dAtA[i:], m.BatchDenom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.BatchDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QuerySupplyResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QuerySupplyResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QuerySupplyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RetiredSupply) > 0 { - i -= len(m.RetiredSupply) - copy(dAtA[i:], m.RetiredSupply) - i = encodeVarintQuery(dAtA, i, uint64(len(m.RetiredSupply))) - i-- - dAtA[i] = 0x12 - } - if len(m.TradableSupply) > 0 { - i -= len(m.TradableSupply) - copy(dAtA[i:], m.TradableSupply) - i = encodeVarintQuery(dAtA, i, uint64(len(m.TradableSupply))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryCreditTypesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryCreditTypesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryCreditTypesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryCreditTypesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryCreditTypesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryCreditTypesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.CreditTypes) > 0 { - for iNdEx := len(m.CreditTypes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.CreditTypes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Params != nil { - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryClassesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryClassesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Classes) > 0 { - for _, e := range m.Classes { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryClassInfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClassId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryClassInfoResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Info != nil { - l = m.Info.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryBatchesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClassId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryBatchesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Batches) > 0 { - for _, e := range m.Batches { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryBatchInfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BatchDenom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryBatchInfoResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Info != nil { - l = m.Info.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryBalanceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Account) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.BatchDenom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryBalanceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.TradableAmount) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.RetiredAmount) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QuerySupplyRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BatchDenom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QuerySupplyResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.TradableSupply) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.RetiredSupply) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryCreditTypesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryCreditTypesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.CreditTypes) > 0 { - for _, e := range m.CreditTypes { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Params == nil { - m.Params = &Params{} - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryClassesRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryClassesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryClassesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryClassesResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryClassesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryClassesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Classes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Classes = append(m.Classes, &ClassInfo{}) - if err := m.Classes[len(m.Classes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryClassInfoRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryClassInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryClassInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryClassInfoResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryClassInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryClassInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Info == nil { - m.Info = &ClassInfo{} - } - if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryBatchesRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBatchesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBatchesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryBatchesResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBatchesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBatchesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Batches", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Batches = append(m.Batches, &BatchInfo{}) - if err := m.Batches[len(m.Batches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryBatchInfoRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBatchInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBatchInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryBatchInfoResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBatchInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBatchInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Info == nil { - m.Info = &BatchInfo{} - } - if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryBalanceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBalanceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBalanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Account = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryBalanceResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBalanceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradableAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TradableAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetiredAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RetiredAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QuerySupplyRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QuerySupplyRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QuerySupplyRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QuerySupplyResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QuerySupplyResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QuerySupplyResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradableSupply", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TradableSupply = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetiredSupply", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RetiredSupply = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryCreditTypesRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryCreditTypesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCreditTypesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryCreditTypesResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryCreditTypesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCreditTypesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreditTypes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CreditTypes = append(m.CreditTypes, &CreditType{}) - if err := m.CreditTypes[len(m.CreditTypes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/ecocredit/v1alpha1/query.pb.gw.go b/x/ecocredit/v1alpha1/query.pb.gw.go deleted file mode 100644 index 19dac75880..0000000000 --- a/x/ecocredit/v1alpha1/query.pb.gw.go +++ /dev/null @@ -1,846 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: regen/ecocredit/v1alpha1/query.proto - -/* -Package v1alpha1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package v1alpha1 - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - -var ( - filter_Query_Classes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_Classes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryClassesRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Classes_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.Classes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Classes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryClassesRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Classes_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.Classes(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_ClassInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryClassInfoRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["class_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "class_id") - } - - protoReq.ClassId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "class_id", err) - } - - msg, err := client.ClassInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ClassInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryClassInfoRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["class_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "class_id") - } - - protoReq.ClassId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "class_id", err) - } - - msg, err := server.ClassInfo(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_Batches_0 = &utilities.DoubleArray{Encoding: map[string]int{"class_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_Query_Batches_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBatchesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["class_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "class_id") - } - - protoReq.ClassId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "class_id", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Batches_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.Batches(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Batches_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBatchesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["class_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "class_id") - } - - protoReq.ClassId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "class_id", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Batches_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.Batches(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_BatchInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBatchInfoRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["batch_denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "batch_denom") - } - - protoReq.BatchDenom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "batch_denom", err) - } - - msg, err := client.BatchInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_BatchInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBatchInfoRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["batch_denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "batch_denom") - } - - protoReq.BatchDenom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "batch_denom", err) - } - - msg, err := server.BatchInfo(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_Balance_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBalanceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["batch_denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "batch_denom") - } - - protoReq.BatchDenom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "batch_denom", err) - } - - val, ok = pathParams["account"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "account") - } - - protoReq.Account, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "account", err) - } - - msg, err := client.Balance(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Balance_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBalanceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["batch_denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "batch_denom") - } - - protoReq.BatchDenom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "batch_denom", err) - } - - val, ok = pathParams["account"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "account") - } - - protoReq.Account, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "account", err) - } - - msg, err := server.Balance(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_Supply_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QuerySupplyRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["batch_denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "batch_denom") - } - - protoReq.BatchDenom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "batch_denom", err) - } - - msg, err := client.Supply(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Supply_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QuerySupplyRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["batch_denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "batch_denom") - } - - protoReq.BatchDenom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "batch_denom", err) - } - - msg, err := server.Supply(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_CreditTypes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCreditTypesRequest - var metadata runtime.ServerMetadata - - msg, err := client.CreditTypes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_CreditTypes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCreditTypesRequest - var metadata runtime.ServerMetadata - - msg, err := server.CreditTypes(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := server.Params(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". -// UnaryRPC :call QueryServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. -func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - - mux.Handle("GET", pattern_Query_Classes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Classes_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Classes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ClassInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_ClassInfo_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ClassInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Batches_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Batches_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Batches_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_BatchInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_BatchInfo_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_BatchInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Balance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Balance_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Balance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Supply_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Supply_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Supply_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_CreditTypes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_CreditTypes_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_CreditTypes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterQueryHandler(ctx, mux, conn) -} - -// RegisterQueryHandler registers the http handlers for service Query to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) -} - -// RegisterQueryHandlerClient registers the http handlers for service Query -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "QueryClient" to call the correct interceptors. -func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - - mux.Handle("GET", pattern_Query_Classes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Classes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Classes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ClassInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_ClassInfo_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ClassInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Batches_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Batches_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Batches_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_BatchInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_BatchInfo_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_BatchInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Balance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Balance_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Balance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Supply_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Supply_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Supply_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_CreditTypes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_CreditTypes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_CreditTypes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Query_Classes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"regen", "ecocredit", "v1alpha1", "classes"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_ClassInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"regen", "ecocredit", "v1alpha1", "classes", "class_id"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_Batches_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"regen", "ecocredit", "v1alpha1", "classes", "class_id", "batches"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_BatchInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"regen", "ecocredit", "v1alpha1", "batches", "batch_denom"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_Balance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"regen", "ecocredit", "v1alpha1", "batches", "batch_denom", "balance", "account"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_Supply_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"regen", "ecocredit", "v1alpha1", "batches", "batch_denom", "supply"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_CreditTypes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"regen", "ecocredit", "v1alpha1", "credit-types"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"regen", "ecocredit", "v1alpha1", "params"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Query_Classes_0 = runtime.ForwardResponseMessage - - forward_Query_ClassInfo_0 = runtime.ForwardResponseMessage - - forward_Query_Batches_0 = runtime.ForwardResponseMessage - - forward_Query_BatchInfo_0 = runtime.ForwardResponseMessage - - forward_Query_Balance_0 = runtime.ForwardResponseMessage - - forward_Query_Supply_0 = runtime.ForwardResponseMessage - - forward_Query_CreditTypes_0 = runtime.ForwardResponseMessage - - forward_Query_Params_0 = runtime.ForwardResponseMessage -) diff --git a/x/ecocredit/v1alpha1/tx.pb.go b/x/ecocredit/v1alpha1/tx.pb.go deleted file mode 100644 index c815fb291e..0000000000 --- a/x/ecocredit/v1alpha1/tx.pb.go +++ /dev/null @@ -1,5254 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: regen/ecocredit/v1alpha1/tx.proto - -package v1alpha1 - -import ( - context "context" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// MsgCreateClass is the Msg/CreateClass request type. -type MsgCreateClass struct { - // admin is the address of the account that created the credit class. - Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // issuers are the account addresses of the approved issuers. - Issuers []string `protobuf:"bytes,2,rep,name=issuers,proto3" json:"issuers,omitempty"` - // metadata is any arbitrary metadata to attached to the credit class. - Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` - // credit_type_name describes the type of credit (e.g. "carbon", "biodiversity"). - CreditTypeName string `protobuf:"bytes,4,opt,name=credit_type_name,json=creditTypeName,proto3" json:"credit_type_name,omitempty"` -} - -func (m *MsgCreateClass) Reset() { *m = MsgCreateClass{} } -func (m *MsgCreateClass) String() string { return proto.CompactTextString(m) } -func (*MsgCreateClass) ProtoMessage() {} -func (*MsgCreateClass) Descriptor() ([]byte, []int) { - return fileDescriptor_96891bdd11ac56ed, []int{0} -} -func (m *MsgCreateClass) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateClass.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCreateClass) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateClass.Merge(m, src) -} -func (m *MsgCreateClass) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateClass) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateClass.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateClass proto.InternalMessageInfo - -func (m *MsgCreateClass) GetAdmin() string { - if m != nil { - return m.Admin - } - return "" -} - -func (m *MsgCreateClass) GetIssuers() []string { - if m != nil { - return m.Issuers - } - return nil -} - -func (m *MsgCreateClass) GetMetadata() []byte { - if m != nil { - return m.Metadata - } - return nil -} - -func (m *MsgCreateClass) GetCreditTypeName() string { - if m != nil { - return m.CreditTypeName - } - return "" -} - -// MsgCreateClassResponse is the Msg/CreateClass response type. -type MsgCreateClassResponse struct { - // class_id is the unique ID of the newly created credit class. - ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` -} - -func (m *MsgCreateClassResponse) Reset() { *m = MsgCreateClassResponse{} } -func (m *MsgCreateClassResponse) String() string { return proto.CompactTextString(m) } -func (*MsgCreateClassResponse) ProtoMessage() {} -func (*MsgCreateClassResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_96891bdd11ac56ed, []int{1} -} -func (m *MsgCreateClassResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateClassResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateClassResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCreateClassResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateClassResponse.Merge(m, src) -} -func (m *MsgCreateClassResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateClassResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateClassResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateClassResponse proto.InternalMessageInfo - -func (m *MsgCreateClassResponse) GetClassId() string { - if m != nil { - return m.ClassId - } - return "" -} - -// MsgCreateBatch is the Msg/CreateBatch request type. -type MsgCreateBatch struct { - // issuer is the address of the batch issuer. - Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` - // class_id is the unique ID of the class. - ClassId string `protobuf:"bytes,2,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` - // issuance are the credits issued in the batch. - Issuance []*MsgCreateBatch_BatchIssuance `protobuf:"bytes,3,rep,name=issuance,proto3" json:"issuance,omitempty"` - // metadata is any arbitrary metadata attached to the credit batch. - Metadata []byte `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` - // start_date is the beginning of the period during which this credit batch - // was quantified and verified. - StartDate *time.Time `protobuf:"bytes,5,opt,name=start_date,json=startDate,proto3,stdtime" json:"start_date,omitempty"` - // end_date is the end of the period during which this credit batch was - // quantified and verified. - EndDate *time.Time `protobuf:"bytes,6,opt,name=end_date,json=endDate,proto3,stdtime" json:"end_date,omitempty"` - // project_location is the location of the project backing the credits in this - // batch. It is a string of the form - // [-[ ]], with the first two - // fields conforming to ISO 3166-2, and postal-code being up to 64 - // alphanumeric characters. country-code is required, while sub-national-code - // and postal-code can be added for increasing precision. - ProjectLocation string `protobuf:"bytes,7,opt,name=project_location,json=projectLocation,proto3" json:"project_location,omitempty"` -} - -func (m *MsgCreateBatch) Reset() { *m = MsgCreateBatch{} } -func (m *MsgCreateBatch) String() string { return proto.CompactTextString(m) } -func (*MsgCreateBatch) ProtoMessage() {} -func (*MsgCreateBatch) Descriptor() ([]byte, []int) { - return fileDescriptor_96891bdd11ac56ed, []int{2} -} -func (m *MsgCreateBatch) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateBatch.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCreateBatch) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateBatch.Merge(m, src) -} -func (m *MsgCreateBatch) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateBatch) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateBatch.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateBatch proto.InternalMessageInfo - -func (m *MsgCreateBatch) GetIssuer() string { - if m != nil { - return m.Issuer - } - return "" -} - -func (m *MsgCreateBatch) GetClassId() string { - if m != nil { - return m.ClassId - } - return "" -} - -func (m *MsgCreateBatch) GetIssuance() []*MsgCreateBatch_BatchIssuance { - if m != nil { - return m.Issuance - } - return nil -} - -func (m *MsgCreateBatch) GetMetadata() []byte { - if m != nil { - return m.Metadata - } - return nil -} - -func (m *MsgCreateBatch) GetStartDate() *time.Time { - if m != nil { - return m.StartDate - } - return nil -} - -func (m *MsgCreateBatch) GetEndDate() *time.Time { - if m != nil { - return m.EndDate - } - return nil -} - -func (m *MsgCreateBatch) GetProjectLocation() string { - if m != nil { - return m.ProjectLocation - } - return "" -} - -// BatchIssuance represents the issuance of some credits in a batch to a -// single recipient. -type MsgCreateBatch_BatchIssuance struct { - // recipient is the account of the recipient. - Recipient string `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient,omitempty"` - // tradable_amount is the number of credits in this issuance that can be - // traded by this recipient. Decimal values are acceptable. - TradableAmount string `protobuf:"bytes,2,opt,name=tradable_amount,json=tradableAmount,proto3" json:"tradable_amount,omitempty"` - // retired_amount is the number of credits in this issuance that are - // effectively retired by the issuer on receipt. Decimal values are - // acceptable. - RetiredAmount string `protobuf:"bytes,3,opt,name=retired_amount,json=retiredAmount,proto3" json:"retired_amount,omitempty"` - // retirement_location is the location of the beneficiary or buyer of the - // retired credits. This must be provided if retired_amount is positive. It - // is a string of the form - // [-[ ]], with the first two - // fields conforming to ISO 3166-2, and postal-code being up to 64 - // alphanumeric characters. - RetirementLocation string `protobuf:"bytes,4,opt,name=retirement_location,json=retirementLocation,proto3" json:"retirement_location,omitempty"` -} - -func (m *MsgCreateBatch_BatchIssuance) Reset() { *m = MsgCreateBatch_BatchIssuance{} } -func (m *MsgCreateBatch_BatchIssuance) String() string { return proto.CompactTextString(m) } -func (*MsgCreateBatch_BatchIssuance) ProtoMessage() {} -func (*MsgCreateBatch_BatchIssuance) Descriptor() ([]byte, []int) { - return fileDescriptor_96891bdd11ac56ed, []int{2, 0} -} -func (m *MsgCreateBatch_BatchIssuance) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateBatch_BatchIssuance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateBatch_BatchIssuance.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCreateBatch_BatchIssuance) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateBatch_BatchIssuance.Merge(m, src) -} -func (m *MsgCreateBatch_BatchIssuance) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateBatch_BatchIssuance) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateBatch_BatchIssuance.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateBatch_BatchIssuance proto.InternalMessageInfo - -func (m *MsgCreateBatch_BatchIssuance) GetRecipient() string { - if m != nil { - return m.Recipient - } - return "" -} - -func (m *MsgCreateBatch_BatchIssuance) GetTradableAmount() string { - if m != nil { - return m.TradableAmount - } - return "" -} - -func (m *MsgCreateBatch_BatchIssuance) GetRetiredAmount() string { - if m != nil { - return m.RetiredAmount - } - return "" -} - -func (m *MsgCreateBatch_BatchIssuance) GetRetirementLocation() string { - if m != nil { - return m.RetirementLocation - } - return "" -} - -// MsgCreateBatchResponse is the Msg/CreateBatch response type. -type MsgCreateBatchResponse struct { - // batch_denom is the unique denomination ID of the newly created batch. - BatchDenom string `protobuf:"bytes,1,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` -} - -func (m *MsgCreateBatchResponse) Reset() { *m = MsgCreateBatchResponse{} } -func (m *MsgCreateBatchResponse) String() string { return proto.CompactTextString(m) } -func (*MsgCreateBatchResponse) ProtoMessage() {} -func (*MsgCreateBatchResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_96891bdd11ac56ed, []int{3} -} -func (m *MsgCreateBatchResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateBatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateBatchResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCreateBatchResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateBatchResponse.Merge(m, src) -} -func (m *MsgCreateBatchResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateBatchResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateBatchResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateBatchResponse proto.InternalMessageInfo - -func (m *MsgCreateBatchResponse) GetBatchDenom() string { - if m != nil { - return m.BatchDenom - } - return "" -} - -// MsgSend is the Msg/Send request type. -type MsgSend struct { - // sender is the address of the account sending credits. - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // sender is the address of the account receiving credits. - Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` - // credits are the credits being sent. - Credits []*MsgSend_SendCredits `protobuf:"bytes,3,rep,name=credits,proto3" json:"credits,omitempty"` -} - -func (m *MsgSend) Reset() { *m = MsgSend{} } -func (m *MsgSend) String() string { return proto.CompactTextString(m) } -func (*MsgSend) ProtoMessage() {} -func (*MsgSend) Descriptor() ([]byte, []int) { - return fileDescriptor_96891bdd11ac56ed, []int{4} -} -func (m *MsgSend) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSend.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgSend) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSend.Merge(m, src) -} -func (m *MsgSend) XXX_Size() int { - return m.Size() -} -func (m *MsgSend) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSend.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSend proto.InternalMessageInfo - -func (m *MsgSend) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -func (m *MsgSend) GetRecipient() string { - if m != nil { - return m.Recipient - } - return "" -} - -func (m *MsgSend) GetCredits() []*MsgSend_SendCredits { - if m != nil { - return m.Credits - } - return nil -} - -// SendCredits specifies a batch and the number of credits being transferred. -// This is split into tradable credits, which will remain tradable on receipt, -// and retired credits, which will be retired on receipt. -type MsgSend_SendCredits struct { - // batch_denom is the unique ID of the credit batch. - BatchDenom string `protobuf:"bytes,1,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` - // tradable_amount is the number of credits in this transfer that can be - // traded by the recipient. Decimal values are acceptable within the - // precision returned by Query/Precision. - TradableAmount string `protobuf:"bytes,2,opt,name=tradable_amount,json=tradableAmount,proto3" json:"tradable_amount,omitempty"` - // retired_amount is the number of credits in this transfer that are - // effectively retired by the issuer on receipt. Decimal values are - // acceptable within the precision returned by Query/Precision. - RetiredAmount string `protobuf:"bytes,3,opt,name=retired_amount,json=retiredAmount,proto3" json:"retired_amount,omitempty"` - // retirement_location is the location of the beneficiary or buyer of the - // retired credits. This must be provided if retired_amount is positive. It - // is a string of the form - // [-[ ]], with the first two - // fields conforming to ISO 3166-2, and postal-code being up to 64 - // alphanumeric characters. - RetirementLocation string `protobuf:"bytes,4,opt,name=retirement_location,json=retirementLocation,proto3" json:"retirement_location,omitempty"` -} - -func (m *MsgSend_SendCredits) Reset() { *m = MsgSend_SendCredits{} } -func (m *MsgSend_SendCredits) String() string { return proto.CompactTextString(m) } -func (*MsgSend_SendCredits) ProtoMessage() {} -func (*MsgSend_SendCredits) Descriptor() ([]byte, []int) { - return fileDescriptor_96891bdd11ac56ed, []int{4, 0} -} -func (m *MsgSend_SendCredits) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSend_SendCredits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSend_SendCredits.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgSend_SendCredits) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSend_SendCredits.Merge(m, src) -} -func (m *MsgSend_SendCredits) XXX_Size() int { - return m.Size() -} -func (m *MsgSend_SendCredits) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSend_SendCredits.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSend_SendCredits proto.InternalMessageInfo - -func (m *MsgSend_SendCredits) GetBatchDenom() string { - if m != nil { - return m.BatchDenom - } - return "" -} - -func (m *MsgSend_SendCredits) GetTradableAmount() string { - if m != nil { - return m.TradableAmount - } - return "" -} - -func (m *MsgSend_SendCredits) GetRetiredAmount() string { - if m != nil { - return m.RetiredAmount - } - return "" -} - -func (m *MsgSend_SendCredits) GetRetirementLocation() string { - if m != nil { - return m.RetirementLocation - } - return "" -} - -// MsgSendResponse is the Msg/Send response type. -type MsgSendResponse struct { -} - -func (m *MsgSendResponse) Reset() { *m = MsgSendResponse{} } -func (m *MsgSendResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSendResponse) ProtoMessage() {} -func (*MsgSendResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_96891bdd11ac56ed, []int{5} -} -func (m *MsgSendResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSendResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgSendResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSendResponse.Merge(m, src) -} -func (m *MsgSendResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgSendResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSendResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSendResponse proto.InternalMessageInfo - -// MsgRetire is the Msg/Retire request type. -type MsgRetire struct { - // holder is the credit holder address. - Holder string `protobuf:"bytes,1,opt,name=holder,proto3" json:"holder,omitempty"` - // credits are the credits being retired. - Credits []*MsgRetire_RetireCredits `protobuf:"bytes,2,rep,name=credits,proto3" json:"credits,omitempty"` - // location is the location of the beneficiary or buyer of the retired - // credits. It is a string of the form - // [-[ ]], with the first two - // fields conforming to ISO 3166-2, and postal-code being up to 64 - // alphanumeric characters. - Location string `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"` -} - -func (m *MsgRetire) Reset() { *m = MsgRetire{} } -func (m *MsgRetire) String() string { return proto.CompactTextString(m) } -func (*MsgRetire) ProtoMessage() {} -func (*MsgRetire) Descriptor() ([]byte, []int) { - return fileDescriptor_96891bdd11ac56ed, []int{6} -} -func (m *MsgRetire) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRetire) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRetire.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRetire) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRetire.Merge(m, src) -} -func (m *MsgRetire) XXX_Size() int { - return m.Size() -} -func (m *MsgRetire) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRetire.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRetire proto.InternalMessageInfo - -func (m *MsgRetire) GetHolder() string { - if m != nil { - return m.Holder - } - return "" -} - -func (m *MsgRetire) GetCredits() []*MsgRetire_RetireCredits { - if m != nil { - return m.Credits - } - return nil -} - -func (m *MsgRetire) GetLocation() string { - if m != nil { - return m.Location - } - return "" -} - -// RetireCredits specifies a batch and the number of credits being retired. -type MsgRetire_RetireCredits struct { - // batch_denom is the unique ID of the credit batch. - BatchDenom string `protobuf:"bytes,1,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` - // amount is the number of credits being retired. - // Decimal values are acceptable within the precision returned by - // Query/Precision. - Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (m *MsgRetire_RetireCredits) Reset() { *m = MsgRetire_RetireCredits{} } -func (m *MsgRetire_RetireCredits) String() string { return proto.CompactTextString(m) } -func (*MsgRetire_RetireCredits) ProtoMessage() {} -func (*MsgRetire_RetireCredits) Descriptor() ([]byte, []int) { - return fileDescriptor_96891bdd11ac56ed, []int{6, 0} -} -func (m *MsgRetire_RetireCredits) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRetire_RetireCredits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRetire_RetireCredits.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRetire_RetireCredits) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRetire_RetireCredits.Merge(m, src) -} -func (m *MsgRetire_RetireCredits) XXX_Size() int { - return m.Size() -} -func (m *MsgRetire_RetireCredits) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRetire_RetireCredits.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRetire_RetireCredits proto.InternalMessageInfo - -func (m *MsgRetire_RetireCredits) GetBatchDenom() string { - if m != nil { - return m.BatchDenom - } - return "" -} - -func (m *MsgRetire_RetireCredits) GetAmount() string { - if m != nil { - return m.Amount - } - return "" -} - -// MsgRetire is the Msg/Retire response type. -type MsgRetireResponse struct { -} - -func (m *MsgRetireResponse) Reset() { *m = MsgRetireResponse{} } -func (m *MsgRetireResponse) String() string { return proto.CompactTextString(m) } -func (*MsgRetireResponse) ProtoMessage() {} -func (*MsgRetireResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_96891bdd11ac56ed, []int{7} -} -func (m *MsgRetireResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRetireResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRetireResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRetireResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRetireResponse.Merge(m, src) -} -func (m *MsgRetireResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgRetireResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRetireResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRetireResponse proto.InternalMessageInfo - -// MsgCancel is the Msg/Cancel request type. -type MsgCancel struct { - // holder is the credit holder address. - Holder string `protobuf:"bytes,1,opt,name=holder,proto3" json:"holder,omitempty"` - // credits are the credits being cancelled. - Credits []*MsgCancel_CancelCredits `protobuf:"bytes,2,rep,name=credits,proto3" json:"credits,omitempty"` -} - -func (m *MsgCancel) Reset() { *m = MsgCancel{} } -func (m *MsgCancel) String() string { return proto.CompactTextString(m) } -func (*MsgCancel) ProtoMessage() {} -func (*MsgCancel) Descriptor() ([]byte, []int) { - return fileDescriptor_96891bdd11ac56ed, []int{8} -} -func (m *MsgCancel) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCancel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCancel.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCancel) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCancel.Merge(m, src) -} -func (m *MsgCancel) XXX_Size() int { - return m.Size() -} -func (m *MsgCancel) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCancel.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCancel proto.InternalMessageInfo - -func (m *MsgCancel) GetHolder() string { - if m != nil { - return m.Holder - } - return "" -} - -func (m *MsgCancel) GetCredits() []*MsgCancel_CancelCredits { - if m != nil { - return m.Credits - } - return nil -} - -// CancelCredits specifies a batch and the number of credits being cancelled. -type MsgCancel_CancelCredits struct { - // batch_denom is the unique ID of the credit batch. - BatchDenom string `protobuf:"bytes,1,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` - // amount is the number of credits being cancelled. - // Decimal values are acceptable within the precision returned by - // Query/Precision. - Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (m *MsgCancel_CancelCredits) Reset() { *m = MsgCancel_CancelCredits{} } -func (m *MsgCancel_CancelCredits) String() string { return proto.CompactTextString(m) } -func (*MsgCancel_CancelCredits) ProtoMessage() {} -func (*MsgCancel_CancelCredits) Descriptor() ([]byte, []int) { - return fileDescriptor_96891bdd11ac56ed, []int{8, 0} -} -func (m *MsgCancel_CancelCredits) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCancel_CancelCredits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCancel_CancelCredits.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCancel_CancelCredits) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCancel_CancelCredits.Merge(m, src) -} -func (m *MsgCancel_CancelCredits) XXX_Size() int { - return m.Size() -} -func (m *MsgCancel_CancelCredits) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCancel_CancelCredits.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCancel_CancelCredits proto.InternalMessageInfo - -func (m *MsgCancel_CancelCredits) GetBatchDenom() string { - if m != nil { - return m.BatchDenom - } - return "" -} - -func (m *MsgCancel_CancelCredits) GetAmount() string { - if m != nil { - return m.Amount - } - return "" -} - -// MsgCancelResponse is the Msg/Cancel response type. -type MsgCancelResponse struct { -} - -func (m *MsgCancelResponse) Reset() { *m = MsgCancelResponse{} } -func (m *MsgCancelResponse) String() string { return proto.CompactTextString(m) } -func (*MsgCancelResponse) ProtoMessage() {} -func (*MsgCancelResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_96891bdd11ac56ed, []int{9} -} -func (m *MsgCancelResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCancelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCancelResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCancelResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCancelResponse.Merge(m, src) -} -func (m *MsgCancelResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgCancelResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCancelResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCancelResponse proto.InternalMessageInfo - -// MsgUpdateClassAdmin is the Msg/UpdateClassAdmin request type. -type MsgUpdateClassAdmin struct { - // admin is the address of the account that is the admin of the credit class. - Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // class_id is the unique ID of the credit class. - ClassId string `protobuf:"bytes,2,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` - // new_admin is the address of the new admin of the credit class. - NewAdmin string `protobuf:"bytes,3,opt,name=new_admin,json=newAdmin,proto3" json:"new_admin,omitempty"` -} - -func (m *MsgUpdateClassAdmin) Reset() { *m = MsgUpdateClassAdmin{} } -func (m *MsgUpdateClassAdmin) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateClassAdmin) ProtoMessage() {} -func (*MsgUpdateClassAdmin) Descriptor() ([]byte, []int) { - return fileDescriptor_96891bdd11ac56ed, []int{10} -} -func (m *MsgUpdateClassAdmin) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateClassAdmin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateClassAdmin.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateClassAdmin) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateClassAdmin.Merge(m, src) -} -func (m *MsgUpdateClassAdmin) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateClassAdmin) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateClassAdmin.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateClassAdmin proto.InternalMessageInfo - -func (m *MsgUpdateClassAdmin) GetAdmin() string { - if m != nil { - return m.Admin - } - return "" -} - -func (m *MsgUpdateClassAdmin) GetClassId() string { - if m != nil { - return m.ClassId - } - return "" -} - -func (m *MsgUpdateClassAdmin) GetNewAdmin() string { - if m != nil { - return m.NewAdmin - } - return "" -} - -// MsgUpdateClassAdminResponse is the MsgUpdateClassAdmin response type. -type MsgUpdateClassAdminResponse struct { -} - -func (m *MsgUpdateClassAdminResponse) Reset() { *m = MsgUpdateClassAdminResponse{} } -func (m *MsgUpdateClassAdminResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateClassAdminResponse) ProtoMessage() {} -func (*MsgUpdateClassAdminResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_96891bdd11ac56ed, []int{11} -} -func (m *MsgUpdateClassAdminResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateClassAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateClassAdminResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateClassAdminResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateClassAdminResponse.Merge(m, src) -} -func (m *MsgUpdateClassAdminResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateClassAdminResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateClassAdminResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateClassAdminResponse proto.InternalMessageInfo - -// MsgUpdateClassIssuers is the Msg/UpdateClassIssuers request type. -type MsgUpdateClassIssuers struct { - // admin is the address of the account that is the admin of the credit class. - Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // class_id is the unique ID of the credit class. - ClassId string `protobuf:"bytes,2,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` - // issuers are the updated account addresses of the approved issuers. - Issuers []string `protobuf:"bytes,3,rep,name=issuers,proto3" json:"issuers,omitempty"` -} - -func (m *MsgUpdateClassIssuers) Reset() { *m = MsgUpdateClassIssuers{} } -func (m *MsgUpdateClassIssuers) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateClassIssuers) ProtoMessage() {} -func (*MsgUpdateClassIssuers) Descriptor() ([]byte, []int) { - return fileDescriptor_96891bdd11ac56ed, []int{12} -} -func (m *MsgUpdateClassIssuers) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateClassIssuers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateClassIssuers.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateClassIssuers) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateClassIssuers.Merge(m, src) -} -func (m *MsgUpdateClassIssuers) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateClassIssuers) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateClassIssuers.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateClassIssuers proto.InternalMessageInfo - -func (m *MsgUpdateClassIssuers) GetAdmin() string { - if m != nil { - return m.Admin - } - return "" -} - -func (m *MsgUpdateClassIssuers) GetClassId() string { - if m != nil { - return m.ClassId - } - return "" -} - -func (m *MsgUpdateClassIssuers) GetIssuers() []string { - if m != nil { - return m.Issuers - } - return nil -} - -// MsgUpdateClassIssuersResponse is the MsgUpdateClassIssuers response type. -type MsgUpdateClassIssuersResponse struct { -} - -func (m *MsgUpdateClassIssuersResponse) Reset() { *m = MsgUpdateClassIssuersResponse{} } -func (m *MsgUpdateClassIssuersResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateClassIssuersResponse) ProtoMessage() {} -func (*MsgUpdateClassIssuersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_96891bdd11ac56ed, []int{13} -} -func (m *MsgUpdateClassIssuersResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateClassIssuersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateClassIssuersResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateClassIssuersResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateClassIssuersResponse.Merge(m, src) -} -func (m *MsgUpdateClassIssuersResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateClassIssuersResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateClassIssuersResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateClassIssuersResponse proto.InternalMessageInfo - -// MsgUpdateClassMetadata is the Msg/UpdateClassMetadata request type. -type MsgUpdateClassMetadata struct { - // admin is the address of the account that is the admin of the credit class. - Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // class_id is the unique ID of the credit class. - ClassId string `protobuf:"bytes,2,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` - // metadata is the updated arbitrary metadata to be attached to the credit class. - Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (m *MsgUpdateClassMetadata) Reset() { *m = MsgUpdateClassMetadata{} } -func (m *MsgUpdateClassMetadata) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateClassMetadata) ProtoMessage() {} -func (*MsgUpdateClassMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_96891bdd11ac56ed, []int{14} -} -func (m *MsgUpdateClassMetadata) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateClassMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateClassMetadata.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateClassMetadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateClassMetadata.Merge(m, src) -} -func (m *MsgUpdateClassMetadata) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateClassMetadata) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateClassMetadata.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateClassMetadata proto.InternalMessageInfo - -func (m *MsgUpdateClassMetadata) GetAdmin() string { - if m != nil { - return m.Admin - } - return "" -} - -func (m *MsgUpdateClassMetadata) GetClassId() string { - if m != nil { - return m.ClassId - } - return "" -} - -func (m *MsgUpdateClassMetadata) GetMetadata() []byte { - if m != nil { - return m.Metadata - } - return nil -} - -// MsgUpdateClassMetadataResponse is the MsgUpdateClassMetadata response type. -type MsgUpdateClassMetadataResponse struct { -} - -func (m *MsgUpdateClassMetadataResponse) Reset() { *m = MsgUpdateClassMetadataResponse{} } -func (m *MsgUpdateClassMetadataResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateClassMetadataResponse) ProtoMessage() {} -func (*MsgUpdateClassMetadataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_96891bdd11ac56ed, []int{15} -} -func (m *MsgUpdateClassMetadataResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateClassMetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateClassMetadataResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateClassMetadataResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateClassMetadataResponse.Merge(m, src) -} -func (m *MsgUpdateClassMetadataResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateClassMetadataResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateClassMetadataResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateClassMetadataResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*MsgCreateClass)(nil), "regen.ecocredit.v1alpha1.MsgCreateClass") - proto.RegisterType((*MsgCreateClassResponse)(nil), "regen.ecocredit.v1alpha1.MsgCreateClassResponse") - proto.RegisterType((*MsgCreateBatch)(nil), "regen.ecocredit.v1alpha1.MsgCreateBatch") - proto.RegisterType((*MsgCreateBatch_BatchIssuance)(nil), "regen.ecocredit.v1alpha1.MsgCreateBatch.BatchIssuance") - proto.RegisterType((*MsgCreateBatchResponse)(nil), "regen.ecocredit.v1alpha1.MsgCreateBatchResponse") - proto.RegisterType((*MsgSend)(nil), "regen.ecocredit.v1alpha1.MsgSend") - proto.RegisterType((*MsgSend_SendCredits)(nil), "regen.ecocredit.v1alpha1.MsgSend.SendCredits") - proto.RegisterType((*MsgSendResponse)(nil), "regen.ecocredit.v1alpha1.MsgSendResponse") - proto.RegisterType((*MsgRetire)(nil), "regen.ecocredit.v1alpha1.MsgRetire") - proto.RegisterType((*MsgRetire_RetireCredits)(nil), "regen.ecocredit.v1alpha1.MsgRetire.RetireCredits") - proto.RegisterType((*MsgRetireResponse)(nil), "regen.ecocredit.v1alpha1.MsgRetireResponse") - proto.RegisterType((*MsgCancel)(nil), "regen.ecocredit.v1alpha1.MsgCancel") - proto.RegisterType((*MsgCancel_CancelCredits)(nil), "regen.ecocredit.v1alpha1.MsgCancel.CancelCredits") - proto.RegisterType((*MsgCancelResponse)(nil), "regen.ecocredit.v1alpha1.MsgCancelResponse") - proto.RegisterType((*MsgUpdateClassAdmin)(nil), "regen.ecocredit.v1alpha1.MsgUpdateClassAdmin") - proto.RegisterType((*MsgUpdateClassAdminResponse)(nil), "regen.ecocredit.v1alpha1.MsgUpdateClassAdminResponse") - proto.RegisterType((*MsgUpdateClassIssuers)(nil), "regen.ecocredit.v1alpha1.MsgUpdateClassIssuers") - proto.RegisterType((*MsgUpdateClassIssuersResponse)(nil), "regen.ecocredit.v1alpha1.MsgUpdateClassIssuersResponse") - proto.RegisterType((*MsgUpdateClassMetadata)(nil), "regen.ecocredit.v1alpha1.MsgUpdateClassMetadata") - proto.RegisterType((*MsgUpdateClassMetadataResponse)(nil), "regen.ecocredit.v1alpha1.MsgUpdateClassMetadataResponse") -} - -func init() { proto.RegisterFile("regen/ecocredit/v1alpha1/tx.proto", fileDescriptor_96891bdd11ac56ed) } - -var fileDescriptor_96891bdd11ac56ed = []byte{ - // 937 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x4f, 0x6f, 0xe3, 0x54, - 0x10, 0xaf, 0x93, 0x6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0x78, 0x31, 0x57, 0xe7, 0x0b, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MsgClient interface { - // CreateClass creates a new credit class with an approved list of issuers and - // optional metadata. - CreateClass(ctx context.Context, in *MsgCreateClass, opts ...grpc.CallOption) (*MsgCreateClassResponse, error) - // CreateBatch creates a new batch of credits for an existing credit class. - // This will create a new batch denom with a fixed supply. Issued credits can - // be distributed to recipients in either tradable or retired form. - CreateBatch(ctx context.Context, in *MsgCreateBatch, opts ...grpc.CallOption) (*MsgCreateBatchResponse, error) - // Send sends tradable credits from one account to another account. Sent - // credits can either be tradable or retired on receipt. - Send(ctx context.Context, in *MsgSend, opts ...grpc.CallOption) (*MsgSendResponse, error) - // Retire retires a specified number of credits in the holder's account. - Retire(ctx context.Context, in *MsgRetire, opts ...grpc.CallOption) (*MsgRetireResponse, error) - // Cancel removes a number of credits from the holder's account and also - // deducts them from the tradable supply, effectively cancelling their - // issuance on Regen Ledger - Cancel(ctx context.Context, in *MsgCancel, opts ...grpc.CallOption) (*MsgCancelResponse, error) - // UpdateClassAdmin updates the credit class admin - UpdateClassAdmin(ctx context.Context, in *MsgUpdateClassAdmin, opts ...grpc.CallOption) (*MsgUpdateClassAdminResponse, error) - // UpdateClassIssuers updates the credit class issuer list - UpdateClassIssuers(ctx context.Context, in *MsgUpdateClassIssuers, opts ...grpc.CallOption) (*MsgUpdateClassIssuersResponse, error) - // UpdateClassMetadata updates the credit class metadata - UpdateClassMetadata(ctx context.Context, in *MsgUpdateClassMetadata, opts ...grpc.CallOption) (*MsgUpdateClassMetadataResponse, error) -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) CreateClass(ctx context.Context, in *MsgCreateClass, opts ...grpc.CallOption) (*MsgCreateClassResponse, error) { - out := new(MsgCreateClassResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.v1alpha1.Msg/CreateClass", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) CreateBatch(ctx context.Context, in *MsgCreateBatch, opts ...grpc.CallOption) (*MsgCreateBatchResponse, error) { - out := new(MsgCreateBatchResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.v1alpha1.Msg/CreateBatch", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) Send(ctx context.Context, in *MsgSend, opts ...grpc.CallOption) (*MsgSendResponse, error) { - out := new(MsgSendResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.v1alpha1.Msg/Send", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) Retire(ctx context.Context, in *MsgRetire, opts ...grpc.CallOption) (*MsgRetireResponse, error) { - out := new(MsgRetireResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.v1alpha1.Msg/Retire", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) Cancel(ctx context.Context, in *MsgCancel, opts ...grpc.CallOption) (*MsgCancelResponse, error) { - out := new(MsgCancelResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.v1alpha1.Msg/Cancel", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateClassAdmin(ctx context.Context, in *MsgUpdateClassAdmin, opts ...grpc.CallOption) (*MsgUpdateClassAdminResponse, error) { - out := new(MsgUpdateClassAdminResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.v1alpha1.Msg/UpdateClassAdmin", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateClassIssuers(ctx context.Context, in *MsgUpdateClassIssuers, opts ...grpc.CallOption) (*MsgUpdateClassIssuersResponse, error) { - out := new(MsgUpdateClassIssuersResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.v1alpha1.Msg/UpdateClassIssuers", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateClassMetadata(ctx context.Context, in *MsgUpdateClassMetadata, opts ...grpc.CallOption) (*MsgUpdateClassMetadataResponse, error) { - out := new(MsgUpdateClassMetadataResponse) - err := c.cc.Invoke(ctx, "/regen.ecocredit.v1alpha1.Msg/UpdateClassMetadata", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { - // CreateClass creates a new credit class with an approved list of issuers and - // optional metadata. - CreateClass(context.Context, *MsgCreateClass) (*MsgCreateClassResponse, error) - // CreateBatch creates a new batch of credits for an existing credit class. - // This will create a new batch denom with a fixed supply. Issued credits can - // be distributed to recipients in either tradable or retired form. - CreateBatch(context.Context, *MsgCreateBatch) (*MsgCreateBatchResponse, error) - // Send sends tradable credits from one account to another account. Sent - // credits can either be tradable or retired on receipt. - Send(context.Context, *MsgSend) (*MsgSendResponse, error) - // Retire retires a specified number of credits in the holder's account. - Retire(context.Context, *MsgRetire) (*MsgRetireResponse, error) - // Cancel removes a number of credits from the holder's account and also - // deducts them from the tradable supply, effectively cancelling their - // issuance on Regen Ledger - Cancel(context.Context, *MsgCancel) (*MsgCancelResponse, error) - // UpdateClassAdmin updates the credit class admin - UpdateClassAdmin(context.Context, *MsgUpdateClassAdmin) (*MsgUpdateClassAdminResponse, error) - // UpdateClassIssuers updates the credit class issuer list - UpdateClassIssuers(context.Context, *MsgUpdateClassIssuers) (*MsgUpdateClassIssuersResponse, error) - // UpdateClassMetadata updates the credit class metadata - UpdateClassMetadata(context.Context, *MsgUpdateClassMetadata) (*MsgUpdateClassMetadataResponse, error) -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (*UnimplementedMsgServer) CreateClass(ctx context.Context, req *MsgCreateClass) (*MsgCreateClassResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateClass not implemented") -} -func (*UnimplementedMsgServer) CreateBatch(ctx context.Context, req *MsgCreateBatch) (*MsgCreateBatchResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateBatch not implemented") -} -func (*UnimplementedMsgServer) Send(ctx context.Context, req *MsgSend) (*MsgSendResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Send not implemented") -} -func (*UnimplementedMsgServer) Retire(ctx context.Context, req *MsgRetire) (*MsgRetireResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Retire not implemented") -} -func (*UnimplementedMsgServer) Cancel(ctx context.Context, req *MsgCancel) (*MsgCancelResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Cancel not implemented") -} -func (*UnimplementedMsgServer) UpdateClassAdmin(ctx context.Context, req *MsgUpdateClassAdmin) (*MsgUpdateClassAdminResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateClassAdmin not implemented") -} -func (*UnimplementedMsgServer) UpdateClassIssuers(ctx context.Context, req *MsgUpdateClassIssuers) (*MsgUpdateClassIssuersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateClassIssuers not implemented") -} -func (*UnimplementedMsgServer) UpdateClassMetadata(ctx context.Context, req *MsgUpdateClassMetadata) (*MsgUpdateClassMetadataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateClassMetadata not implemented") -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -func _Msg_CreateClass_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreateClass) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreateClass(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.v1alpha1.Msg/CreateClass", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreateClass(ctx, req.(*MsgCreateClass)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_CreateBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreateBatch) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreateBatch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.v1alpha1.Msg/CreateBatch", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreateBatch(ctx, req.(*MsgCreateBatch)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSend) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Send(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.v1alpha1.Msg/Send", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Send(ctx, req.(*MsgSend)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_Retire_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRetire) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Retire(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.v1alpha1.Msg/Retire", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Retire(ctx, req.(*MsgRetire)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_Cancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCancel) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Cancel(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.v1alpha1.Msg/Cancel", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Cancel(ctx, req.(*MsgCancel)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateClassAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateClassAdmin) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateClassAdmin(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.v1alpha1.Msg/UpdateClassAdmin", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateClassAdmin(ctx, req.(*MsgUpdateClassAdmin)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateClassIssuers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateClassIssuers) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateClassIssuers(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.v1alpha1.Msg/UpdateClassIssuers", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateClassIssuers(ctx, req.(*MsgUpdateClassIssuers)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateClassMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateClassMetadata) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateClassMetadata(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/regen.ecocredit.v1alpha1.Msg/UpdateClassMetadata", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateClassMetadata(ctx, req.(*MsgUpdateClassMetadata)) - } - return interceptor(ctx, in, info, handler) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "regen.ecocredit.v1alpha1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateClass", - Handler: _Msg_CreateClass_Handler, - }, - { - MethodName: "CreateBatch", - Handler: _Msg_CreateBatch_Handler, - }, - { - MethodName: "Send", - Handler: _Msg_Send_Handler, - }, - { - MethodName: "Retire", - Handler: _Msg_Retire_Handler, - }, - { - MethodName: "Cancel", - Handler: _Msg_Cancel_Handler, - }, - { - MethodName: "UpdateClassAdmin", - Handler: _Msg_UpdateClassAdmin_Handler, - }, - { - MethodName: "UpdateClassIssuers", - Handler: _Msg_UpdateClassIssuers_Handler, - }, - { - MethodName: "UpdateClassMetadata", - Handler: _Msg_UpdateClassMetadata_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "regen/ecocredit/v1alpha1/tx.proto", -} - -func (m *MsgCreateClass) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCreateClass) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.CreditTypeName) > 0 { - i -= len(m.CreditTypeName) - copy(dAtA[i:], m.CreditTypeName) - i = encodeVarintTx(dAtA, i, uint64(len(m.CreditTypeName))) - i-- - dAtA[i] = 0x22 - } - if len(m.Metadata) > 0 { - i -= len(m.Metadata) - copy(dAtA[i:], m.Metadata) - i = encodeVarintTx(dAtA, i, uint64(len(m.Metadata))) - i-- - dAtA[i] = 0x1a - } - if len(m.Issuers) > 0 { - for iNdEx := len(m.Issuers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Issuers[iNdEx]) - copy(dAtA[i:], m.Issuers[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.Issuers[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Admin) > 0 { - i -= len(m.Admin) - copy(dAtA[i:], m.Admin) - i = encodeVarintTx(dAtA, i, uint64(len(m.Admin))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgCreateClassResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCreateClassResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateClassResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ClassId) > 0 { - i -= len(m.ClassId) - copy(dAtA[i:], m.ClassId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ClassId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgCreateBatch) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCreateBatch) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateBatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ProjectLocation) > 0 { - i -= len(m.ProjectLocation) - copy(dAtA[i:], m.ProjectLocation) - i = encodeVarintTx(dAtA, i, uint64(len(m.ProjectLocation))) - i-- - dAtA[i] = 0x3a - } - if m.EndDate != nil { - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.EndDate, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.EndDate):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintTx(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x32 - } - if m.StartDate != nil { - n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.StartDate, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.StartDate):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintTx(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x2a - } - if len(m.Metadata) > 0 { - i -= len(m.Metadata) - copy(dAtA[i:], m.Metadata) - i = encodeVarintTx(dAtA, i, uint64(len(m.Metadata))) - i-- - dAtA[i] = 0x22 - } - if len(m.Issuance) > 0 { - for iNdEx := len(m.Issuance) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Issuance[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.ClassId) > 0 { - i -= len(m.ClassId) - copy(dAtA[i:], m.ClassId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ClassId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Issuer) > 0 { - i -= len(m.Issuer) - copy(dAtA[i:], m.Issuer) - i = encodeVarintTx(dAtA, i, uint64(len(m.Issuer))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgCreateBatch_BatchIssuance) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCreateBatch_BatchIssuance) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateBatch_BatchIssuance) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RetirementLocation) > 0 { - i -= len(m.RetirementLocation) - copy(dAtA[i:], m.RetirementLocation) - i = encodeVarintTx(dAtA, i, uint64(len(m.RetirementLocation))) - i-- - dAtA[i] = 0x22 - } - if len(m.RetiredAmount) > 0 { - i -= len(m.RetiredAmount) - copy(dAtA[i:], m.RetiredAmount) - i = encodeVarintTx(dAtA, i, uint64(len(m.RetiredAmount))) - i-- - dAtA[i] = 0x1a - } - if len(m.TradableAmount) > 0 { - i -= len(m.TradableAmount) - copy(dAtA[i:], m.TradableAmount) - i = encodeVarintTx(dAtA, i, uint64(len(m.TradableAmount))) - i-- - dAtA[i] = 0x12 - } - if len(m.Recipient) > 0 { - i -= len(m.Recipient) - copy(dAtA[i:], m.Recipient) - i = encodeVarintTx(dAtA, i, uint64(len(m.Recipient))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgCreateBatchResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCreateBatchResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateBatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BatchDenom) > 0 { - i -= len(m.BatchDenom) - copy(dAtA[i:], m.BatchDenom) - i = encodeVarintTx(dAtA, i, uint64(len(m.BatchDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgSend) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgSend) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSend) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Credits) > 0 { - for iNdEx := len(m.Credits) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Credits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Recipient) > 0 { - i -= len(m.Recipient) - copy(dAtA[i:], m.Recipient) - i = encodeVarintTx(dAtA, i, uint64(len(m.Recipient))) - i-- - dAtA[i] = 0x12 - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgSend_SendCredits) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgSend_SendCredits) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSend_SendCredits) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RetirementLocation) > 0 { - i -= len(m.RetirementLocation) - copy(dAtA[i:], m.RetirementLocation) - i = encodeVarintTx(dAtA, i, uint64(len(m.RetirementLocation))) - i-- - dAtA[i] = 0x22 - } - if len(m.RetiredAmount) > 0 { - i -= len(m.RetiredAmount) - copy(dAtA[i:], m.RetiredAmount) - i = encodeVarintTx(dAtA, i, uint64(len(m.RetiredAmount))) - i-- - dAtA[i] = 0x1a - } - if len(m.TradableAmount) > 0 { - i -= len(m.TradableAmount) - copy(dAtA[i:], m.TradableAmount) - i = encodeVarintTx(dAtA, i, uint64(len(m.TradableAmount))) - i-- - dAtA[i] = 0x12 - } - if len(m.BatchDenom) > 0 { - i -= len(m.BatchDenom) - copy(dAtA[i:], m.BatchDenom) - i = encodeVarintTx(dAtA, i, uint64(len(m.BatchDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgSendResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgSendResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSendResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgRetire) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgRetire) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRetire) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Location) > 0 { - i -= len(m.Location) - copy(dAtA[i:], m.Location) - i = encodeVarintTx(dAtA, i, uint64(len(m.Location))) - i-- - dAtA[i] = 0x1a - } - if len(m.Credits) > 0 { - for iNdEx := len(m.Credits) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Credits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Holder) > 0 { - i -= len(m.Holder) - copy(dAtA[i:], m.Holder) - i = encodeVarintTx(dAtA, i, uint64(len(m.Holder))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgRetire_RetireCredits) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgRetire_RetireCredits) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRetire_RetireCredits) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Amount) > 0 { - i -= len(m.Amount) - copy(dAtA[i:], m.Amount) - i = encodeVarintTx(dAtA, i, uint64(len(m.Amount))) - i-- - dAtA[i] = 0x12 - } - if len(m.BatchDenom) > 0 { - i -= len(m.BatchDenom) - copy(dAtA[i:], m.BatchDenom) - i = encodeVarintTx(dAtA, i, uint64(len(m.BatchDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgRetireResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgRetireResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRetireResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgCancel) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCancel) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCancel) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Credits) > 0 { - for iNdEx := len(m.Credits) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Credits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Holder) > 0 { - i -= len(m.Holder) - copy(dAtA[i:], m.Holder) - i = encodeVarintTx(dAtA, i, uint64(len(m.Holder))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgCancel_CancelCredits) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCancel_CancelCredits) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCancel_CancelCredits) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Amount) > 0 { - i -= len(m.Amount) - copy(dAtA[i:], m.Amount) - i = encodeVarintTx(dAtA, i, uint64(len(m.Amount))) - i-- - dAtA[i] = 0x12 - } - if len(m.BatchDenom) > 0 { - i -= len(m.BatchDenom) - copy(dAtA[i:], m.BatchDenom) - i = encodeVarintTx(dAtA, i, uint64(len(m.BatchDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgCancelResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCancelResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCancelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgUpdateClassAdmin) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateClassAdmin) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateClassAdmin) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.NewAdmin) > 0 { - i -= len(m.NewAdmin) - copy(dAtA[i:], m.NewAdmin) - i = encodeVarintTx(dAtA, i, uint64(len(m.NewAdmin))) - i-- - dAtA[i] = 0x1a - } - if len(m.ClassId) > 0 { - i -= len(m.ClassId) - copy(dAtA[i:], m.ClassId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ClassId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Admin) > 0 { - i -= len(m.Admin) - copy(dAtA[i:], m.Admin) - i = encodeVarintTx(dAtA, i, uint64(len(m.Admin))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateClassAdminResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateClassAdminResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateClassAdminResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgUpdateClassIssuers) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateClassIssuers) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateClassIssuers) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Issuers) > 0 { - for iNdEx := len(m.Issuers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Issuers[iNdEx]) - copy(dAtA[i:], m.Issuers[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.Issuers[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.ClassId) > 0 { - i -= len(m.ClassId) - copy(dAtA[i:], m.ClassId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ClassId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Admin) > 0 { - i -= len(m.Admin) - copy(dAtA[i:], m.Admin) - i = encodeVarintTx(dAtA, i, uint64(len(m.Admin))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateClassIssuersResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateClassIssuersResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateClassIssuersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgUpdateClassMetadata) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateClassMetadata) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateClassMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Metadata) > 0 { - i -= len(m.Metadata) - copy(dAtA[i:], m.Metadata) - i = encodeVarintTx(dAtA, i, uint64(len(m.Metadata))) - i-- - dAtA[i] = 0x1a - } - if len(m.ClassId) > 0 { - i -= len(m.ClassId) - copy(dAtA[i:], m.ClassId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ClassId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Admin) > 0 { - i -= len(m.Admin) - copy(dAtA[i:], m.Admin) - i = encodeVarintTx(dAtA, i, uint64(len(m.Admin))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateClassMetadataResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateClassMetadataResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateClassMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgCreateClass) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Admin) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Issuers) > 0 { - for _, s := range m.Issuers { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - l = len(m.Metadata) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.CreditTypeName) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgCreateClassResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClassId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgCreateBatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Issuer) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ClassId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Issuance) > 0 { - for _, e := range m.Issuance { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - l = len(m.Metadata) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.StartDate != nil { - l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.StartDate) - n += 1 + l + sovTx(uint64(l)) - } - if m.EndDate != nil { - l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.EndDate) - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ProjectLocation) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgCreateBatch_BatchIssuance) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Recipient) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.TradableAmount) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.RetiredAmount) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.RetirementLocation) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgCreateBatchResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BatchDenom) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgSend) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Recipient) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Credits) > 0 { - for _, e := range m.Credits { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func (m *MsgSend_SendCredits) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BatchDenom) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.TradableAmount) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.RetiredAmount) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.RetirementLocation) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgSendResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgRetire) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Holder) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Credits) > 0 { - for _, e := range m.Credits { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - l = len(m.Location) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgRetire_RetireCredits) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BatchDenom) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Amount) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgRetireResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgCancel) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Holder) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Credits) > 0 { - for _, e := range m.Credits { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func (m *MsgCancel_CancelCredits) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BatchDenom) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Amount) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgCancelResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgUpdateClassAdmin) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Admin) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ClassId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.NewAdmin) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgUpdateClassAdminResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgUpdateClassIssuers) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Admin) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ClassId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Issuers) > 0 { - for _, s := range m.Issuers { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func (m *MsgUpdateClassIssuersResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgUpdateClassMetadata) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Admin) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ClassId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Metadata) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgUpdateClassMetadataResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgCreateClass) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCreateClass: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateClass: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Admin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Issuers", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Issuers = append(m.Issuers, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) - if m.Metadata == nil { - m.Metadata = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreditTypeName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CreditTypeName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCreateClassResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCreateClassResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateClassResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCreateBatch) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCreateBatch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateBatch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Issuer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Issuer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Issuance", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Issuance = append(m.Issuance, &MsgCreateBatch_BatchIssuance{}) - if err := m.Issuance[len(m.Issuance)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) - if m.Metadata == nil { - m.Metadata = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartDate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StartDate == nil { - m.StartDate = new(time.Time) - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.StartDate, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EndDate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EndDate == nil { - m.EndDate = new(time.Time) - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.EndDate, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProjectLocation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProjectLocation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCreateBatch_BatchIssuance) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BatchIssuance: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchIssuance: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Recipient = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradableAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TradableAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetiredAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RetiredAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetirementLocation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RetirementLocation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCreateBatchResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCreateBatchResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateBatchResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSend) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgSend: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSend: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Recipient = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Credits = append(m.Credits, &MsgSend_SendCredits{}) - if err := m.Credits[len(m.Credits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSend_SendCredits) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SendCredits: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SendCredits: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradableAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TradableAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetiredAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RetiredAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetirementLocation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RetirementLocation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSendResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgSendResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSendResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRetire) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRetire: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRetire: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Holder", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Holder = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Credits = append(m.Credits, &MsgRetire_RetireCredits{}) - if err := m.Credits[len(m.Credits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Location = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRetire_RetireCredits) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RetireCredits: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RetireCredits: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRetireResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRetireResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRetireResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCancel) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCancel: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCancel: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Holder", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Holder = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Credits = append(m.Credits, &MsgCancel_CancelCredits{}) - if err := m.Credits[len(m.Credits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCancel_CancelCredits) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CancelCredits: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CancelCredits: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCancelResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCancelResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCancelResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateClassAdmin) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateClassAdmin: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateClassAdmin: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Admin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewAdmin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NewAdmin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateClassAdminResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateClassAdminResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateClassAdminResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateClassIssuers) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateClassIssuers: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateClassIssuers: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Admin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Issuers", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Issuers = append(m.Issuers, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateClassIssuersResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateClassIssuersResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateClassIssuersResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateClassMetadata) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateClassMetadata: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateClassMetadata: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Admin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) - if m.Metadata == nil { - m.Metadata = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateClassMetadataResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateClassMetadataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateClassMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTx(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTx - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTx - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTx - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/ecocredit/v1alpha1/types.pb.go b/x/ecocredit/v1alpha1/types.pb.go deleted file mode 100644 index 2e72e0be47..0000000000 --- a/x/ecocredit/v1alpha1/types.pb.go +++ /dev/null @@ -1,2170 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: regen/ecocredit/v1alpha1/types.proto - -package v1alpha1 - -import ( - fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types1 "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// ClassInfo represents the high-level on-chain information for a credit class. -type ClassInfo struct { - // class_id is the unique ID of credit class. - ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` - // admin is the admin of the credit class. - Admin string `protobuf:"bytes,2,opt,name=admin,proto3" json:"admin,omitempty"` - // issuers are the approved issuers of the credit class. - Issuers []string `protobuf:"bytes,3,rep,name=issuers,proto3" json:"issuers,omitempty"` - // metadata is any arbitrary metadata to attached to the credit class. - Metadata []byte `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` - // credit_type describes the type of credit (e.g. carbon, biodiversity), as - // well as unit and precision. - CreditType *CreditType `protobuf:"bytes,5,opt,name=credit_type,json=creditType,proto3" json:"credit_type,omitempty"` - // The number of batches issued in this credit class. - NumBatches uint64 `protobuf:"varint,6,opt,name=num_batches,json=numBatches,proto3" json:"num_batches,omitempty"` -} - -func (m *ClassInfo) Reset() { *m = ClassInfo{} } -func (m *ClassInfo) String() string { return proto.CompactTextString(m) } -func (*ClassInfo) ProtoMessage() {} -func (*ClassInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_5342f4dcaeff1a84, []int{0} -} -func (m *ClassInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClassInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ClassInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ClassInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClassInfo.Merge(m, src) -} -func (m *ClassInfo) XXX_Size() int { - return m.Size() -} -func (m *ClassInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ClassInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ClassInfo proto.InternalMessageInfo - -func (m *ClassInfo) GetClassId() string { - if m != nil { - return m.ClassId - } - return "" -} - -func (m *ClassInfo) GetAdmin() string { - if m != nil { - return m.Admin - } - return "" -} - -func (m *ClassInfo) GetIssuers() []string { - if m != nil { - return m.Issuers - } - return nil -} - -func (m *ClassInfo) GetMetadata() []byte { - if m != nil { - return m.Metadata - } - return nil -} - -func (m *ClassInfo) GetCreditType() *CreditType { - if m != nil { - return m.CreditType - } - return nil -} - -func (m *ClassInfo) GetNumBatches() uint64 { - if m != nil { - return m.NumBatches - } - return 0 -} - -// BatchInfo represents the high-level on-chain information for a credit batch. -type BatchInfo struct { - // class_id is the unique ID of credit class. - ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` - // batch_denom is the unique ID of credit batch. - BatchDenom string `protobuf:"bytes,2,opt,name=batch_denom,json=batchDenom,proto3" json:"batch_denom,omitempty"` - // issuer is the issuer of the credit batch. - Issuer string `protobuf:"bytes,3,opt,name=issuer,proto3" json:"issuer,omitempty"` - // total_amount is the total number of active credits in the credit batch. - // Some of the issued credits may be cancelled and will be removed from - // total_amount and tracked in amount_cancelled. total_amount and - // amount_cancelled will always sum to the original amount of credits that - // were issued. - TotalAmount string `protobuf:"bytes,4,opt,name=total_amount,json=totalAmount,proto3" json:"total_amount,omitempty"` - // metadata is any arbitrary metadata attached to the credit batch. - Metadata []byte `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` - // amount_cancelled is the number of credits in the batch that have been - // cancelled, effectively undoing there issuance. The sum of total_amount and - // amount_cancelled will always sum to the original amount of credits that - // were issued. - AmountCancelled string `protobuf:"bytes,6,opt,name=amount_cancelled,json=amountCancelled,proto3" json:"amount_cancelled,omitempty"` - // start_date is the beginning of the period during which this credit batch - // was quantified and verified. - StartDate *time.Time `protobuf:"bytes,7,opt,name=start_date,json=startDate,proto3,stdtime" json:"start_date,omitempty"` - // end_date is the end of the period during which this credit batch was - // quantified and verified. - EndDate *time.Time `protobuf:"bytes,8,opt,name=end_date,json=endDate,proto3,stdtime" json:"end_date,omitempty"` - // project_location is the location of the project backing the credits in this - // batch. Full documentation can be found in MsgCreateBatch.project_location. - ProjectLocation string `protobuf:"bytes,9,opt,name=project_location,json=projectLocation,proto3" json:"project_location,omitempty"` -} - -func (m *BatchInfo) Reset() { *m = BatchInfo{} } -func (m *BatchInfo) String() string { return proto.CompactTextString(m) } -func (*BatchInfo) ProtoMessage() {} -func (*BatchInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_5342f4dcaeff1a84, []int{1} -} -func (m *BatchInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BatchInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchInfo.Merge(m, src) -} -func (m *BatchInfo) XXX_Size() int { - return m.Size() -} -func (m *BatchInfo) XXX_DiscardUnknown() { - xxx_messageInfo_BatchInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_BatchInfo proto.InternalMessageInfo - -func (m *BatchInfo) GetClassId() string { - if m != nil { - return m.ClassId - } - return "" -} - -func (m *BatchInfo) GetBatchDenom() string { - if m != nil { - return m.BatchDenom - } - return "" -} - -func (m *BatchInfo) GetIssuer() string { - if m != nil { - return m.Issuer - } - return "" -} - -func (m *BatchInfo) GetTotalAmount() string { - if m != nil { - return m.TotalAmount - } - return "" -} - -func (m *BatchInfo) GetMetadata() []byte { - if m != nil { - return m.Metadata - } - return nil -} - -func (m *BatchInfo) GetAmountCancelled() string { - if m != nil { - return m.AmountCancelled - } - return "" -} - -func (m *BatchInfo) GetStartDate() *time.Time { - if m != nil { - return m.StartDate - } - return nil -} - -func (m *BatchInfo) GetEndDate() *time.Time { - if m != nil { - return m.EndDate - } - return nil -} - -func (m *BatchInfo) GetProjectLocation() string { - if m != nil { - return m.ProjectLocation - } - return "" -} - -// Params defines the updatable global parameters of the ecocredit module for -// use with the x/params module. -type Params struct { - // credit_class_fee is the fixed fee charged on creation of a new credit class - CreditClassFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=credit_class_fee,json=creditClassFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"credit_class_fee"` - // allowed_class_creators is an allowlist defining the addresses with - // the required permissions to create credit classes - AllowedClassCreators []string `protobuf:"bytes,2,rep,name=allowed_class_creators,json=allowedClassCreators,proto3" json:"allowed_class_creators,omitempty"` - // allowlist_enabled is a param that enables/disables the allowlist for credit - // creation - AllowlistEnabled bool `protobuf:"varint,3,opt,name=allowlist_enabled,json=allowlistEnabled,proto3" json:"allowlist_enabled,omitempty"` - // credit_types is a list of definitions for credit types - CreditTypes []*CreditType `protobuf:"bytes,4,rep,name=credit_types,json=creditTypes,proto3" json:"credit_types,omitempty"` - // basket_creation_fee is the fee to create a new basket denom. - BasketCreationFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=basket_creation_fee,json=basketCreationFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"basket_creation_fee"` -} - -func (m *Params) Reset() { *m = Params{} } -func (m *Params) String() string { return proto.CompactTextString(m) } -func (*Params) ProtoMessage() {} -func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_5342f4dcaeff1a84, []int{2} -} -func (m *Params) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Params.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Params) XXX_Merge(src proto.Message) { - xxx_messageInfo_Params.Merge(m, src) -} -func (m *Params) XXX_Size() int { - return m.Size() -} -func (m *Params) XXX_DiscardUnknown() { - xxx_messageInfo_Params.DiscardUnknown(m) -} - -var xxx_messageInfo_Params proto.InternalMessageInfo - -func (m *Params) GetCreditClassFee() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.CreditClassFee - } - return nil -} - -func (m *Params) GetAllowedClassCreators() []string { - if m != nil { - return m.AllowedClassCreators - } - return nil -} - -func (m *Params) GetAllowlistEnabled() bool { - if m != nil { - return m.AllowlistEnabled - } - return false -} - -func (m *Params) GetCreditTypes() []*CreditType { - if m != nil { - return m.CreditTypes - } - return nil -} - -func (m *Params) GetBasketCreationFee() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.BasketCreationFee - } - return nil -} - -// CreditType defines the measurement unit/precision of a certain credit type -// (e.g. carbon, biodiversity...) -type CreditType struct { - // the type of credit (e.g. carbon, biodiversity, etc) - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // abbreviation is a 1-3 character uppercase abbreviation of the CreditType - // name, used in batch denominations within the CreditType. It must be unique. - Abbreviation string `protobuf:"bytes,2,opt,name=abbreviation,proto3" json:"abbreviation,omitempty"` - // the measurement unit (e.g. kg, ton, etc) - Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"` - // the decimal precision - Precision uint32 `protobuf:"varint,4,opt,name=precision,proto3" json:"precision,omitempty"` -} - -func (m *CreditType) Reset() { *m = CreditType{} } -func (m *CreditType) String() string { return proto.CompactTextString(m) } -func (*CreditType) ProtoMessage() {} -func (*CreditType) Descriptor() ([]byte, []int) { - return fileDescriptor_5342f4dcaeff1a84, []int{3} -} -func (m *CreditType) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CreditType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CreditType.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CreditType) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreditType.Merge(m, src) -} -func (m *CreditType) XXX_Size() int { - return m.Size() -} -func (m *CreditType) XXX_DiscardUnknown() { - xxx_messageInfo_CreditType.DiscardUnknown(m) -} - -var xxx_messageInfo_CreditType proto.InternalMessageInfo - -func (m *CreditType) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *CreditType) GetAbbreviation() string { - if m != nil { - return m.Abbreviation - } - return "" -} - -func (m *CreditType) GetUnit() string { - if m != nil { - return m.Unit - } - return "" -} - -func (m *CreditType) GetPrecision() uint32 { - if m != nil { - return m.Precision - } - return 0 -} - -// CreditTypeSeq associates a sequence number with a credit type abbreviation. -// This represents the number of credit classes created with that credit type. -type CreditTypeSeq struct { - // The credit type abbreviation - Abbreviation string `protobuf:"bytes,1,opt,name=abbreviation,proto3" json:"abbreviation,omitempty"` - // The sequence number of classes of the credit type - SeqNumber uint64 `protobuf:"varint,2,opt,name=seq_number,json=seqNumber,proto3" json:"seq_number,omitempty"` -} - -func (m *CreditTypeSeq) Reset() { *m = CreditTypeSeq{} } -func (m *CreditTypeSeq) String() string { return proto.CompactTextString(m) } -func (*CreditTypeSeq) ProtoMessage() {} -func (*CreditTypeSeq) Descriptor() ([]byte, []int) { - return fileDescriptor_5342f4dcaeff1a84, []int{4} -} -func (m *CreditTypeSeq) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CreditTypeSeq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CreditTypeSeq.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CreditTypeSeq) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreditTypeSeq.Merge(m, src) -} -func (m *CreditTypeSeq) XXX_Size() int { - return m.Size() -} -func (m *CreditTypeSeq) XXX_DiscardUnknown() { - xxx_messageInfo_CreditTypeSeq.DiscardUnknown(m) -} - -var xxx_messageInfo_CreditTypeSeq proto.InternalMessageInfo - -func (m *CreditTypeSeq) GetAbbreviation() string { - if m != nil { - return m.Abbreviation - } - return "" -} - -func (m *CreditTypeSeq) GetSeqNumber() uint64 { - if m != nil { - return m.SeqNumber - } - return 0 -} - -func init() { - proto.RegisterType((*ClassInfo)(nil), "regen.ecocredit.v1alpha1.ClassInfo") - proto.RegisterType((*BatchInfo)(nil), "regen.ecocredit.v1alpha1.BatchInfo") - proto.RegisterType((*Params)(nil), "regen.ecocredit.v1alpha1.Params") - proto.RegisterType((*CreditType)(nil), "regen.ecocredit.v1alpha1.CreditType") - proto.RegisterType((*CreditTypeSeq)(nil), "regen.ecocredit.v1alpha1.CreditTypeSeq") -} - -func init() { - proto.RegisterFile("regen/ecocredit/v1alpha1/types.proto", fileDescriptor_5342f4dcaeff1a84) -} - -var fileDescriptor_5342f4dcaeff1a84 = []byte{ - // 754 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcd, 0x6e, 0xeb, 0x44, - 0x14, 0x8e, 0x9b, 0x5f, 0x9f, 0xe4, 0x42, 0xee, 0x50, 0x5d, 0xf9, 0x46, 0x90, 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bd, 0xb1, 0xb0, 0x20, 0x3f, 0xc1, 0x7b, 0x21, 0x15, 0xe7, 0x28, 0xf5, 0x23, 0x13, 0xce, 0x54, - 0x97, 0xea, 0xff, 0x7f, 0x97, 0x5e, 0xeb, 0x3a, 0x33, 0x53, 0xe6, 0x08, 0x71, 0xb4, 0x04, 0xd8, - 0xbc, 0x8b, 0x10, 0xa8, 0x31, 0x9a, 0xa1, 0xd9, 0x0d, 0x15, 0x93, 0x11, 0x74, 0x68, 0x18, 0xe6, - 0xb8, 0x4c, 0xf4, 0xcc, 0xf5, 0x66, 0x3c, 0xc1, 0x4a, 0x5e, 0xc1, 0x12, 0x69, 0x36, 0x43, 0xc5, - 0xe4, 0x7d, 0xb0, 0x17, 0x39, 0x46, 0x89, 0x28, 0x49, 0xe5, 0x52, 0xbc, 0xf2, 0x37, 0xc0, 0xc8, - 0x87, 0x57, 0x9b, 0xba, 0xdf, 0xe1, 0xc5, 0x3f, 0xca, 0x58, 0xcf, 0x94, 0xf9, 0x00, 0x40, 0xe0, - 0x45, 0xc0, 0x8a, 0x2c, 0xc4, 0x5c, 0x3d, 0xa4, 0xe6, 0xdb, 0x02, 0x2f, 0xbe, 0x51, 0xc0, 0xf4, - 0xe4, 0xe6, 0xbe, 0x6f, 0xdd, 0xde, 0xf7, 0xad, 0x3f, 0xee, 0xfb, 0xd6, 0xf5, 0x43, 0xbf, 0x72, - 0xfb, 0xd0, 0xaf, 0xfc, 0xfa, 0xd0, 0xaf, 0x7c, 0xff, 0xd9, 0xa3, 0x16, 0xa9, 0xf9, 0xec, 0x31, - 0x94, 0x97, 0x3c, 0x3f, 0x37, 0x59, 0x8a, 0xf1, 0x1c, 0x73, 0xef, 0xc7, 0x67, 0xbe, 0xcd, 0x61, - 0x43, 0xad, 0xc6, 0x27, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x41, 0xfb, 0xca, 0x9b, 0xbe, 0x05, - 0x00, 0x00, -} - -func (m *ClassInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClassInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClassInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NumBatches != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.NumBatches)) - i-- - dAtA[i] = 0x30 - } - if m.CreditType != nil { - { - size, err := m.CreditType.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if len(m.Metadata) > 0 { - i -= len(m.Metadata) - copy(dAtA[i:], m.Metadata) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata))) - i-- - dAtA[i] = 0x22 - } - if len(m.Issuers) > 0 { - for iNdEx := len(m.Issuers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Issuers[iNdEx]) - copy(dAtA[i:], m.Issuers[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Issuers[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Admin) > 0 { - i -= len(m.Admin) - copy(dAtA[i:], m.Admin) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Admin))) - i-- - dAtA[i] = 0x12 - } - if len(m.ClassId) > 0 { - i -= len(m.ClassId) - copy(dAtA[i:], m.ClassId) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ClassId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BatchInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BatchInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ProjectLocation) > 0 { - i -= len(m.ProjectLocation) - copy(dAtA[i:], m.ProjectLocation) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ProjectLocation))) - i-- - dAtA[i] = 0x4a - } - if m.EndDate != nil { - n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.EndDate, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.EndDate):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintTypes(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x42 - } - if m.StartDate != nil { - n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.StartDate, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.StartDate):]) - if err3 != nil { - return 0, err3 - } - i -= n3 - i = encodeVarintTypes(dAtA, i, uint64(n3)) - i-- - dAtA[i] = 0x3a - } - if len(m.AmountCancelled) > 0 { - i -= len(m.AmountCancelled) - copy(dAtA[i:], m.AmountCancelled) - i = encodeVarintTypes(dAtA, i, uint64(len(m.AmountCancelled))) - i-- - dAtA[i] = 0x32 - } - if len(m.Metadata) > 0 { - i -= len(m.Metadata) - copy(dAtA[i:], m.Metadata) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata))) - i-- - dAtA[i] = 0x2a - } - if len(m.TotalAmount) > 0 { - i -= len(m.TotalAmount) - copy(dAtA[i:], m.TotalAmount) - i = encodeVarintTypes(dAtA, i, uint64(len(m.TotalAmount))) - i-- - dAtA[i] = 0x22 - } - if len(m.Issuer) > 0 { - i -= len(m.Issuer) - copy(dAtA[i:], m.Issuer) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Issuer))) - i-- - dAtA[i] = 0x1a - } - if len(m.BatchDenom) > 0 { - i -= len(m.BatchDenom) - copy(dAtA[i:], m.BatchDenom) - i = encodeVarintTypes(dAtA, i, uint64(len(m.BatchDenom))) - i-- - dAtA[i] = 0x12 - } - if len(m.ClassId) > 0 { - i -= len(m.ClassId) - copy(dAtA[i:], m.ClassId) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ClassId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Params) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BasketCreationFee) > 0 { - for iNdEx := len(m.BasketCreationFee) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.BasketCreationFee[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if len(m.CreditTypes) > 0 { - for iNdEx := len(m.CreditTypes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.CreditTypes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if m.AllowlistEnabled { - i-- - if m.AllowlistEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.AllowedClassCreators) > 0 { - for iNdEx := len(m.AllowedClassCreators) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AllowedClassCreators[iNdEx]) - copy(dAtA[i:], m.AllowedClassCreators[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.AllowedClassCreators[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.CreditClassFee) > 0 { - for iNdEx := len(m.CreditClassFee) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.CreditClassFee[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *CreditType) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CreditType) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CreditType) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Precision != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Precision)) - i-- - dAtA[i] = 0x20 - } - if len(m.Unit) > 0 { - i -= len(m.Unit) - copy(dAtA[i:], m.Unit) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Unit))) - i-- - dAtA[i] = 0x1a - } - if len(m.Abbreviation) > 0 { - i -= len(m.Abbreviation) - copy(dAtA[i:], m.Abbreviation) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Abbreviation))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CreditTypeSeq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CreditTypeSeq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CreditTypeSeq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SeqNumber != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.SeqNumber)) - i-- - dAtA[i] = 0x10 - } - if len(m.Abbreviation) > 0 { - i -= len(m.Abbreviation) - copy(dAtA[i:], m.Abbreviation) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Abbreviation))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { - offset -= sovTypes(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ClassInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClassId) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Admin) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.Issuers) > 0 { - for _, s := range m.Issuers { - l = len(s) - n += 1 + l + sovTypes(uint64(l)) - } - } - l = len(m.Metadata) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.CreditType != nil { - l = m.CreditType.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.NumBatches != 0 { - n += 1 + sovTypes(uint64(m.NumBatches)) - } - return n -} - -func (m *BatchInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClassId) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.BatchDenom) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Issuer) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.TotalAmount) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Metadata) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.AmountCancelled) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.StartDate != nil { - l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.StartDate) - n += 1 + l + sovTypes(uint64(l)) - } - if m.EndDate != nil { - l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.EndDate) - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ProjectLocation) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.CreditClassFee) > 0 { - for _, e := range m.CreditClassFee { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.AllowedClassCreators) > 0 { - for _, s := range m.AllowedClassCreators { - l = len(s) - n += 1 + l + sovTypes(uint64(l)) - } - } - if m.AllowlistEnabled { - n += 2 - } - if len(m.CreditTypes) > 0 { - for _, e := range m.CreditTypes { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.BasketCreationFee) > 0 { - for _, e := range m.BasketCreationFee { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - -func (m *CreditType) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Abbreviation) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Unit) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Precision != 0 { - n += 1 + sovTypes(uint64(m.Precision)) - } - return n -} - -func (m *CreditTypeSeq) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Abbreviation) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.SeqNumber != 0 { - n += 1 + sovTypes(uint64(m.SeqNumber)) - } - return n -} - -func sovTypes(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ClassInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClassInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClassInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Admin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Issuers", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Issuers = append(m.Issuers, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) - if m.Metadata == nil { - m.Metadata = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreditType", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CreditType == nil { - m.CreditType = &CreditType{} - } - if err := m.CreditType.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NumBatches", wireType) - } - m.NumBatches = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NumBatches |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BatchInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BatchInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Issuer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Issuer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TotalAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) - if m.Metadata == nil { - m.Metadata = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AmountCancelled", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AmountCancelled = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartDate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StartDate == nil { - m.StartDate = new(time.Time) - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.StartDate, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EndDate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EndDate == nil { - m.EndDate = new(time.Time) - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.EndDate, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProjectLocation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProjectLocation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Params) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreditClassFee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CreditClassFee = append(m.CreditClassFee, types1.Coin{}) - if err := m.CreditClassFee[len(m.CreditClassFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowedClassCreators", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AllowedClassCreators = append(m.AllowedClassCreators, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowlistEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowlistEnabled = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreditTypes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CreditTypes = append(m.CreditTypes, &CreditType{}) - if err := m.CreditTypes[len(m.CreditTypes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BasketCreationFee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BasketCreationFee = append(m.BasketCreationFee, types1.Coin{}) - if err := m.BasketCreationFee[len(m.BasketCreationFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CreditType) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CreditType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CreditType: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Abbreviation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Abbreviation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Unit = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Precision", wireType) - } - m.Precision = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Precision |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CreditTypeSeq) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CreditTypeSeq: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CreditTypeSeq: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Abbreviation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Abbreviation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SeqNumber", wireType) - } - m.SeqNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SeqNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTypes(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTypes - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTypes - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTypes - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") -)