diff --git a/go.mod b/go.mod
index 1f3a37a52c..691b5c5dec 100644
--- a/go.mod
+++ b/go.mod
@@ -17,8 +17,8 @@ require (
github.com/stretchr/testify v1.7.0
github.com/tendermint/tendermint v0.34.12
github.com/tendermint/tm-db v0.6.4
- golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
- google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af // indirect
+ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
+ google.golang.org/genproto v0.0.0-20210921142501-181ce0d877f6 // indirect
)
replace google.golang.org/grpc => google.golang.org/grpc v1.33.2
diff --git a/go.sum b/go.sum
index 5119c7896f..b9d5b92732 100644
--- a/go.sum
+++ b/go.sum
@@ -778,7 +778,6 @@ github.com/tendermint/tendermint v0.34.0-rc4/go.mod h1:yotsojf2C1QBOw4dZrTcxbyxm
github.com/tendermint/tendermint v0.34.0-rc6/go.mod h1:ugzyZO5foutZImv0Iyx/gOFCX6mjJTgbLHTwi17VDVg=
github.com/tendermint/tendermint v0.34.0/go.mod h1:Aj3PIipBFSNO21r+Lq3TtzQ+uKESxkbA3yo/INM4QwQ=
github.com/tendermint/tendermint v0.34.10/go.mod h1:aeHL7alPh4uTBIJQ8mgFEE8VwJLXI1VD3rVOmH2Mcy0=
-github.com/tendermint/tendermint v0.34.11/go.mod h1:aeHL7alPh4uTBIJQ8mgFEE8VwJLXI1VD3rVOmH2Mcy0=
github.com/tendermint/tendermint v0.34.12 h1:m+kUYNhONedhJfHmHG8lqsdZvbR5t6vmhaok1yXjpKg=
github.com/tendermint/tendermint v0.34.12/go.mod h1:aeHL7alPh4uTBIJQ8mgFEE8VwJLXI1VD3rVOmH2Mcy0=
github.com/tendermint/tm-db v0.6.2/go.mod h1:GYtQ67SUvATOcoY8/+x6ylk8Qo02BQyLrAs+yAcLvGI=
@@ -866,8 +865,8 @@ golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
-golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ=
-golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg=
+golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -1124,7 +1123,6 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
-golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -1207,8 +1205,8 @@ google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
-google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af h1:aLMMXFYqw01RA6XJim5uaN+afqNNjc9P8HPAbnpnc5s=
-google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
+google.golang.org/genproto v0.0.0-20210921142501-181ce0d877f6 h1:2ncG/LajxmrclaZH+ppVi02rQxz4eXYJzGHdFN4Y9UA=
+google.golang.org/genproto v0.0.0-20210921142501-181ce0d877f6/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
diff --git a/proto/regen/ecocredit/v1alpha1/tx.proto b/proto/regen/ecocredit/v1alpha1/tx.proto
index 5aa2b5e625..cd7057179b 100644
--- a/proto/regen/ecocredit/v1alpha1/tx.proto
+++ b/proto/regen/ecocredit/v1alpha1/tx.proto
@@ -30,6 +30,15 @@ service Msg {
// deducts them from the tradable supply, effectively cancelling their
// issuance on Regen Ledger
rpc Cancel(MsgCancel) returns (MsgCancelResponse);
+
+ // UpdateClassAdmin updates the credit class admin
+ rpc UpdateClassAdmin(MsgUpdateClassAdmin) returns (MsgUpdateClassAdminResponse);
+
+ // UpdateClassIssuers updates the credit class issuer list
+ rpc UpdateClassIssuers(MsgUpdateClassIssuers) returns (MsgUpdateClassIssuersResponse);
+
+ // UpdateClassMetadata updates the credit class metadata
+ rpc UpdateClassMetadata(MsgUpdateClassMetadata) returns (MsgUpdateClassMetadataResponse);
}
// MsgCreateClass is the Msg/CreateClass request type.
@@ -217,4 +226,52 @@ message MsgCancel {
}
// MsgCancelResponse is the Msg/Cancel response type.
-message MsgCancelResponse {}
\ No newline at end of file
+message MsgCancelResponse {}
+
+// MsgUpdateClassAdmin is the Msg/UpdateClassAdmin request type.
+message MsgUpdateClassAdmin {
+
+ // admin is the address of the account that is the admin of the credit class.
+ string admin = 1;
+
+ // class_id is the unique ID of the credit class.
+ string class_id = 2;
+
+ // new_admin is the address of the new admin of the credit class.
+ string new_admin = 3;
+}
+
+// MsgUpdateClassAdminResponse is the MsgUpdateClassAdmin response type.
+message MsgUpdateClassAdminResponse {}
+
+// MsgUpdateClassIssuers is the Msg/UpdateClassIssuers request type.
+message MsgUpdateClassIssuers {
+
+ // admin is the address of the account that is the admin of the credit class.
+ string admin = 1;
+
+ // class_id is the unique ID of the credit class.
+ string class_id = 2;
+
+ // issuers are the updated account addresses of the approved issuers.
+ repeated string issuers = 3;
+}
+
+// MsgUpdateClassIssuersResponse is the MsgUpdateClassIssuers response type.
+message MsgUpdateClassIssuersResponse {}
+
+// MsgUpdateClassMetadata is the Msg/UpdateClassMetadata request type.
+message MsgUpdateClassMetadata {
+
+ // admin is the address of the account that is the admin of the credit class.
+ string admin = 1;
+
+ // class_id is the unique ID of the credit class.
+ string class_id = 2;
+
+ // metadata is the updated arbitrary metadata to be attached to the credit class.
+ bytes metadata = 3;
+}
+
+// MsgUpdateClassMetadataResponse is the MsgUpdateClassMetadata response type.
+message MsgUpdateClassMetadataResponse {}
\ No newline at end of file
diff --git a/x/ecocredit/client/testsuite/tx.go b/x/ecocredit/client/testsuite/tx.go
index 3dddc6a6b9..f00214a146 100644
--- a/x/ecocredit/client/testsuite/tx.go
+++ b/x/ecocredit/client/testsuite/tx.go
@@ -1,22 +1,23 @@
package testsuite
import (
+ "encoding/base64"
"fmt"
- "strings"
-
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/crypto/hd"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/cosmos-sdk/testutil"
+ "github.com/cosmos/cosmos-sdk/testutil/testdata"
sdk "github.com/cosmos/cosmos-sdk/types"
banktestutil "github.com/cosmos/cosmos-sdk/x/bank/client/testutil"
- proto "github.com/gogo/protobuf/proto"
+ "github.com/gogo/protobuf/proto"
"github.com/regen-network/regen-ledger/types/testutil/cli"
"github.com/regen-network/regen-ledger/types/testutil/network"
"github.com/regen-network/regen-ledger/x/ecocredit"
"github.com/regen-network/regen-ledger/x/ecocredit/client"
"github.com/stretchr/testify/suite"
tmcli "github.com/tendermint/tendermint/libs/cli"
+ "strings"
)
type IntegrationTestSuite struct {
@@ -25,8 +26,9 @@ type IntegrationTestSuite struct {
cfg network.Config
network *network.Network
- classInfo *ecocredit.ClassInfo
- batchInfo *ecocredit.BatchInfo
+ testAccount sdk.AccAddress
+ classInfo *ecocredit.ClassInfo
+ batchInfo *ecocredit.BatchInfo
}
const (
@@ -64,6 +66,9 @@ func (s *IntegrationTestSuite) SetupSuite() {
info, _, err := val.ClientCtx.Keyring.NewMnemonic("NewValidator0", keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1)
s.Require().NoError(err)
+ _, a1pub, a1 := testdata.KeyTestPubAddr()
+ val.ClientCtx.Keyring.SavePubKey("throwaway", a1pub, hd.Secp256k1Type)
+
account := sdk.AccAddress(info.GetPubKey().Address())
_, err = banktestutil.MsgSendExec(
val.ClientCtx,
@@ -75,6 +80,17 @@ func (s *IntegrationTestSuite) SetupSuite() {
)
s.Require().NoError(err)
+ _, err = banktestutil.MsgSendExec(
+ val.ClientCtx,
+ val.Address,
+ a1,
+ sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(2000))), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
+ fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock),
+ fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()),
+ )
+ s.Require().NoError(err)
+ s.testAccount = a1
+
var commonFlags = []string{
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock),
@@ -1137,3 +1153,200 @@ func (s *IntegrationTestSuite) TestTxCancel() {
})
}
}
+
+func (s *IntegrationTestSuite) TestTxUpdateAdmin() {
+ // use this classId as to not corrupt other tests
+ const classId = "C02"
+ _, _, a1 := testdata.KeyTestPubAddr()
+ val0 := s.network.Validators[0]
+ clientCtx := val0.ClientCtx
+
+ testCases := []struct {
+ name string
+ args []string
+ expErr bool
+ expErrMsg string
+ }{
+ {
+ name: "invalid request: not enough args",
+ args: []string{},
+ expErr: true,
+ expErrMsg: "accepts 2 arg(s), received 0",
+ },
+ {
+ name: "invalid request: no id",
+ args: []string{"", a1.String()},
+ expErr: true,
+ expErrMsg: "class-id is required",
+ },
+ {
+ name: "invalid request: no admin address",
+ args: append([]string{classId, "", makeFlagFrom(a1.String())}, s.commonTxFlags()...),
+ expErr: true,
+ expErrMsg: "new admin address is required",
+ },
+ {
+ name: "valid request",
+ args: append([]string{classId, a1.String(), makeFlagFrom(val0.Address.String())}, s.commonTxFlags()...),
+ expErr: false,
+ },
+ }
+
+ for _, tc := range testCases {
+ s.Run(tc.name, func() {
+ cmd := client.TxUpdateClassAdminCmd()
+ _, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args)
+ if tc.expErr {
+ s.Require().Error(err)
+ } else {
+ s.Require().NoError(err)
+
+ // query the class info
+ query := client.QueryClassInfoCmd()
+ out, err := cli.ExecTestCLICmd(clientCtx, query, []string{classId, flagOutputJSON})
+ s.Require().NoError(err, out.String())
+ var res ecocredit.QueryClassInfoResponse
+ err = clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)
+ s.Require().NoError(err)
+
+ // check the admin has been changed
+ s.Require().Equal(res.Info.Admin, tc.args[1])
+ }
+ })
+ }
+}
+
+func (s *IntegrationTestSuite) TestTxUpdateMetadata() {
+ // use C03 here as C02 will be corrupted by the admin change test
+ const classId = "C03"
+ newMetaData := base64.StdEncoding.EncodeToString([]byte("hello"))
+ _, _, a1 := testdata.KeyTestPubAddr()
+ val0 := s.network.Validators[0]
+ clientCtx := val0.ClientCtx
+
+ testCases := []struct {
+ name string
+ args []string
+ expErr bool
+ expErrMsg string
+ }{
+ {
+ name: "invalid request: not enough args",
+ args: []string{},
+ expErr: true,
+ expErrMsg: "accepts 2 arg(s), received 0",
+ },
+ {
+ name: "invalid request: bad id",
+ args: []string{"", a1.String()},
+ expErr: true,
+ expErrMsg: "class-id is required",
+ },
+ {
+ name: "invalid request: no metadata",
+ args: append([]string{classId, "", makeFlagFrom(a1.String())}, s.commonTxFlags()...),
+ expErr: true,
+ expErrMsg: "base64_metadata is required",
+ },
+ {
+ name: "invalid request: bad metadata",
+ args: append([]string{classId, "test", makeFlagFrom(a1.String())}, s.commonTxFlags()...),
+ expErr: true,
+ expErrMsg: "metadata is malformed, proper base64 string is required",
+ },
+ {
+ name: "valid request",
+ args: append([]string{classId, newMetaData, makeFlagFrom(val0.Address.String())}, s.commonTxFlags()...),
+ expErr: false,
+ },
+ }
+
+ for _, tc := range testCases {
+ s.Run(tc.name, func() {
+ cmd := client.TxUpdateClassMetadataCmd()
+ _, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args)
+ if tc.expErr {
+ s.Require().Error(err)
+ } else {
+ s.Require().NoError(err)
+
+ // query the credit class info
+ query := client.QueryClassInfoCmd()
+ out, err := cli.ExecTestCLICmd(clientCtx, query, []string{classId, flagOutputJSON})
+ s.Require().NoError(err, out.String())
+ var res ecocredit.QueryClassInfoResponse
+ err = clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)
+ s.Require().NoError(err)
+
+ // check metadata changed
+ b, err := base64.StdEncoding.DecodeString(newMetaData)
+ s.Require().NoError(err)
+ s.Require().Equal(res.Info.Metadata, b)
+ }
+ })
+ }
+}
+
+func (s *IntegrationTestSuite) TestTxUpdateIssuers() {
+ const classId = "C03"
+ _, _, a2 := testdata.KeyTestPubAddr()
+ newIssuers := []string{s.testAccount.String(), a2.String()}
+ val0 := s.network.Validators[0]
+ clientCtx := val0.ClientCtx
+
+ testCases := []struct {
+ name string
+ args []string
+ expErr bool
+ expErrMsg string
+ }{
+ {
+ name: "invalid request: not enough args",
+ args: append([]string{makeFlagFrom(s.testAccount.String())}, s.commonTxFlags()...),
+ expErr: true,
+ expErrMsg: "accepts 2 arg(s), received 0",
+ },
+ {
+ name: "invalid request: no id",
+ args: append([]string{"", s.testAccount.String(), makeFlagFrom(val0.Address.String())}, s.commonTxFlags()...),
+ expErr: true,
+ expErrMsg: "class-id is required",
+ },
+ {
+ name: "invalid request: bad issuer addresses",
+ args: append([]string{classId, "hello,world", makeFlagFrom(s.testAccount.String())}, s.commonTxFlags()...),
+ expErr: true,
+ expErrMsg: "invalid address",
+ },
+ {
+ name: "valid request",
+ args: append([]string{classId, fmt.Sprintf("%s,%s", newIssuers[0], newIssuers[1]), makeFlagFrom(val0.Address.String())}, s.commonTxFlags()...),
+ expErr: false,
+ },
+ }
+
+ for _, tc := range testCases {
+ s.Run(tc.name, func() {
+ cmd := client.TxUpdateClassIssuersCmd()
+ _, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args)
+ if tc.expErr {
+ s.Require().Error(err)
+ s.Require().Contains(err.Error(), tc.expErrMsg)
+ } else {
+ s.Require().NoError(err)
+
+ // query the credit class info
+ query := client.QueryClassInfoCmd()
+ out, err := cli.ExecTestCLICmd(clientCtx, query, []string{classId, flagOutputJSON})
+ s.Require().NoError(err, out.String())
+ var res ecocredit.QueryClassInfoResponse
+ err = clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)
+ s.Require().NoError(err)
+
+ // check issuers list was changed
+ s.Require().NoError(err)
+ s.Require().Equal(res.Info.Issuers, newIssuers)
+ }
+ })
+ }
+}
diff --git a/x/ecocredit/client/tx.go b/x/ecocredit/client/tx.go
index 0eae311a91..f0c16fcabd 100644
--- a/x/ecocredit/client/tx.go
+++ b/x/ecocredit/client/tx.go
@@ -35,6 +35,9 @@ func TxCmd(name string) *cobra.Command {
TxSendCmd(),
TxRetireCmd(),
TxCancelCmd(),
+ TxUpdateClassMetadataCmd(),
+ TxUpdateClassIssuersCmd(),
+ TxUpdateClassAdminCmd(),
)
return cmd
}
@@ -369,3 +372,125 @@ Parameters:
},
})
}
+
+func TxUpdateClassMetadataCmd() *cobra.Command {
+ return txflags(&cobra.Command{
+ Use: "update-class-metadata [class-id] [metadata]",
+ Short: "Updates the metadata for a specific credit class",
+ Long: `Updates the metadata for a specific credit class. the '--from' flag must equal the credit class admin.
+
+Parameters:
+ class-id: the class id that corresponds with the credit class you want to update
+ metadata: base64 encoded metadata`,
+ Args: cobra.ExactArgs(2),
+ RunE: func(cmd *cobra.Command, args []string) error {
+
+ if args[0] == "" {
+ return errors.New("class-id is required")
+ }
+ classID := args[0]
+
+ // Check that metadata is provided and decode it
+ if args[1] == "" {
+ return errors.New("base64_metadata is required")
+ }
+ b, err := base64.StdEncoding.DecodeString(args[1])
+ if err != nil {
+ return sdkerrors.ErrInvalidRequest.Wrap("metadata is malformed, proper base64 string is required")
+ }
+
+ clientCtx, err := sdkclient.GetClientTxContext(cmd)
+ if err != nil {
+ return err
+ }
+
+ msg := ecocredit.MsgUpdateClassMetadata{
+ Admin: clientCtx.From,
+ ClassId: classID,
+ Metadata: b,
+ }
+
+ return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg)
+ },
+ })
+}
+
+func TxUpdateClassAdminCmd() *cobra.Command {
+ return txflags(&cobra.Command{
+ Use: "update-class-admin [class-id] [admin]",
+ Short: "Updates the admin for a specific credit class",
+ Long: `Updates the admin for a specific credit class. the '--from' flag must equal the current credit class admin.
+ WARNING: Updating the admin replaces the current admin. Be sure the address entered is correct.
+
+Parameters:
+ class-id: the class id that corresponds with the credit class you want to update
+ new-admin: the address to overwrite the current admin address`,
+ Args: cobra.ExactArgs(2),
+ RunE: func(cmd *cobra.Command, args []string) error {
+
+ if args[0] == "" {
+ return errors.New("class-id is required")
+ }
+ classID := args[0]
+
+ // check for the address
+ newAdmin := args[1]
+ if newAdmin == "" {
+ return errors.New("new admin address is required")
+ }
+
+ clientCtx, err := sdkclient.GetClientTxContext(cmd)
+ if err != nil {
+ return err
+ }
+
+ msg := ecocredit.MsgUpdateClassAdmin{
+ Admin: clientCtx.From,
+ ClassId: classID,
+ NewAdmin: newAdmin,
+ }
+
+ return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg)
+ },
+ })
+}
+
+func TxUpdateClassIssuersCmd() *cobra.Command {
+ return txflags(&cobra.Command{
+ Use: "update-class-issuers [class-id] [issuers]",
+ Short: "Update the list of issuers for a specific credit class",
+ Long: `Update the list of issuers for a specific credit class. the '--from' flag must equal the current credit class admin.
+
+Parameters:
+ class-id: the class id that corresponds with the credit class you want to update
+ issuers: the new list of issuers to replace the current issuers
+ eg: 'regen tx ecocredit update-class-issuers C01 addr1,addr2,addr3`,
+ Args: cobra.ExactArgs(2),
+ RunE: func(cmd *cobra.Command, args []string) error {
+
+ if args[0] == "" {
+ return errors.New("class-id is required")
+ }
+ classID := args[0]
+
+ // Parse the comma-separated list of issuers
+ issuers := strings.Split(args[1], ",")
+ for i := range issuers {
+ issuers[i] = strings.TrimSpace(issuers[i])
+ }
+
+ clientCtx, err := sdkclient.GetClientTxContext(cmd)
+ if err != nil {
+ return err
+ }
+
+ msg := ecocredit.MsgUpdateClassIssuers{
+ Admin: clientCtx.From,
+ ClassId: classID,
+ Issuers: issuers,
+ }
+
+ return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg)
+ },
+ })
+}
diff --git a/x/ecocredit/msgs.go b/x/ecocredit/msgs.go
index d0ec7bf6d7..01da66ddb7 100644
--- a/x/ecocredit/msgs.go
+++ b/x/ecocredit/msgs.go
@@ -9,10 +9,10 @@ import (
)
var (
- _, _, _, _, _ sdk.Msg = &MsgCreateClass{}, &MsgCreateBatch{}, &MsgSend{},
- &MsgRetire{}, &MsgCancel{}
- _, _, _, _, _ legacytx.LegacyMsg = &MsgCreateClass{}, &MsgCreateBatch{}, &MsgSend{},
- &MsgRetire{}, &MsgCancel{}
+ _, _, _, _, _, _, _, _ sdk.Msg = &MsgCreateClass{}, &MsgCreateBatch{}, &MsgSend{},
+ &MsgRetire{}, &MsgCancel{}, &MsgUpdateClassAdmin{}, &MsgUpdateClassIssuers{}, &MsgUpdateClassMetadata{}
+ _, _, _, _, _, _, _, _ legacytx.LegacyMsg = &MsgCreateClass{}, &MsgCreateBatch{}, &MsgSend{},
+ &MsgRetire{}, &MsgCancel{}, &MsgUpdateClassAdmin{}, &MsgUpdateClassIssuers{}, &MsgUpdateClassMetadata{}
)
// MaxMetadataLength defines the max length of the metadata bytes field
@@ -277,3 +277,100 @@ func (m *MsgCancel) GetSigners() []sdk.AccAddress {
addr, _ := sdk.AccAddressFromBech32(m.Holder)
return []sdk.AccAddress{addr}
}
+
+func (m MsgUpdateClassAdmin) Route() string { return sdk.MsgTypeURL(&m) }
+
+func (m MsgUpdateClassAdmin) Type() string { return sdk.MsgTypeURL(&m) }
+
+func (m MsgUpdateClassAdmin) GetSignBytes() []byte {
+ return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
+}
+
+func (m *MsgUpdateClassAdmin) ValidateBasic() error {
+ if m.Admin == m.NewAdmin {
+ return sdkerrors.ErrInvalidAddress.Wrap("new admin should be a different address from the signer")
+ }
+
+ if _, err := sdk.AccAddressFromBech32(m.Admin); err != nil {
+ return sdkerrors.ErrInvalidAddress
+ }
+
+ if _, err := sdk.AccAddressFromBech32(m.NewAdmin); err != nil {
+ return sdkerrors.ErrInvalidAddress
+ }
+
+ if err := ValidateClassID(m.ClassId); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *MsgUpdateClassAdmin) GetSigners() []sdk.AccAddress {
+ addr, _ := sdk.AccAddressFromBech32(m.Admin)
+ return []sdk.AccAddress{addr}
+}
+
+func (m MsgUpdateClassIssuers) Route() string { return sdk.MsgTypeURL(&m) }
+
+func (m MsgUpdateClassIssuers) Type() string { return sdk.MsgTypeURL(&m) }
+
+func (m MsgUpdateClassIssuers) GetSignBytes() []byte {
+ return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
+}
+
+func (m *MsgUpdateClassIssuers) ValidateBasic() error {
+ if _, err := sdk.AccAddressFromBech32(m.Admin); err != nil {
+ return sdkerrors.ErrInvalidAddress
+ }
+
+ if err := ValidateClassID(m.ClassId); err != nil {
+ return err
+ }
+
+ if len(m.Issuers) == 0 {
+ return sdkerrors.ErrInvalidRequest.Wrap("issuers cannot be empty")
+ }
+
+ for _, addr := range m.Issuers {
+ if _, err := sdk.AccAddressFromBech32(addr); err != nil {
+ return sdkerrors.ErrInvalidAddress
+ }
+ }
+
+ return nil
+}
+
+func (m *MsgUpdateClassIssuers) GetSigners() []sdk.AccAddress {
+ addr, _ := sdk.AccAddressFromBech32(m.Admin)
+ return []sdk.AccAddress{addr}
+}
+
+func (m MsgUpdateClassMetadata) Route() string { return sdk.MsgTypeURL(&m) }
+
+func (m MsgUpdateClassMetadata) Type() string { return sdk.MsgTypeURL(&m) }
+
+func (m MsgUpdateClassMetadata) GetSignBytes() []byte {
+ return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
+}
+
+func (m *MsgUpdateClassMetadata) ValidateBasic() error {
+ if _, err := sdk.AccAddressFromBech32(m.Admin); err != nil {
+ return sdkerrors.ErrInvalidAddress
+ }
+
+ if err := ValidateClassID(m.ClassId); err != nil {
+ return err
+ }
+
+ if len(m.Metadata) > MaxMetadataLength {
+ return ErrMaxLimit.Wrap("credit class metadata")
+ }
+
+ return nil
+}
+
+func (m *MsgUpdateClassMetadata) GetSigners() []sdk.AccAddress {
+ addr, _ := sdk.AccAddressFromBech32(m.Admin)
+ return []sdk.AccAddress{addr}
+}
diff --git a/x/ecocredit/msgs_test.go b/x/ecocredit/msgs_test.go
index 975f86e3e1..1141d87120 100644
--- a/x/ecocredit/msgs_test.go
+++ b/x/ecocredit/msgs_test.go
@@ -778,3 +778,128 @@ func TestMsgCancel(t *testing.T) {
})
}
}
+
+func TestMsgUpdateClassAdmin(t *testing.T) {
+ _, _, admin := testdata.KeyTestPubAddr()
+ _, _, newAdmin := testdata.KeyTestPubAddr()
+
+ tests := map[string]struct {
+ src MsgUpdateClassAdmin
+ expErr bool
+ }{
+ "valid": {
+ src: MsgUpdateClassAdmin{Admin: admin.String(), NewAdmin: newAdmin.String(), ClassId: "C01"},
+ expErr: false,
+ },
+ "invalid: same address": {
+ src: MsgUpdateClassAdmin{Admin: admin.String(), NewAdmin: admin.String(), ClassId: "C01"},
+ expErr: true,
+ },
+ "invalid: bad ClassID": {
+ src: MsgUpdateClassAdmin{Admin: admin.String(), NewAdmin: newAdmin.String(), ClassId: "asl;dfjkdjk???fgs;dfljgk"},
+ expErr: true,
+ },
+ "invalid: bad admin addr": {
+ src: MsgUpdateClassAdmin{Admin: "?!@%)(87", NewAdmin: newAdmin.String(), ClassId: "C02"},
+ expErr: true,
+ },
+ "invalid: bad NewAdmin addr": {
+ src: MsgUpdateClassAdmin{Admin: admin.String(), NewAdmin: "?!?@%?@$#6", ClassId: "C02"},
+ expErr: true,
+ },
+ }
+
+ for msg, test := range tests {
+ t.Run(msg, func(t *testing.T) {
+ err := test.src.ValidateBasic()
+ if test.expErr {
+ require.Error(t, err)
+ } else {
+ require.NoError(t, err)
+ }
+ })
+ }
+}
+
+func TestMsgUpdateClassIssuers(t *testing.T) {
+ _, _, a1 := testdata.KeyTestPubAddr()
+ _, _, a2 := testdata.KeyTestPubAddr()
+
+ tests := map[string]struct {
+ src MsgUpdateClassIssuers
+ expErr bool
+ }{
+ "valid": {
+ src: MsgUpdateClassIssuers{Admin: a2.String(), ClassId: "C01", Issuers: []string{a1.String()}},
+ expErr: false,
+ },
+ "invalid: no issuers": {
+ src: MsgUpdateClassIssuers{Admin: a2.String(), ClassId: "C01", Issuers: []string{}},
+ expErr: true,
+ },
+ "invalid: no class ID": {
+ src: MsgUpdateClassIssuers{Admin: a2.String(), ClassId: "", Issuers: []string{a1.String()}},
+ expErr: true,
+ },
+ "invalid: bad admin address": {
+ src: MsgUpdateClassIssuers{Admin: "//????.!", ClassId: "C01", Issuers: []string{a1.String()}},
+ expErr: true,
+ },
+ "invalid: bad class ID": {
+ src: MsgUpdateClassIssuers{Admin: a1.String(), ClassId: "s.1%?#%", Issuers: []string{a1.String()}},
+ expErr: true,
+ },
+ }
+
+ for msg, test := range tests {
+ t.Run(msg, func(t *testing.T) {
+ err := test.src.ValidateBasic()
+ if test.expErr {
+ require.Error(t, err)
+ } else {
+ require.NoError(t, err)
+ }
+ })
+ }
+}
+
+func TestMsgUpdateClassMetadata(t *testing.T) {
+ _, _, a1 := testdata.KeyTestPubAddr()
+
+ tests := map[string]struct {
+ src MsgUpdateClassMetadata
+ expErr bool
+ }{
+ "valid": {
+ src: MsgUpdateClassMetadata{Admin: a1.String(), ClassId: "C01", Metadata: []byte("hello world")},
+ expErr: false,
+ },
+ "invalid: bad admin address": {
+ src: MsgUpdateClassMetadata{Admin: "???a!#)(%", ClassId: "C01", Metadata: []byte("hello world")},
+ expErr: true,
+ },
+ "invalid: bad class ID": {
+ src: MsgUpdateClassMetadata{Admin: a1.String(), ClassId: "6012949", Metadata: []byte("hello world")},
+ expErr: true,
+ },
+ "invalid: no class ID": {
+ src: MsgUpdateClassMetadata{Admin: a1.String()},
+ expErr: true,
+ },
+ "invalid: metadata too large": {
+ src: MsgUpdateClassMetadata{Admin: a1.String(), ClassId: "C01", Metadata: []byte(simtypes.RandStringOfLength(r, 288))},
+ expErr: true,
+ },
+ }
+
+ for msg, test := range tests {
+ t.Run(msg, func(t *testing.T) {
+ err := test.src.ValidateBasic()
+ if test.expErr {
+ require.Error(t, err)
+ } else {
+ require.NoError(t, err)
+ }
+ })
+ }
+}
diff --git a/x/ecocredit/server/msg_server.go b/x/ecocredit/server/msg_server.go
index 61335da77c..70592893d4 100644
--- a/x/ecocredit/server/msg_server.go
+++ b/x/ecocredit/server/msg_server.go
@@ -453,6 +453,57 @@ func (s serverImpl) Cancel(goCtx context.Context, req *ecocredit.MsgCancel) (*ec
return &ecocredit.MsgCancelResponse{}, nil
}
+func (s serverImpl) UpdateClassAdmin(goCtx context.Context, req *ecocredit.MsgUpdateClassAdmin) (*ecocredit.MsgUpdateClassAdminResponse, error) {
+ ctx := types.UnwrapSDKContext(goCtx)
+ cInfo, err := s.getClassInfo(ctx, req.ClassId)
+ if err != nil {
+ return nil, err
+ }
+
+ if cInfo.Admin != req.Admin {
+ return nil, sdkerrors.ErrUnauthorized.Wrapf("you are not the administrator of this class")
+ }
+
+ cInfo.Admin = req.NewAdmin
+ err = s.classInfoTable.Update(ctx, cInfo)
+
+ return &ecocredit.MsgUpdateClassAdminResponse{}, err
+}
+
+func (s serverImpl) UpdateClassIssuers(goCtx context.Context, req *ecocredit.MsgUpdateClassIssuers) (*ecocredit.MsgUpdateClassIssuersResponse, error) {
+ ctx := types.UnwrapSDKContext(goCtx)
+ cInfo, err := s.getClassInfo(ctx, req.ClassId)
+ if err != nil {
+ return nil, err
+ }
+
+ if cInfo.Admin != req.Admin {
+ return nil, sdkerrors.ErrUnauthorized.Wrapf("you are not the administrator of this class")
+ }
+
+ cInfo.Issuers = req.Issuers
+ err = s.classInfoTable.Update(ctx, cInfo)
+
+ return &ecocredit.MsgUpdateClassIssuersResponse{}, err
+}
+
+func (s serverImpl) UpdateClassMetadata(goCtx context.Context, req *ecocredit.MsgUpdateClassMetadata) (*ecocredit.MsgUpdateClassMetadataResponse, error) {
+ ctx := types.UnwrapSDKContext(goCtx)
+ cInfo, err := s.getClassInfo(ctx, req.ClassId)
+ if err != nil {
+ return nil, err
+ }
+
+ if cInfo.Admin != req.Admin {
+ return nil, sdkerrors.ErrUnauthorized.Wrapf("you are not the administrator of this class")
+ }
+
+ cInfo.Metadata = req.Metadata
+ err = s.classInfoTable.Update(ctx, cInfo)
+
+ return &ecocredit.MsgUpdateClassMetadataResponse{}, err
+}
+
// nextBatchInClass gets the sequence number for the next batch in the credit
// class and updates the class info with the new batch number
func (s serverImpl) nextBatchInClass(ctx types.Context, classInfo *ecocredit.ClassInfo) (uint64, error) {
diff --git a/x/ecocredit/server/testsuite/suite.go b/x/ecocredit/server/testsuite/suite.go
index 7a380b95a6..13894aeec6 100644
--- a/x/ecocredit/server/testsuite/suite.go
+++ b/x/ecocredit/server/testsuite/suite.go
@@ -83,6 +83,168 @@ func (s *IntegrationTestSuite) fundAccount(addr sdk.AccAddress, amounts sdk.Coin
return s.bankKeeper.SendCoinsFromModuleToAccount(s.sdkCtx, minttypes.ModuleName, addr, amounts)
}
+func (s *IntegrationTestSuite) TestUpdateClassAdmin() {
+ admin := s.signers[0]
+ issuer1 := s.signers[1].String()
+ issuer2 := s.signers[2].String()
+ newAdmin := s.signers[3].String()
+
+ s.Require().NoError(s.fundAccount(admin, sdk.NewCoins(sdk.NewInt64Coin("stake", 4*ecocredit.DefaultCreditClassFeeTokens.Int64()))))
+ createClsRes, err := s.msgClient.CreateClass(s.ctx, &ecocredit.MsgCreateClass{Admin: admin.String(), Issuers: []string{issuer1, issuer2}, Metadata: nil, CreditTypeName: "carbon"})
+ s.Require().NoError(err)
+ s.Require().NotNil(createClsRes)
+ classID := createClsRes.ClassId
+
+ testCases := []struct {
+ name string
+ msg ecocredit.MsgUpdateClassAdmin
+ expErr bool
+ }{
+ {
+ name: "invalid: not admin",
+ msg: ecocredit.MsgUpdateClassAdmin{ClassId: classID, Admin: issuer1, NewAdmin: newAdmin},
+ expErr: true,
+ },
+ {
+ name: "invalid: bad classID",
+ msg: ecocredit.MsgUpdateClassAdmin{ClassId: "foobarbaz", Admin: admin.String(), NewAdmin: newAdmin},
+ expErr: true,
+ },
+ {
+ name: "valid",
+ msg: ecocredit.MsgUpdateClassAdmin{ClassId: classID, Admin: admin.String(), NewAdmin: newAdmin},
+ expErr: false,
+ },
+ }
+
+ for _, tc := range testCases {
+ s.Run(tc.name, func() {
+ updateRes, err := s.msgClient.UpdateClassAdmin(s.ctx, &tc.msg)
+ if tc.expErr {
+ s.Require().Error(err)
+ return
+ }
+
+ s.Require().NoError(err)
+ s.Require().NotNil(updateRes)
+
+ res, err := s.queryClient.ClassInfo(s.ctx, &ecocredit.QueryClassInfoRequest{ClassId: classID})
+ s.Require().NoError(err)
+ s.Require().NotNil(res)
+
+ s.Require().Equal(res.Info.Admin, newAdmin)
+ })
+ }
+}
+
+func (s *IntegrationTestSuite) TestUpdateClassIssuers() {
+ admin := s.signers[0]
+ issuer1 := s.signers[1].String()
+ issuer2 := s.signers[2].String()
+ issuer3 := s.signers[3].String()
+
+ s.Require().NoError(s.fundAccount(admin, sdk.NewCoins(sdk.NewInt64Coin("stake", 4*ecocredit.DefaultCreditClassFeeTokens.Int64()))))
+ createClsRes, err := s.msgClient.CreateClass(s.ctx, &ecocredit.MsgCreateClass{Admin: admin.String(), Issuers: []string{issuer1}, Metadata: nil, CreditTypeName: "carbon"})
+ s.Require().NoError(err)
+ s.Require().NotNil(createClsRes)
+ classID := createClsRes.ClassId
+
+ testCases := []struct {
+ name string
+ msg ecocredit.MsgUpdateClassIssuers
+ expErr bool
+ }{
+ {
+ name: "invalid: not admin",
+ msg: ecocredit.MsgUpdateClassIssuers{ClassId: classID, Admin: issuer1, Issuers: []string{issuer1}},
+ expErr: true,
+ },
+ {
+ name: "invalid: bad classID",
+ msg: ecocredit.MsgUpdateClassIssuers{ClassId: "foobarbaz", Admin: admin.String(), Issuers: []string{}},
+ expErr: true,
+ },
+ {
+ name: "valid",
+ msg: ecocredit.MsgUpdateClassIssuers{ClassId: classID, Admin: admin.String(), Issuers: []string{issuer2, issuer3}},
+ expErr: false,
+ },
+ }
+
+ for _, tc := range testCases {
+ s.Run(tc.name, func() {
+ updateRes, err := s.msgClient.UpdateClassIssuers(s.ctx, &tc.msg)
+ if tc.expErr {
+ s.Require().Error(err)
+ return
+ }
+
+ s.Require().NoError(err)
+ s.Require().NotNil(updateRes)
+
+ res, err := s.queryClient.ClassInfo(s.ctx, &ecocredit.QueryClassInfoRequest{ClassId: classID})
+ s.Require().NoError(err)
+ s.Require().NotNil(res)
+
+ s.Require().Equal(res.Info.Issuers, tc.msg.Issuers)
+
+ })
+ }
+}
+
+func (s *IntegrationTestSuite) TestUpdateClassMetadata() {
+ admin := s.signers[0]
+ issuer1 := s.signers[3].String()
+
+ s.Require().NoError(s.fundAccount(admin, sdk.NewCoins(sdk.NewInt64Coin("stake", 4*ecocredit.DefaultCreditClassFeeTokens.Int64()))))
+ createClsRes, err := s.msgClient.CreateClass(s.ctx, &ecocredit.MsgCreateClass{Admin: admin.String(), Issuers: []string{issuer1}, Metadata: nil, CreditTypeName: "carbon"})
+ s.Require().NoError(err)
+ s.Require().NotNil(createClsRes)
+ classID := createClsRes.ClassId
+
+ testCases := []struct {
+ name string
+ msg ecocredit.MsgUpdateClassMetadata
+ expErr bool
+ }{
+ {
+ name: "invalid: not admin",
+ msg: ecocredit.MsgUpdateClassMetadata{ClassId: classID, Admin: issuer1, Metadata: []byte("hello")},
+ expErr: true,
+ },
+ {
+ name: "invalid: bad classID",
+ msg: ecocredit.MsgUpdateClassMetadata{ClassId: "foobarbaz", Admin: admin.String()},
+ expErr: true,
+ },
+ {
+ name: "valid",
+ msg: ecocredit.MsgUpdateClassMetadata{ClassId: classID, Admin: admin.String(), Metadata: []byte("hello world")},
+ expErr: false,
+ },
+ }
+
+ for _, tc := range testCases {
+ s.Run(tc.name, func() {
+ updateRes, err := s.msgClient.UpdateClassMetadata(s.ctx, &tc.msg)
+ if tc.expErr {
+ s.Require().Error(err)
+ return
+ }
+
+ s.Require().NoError(err)
+ s.Require().NotNil(updateRes)
+
+ res, err := s.queryClient.ClassInfo(s.ctx, &ecocredit.QueryClassInfoRequest{ClassId: classID})
+ s.Require().NoError(err)
+ s.Require().NotNil(res)
+
+ s.Require().Equal(res.Info.Metadata, tc.msg.Metadata)
+
+ })
+ }
+}
+
func (s *IntegrationTestSuite) TestScenario() {
admin := s.signers[0]
issuer1 := s.signers[1].String()
@@ -810,4 +972,7 @@ func (s *IntegrationTestSuite) TestScenario() {
}
})
}
+
+ // reset the space to avoid corrupting other tests
+ s.paramSpace.Set(s.sdkCtx, ecocredit.KeyCreditTypes, ecocredit.DefaultParams().CreditTypes)
}
diff --git a/x/ecocredit/spec/protobuf.md b/x/ecocredit/spec/protobuf.md
index ca7a1331a4..6e0e0d0f8a 100644
--- a/x/ecocredit/spec/protobuf.md
+++ b/x/ecocredit/spec/protobuf.md
@@ -58,6 +58,12 @@
- [MsgSend](#regen.ecocredit.v1alpha1.MsgSend)
- [MsgSend.SendCredits](#regen.ecocredit.v1alpha1.MsgSend.SendCredits)
- [MsgSendResponse](#regen.ecocredit.v1alpha1.MsgSendResponse)
+ - [MsgUpdateClassAdmin](#regen.ecocredit.v1alpha1.MsgUpdateClassAdmin)
+ - [MsgUpdateClassAdminResponse](#regen.ecocredit.v1alpha1.MsgUpdateClassAdminResponse)
+ - [MsgUpdateClassIssuers](#regen.ecocredit.v1alpha1.MsgUpdateClassIssuers)
+ - [MsgUpdateClassIssuersResponse](#regen.ecocredit.v1alpha1.MsgUpdateClassIssuersResponse)
+ - [MsgUpdateClassMetadata](#regen.ecocredit.v1alpha1.MsgUpdateClassMetadata)
+ - [MsgUpdateClassMetadataResponse](#regen.ecocredit.v1alpha1.MsgUpdateClassMetadataResponse)
- [Msg](#regen.ecocredit.v1alpha1.Msg)
@@ -859,6 +865,87 @@ MsgSendResponse is the Msg/Send response type.
+
+
+
+### MsgUpdateClassAdmin
+MsgUpdateClassAdmin is the Msg/UpdateClassAdmin request type.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| admin | [string](#string) | | admin is the address of the account that is the admin of the credit class. |
+| class_id | [string](#string) | | class_id is the unique ID of the credit class. |
+| new_admin | [string](#string) | | new_admin is the address of the new admin of the credit class. |
+
+
+
+
+
+
+
+
+### MsgUpdateClassAdminResponse
+MsgUpdateClassAdminResponse is the MsgUpdateClassAdmin response type.
+
+
+
+
+
+
+
+
+### MsgUpdateClassIssuers
+MsgUpdateClassIssuers is the Msg/UpdateClassIssuers request type.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| admin | [string](#string) | | admin is the address of the account that is the admin of the credit class. |
+| class_id | [string](#string) | | class_id is the unique ID of the credit class. |
+| issuers | [string](#string) | repeated | issuers are the updated account addresses of the approved issuers. |
+
+
+
+
+
+
+
+
+### MsgUpdateClassIssuersResponse
+MsgUpdateClassIssuersResponse is the MsgUpdateClassIssuers response type.
+
+
+
+
+
+
+
+
+### MsgUpdateClassMetadata
+MsgUpdateClassMetadata is the Msg/UpdateClassMetadata request type.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| admin | [string](#string) | | admin is the address of the account that is the admin of the credit class. |
+| class_id | [string](#string) | | class_id is the unique ID of the credit class. |
+| metadata | [bytes](#bytes) | | metadata is the updated arbitrary metadata to be attached to the credit class. |
+
+
+
+
+
+
+
+
+### MsgUpdateClassMetadataResponse
+MsgUpdateClassMetadataResponse is the MsgUpdateClassMetadata response type.
+
+
+
+
+
@@ -878,6 +965,9 @@ Msg is the regen.ecocredit.v1alpha1 Msg service.
| Send | [MsgSend](#regen.ecocredit.v1alpha1.MsgSend) | [MsgSendResponse](#regen.ecocredit.v1alpha1.MsgSendResponse) | Send sends tradable credits from one account to another account. Sent credits can either be tradable or retired on receipt. |
| Retire | [MsgRetire](#regen.ecocredit.v1alpha1.MsgRetire) | [MsgRetireResponse](#regen.ecocredit.v1alpha1.MsgRetireResponse) | Retire retires a specified number of credits in the holder's account. |
| Cancel | [MsgCancel](#regen.ecocredit.v1alpha1.MsgCancel) | [MsgCancelResponse](#regen.ecocredit.v1alpha1.MsgCancelResponse) | 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 |
+| UpdateClassAdmin | [MsgUpdateClassAdmin](#regen.ecocredit.v1alpha1.MsgUpdateClassAdmin) | [MsgUpdateClassAdminResponse](#regen.ecocredit.v1alpha1.MsgUpdateClassAdminResponse) | UpdateClassAdmin updates the credit class admin |
+| UpdateClassIssuers | [MsgUpdateClassIssuers](#regen.ecocredit.v1alpha1.MsgUpdateClassIssuers) | [MsgUpdateClassIssuersResponse](#regen.ecocredit.v1alpha1.MsgUpdateClassIssuersResponse) | UpdateClassIssuers updates the credit class issuer list |
+| UpdateClassMetadata | [MsgUpdateClassMetadata](#regen.ecocredit.v1alpha1.MsgUpdateClassMetadata) | [MsgUpdateClassMetadataResponse](#regen.ecocredit.v1alpha1.MsgUpdateClassMetadataResponse) | UpdateClassMetadata updates the credit class metadata |
diff --git a/x/ecocredit/tx.pb.go b/x/ecocredit/tx.pb.go
index 2176634164..5d1ab9c141 100644
--- a/x/ecocredit/tx.pb.go
+++ b/x/ecocredit/tx.pb.go
@@ -882,6 +882,309 @@ func (m *MsgCancelResponse) XXX_DiscardUnknown() {
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")
@@ -897,62 +1200,77 @@ func init() {
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{
- // 794 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcd, 0x6e, 0xeb, 0x44,
- 0x14, 0xae, 0x93, 0xdc, 0xfc, 0x9c, 0x90, 0xf4, 0x5e, 0xdf, 0xab, 0xca, 0x58, 0x28, 0x4d, 0x53,
- 0x21, 0x5c, 0xa1, 0xda, 0xa4, 0x95, 0x90, 0x10, 0x0b, 0x44, 0x53, 0x89, 0x56, 0x25, 0x2c, 0x4c,
- 0x57, 0xdd, 0x44, 0x13, 0xfb, 0xe0, 0x18, 0x6c, 0x8f, 0x65, 0x4f, 0xa0, 0x7d, 0x01, 0x76, 0x48,
- 0x7d, 0x12, 0xd8, 0xf7, 0x09, 0x58, 0x76, 0x85, 0xd8, 0x81, 0xda, 0x15, 0x6f, 0x81, 0x3c, 0x33,
- 0x76, 0xe2, 0x22, 0x1a, 0x4b, 0x20, 0xdd, 0x4d, 0xdc, 0x73, 0xfc, 0x9d, 0x33, 0xdf, 0xf9, 0xe6,
- 0x9b, 0x71, 0x61, 0x2f, 0x41, 0x0f, 0x23, 0x0b, 0x1d, 0xea, 0x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0xe2, 0x2f, 0xd9, 0xc3, 0xbf, 0x03, 0x00, 0x00, 0xff,
+ 0xff, 0xfa, 0x8b, 0x29, 0x8b, 0xde, 0x0b, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -983,6 +1301,12 @@ type MsgClient interface {
// 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 {
@@ -1038,6 +1362,33 @@ func (c *msgClient) Cancel(ctx context.Context, in *MsgCancel, opts ...grpc.Call
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
@@ -1056,6 +1407,12 @@ type MsgServer interface {
// 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.
@@ -1077,6 +1434,15 @@ func (*UnimplementedMsgServer) Retire(ctx context.Context, req *MsgRetire) (*Msg
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)
@@ -1172,6 +1538,60 @@ func _Msg_Cancel_Handler(srv interface{}, ctx context.Context, dec func(interfac
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),
@@ -1196,6 +1616,18 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
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",
@@ -1790,10 +2222,213 @@ func (m *MsgCancelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
-func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
- offset -= sovTx(v)
- base := offset
- for v >= 1<<7 {
+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++
@@ -2069,38 +2704,130 @@ func (m *MsgCancelResponse) Size() (n int) {
return n
}
-func sovTx(x uint64) (n int) {
- return (math_bits.Len64(x|1) + 6) / 7
+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 sozTx(x uint64) (n int) {
- return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+
+func (m *MsgUpdateClassAdminResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ return n
}
-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")
+
+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))
}
- if fieldNum <= 0 {
+ }
+ 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 {
@@ -2201,10 +2928,650 @@ func (m *MsgCreateClass) Unmarshal(dAtA []byte) error {
if m.Metadata == nil {
m.Metadata = []byte{}
}
- iNdEx = postIndex
- case 4:
+ 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 {
+ return ErrInvalidLengthTx
+ }
+ if (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 {
+ return ErrInvalidLengthTx
+ }
+ if (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 {
+ return ErrInvalidLengthTx
+ }
+ if (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 {
+ return ErrInvalidLengthTx
+ }
+ if (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 CreditTypeName", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -2232,7 +3599,7 @@ func (m *MsgCreateClass) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.CreditTypeName = string(dAtA[iNdEx:postIndex])
+ m.BatchDenom = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -2258,7 +3625,7 @@ func (m *MsgCreateClass) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *MsgCreateClassResponse) Unmarshal(dAtA []byte) error {
+func (m *MsgSend) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -2281,15 +3648,15 @@ func (m *MsgCreateClassResponse) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: MsgCreateClassResponse: wiretype end group for non-group")
+ return fmt.Errorf("proto: MsgSend: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: MsgCreateClassResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ 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 ClassId", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -2317,7 +3684,73 @@ func (m *MsgCreateClassResponse) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.ClassId = string(dAtA[iNdEx:postIndex])
+ 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
@@ -2343,7 +3776,7 @@ func (m *MsgCreateClassResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *MsgCreateBatch) Unmarshal(dAtA []byte) error {
+func (m *MsgSend_SendCredits) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -2366,15 +3799,15 @@ func (m *MsgCreateBatch) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: MsgCreateBatch: wiretype end group for non-group")
+ return fmt.Errorf("proto: SendCredits: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: MsgCreateBatch: illegal tag %d (wire type %d)", fieldNum, wire)
+ 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 Issuer", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -2402,11 +3835,11 @@ func (m *MsgCreateBatch) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Issuer = string(dAtA[iNdEx:postIndex])
+ m.BatchDenom = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field TradableAmount", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -2434,13 +3867,13 @@ func (m *MsgCreateBatch) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.ClassId = string(dAtA[iNdEx:postIndex])
+ m.TradableAmount = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Issuance", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field RetiredAmount", wireType)
}
- var msglen int
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
@@ -2450,31 +3883,29 @@ func (m *MsgCreateBatch) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= int(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- if msglen < 0 {
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
return ErrInvalidLengthTx
}
- postIndex := iNdEx + msglen
+ postIndex := iNdEx + intStringLen
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
- }
+ m.RetiredAmount = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field RetirementLocation", wireType)
}
- var byteLen int
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
@@ -2484,31 +3915,135 @@ func (m *MsgCreateBatch) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- byteLen |= int(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- if byteLen < 0 {
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
return ErrInvalidLengthTx
}
- postIndex := iNdEx + byteLen
+ postIndex := iNdEx + intStringLen
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{}
- }
+ m.RetirementLocation = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
- case 5:
+ default:
+ iNdEx = preIndex
+ skippy, err := skipTx(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthTx
+ }
+ if (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 {
+ return ErrInvalidLengthTx
+ }
+ if (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 StartDate", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Holder", wireType)
}
- var msglen int
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
@@ -2518,31 +4053,27 @@ func (m *MsgCreateBatch) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= int(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- if msglen < 0 {
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
return ErrInvalidLengthTx
}
- postIndex := iNdEx + msglen
+ postIndex := iNdEx + intStringLen
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
- }
+ m.Holder = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
- case 6:
+ case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field EndDate", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Credits", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -2569,16 +4100,14 @@ func (m *MsgCreateBatch) Unmarshal(dAtA []byte) error {
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 {
+ 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 7:
+ case 3:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ProjectLocation", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -2606,7 +4135,7 @@ func (m *MsgCreateBatch) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.ProjectLocation = string(dAtA[iNdEx:postIndex])
+ m.Location = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -2632,7 +4161,7 @@ func (m *MsgCreateBatch) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *MsgCreateBatch_BatchIssuance) Unmarshal(dAtA []byte) error {
+func (m *MsgRetire_RetireCredits) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -2655,15 +4184,15 @@ func (m *MsgCreateBatch_BatchIssuance) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: BatchIssuance: wiretype end group for non-group")
+ return fmt.Errorf("proto: RetireCredits: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: BatchIssuance: illegal tag %d (wire type %d)", fieldNum, wire)
+ 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 Recipient", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -2691,75 +4220,11 @@ func (m *MsgCreateBatch_BatchIssuance) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Recipient = string(dAtA[iNdEx:postIndex])
+ 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)
+ return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -2787,7 +4252,7 @@ func (m *MsgCreateBatch_BatchIssuance) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.RetirementLocation = string(dAtA[iNdEx:postIndex])
+ m.Amount = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -2813,7 +4278,7 @@ func (m *MsgCreateBatch_BatchIssuance) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *MsgCreateBatchResponse) Unmarshal(dAtA []byte) error {
+func (m *MsgRetireResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -2836,44 +4301,12 @@ func (m *MsgCreateBatchResponse) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: MsgCreateBatchResponse: wiretype end group for non-group")
+ return fmt.Errorf("proto: MsgRetireResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: MsgCreateBatchResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: MsgRetireResponse: 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:])
@@ -2898,7 +4331,7 @@ func (m *MsgCreateBatchResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *MsgSend) Unmarshal(dAtA []byte) error {
+func (m *MsgCancel) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -2921,15 +4354,15 @@ func (m *MsgSend) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: MsgSend: wiretype end group for non-group")
+ return fmt.Errorf("proto: MsgCancel: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: MsgSend: illegal tag %d (wire type %d)", fieldNum, wire)
+ 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 Sender", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Holder", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -2957,41 +4390,9 @@ func (m *MsgSend) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Sender = string(dAtA[iNdEx:postIndex])
+ m.Holder = 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)
}
@@ -3020,7 +4421,7 @@ func (m *MsgSend) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Credits = append(m.Credits, &MsgSend_SendCredits{})
+ m.Credits = append(m.Credits, &MsgCancel_CancelCredits{})
if err := m.Credits[len(m.Credits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -3049,7 +4450,7 @@ func (m *MsgSend) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *MsgSend_SendCredits) Unmarshal(dAtA []byte) error {
+func (m *MsgCancel_CancelCredits) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -3072,79 +4473,15 @@ func (m *MsgSend_SendCredits) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: SendCredits: wiretype end group for non-group")
+ return fmt.Errorf("proto: CancelCredits: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: SendCredits: illegal tag %d (wire type %d)", fieldNum, wire)
+ 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 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)
+ return fmt.Errorf("proto: wrong wireType = %d for field BatchDenom", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -3172,11 +4509,11 @@ func (m *MsgSend_SendCredits) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.RetiredAmount = string(dAtA[iNdEx:postIndex])
+ m.BatchDenom = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
- case 4:
+ case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RetirementLocation", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -3204,7 +4541,7 @@ func (m *MsgSend_SendCredits) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.RetirementLocation = string(dAtA[iNdEx:postIndex])
+ m.Amount = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -3230,7 +4567,7 @@ func (m *MsgSend_SendCredits) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *MsgSendResponse) Unmarshal(dAtA []byte) error {
+func (m *MsgCancelResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -3253,10 +4590,10 @@ func (m *MsgSendResponse) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: MsgSendResponse: wiretype end group for non-group")
+ return fmt.Errorf("proto: MsgCancelResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: MsgSendResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: MsgCancelResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
@@ -3283,7 +4620,7 @@ func (m *MsgSendResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *MsgRetire) Unmarshal(dAtA []byte) error {
+func (m *MsgUpdateClassAdmin) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -3306,15 +4643,15 @@ func (m *MsgRetire) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: MsgRetire: wiretype end group for non-group")
+ return fmt.Errorf("proto: MsgUpdateClassAdmin: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: MsgRetire: illegal tag %d (wire type %d)", fieldNum, wire)
+ 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 Holder", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -3342,13 +4679,13 @@ func (m *MsgRetire) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Holder = string(dAtA[iNdEx:postIndex])
+ m.Admin = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Credits", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType)
}
- var msglen int
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
@@ -3358,29 +4695,27 @@ func (m *MsgRetire) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= int(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- if msglen < 0 {
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
return ErrInvalidLengthTx
}
- postIndex := iNdEx + msglen
+ postIndex := iNdEx + intStringLen
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
- }
+ m.ClassId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field NewAdmin", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -3408,7 +4743,7 @@ func (m *MsgRetire) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Location = string(dAtA[iNdEx:postIndex])
+ m.NewAdmin = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -3434,7 +4769,7 @@ func (m *MsgRetire) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *MsgRetire_RetireCredits) Unmarshal(dAtA []byte) error {
+func (m *MsgUpdateClassAdminResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -3457,15 +4792,68 @@ func (m *MsgRetire_RetireCredits) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: RetireCredits: wiretype end group for non-group")
+ return fmt.Errorf("proto: MsgUpdateClassAdminResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: RetireCredits: illegal tag %d (wire type %d)", fieldNum, wire)
+ 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 {
+ return ErrInvalidLengthTx
+ }
+ if (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 BatchDenom", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -3493,11 +4881,11 @@ func (m *MsgRetire_RetireCredits) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.BatchDenom = string(dAtA[iNdEx:postIndex])
+ m.Admin = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -3525,7 +4913,39 @@ func (m *MsgRetire_RetireCredits) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Amount = string(dAtA[iNdEx:postIndex])
+ 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
@@ -3551,7 +4971,7 @@ func (m *MsgRetire_RetireCredits) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *MsgRetireResponse) Unmarshal(dAtA []byte) error {
+func (m *MsgUpdateClassIssuersResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -3574,10 +4994,10 @@ func (m *MsgRetireResponse) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: MsgRetireResponse: wiretype end group for non-group")
+ return fmt.Errorf("proto: MsgUpdateClassIssuersResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: MsgRetireResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: MsgUpdateClassIssuersResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
@@ -3604,7 +5024,7 @@ func (m *MsgRetireResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *MsgCancel) Unmarshal(dAtA []byte) error {
+func (m *MsgUpdateClassMetadata) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -3627,15 +5047,15 @@ func (m *MsgCancel) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: MsgCancel: wiretype end group for non-group")
+ return fmt.Errorf("proto: MsgUpdateClassMetadata: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: MsgCancel: illegal tag %d (wire type %d)", fieldNum, wire)
+ 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 Holder", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -3663,98 +5083,11 @@ func (m *MsgCancel) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Holder = string(dAtA[iNdEx:postIndex])
+ m.Admin = 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 {
- return ErrInvalidLengthTx
- }
- if (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)
+ return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -3782,13 +5115,13 @@ func (m *MsgCancel_CancelCredits) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.BatchDenom = string(dAtA[iNdEx:postIndex])
+ m.ClassId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
- case 2:
+ case 3:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
}
- var stringLen uint64
+ var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
@@ -3798,23 +5131,25 @@ func (m *MsgCancel_CancelCredits) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= uint64(b&0x7F) << shift
+ byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
- intStringLen := int(stringLen)
- if intStringLen < 0 {
+ if byteLen < 0 {
return ErrInvalidLengthTx
}
- postIndex := iNdEx + intStringLen
+ postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthTx
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Amount = string(dAtA[iNdEx:postIndex])
+ m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...)
+ if m.Metadata == nil {
+ m.Metadata = []byte{}
+ }
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -3840,7 +5175,7 @@ func (m *MsgCancel_CancelCredits) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *MsgCancelResponse) Unmarshal(dAtA []byte) error {
+func (m *MsgUpdateClassMetadataResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -3863,10 +5198,10 @@ func (m *MsgCancelResponse) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: MsgCancelResponse: wiretype end group for non-group")
+ return fmt.Errorf("proto: MsgUpdateClassMetadataResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: MsgCancelResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: MsgUpdateClassMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default: