From 8f88e25af8fee9bbb1bdc014ceee84a97b16c958 Mon Sep 17 00:00:00 2001 From: harish Date: Wed, 27 Oct 2021 21:50:02 +0530 Subject: [PATCH 1/7] update: updated onft, denom proto definations, types --- client/cli/flags.go | 34 +- client/cli/query.go | 8 +- client/cli/tx.go | 31 +- client/rest/rest.go | 14 +- client/rest/tx.go | 22 +- exported/onft.go | 2 +- handler.go | 8 + keeper/collection.go | 1 + keeper/grpc_query.go | 14 +- keeper/keeper.go | 30 +- keeper/msg_server.go | 38 +- proto/onft/v1beta1/events.proto | 58 + proto/onft/v1beta1/onft.proto | 59 +- proto/onft/v1beta1/query.proto | 46 +- proto/onft/v1beta1/tx.proto | 62 +- .../base/query/v1beta1/pagination.proto | 49 + .../proto/cosmos/base/v1beta1/coin.proto | 40 + types/codec.go | 6 +- types/constants.go | 16 +- types/denom.go | 4 +- types/errors.go | 2 +- types/events.go | 2 + types/events.pb.go | 2321 +++++++++++++++++ types/keys.go | 20 +- types/msgs.go | 141 +- types/onft.go | 29 +- types/onft.pb.go | 667 ++++- types/query.pb.go | 565 +++- types/query.pb.gw.go | 146 +- types/tx.pb.go | 1520 +++++++++-- 30 files changed, 5393 insertions(+), 562 deletions(-) create mode 100644 proto/onft/v1beta1/events.proto create mode 100644 third_party/proto/cosmos/base/query/v1beta1/pagination.proto create mode 100644 third_party/proto/cosmos/base/v1beta1/coin.proto create mode 100644 types/events.pb.go diff --git a/client/cli/flags.go b/client/cli/flags.go index 3fb13d9..4d03c6d 100644 --- a/client/cli/flags.go +++ b/client/cli/flags.go @@ -5,17 +5,20 @@ import ( ) const ( - FlagONFTName = "name" - FlagONFTDescription = "description" - FlagONFTMediaURI = "media-uri" - FlagONFTPreviewURI = "preview-uri" - FlagONFTType = "type" - FlagTransferable = "transferable" - FlagRecipient = "recipient" - FlagOwner = "owner" - FlagDenomName = "name" - FlagDenom = "denom" - FlagSchema = "schema" + FlagONFTName = "name" + FlagONFTDescription = "description" + FlagONFTMediaURI = "media-uri" + FlagONFTPreviewURI = "preview-uri" + FlagONFTType = "type" + FlagTransferable = "transferable" + FlagExtensible = "extensible" + FlagRecipient = "recipient" + FlagOwner = "owner" + FlagDenomName = "name" + FlagDenom = "denom" + FlagSchema = "schema" + FlagDenomDescription = "description" + FlagDenomPreviewURI = "preview-uri" ) var ( @@ -23,13 +26,15 @@ var ( FsMintONFT = flag.NewFlagSet("", flag.ContinueOnError) FsEditONFT = flag.NewFlagSet("", flag.ContinueOnError) FsTransferONFT = flag.NewFlagSet("", flag.ContinueOnError) - FsQuerySupply = flag.NewFlagSet("", flag.ContinueOnError) - FsQueryOwner = flag.NewFlagSet("", flag.ContinueOnError) + FsQuerySupply = flag.NewFlagSet("", flag.ContinueOnError) + FsQueryOwner = flag.NewFlagSet("", flag.ContinueOnError) ) func init() { FsCreateDenom.String(FlagSchema, "", "Denom schema") FsCreateDenom.String(FlagDenomName, "", "Name of the denom") + FsCreateDenom.String(FlagDenomDescription, "", "Description for denom") + FsCreateDenom.String(FlagDenomPreviewURI, "", "Preview image uri for denom") FsMintONFT.String(FlagONFTMediaURI, "", "Media uri of onft") FsMintONFT.String(FlagRecipient, "", "Receiver of the onft. default value is sender address of transaction") @@ -46,7 +51,6 @@ func init() { FsEditONFT.String(FlagONFTType, "[do-not-modify]", "type of onft") FsEditONFT.String(FlagTransferable, "[do-not-modify]", "transferability of onft") - FsTransferONFT.String(FlagRecipient, "", "Receiver of the onft. default value is sender address of transaction") FsQuerySupply.String(FlagOwner, "", "The owner of a nft") -} \ No newline at end of file +} diff --git a/client/cli/query.go b/client/cli/query.go index 2a8305d..279eb04 100644 --- a/client/cli/query.go +++ b/client/cli/query.go @@ -64,7 +64,7 @@ $ %s query onft supply [denom-id]`, version.AppName)), queryClient := types.NewQueryClient(clientCtx) resp, err := queryClient.Supply(context.Background(), &types.QuerySupplyRequest{ - Denom: denomId, + DenomId: denomId, Owner: owner.String(), }) if err != nil { @@ -98,7 +98,7 @@ $ %s query onft collection `, version.AppName)), queryClient := types.NewQueryClient(clientCtx) resp, err := queryClient.Collection(context.Background(), &types.QueryCollectionRequest{ - Denom: denomId, + DenomId: denomId, }) if err != nil { return err @@ -160,7 +160,7 @@ $ %s query onft denom `, version.AppName)), queryClient := types.NewQueryClient(clientCtx) resp, err := queryClient.Denom(context.Background(), &types.QueryDenomRequest{ - Denom: denomId, + DenomId: denomId, }) if err != nil { return err @@ -193,7 +193,7 @@ $ %s query onft asset `, version.AppName)), queryClient := types.NewQueryClient(clientCtx) resp, err := queryClient.ONFT(context.Background(), &types.QueryONFTRequest{ - Denom: denomId, + DenomId: denomId, Id: onftId, }) if err != nil { diff --git a/client/cli/tx.go b/client/cli/tx.go index bf9571b..e02f904 100644 --- a/client/cli/tx.go +++ b/client/cli/tx.go @@ -61,10 +61,23 @@ $ %s tx onft create [symbol] --name= --schema= --chain-id= --name --description return fmt.Errorf("invalid onft type, valid types are artwork,audio,video") } transferable := true - transferability, err := cmd.Flags().GetString(FlagONFTType) + transferability, err := cmd.Flags().GetString(FlagTransferable) if err != nil { return err } @@ -176,6 +189,12 @@ $ %s tx onft mint [denom-id] --type --name --description if len(transferability) > 0 && (transferability == "no" || transferability == "false") { transferable = false } + extensible := true + extensibility, err := cmd.Flags().GetString(FlagTransferable) + extensibility = strings.ToLower(strings.TrimSpace(extensibility)) + if len(extensibility) > 0 && (extensibility == "no" || extensibility == "false") { + extensible = false + } msg := types.NewMsgMintONFT( denomId, sender, @@ -183,6 +202,7 @@ $ %s tx onft mint [denom-id] --type --name --description onftMetadata, onftType, transferable, + extensible, ) if err := msg.ValidateBasic(); err != nil { return err @@ -272,12 +292,21 @@ $ %s tx onft edit [denom-id] [onft-id] --name= --description= 0 && (extensible == "no" || extensible == "yes" || + extensible == types.DoNotModify)) { + return fmt.Errorf("invalid option for extensible flag , valid options are yes|no") + } msg := types.NewMsgEditONFT( onftId, denomId, onftMetadata, onftType, transferable, + extensible, clientCtx.GetFromAddress().String(), ) if err := msg.ValidateBasic(); err != nil { diff --git a/client/rest/rest.go b/client/rest/rest.go index 26355a0..ddeb0f4 100644 --- a/client/rest/rest.go +++ b/client/rest/rest.go @@ -20,11 +20,13 @@ const ( ) type createDenomReq struct { - BaseReq rest.BaseReq `json:"base_req"` - Sender sdk.AccAddress `json:"sender"` - Symbol string `json:"symbol"` - Name string `json:"name"` - Schema string `json:"schema"` + BaseReq rest.BaseReq `json:"base_req"` + Sender sdk.AccAddress `json:"sender"` + Symbol string `json:"symbol"` + Name string `json:"name"` + Schema string `json:"schema"` + Description string `json:"description"` + PreviewURI string `json:"preview_uri"` } type mintONFTReq struct { @@ -38,6 +40,7 @@ type mintONFTReq struct { PreviewURI string `json:"preview_uri"` Type string `json:"type"` Transferable string `json:"transferable"` + Extensible string `json:"extensible"` } type editONFTReq struct { @@ -49,6 +52,7 @@ type editONFTReq struct { PreviewURI string `json:"preview_uri"` Type string `json:"type"` Transferable string `json:"transferable"` + Extensible string `json:"extensible"` } type transferONFTReq struct { diff --git a/client/rest/tx.go b/client/rest/tx.go index e75adfe..dc6c79a 100644 --- a/client/rest/tx.go +++ b/client/rest/tx.go @@ -54,7 +54,14 @@ func createDenomHandlerFn(cliCtx client.Context) http.HandlerFunc { return } - msg := types.NewMsgCreateDenom(req.Symbol, req.Name, req.Schema, req.Sender.String()) + msg := types.NewMsgCreateDenom( + req.Symbol, + req.Name, + req.Schema, + req.Sender.String(), + req.Description, + req.PreviewURI, + ) if err := msg.ValidateBasic(); err != nil { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) return @@ -108,6 +115,11 @@ func mintONFTHandlerFn(cliCtx client.Context) http.HandlerFunc { if len(transferability) > 0 && (transferability == "no" || transferability == "false") { transferable = false } + extensible := true + extensibility := strings.ToLower(req.Extensible) + if len(extensibility) > 0 && (extensibility == "no" || extensibility == "false") { + extensible = false + } msg := types.NewMsgMintONFT( req.Denom, @@ -116,6 +128,7 @@ func mintONFTHandlerFn(cliCtx client.Context) http.HandlerFunc { metadata, onftType, transferable, + extensible, ) if err := msg.ValidateBasic(); err != nil { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) @@ -164,12 +177,19 @@ func editONFTHandlerFn(cliCtx client.Context) http.HandlerFunc { rest.WriteErrorResponse(w, http.StatusBadRequest, "invalid option for transferable flag , valid options are yes,no") return } + extensible := strings.ToLower(req.Extensible) + if len(extensible) > 0 && !(extensible == "no" || extensible == "yes" || + extensible == types.DoNotModify) { + rest.WriteErrorResponse(w, http.StatusBadRequest, "invalid option for extensible flag , valid options are yes,no") + return + } msg := types.NewMsgEditONFT( vars[RestParamONFTID], vars[RestParamDenom], metadata, onftType, transferable, + extensible, req.Sender.String(), ) if err := msg.ValidateBasic(); err != nil { diff --git a/exported/onft.go b/exported/onft.go index b39d0ea..b340bc5 100644 --- a/exported/onft.go +++ b/exported/onft.go @@ -14,6 +14,6 @@ type ONFT interface { GetPreviewURI() string GetType() string IsTransferable() bool + IsExtensible() bool GetCreatedTime() time.Time } - diff --git a/handler.go b/handler.go index adf5602..d20f265 100644 --- a/handler.go +++ b/handler.go @@ -19,6 +19,14 @@ func NewHandler(k keeper.Keeper) sdk.Handler { res, err := msgServer.CreateDenom(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) + case *types.MsgUpdateDenom: + res, err := msgServer.UpdateDenom(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) + + case *types.MsgTransferDenom: + res, err := msgServer.TransferDenom(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) + case *types.MsgMintONFT: res, err := msgServer.MintONFT(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) diff --git a/keeper/collection.go b/keeper/collection.go index 9613896..b44871a 100644 --- a/keeper/collection.go +++ b/keeper/collection.go @@ -32,6 +32,7 @@ func (k Keeper) SetCollection(ctx sdk.Context, collection types.Collection) erro metadata, aType, onft.IsTransferable(), + onft.IsExtensible(), onft.GetOwner(), onft.GetOwner(), ); err != nil { diff --git a/keeper/grpc_query.go b/keeper/grpc_query.go index 4f6e7fb..591f4fc 100644 --- a/keeper/grpc_query.go +++ b/keeper/grpc_query.go @@ -13,7 +13,7 @@ import ( var _ types.QueryServer = Keeper{} func (k Keeper) Supply(c context.Context, request *types.QuerySupplyRequest) (*types.QuerySupplyResponse, error) { - denom := strings.ToLower(strings.TrimSpace(request.Denom)) + denom := strings.ToLower(strings.TrimSpace(request.DenomId)) ctx := sdk.UnwrapSDKContext(c) var supply uint64 @@ -30,7 +30,7 @@ func (k Keeper) Supply(c context.Context, request *types.QuerySupplyRequest) (*t } func (k Keeper) Collection(c context.Context, request *types.QueryCollectionRequest) (*types.QueryCollectionResponse, error) { - denom := strings.ToLower(strings.TrimSpace(request.Denom)) + denom := strings.ToLower(strings.TrimSpace(request.DenomId)) ctx := sdk.UnwrapSDKContext(c) collection, err := k.GetCollection(ctx, denom) @@ -43,7 +43,7 @@ func (k Keeper) Collection(c context.Context, request *types.QueryCollectionRequ } func (k Keeper) Denom(c context.Context, request *types.QueryDenomRequest) (*types.QueryDenomResponse, error) { - denom := strings.ToLower(strings.TrimSpace(request.Denom)) + denom := strings.ToLower(strings.TrimSpace(request.DenomId)) ctx := sdk.UnwrapSDKContext(c) denomObject, err := k.GetDenom(ctx, denom) @@ -65,18 +65,18 @@ func (k Keeper) Denoms(c context.Context, request *types.QueryDenomsRequest) (*t } func (k Keeper) ONFT(c context.Context, request *types.QueryONFTRequest) (*types.QueryONFTResponse, error) { - denom := strings.ToLower(strings.TrimSpace(request.Denom)) + denom := strings.ToLower(strings.TrimSpace(request.DenomId)) onftID := strings.ToLower(strings.TrimSpace(request.Id)) ctx := sdk.UnwrapSDKContext(c) nft, err := k.GetONFT(ctx, denom, onftID) if err != nil { - return nil, sdkerrors.Wrapf(types.ErrUnknownONFT, "invalid ONFT %s from collection %s", request.Id, request.Denom) + return nil, sdkerrors.Wrapf(types.ErrUnknownONFT, "invalid ONFT %s from collection %s", request.Id, request.DenomId) } oNFT, ok := nft.(types.ONFT) if !ok { - return nil, sdkerrors.Wrapf(types.ErrUnknownONFT, "invalid type NFT %s from collection %s", request.Id, request.Denom) + return nil, sdkerrors.Wrapf(types.ErrUnknownONFT, "invalid type NFT %s from collection %s", request.Id, request.DenomId) } return &types.QueryONFTResponse{ @@ -84,7 +84,7 @@ func (k Keeper) ONFT(c context.Context, request *types.QueryONFTRequest) (*types }, nil } func (k Keeper) OwnerONFTs(c context.Context, request *types.QueryOwnerONFTsRequest) (*types.QueryOwnerONFTsResponse, error) { - denom := strings.ToLower(strings.TrimSpace(request.Denom)) + denom := strings.ToLower(strings.TrimSpace(request.DenomId)) ctx := sdk.UnwrapSDKContext(c) onfts := k.GetOwnerONFTs(ctx, denom, request.Owner) diff --git a/keeper/keeper.go b/keeper/keeper.go index 716323a..e343947 100644 --- a/keeper/keeper.go +++ b/keeper/keeper.go @@ -31,12 +31,21 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { func (k Keeper) CreateDenom(ctx sdk.Context, id, symbol, name, schema string, - creator sdk.AccAddress) error { - return k.SetDenom(ctx, types.NewDenom(id, symbol, name, schema, creator)) + creator sdk.AccAddress, description, previewUri string) error { + return k.SetDenom(ctx, types.NewDenom(id, symbol, name, schema, creator, description, previewUri)) +} +func (k Keeper) UpdateDenom(ctx sdk.Context) { + // TODO: Implement Update Denom keeper functionality +} + +func (k Keeper) TransferDenomOwner(ctx sdk.Context) { + // TODO: impletment transfer denom } -func (k Keeper) MintONFT(ctx sdk.Context, denomID, onftID string, metadata types.Metadata, assetType types.AssetType, - transferable bool, sender, recipient sdk.AccAddress) error { +func (k Keeper) MintONFT( + ctx sdk.Context, denomID, onftID string, + metadata types.Metadata, assetType types.AssetType, + transferable, extensible bool, sender, recipient sdk.AccAddress) error { if !k.HasPermissionToMint(ctx, denomID, sender) { return sdkerrors.Wrapf(types.ErrUnauthorized, "only creator of denom has permission to mint") } @@ -53,6 +62,7 @@ func (k Keeper) MintONFT(ctx sdk.Context, denomID, onftID string, metadata types metadata, assetType, transferable, + extensible, recipient, ctx.BlockHeader().Time, )) @@ -101,15 +111,19 @@ func (k Keeper) EditONFT(ctx sdk.Context, denomID, onftID string, metadata types return err } if denom.Creator != onft.Owner { - return sdkerrors.Wrapf(types.ErrNotEditable, "onft %s: transferability can be modified only when creator and owner of onft are equal.", onftID) + return sdkerrors.Wrapf( + types.ErrNotEditable, + "onft %s: transferability can be modified only when creator and owner of onft are equal.", + onftID, + ) } switch transferable := strings.ToLower(transferable); transferable { case "yes": - onft.TransferEnabled = true + onft.Transferable = true case "no": - onft.TransferEnabled = false + onft.Transferable = false default: - onft.TransferEnabled = true + onft.Transferable = true } } diff --git a/keeper/msg_server.go b/keeper/msg_server.go index 791e229..51bdff1 100644 --- a/keeper/msg_server.go +++ b/keeper/msg_server.go @@ -27,7 +27,15 @@ func (m msgServer) CreateDenom(goCtx context.Context, } ctx := sdk.UnwrapSDKContext(goCtx) - if err := m.Keeper.CreateDenom(ctx, msg.Id, msg.Symbol, msg.Name, msg.Schema, sender); err != nil { + if err := m.Keeper.CreateDenom(ctx, + msg.Id, + msg.Symbol, + msg.Name, + msg.Schema, + sender, + msg.Description, + msg.PreviewUri, + ); err != nil { return nil, err } @@ -49,6 +57,16 @@ func (m msgServer) CreateDenom(goCtx context.Context, return &types.MsgCreateDenomResponse{}, nil } +// TODO: update UpdateDenom function +func (m msgServer) UpdateDenom(goCtx context.Context, msg *types.MsgUpdateDenom) (*types.MsgUpdateDenomResponse, error) { + return &types.MsgUpdateDenomResponse{}, nil +} + +// TODO: Update TransferDenom function +func (m msgServer) TransferDenom(goCtx context.Context, msg *types.MsgTransferDenom) (*types.MsgTransferDenomResponse, error) { + return &types.MsgTransferDenomResponse{}, nil +} + func (m msgServer) MintONFT(goCtx context.Context, msg *types.MsgMintONFT) (*types.MsgMintONFTResponse, error) { sender, err := sdk.AccAddressFromBech32(msg.Sender) @@ -63,10 +81,12 @@ func (m msgServer) MintONFT(goCtx context.Context, ctx := sdk.UnwrapSDKContext(goCtx) if err := m.Keeper.MintONFT(ctx, - msg.Denom, msg.Id, + msg.DenomId, + msg.Id, msg.Metadata, msg.AssetType, msg.Transferable, + msg.Extensible, sender, recipient, ); err != nil { @@ -77,7 +97,7 @@ func (m msgServer) MintONFT(goCtx context.Context, sdk.NewEvent( types.EventTypeMintONFT, sdk.NewAttribute(types.AttributeKeyONFTID, msg.Id), - sdk.NewAttribute(types.AttributeKeyDenomID, msg.Denom), + sdk.NewAttribute(types.AttributeKeyDenomID, msg.DenomId), sdk.NewAttribute(types.AttributeKeyMediaURI, msg.Metadata.Media), sdk.NewAttribute(types.AttributeKeyRecipient, msg.Recipient), ), @@ -100,7 +120,7 @@ func (m msgServer) EditONFT(goCtx context.Context, } ctx := sdk.UnwrapSDKContext(goCtx) - if err := m.Keeper.EditONFT(ctx, msg.Denom, msg.Id, + if err := m.Keeper.EditONFT(ctx, msg.DenomId, msg.Id, msg.Metadata, msg.AssetType, msg.Transferable, @@ -113,7 +133,7 @@ func (m msgServer) EditONFT(goCtx context.Context, sdk.NewEvent( types.EventTypeEditONFT, sdk.NewAttribute(types.AttributeKeyONFTID, msg.Id), - sdk.NewAttribute(types.AttributeKeyDenomID, msg.Denom), + sdk.NewAttribute(types.AttributeKeyDenomID, msg.DenomId), sdk.NewAttribute(types.AttributeKeyMediaURI, msg.Metadata.Media), sdk.NewAttribute(types.AttributeKeyOwner, msg.Sender), ), @@ -140,7 +160,7 @@ func (m msgServer) TransferONFT(goCtx context.Context, } ctx := sdk.UnwrapSDKContext(goCtx) - if err := m.Keeper.TransferOwnership(ctx, msg.Denom, msg.Id, + if err := m.Keeper.TransferOwnership(ctx, msg.DenomId, msg.Id, sender, recipient, ); err != nil { @@ -151,7 +171,7 @@ func (m msgServer) TransferONFT(goCtx context.Context, sdk.NewEvent( types.EventTypeTransferONFT, sdk.NewAttribute(types.AttributeKeyONFTID, msg.Id), - sdk.NewAttribute(types.AttributeKeyDenomID, msg.Denom), + sdk.NewAttribute(types.AttributeKeyDenomID, msg.DenomId), sdk.NewAttribute(types.AttributeKeySender, msg.Sender), sdk.NewAttribute(types.AttributeKeyRecipient, msg.Recipient), ), @@ -174,14 +194,14 @@ func (m msgServer) BurnONFT(goCtx context.Context, } ctx := sdk.UnwrapSDKContext(goCtx) - if err := m.Keeper.BurnONFT(ctx, msg.Denom, msg.Id, sender); err != nil { + if err := m.Keeper.BurnONFT(ctx, msg.DenomId, msg.Id, sender); err != nil { return nil, err } ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeBurnONFT, - sdk.NewAttribute(types.AttributeKeyDenomID, msg.Denom), + sdk.NewAttribute(types.AttributeKeyDenomID, msg.DenomId), sdk.NewAttribute(types.AttributeKeyONFTID, msg.Id), sdk.NewAttribute(types.AttributeKeyOwner, msg.Sender), ), diff --git a/proto/onft/v1beta1/events.proto b/proto/onft/v1beta1/events.proto new file mode 100644 index 0000000..76efac3 --- /dev/null +++ b/proto/onft/v1beta1/events.proto @@ -0,0 +1,58 @@ +syntax = "proto3"; +package OmniFlix.onft.v1beta1; + +option go_package = "github.com/OmniFlix/onft/types"; + +// EventCreateDenom is emitted on Denom Creation +message EventCreateDenom { + string id = 1; + string symbol = 2; + string name = 3; + string creator = 4; +} + +// EventUpdateDenom is emitted on Denom Update +message EventUpdateDenom { + string id = 1; + string symbol = 2; + string name = 3; + string creator = 4; +} + +// EventTransferDenom is emitted on Denom Transfer +message EventTransferDenom { + string id = 1; + string symbol = 2; + string sender = 3; + string recipient = 4; +} + +// EventMintONFT is emitted on Mint +message EventMintONFT { + string denom_id = 1; + string id = 2; + string uri = 3; + string owner = 4; +} + +// EventEditONFT is emitted on Edit +message EventEditONFT { + string denom_id = 1; + string id = 2; + string owner = 3; +} + +// EventTransferONFT is emitted on Transfer +message EventTransferONFT { + string denom_id = 1; + string id = 2; + string sender = 3; + string recipient = 4; +} + +// EventBurnONFT is emitted on Burn +message EventBurnONFT { + string denom_id = 1; + string id = 2; + string owner = 3; +} diff --git a/proto/onft/v1beta1/onft.proto b/proto/onft/v1beta1/onft.proto index b9822d2..68577ed 100644 --- a/proto/onft/v1beta1/onft.proto +++ b/proto/onft/v1beta1/onft.proto @@ -7,7 +7,7 @@ import "google/protobuf/timestamp.proto"; option go_package = "github.com/OmniFlix/onft/types"; option (gogoproto.goproto_getters_all) = false; -//ASSETS or collections +// Collection message Collection { option (gogoproto.equal) = true; @@ -16,33 +16,39 @@ message Collection { } message IDCollection { - string denom = 1; - repeated string ids = 2; + option (gogoproto.equal) = true; + + string denom_id = 1 [(gogoproto.moretags) = "yaml:\"denom_id\""]; + repeated string onft_ids = 2 [(gogoproto.moretags) = "yaml:\"onft_ids\""]; } message Denom { option (gogoproto.equal) = true; - string id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; - string symbol = 2 [(gogoproto.moretags) = "yaml:\"symbol\""]; - string name = 3 [(gogoproto.moretags) = "yaml:\"name\""]; - string schema = 4 [(gogoproto.moretags) = "yaml:\"schema\""]; + string id = 1; + string symbol = 2; + string name = 3; + string schema = 4; string creator = 5; + string description = 6; + string preview_uri = 7 [(gogoproto.moretags) = "yaml:\"created_at\""]; } //ASSET or ONFT message ONFT { - option (gogoproto.equal) = true; - - string id = 1; - Metadata metadata = 2 [(gogoproto.nullable) = false]; - string owner = 3; - AssetType type = 4; - bool transfer_enabled = 5; - google.protobuf.Timestamp created = 6 [ + option (gogoproto.equal) = true; + + string id = 1; + Metadata metadata = 2 [(gogoproto.nullable) = false]; + string data = 3; + string owner = 4; + AssetType type = 5; + bool transferable = 6; + bool extensible = 7; + google.protobuf.Timestamp created_at = 8 [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true, - (gogoproto.moretags) = "yaml:\"created\"" + (gogoproto.moretags) = "yaml:\"created_at\"" ]; } @@ -53,14 +59,27 @@ enum AssetType { ARTWORK = 0; AUDIO = 1; VIDEO = 2; + DOCUMENT = 3; } message Metadata { option (gogoproto.equal) = true; - string name = 1 [(gogoproto.moretags) = "yaml:\"name\""]; - string description = 2 [(gogoproto.moretags) = "yaml:\"description\""]; - string preview = 3 [(gogoproto.moretags) = "yaml:\"preview\""]; - string media = 4 [(gogoproto.moretags) = "yaml:\"media\""]; + string name = 1; + string description = 2; + string preview = 3; + string media = 4; } + +// Entry defines a type of owner +message Entry { + option (gogoproto.equal) = true; + + string address = 1; + repeated IDCollection id_collections = 2 [ + (gogoproto.moretags) = "yaml:\"idcs\"", + (gogoproto.customname) = "IDCollections", + (gogoproto.nullable) = false + ]; +} \ No newline at end of file diff --git a/proto/onft/v1beta1/query.proto b/proto/onft/v1beta1/query.proto index 7301bf5..a04a7eb 100644 --- a/proto/onft/v1beta1/query.proto +++ b/proto/onft/v1beta1/query.proto @@ -4,57 +4,64 @@ package OmniFlix.onft.v1beta1; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "onft/v1beta1/onft.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; option go_package = "github.com/OmniFlix/onft/types"; service Query { rpc Collection(QueryCollectionRequest) returns (QueryCollectionResponse) { - option (google.api.http).get = "/omniflix/onft/v1beta1/collections/{denom}"; + option (google.api.http).get = "/omniflix/onft/v1beta1/collections/{denom_id}"; } rpc Denom(QueryDenomRequest) returns (QueryDenomResponse) { - option (google.api.http).get = "/omniflix/onft/v1beta1/denoms/{denom}"; + option (google.api.http).get = "/omniflix/onft/v1beta1/denoms/{denom_id}"; } rpc Denoms(QueryDenomsRequest) returns (QueryDenomsResponse) { option (google.api.http).get = "/omniflix/onft/v1beta1/denoms"; } rpc ONFT(QueryONFTRequest) returns (QueryONFTResponse) { - option (google.api.http).get = "/omniflix/onft/v1beta1/denoms/{denom}/onfts/{id}"; + option (google.api.http).get = "/omniflix/onft/v1beta1/denoms/{denom_id}/onfts/{id}"; } rpc OwnerONFTs(QueryOwnerONFTsRequest) returns (QueryOwnerONFTsResponse) { - option (google.api.http).get = "/omniflix/onft/v1beta1/onfts/{denom}/{owner}"; + option (google.api.http).get = "/omniflix/onft/v1beta1/onfts/{denom_id}/{owner}"; } rpc Supply(QuerySupplyRequest) returns (QuerySupplyResponse) { - option (google.api.http).get = "/omniflix/onft/v1beta1/denoms/{denom}/supply"; + option (google.api.http).get = "/omniflix/onft/v1beta1/denoms/{denom_id}/supply"; } } message QueryCollectionRequest { - string denom = 1; + string denom_id = 1 [(gogoproto.moretags) = "yaml:\"denom_id\""]; + cosmos.base.query.v1beta1.PageRequest pagination = 2; } message QueryCollectionResponse { - Collection collection = 1; + Collection collection = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; } message QueryDenomRequest { - string denom = 1; + string denom_id = 1 [(gogoproto.moretags) = "yaml:\"denom_id\""]; } message QueryDenomResponse { Denom denom = 1; } -message QueryDenomsRequest {} +message QueryDenomsRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} message QueryDenomsResponse { - repeated Denom denoms = 1 [(gogoproto.nullable) = false]; + repeated Denom denoms = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; } message QueryONFTRequest { - string denom = 1; - string id = 2; + string denom_id = 1 [(gogoproto.moretags) = "yaml:\"denom_id\""]; + string id = 2; } message QueryONFTResponse { @@ -63,18 +70,21 @@ message QueryONFTResponse { message QueryOwnerONFTsRequest { - string denom = 1; - string owner = 2; + string denom_id = 1 [(gogoproto.moretags) = "yaml:\"denom_id\""]; + string owner = 2; + cosmos.base.query.v1beta1.PageRequest pagination = 3; } message QueryOwnerONFTsResponse { - repeated ONFT onfts = 1; + repeated ONFT onfts = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; } + message QuerySupplyRequest { - string denom = 1; - string owner = 2; + string denom_id = 1 [(gogoproto.moretags) = "yaml:\"denom_id\""]; + string owner = 2; } message QuerySupplyResponse { uint64 amount = 1; -} \ No newline at end of file +} diff --git a/proto/onft/v1beta1/tx.proto b/proto/onft/v1beta1/tx.proto index f9773ca..c91a0eb 100644 --- a/proto/onft/v1beta1/tx.proto +++ b/proto/onft/v1beta1/tx.proto @@ -10,6 +10,10 @@ option (gogoproto.goproto_getters_all) = false; service Msg { rpc CreateDenom(MsgCreateDenom) returns (MsgCreateDenomResponse); + rpc UpdateDenom(MsgUpdateDenom) returns (MsgUpdateDenomResponse); + + rpc TransferDenom(MsgTransferDenom) returns (MsgTransferDenomResponse); + rpc MintONFT(MsgMintONFT) returns (MsgMintONFTResponse); rpc EditONFT(MsgEditONFT) returns (MsgEditONFTResponse); @@ -25,22 +29,48 @@ message MsgCreateDenom { string id = 1; string symbol = 2; string name = 3; - string schema = 4; - string sender = 5 [(gogoproto.moretags) = "yaml:\"sender\""]; + string description = 4; + string preview_uri = 5 [(gogoproto.moretags) = "yaml:\"preview_uri\""]; + string schema = 6; + string sender = 7; } message MsgCreateDenomResponse {} +message MsgUpdateDenom { + option (gogoproto.equal) = true; + + string id = 1; + string name = 2; + string description = 3; + string preview_uri = 4 [(gogoproto.moretags) = "yaml:\"preview_uri\""]; + string sender = 5; +} + +message MsgUpdateDenomResponse {} + +message MsgTransferDenom { + option (gogoproto.equal) = true; + + string id = 1; + string sender = 2; + string recipient = 3; +} + +message MsgTransferDenomResponse {} + message MsgMintONFT { option (gogoproto.equal) = true; string id = 1; - string denom = 2; + string denom_id = 2 [(gogoproto.moretags) = "yaml:\"denom_id\""]; Metadata metadata = 3 [(gogoproto.nullable) = false]; - AssetType assetType = 4; - bool transferable = 5; - string sender = 6 [(gogoproto.moretags) = "yaml:\"sender\""]; - string recipient = 7 [(gogoproto.moretags) = "yaml:\"recipient\""]; + string data = 4; + AssetType assetType = 5; + bool transferable = 6; + bool extensible = 7; + string sender = 8; + string recipient = 9; } message MsgMintONFTResponse {} @@ -49,22 +79,24 @@ message MsgTransferONFT { option (gogoproto.equal) = true; string id = 1; - string denom = 2; - string sender = 3 [(gogoproto.moretags) = "yaml:\"sender\""]; - string recipient = 4 [(gogoproto.moretags) = "yaml:\"recipient\""]; + string denom_id = 2 [(gogoproto.moretags) = "yaml:\"denom_id\""]; + string sender = 3; + string recipient = 4; } message MsgTransferONFTResponse {} + message MsgEditONFT { option (gogoproto.equal) = true; string id = 1; - string denom = 2; + string denom_id = 2 [(gogoproto.moretags) = "yaml:\"denom_id\""]; Metadata metadata = 3 [(gogoproto.nullable) = false]; string assetType = 4; string transferable = 5; - string sender = 6 [(gogoproto.moretags) = "yaml:\"sender\""]; + string extensible = 6; + string sender = 7; } message MsgEditONFTResponse {} @@ -73,8 +105,8 @@ message MsgBurnONFT { option (gogoproto.equal) = true; string id = 1; - string denom = 2; - string sender = 3 [(gogoproto.moretags) = "yaml:\"recipient\""]; + string denom_id = 2 [(gogoproto.moretags) = "yaml:\"denom_id\""]; + string sender = 3; } -message MsgBurnONFTResponse {} \ No newline at end of file +message MsgBurnONFTResponse {} diff --git a/third_party/proto/cosmos/base/query/v1beta1/pagination.proto b/third_party/proto/cosmos/base/query/v1beta1/pagination.proto new file mode 100644 index 0000000..b46c051 --- /dev/null +++ b/third_party/proto/cosmos/base/query/v1beta1/pagination.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; +package cosmos.base.query.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/types/query"; + +// PageRequest is to be embedded in gRPC request messages for efficient +// pagination. Ex: +// +// message SomeRequest { +// Foo some_parameter = 1; +// PageRequest page = 2; +// } +message PageRequest { + // key is a value returned in PageResponse.next_key to begin + // querying the next page most efficiently. Only one of offset or key + // should be set. + bytes key = 1; + + // offset is a numeric offset that can be used when key is unavailable. + // It is less efficient than using key. Only one of offset or key should + // be set. + uint64 offset = 2; + + // limit is the total number of results to be returned in the result page. + // If left empty it will default to a value to be set by each app. + uint64 limit = 3; + + // count_total is set to true to indicate that the result set should include + // a count of the total number of items available for pagination in UIs. count_total + // is only respected when offset is used. It is ignored when key is set. + bool count_total = 4; +} + +// PageResponse is to be embedded in gRPC response messages where the corresponding +// request message has used PageRequest +// +// message SomeResponse { +// repeated Bar results = 1; +// PageResponse page = 2; +// } +message PageResponse { + // next_key is the key to be passed to PageRequest.key to + // query the next page most efficiently + bytes next_key = 1; + + // total is total number of results available if PageRequest.count_total + // was set, its value is undefined otherwise + uint64 total = 2; +} diff --git a/third_party/proto/cosmos/base/v1beta1/coin.proto b/third_party/proto/cosmos/base/v1beta1/coin.proto new file mode 100644 index 0000000..fab7528 --- /dev/null +++ b/third_party/proto/cosmos/base/v1beta1/coin.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; +package cosmos.base.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/types"; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = false; + +// Coin defines a token with a denomination and an amount. +// +// NOTE: The amount field is an Int which implements the custom method +// signatures required by gogoproto. +message Coin { + option (gogoproto.equal) = true; + + string denom = 1; + string amount = 2 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; +} + +// DecCoin defines a token with a denomination and a decimal amount. +// +// NOTE: The amount field is an Dec which implements the custom method +// signatures required by gogoproto. +message DecCoin { + option (gogoproto.equal) = true; + + string denom = 1; + string amount = 2 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; +} + +// IntProto defines a Protobuf wrapper around an Int object. +message IntProto { + string int = 1 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; +} + +// DecProto defines a Protobuf wrapper around a Dec object. +message DecProto { + string dec = 1 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; +} diff --git a/types/codec.go b/types/codec.go index 4b03115..abc4694 100644 --- a/types/codec.go +++ b/types/codec.go @@ -12,6 +12,8 @@ import ( func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgCreateDenom{}, "OmniFlix/onft/MsgCreateDenom", nil) + cdc.RegisterConcrete(&MsgUpdateDenom{}, "OmniFlix/onft/MsgUpdateDenom", nil) + cdc.RegisterConcrete(&MsgTransferDenom{}, "OmniFlix/onft/MsgTransferDenom", nil) cdc.RegisterConcrete(&MsgTransferONFT{}, "OmniFlix/onft/MsgTransferONFT", nil) cdc.RegisterConcrete(&MsgEditONFT{}, "OmniFlix/onft/MsgEditONFT", nil) cdc.RegisterConcrete(&MsgMintONFT{}, "OmniFlix/onft/MsgMintONFT", nil) @@ -24,6 +26,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { func RegisterInterfaces(registry types.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgCreateDenom{}, + &MsgUpdateDenom{}, + &MsgTransferDenom{}, &MsgTransferONFT{}, &MsgEditONFT{}, &MsgMintONFT{}, @@ -67,4 +71,4 @@ func MustUnMarshalONFTID(cdc codec.BinaryCodec, value []byte) string { var onftIDWrap gogotypes.StringValue cdc.MustUnmarshal(value, &onftIDWrap) return onftIDWrap.Value -} \ No newline at end of file +} diff --git a/types/constants.go b/types/constants.go index 11ac79f..0f39706 100644 --- a/types/constants.go +++ b/types/constants.go @@ -1,9 +1,13 @@ package types const ( - DoNotModify = "[do-not-modify]" - MinDenomLen = 3 - MaxDenomLen = 64 - MaxPreviewURIlen = 256 - MaxMediaURILen = 256 -) \ No newline at end of file + MinDenomLen = 3 + MaxDenomLen = 64 + MinSymbolLen = 3 + MaxSymbolLen = 12 + MaxNameLen = 128 + MaxDescriptionLen = 1024 + MaxPreviewURILen = 256 + MaxMediaURILen = 256 + DoNotModify = "[do-not-modify]" +) diff --git a/types/denom.go b/types/denom.go index 8f8dde7..4824745 100644 --- a/types/denom.go +++ b/types/denom.go @@ -7,13 +7,15 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) -func NewDenom(id, symbol, name, schema string, creator sdk.AccAddress) Denom { +func NewDenom(id, symbol, name, schema string, creator sdk.AccAddress, description, previewUri string) Denom { return Denom{ Id: id, Symbol: symbol, Name: name, Schema: schema, Creator: creator.String(), + Description: description, + PreviewUri: previewUri, } } diff --git a/types/errors.go b/types/errors.go index 1906fae..15b0eeb 100644 --- a/types/errors.go +++ b/types/errors.go @@ -17,7 +17,7 @@ var ( ErrUnauthorized = sdkerrors.Register(ModuleName, 9, "unauthorized address") ErrInvalidDenom = sdkerrors.Register(ModuleName, 10, "invalid denom") ErrInvalidONFTID = sdkerrors.Register(ModuleName, 11, "invalid ID") - ErrInvalidONFTMETA = sdkerrors.Register(ModuleName, 12, "invalid metadata") + ErrInvalidONFTMeta = sdkerrors.Register(ModuleName, 12, "invalid metadata") ErrInvalidMediaURI = sdkerrors.Register(ModuleName, 13, "invalid media URI") ErrInvalidPreviewURI = sdkerrors.Register(ModuleName, 14, "invalid preview URI") ErrNotTransferable = sdkerrors.Register(ModuleName, 15, "onft is not transferable") diff --git a/types/events.go b/types/events.go index 5b7165c..2bd2492 100644 --- a/types/events.go +++ b/types/events.go @@ -2,6 +2,8 @@ package types var ( EventTypeCreateDenom = "create_denom" + EventTypeUpdateDenom = "update_denom" + EventTypeTransferDenom = "transfer_denom" EventTypeMintONFT = "mint_onft" EventTypeTransferONFT = "transfer_onft" EventTypeEditONFT = "edit_onft" diff --git a/types/events.pb.go b/types/events.pb.go new file mode 100644 index 0000000..82e7c4d --- /dev/null +++ b/types/events.pb.go @@ -0,0 +1,2321 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: onft/v1beta1/events.proto + +package types + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// EventCreateDenom is emitted on Denom Creation +type EventCreateDenom struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"` +} + +func (m *EventCreateDenom) Reset() { *m = EventCreateDenom{} } +func (m *EventCreateDenom) String() string { return proto.CompactTextString(m) } +func (*EventCreateDenom) ProtoMessage() {} +func (*EventCreateDenom) Descriptor() ([]byte, []int) { + return fileDescriptor_b4387dcba1ec9100, []int{0} +} +func (m *EventCreateDenom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventCreateDenom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventCreateDenom.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 *EventCreateDenom) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventCreateDenom.Merge(m, src) +} +func (m *EventCreateDenom) XXX_Size() int { + return m.Size() +} +func (m *EventCreateDenom) XXX_DiscardUnknown() { + xxx_messageInfo_EventCreateDenom.DiscardUnknown(m) +} + +var xxx_messageInfo_EventCreateDenom proto.InternalMessageInfo + +func (m *EventCreateDenom) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *EventCreateDenom) GetSymbol() string { + if m != nil { + return m.Symbol + } + return "" +} + +func (m *EventCreateDenom) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *EventCreateDenom) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +// EventUpdateDenom is emitted on Denom Update +type EventUpdateDenom struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"` +} + +func (m *EventUpdateDenom) Reset() { *m = EventUpdateDenom{} } +func (m *EventUpdateDenom) String() string { return proto.CompactTextString(m) } +func (*EventUpdateDenom) ProtoMessage() {} +func (*EventUpdateDenom) Descriptor() ([]byte, []int) { + return fileDescriptor_b4387dcba1ec9100, []int{1} +} +func (m *EventUpdateDenom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventUpdateDenom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventUpdateDenom.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 *EventUpdateDenom) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUpdateDenom.Merge(m, src) +} +func (m *EventUpdateDenom) XXX_Size() int { + return m.Size() +} +func (m *EventUpdateDenom) XXX_DiscardUnknown() { + xxx_messageInfo_EventUpdateDenom.DiscardUnknown(m) +} + +var xxx_messageInfo_EventUpdateDenom proto.InternalMessageInfo + +func (m *EventUpdateDenom) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *EventUpdateDenom) GetSymbol() string { + if m != nil { + return m.Symbol + } + return "" +} + +func (m *EventUpdateDenom) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *EventUpdateDenom) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +// EventTransferDenom is emitted on Denom Transfer +type EventTransferDenom struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` + Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` + Recipient string `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient,omitempty"` +} + +func (m *EventTransferDenom) Reset() { *m = EventTransferDenom{} } +func (m *EventTransferDenom) String() string { return proto.CompactTextString(m) } +func (*EventTransferDenom) ProtoMessage() {} +func (*EventTransferDenom) Descriptor() ([]byte, []int) { + return fileDescriptor_b4387dcba1ec9100, []int{2} +} +func (m *EventTransferDenom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventTransferDenom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventTransferDenom.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 *EventTransferDenom) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventTransferDenom.Merge(m, src) +} +func (m *EventTransferDenom) XXX_Size() int { + return m.Size() +} +func (m *EventTransferDenom) XXX_DiscardUnknown() { + xxx_messageInfo_EventTransferDenom.DiscardUnknown(m) +} + +var xxx_messageInfo_EventTransferDenom proto.InternalMessageInfo + +func (m *EventTransferDenom) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *EventTransferDenom) GetSymbol() string { + if m != nil { + return m.Symbol + } + return "" +} + +func (m *EventTransferDenom) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *EventTransferDenom) GetRecipient() string { + if m != nil { + return m.Recipient + } + return "" +} + +// EventMintONFT is emitted on Mint +type EventMintONFT struct { + DenomId string `protobuf:"bytes,1,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Uri string `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty"` + Owner string `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"` +} + +func (m *EventMintONFT) Reset() { *m = EventMintONFT{} } +func (m *EventMintONFT) String() string { return proto.CompactTextString(m) } +func (*EventMintONFT) ProtoMessage() {} +func (*EventMintONFT) Descriptor() ([]byte, []int) { + return fileDescriptor_b4387dcba1ec9100, []int{3} +} +func (m *EventMintONFT) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventMintONFT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventMintONFT.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 *EventMintONFT) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventMintONFT.Merge(m, src) +} +func (m *EventMintONFT) XXX_Size() int { + return m.Size() +} +func (m *EventMintONFT) XXX_DiscardUnknown() { + xxx_messageInfo_EventMintONFT.DiscardUnknown(m) +} + +var xxx_messageInfo_EventMintONFT proto.InternalMessageInfo + +func (m *EventMintONFT) GetDenomId() string { + if m != nil { + return m.DenomId + } + return "" +} + +func (m *EventMintONFT) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *EventMintONFT) GetUri() string { + if m != nil { + return m.Uri + } + return "" +} + +func (m *EventMintONFT) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +// EventEditONFT is emitted on Edit +type EventEditONFT struct { + DenomId string `protobuf:"bytes,1,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` +} + +func (m *EventEditONFT) Reset() { *m = EventEditONFT{} } +func (m *EventEditONFT) String() string { return proto.CompactTextString(m) } +func (*EventEditONFT) ProtoMessage() {} +func (*EventEditONFT) Descriptor() ([]byte, []int) { + return fileDescriptor_b4387dcba1ec9100, []int{4} +} +func (m *EventEditONFT) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventEditONFT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventEditONFT.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 *EventEditONFT) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventEditONFT.Merge(m, src) +} +func (m *EventEditONFT) XXX_Size() int { + return m.Size() +} +func (m *EventEditONFT) XXX_DiscardUnknown() { + xxx_messageInfo_EventEditONFT.DiscardUnknown(m) +} + +var xxx_messageInfo_EventEditONFT proto.InternalMessageInfo + +func (m *EventEditONFT) GetDenomId() string { + if m != nil { + return m.DenomId + } + return "" +} + +func (m *EventEditONFT) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *EventEditONFT) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +// EventTransferONFT is emitted on Transfer +type EventTransferONFT struct { + DenomId string `protobuf:"bytes,1,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` + Recipient string `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient,omitempty"` +} + +func (m *EventTransferONFT) Reset() { *m = EventTransferONFT{} } +func (m *EventTransferONFT) String() string { return proto.CompactTextString(m) } +func (*EventTransferONFT) ProtoMessage() {} +func (*EventTransferONFT) Descriptor() ([]byte, []int) { + return fileDescriptor_b4387dcba1ec9100, []int{5} +} +func (m *EventTransferONFT) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventTransferONFT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventTransferONFT.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 *EventTransferONFT) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventTransferONFT.Merge(m, src) +} +func (m *EventTransferONFT) XXX_Size() int { + return m.Size() +} +func (m *EventTransferONFT) XXX_DiscardUnknown() { + xxx_messageInfo_EventTransferONFT.DiscardUnknown(m) +} + +var xxx_messageInfo_EventTransferONFT proto.InternalMessageInfo + +func (m *EventTransferONFT) GetDenomId() string { + if m != nil { + return m.DenomId + } + return "" +} + +func (m *EventTransferONFT) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *EventTransferONFT) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *EventTransferONFT) GetRecipient() string { + if m != nil { + return m.Recipient + } + return "" +} + +// EventBurnONFT is emitted on Burn +type EventBurnONFT struct { + DenomId string `protobuf:"bytes,1,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` +} + +func (m *EventBurnONFT) Reset() { *m = EventBurnONFT{} } +func (m *EventBurnONFT) String() string { return proto.CompactTextString(m) } +func (*EventBurnONFT) ProtoMessage() {} +func (*EventBurnONFT) Descriptor() ([]byte, []int) { + return fileDescriptor_b4387dcba1ec9100, []int{6} +} +func (m *EventBurnONFT) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventBurnONFT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventBurnONFT.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 *EventBurnONFT) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventBurnONFT.Merge(m, src) +} +func (m *EventBurnONFT) XXX_Size() int { + return m.Size() +} +func (m *EventBurnONFT) XXX_DiscardUnknown() { + xxx_messageInfo_EventBurnONFT.DiscardUnknown(m) +} + +var xxx_messageInfo_EventBurnONFT proto.InternalMessageInfo + +func (m *EventBurnONFT) GetDenomId() string { + if m != nil { + return m.DenomId + } + return "" +} + +func (m *EventBurnONFT) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *EventBurnONFT) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func init() { + proto.RegisterType((*EventCreateDenom)(nil), "OmniFlix.onft.v1beta1.EventCreateDenom") + proto.RegisterType((*EventUpdateDenom)(nil), "OmniFlix.onft.v1beta1.EventUpdateDenom") + proto.RegisterType((*EventTransferDenom)(nil), "OmniFlix.onft.v1beta1.EventTransferDenom") + proto.RegisterType((*EventMintONFT)(nil), "OmniFlix.onft.v1beta1.EventMintONFT") + proto.RegisterType((*EventEditONFT)(nil), "OmniFlix.onft.v1beta1.EventEditONFT") + proto.RegisterType((*EventTransferONFT)(nil), "OmniFlix.onft.v1beta1.EventTransferONFT") + proto.RegisterType((*EventBurnONFT)(nil), "OmniFlix.onft.v1beta1.EventBurnONFT") +} + +func init() { proto.RegisterFile("onft/v1beta1/events.proto", fileDescriptor_b4387dcba1ec9100) } + +var fileDescriptor_b4387dcba1ec9100 = []byte{ + // 334 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x93, 0xc1, 0x4a, 0xc3, 0x40, + 0x10, 0x86, 0x9b, 0xb4, 0xb6, 0x76, 0x40, 0xa9, 0x8b, 0x4a, 0x0a, 0xb2, 0x48, 0x4f, 0x9e, 0x12, + 0x8a, 0x17, 0xcf, 0xd5, 0x16, 0x3c, 0x68, 0x45, 0xea, 0xc5, 0x8b, 0x24, 0xdd, 0xa9, 0x5d, 0x68, + 0x76, 0xc3, 0x66, 0x5b, 0xed, 0x5b, 0xf8, 0x58, 0x1e, 0x7b, 0xf4, 0x28, 0xed, 0x8b, 0x48, 0xd6, + 0x4d, 0xd4, 0x63, 0x44, 0x6f, 0xf3, 0xff, 0x0c, 0xff, 0x37, 0x33, 0x30, 0xd0, 0x96, 0x62, 0xa2, + 0x83, 0x45, 0x37, 0x42, 0x1d, 0x76, 0x03, 0x5c, 0xa0, 0xd0, 0xa9, 0x9f, 0x28, 0xa9, 0x25, 0x39, + 0x18, 0xc6, 0x82, 0x0f, 0x66, 0xfc, 0xd9, 0xcf, 0x7a, 0x7c, 0xdb, 0xd3, 0x99, 0x42, 0xab, 0x9f, + 0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0x43, 0x2b, 0xf7, 0xf4, 0x91, 0xeb, 0xe9, 0x3c, 0xf2, + 0xc7, 0x32, 0x0e, 0xf2, 0x0f, 0x08, 0xcc, 0x97, 0xe8, 0x65, 0x82, 0x69, 0x54, 0x37, 0xdf, 0x71, + 0xfa, 0x11, 0x00, 0x00, 0xff, 0xff, 0xee, 0x6b, 0x26, 0x3d, 0x3a, 0x03, 0x00, 0x00, +} + +func (m *EventCreateDenom) 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 *EventCreateDenom) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventCreateDenom) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0x22 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x1a + } + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Symbol))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventUpdateDenom) 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 *EventUpdateDenom) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventUpdateDenom) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0x22 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x1a + } + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Symbol))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventTransferDenom) 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 *EventTransferDenom) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventTransferDenom) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Recipient) > 0 { + i -= len(m.Recipient) + copy(dAtA[i:], m.Recipient) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Recipient))) + i-- + dAtA[i] = 0x22 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x1a + } + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Symbol))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventMintONFT) 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 *EventMintONFT) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventMintONFT) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x22 + } + if len(m.Uri) > 0 { + i -= len(m.Uri) + copy(dAtA[i:], m.Uri) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Uri))) + i-- + dAtA[i] = 0x1a + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0x12 + } + if len(m.DenomId) > 0 { + i -= len(m.DenomId) + copy(dAtA[i:], m.DenomId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DenomId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventEditONFT) 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 *EventEditONFT) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventEditONFT) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x1a + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0x12 + } + if len(m.DenomId) > 0 { + i -= len(m.DenomId) + copy(dAtA[i:], m.DenomId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DenomId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventTransferONFT) 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 *EventTransferONFT) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventTransferONFT) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Recipient) > 0 { + i -= len(m.Recipient) + copy(dAtA[i:], m.Recipient) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Recipient))) + i-- + dAtA[i] = 0x22 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x1a + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0x12 + } + if len(m.DenomId) > 0 { + i -= len(m.DenomId) + copy(dAtA[i:], m.DenomId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DenomId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventBurnONFT) 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 *EventBurnONFT) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventBurnONFT) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x1a + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0x12 + } + if len(m.DenomId) > 0 { + i -= len(m.DenomId) + copy(dAtA[i:], m.DenomId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DenomId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventCreateDenom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Symbol) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventUpdateDenom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Symbol) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventTransferDenom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Symbol) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Recipient) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventMintONFT) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DenomId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Id) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Uri) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventEditONFT) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DenomId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Id) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventTransferONFT) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DenomId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Id) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Recipient) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventBurnONFT) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DenomId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Id) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func sovEvents(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventCreateDenom) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventCreateDenom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventCreateDenom: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventUpdateDenom) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventUpdateDenom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventUpdateDenom: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventTransferDenom) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventTransferDenom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventTransferDenom: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Recipient = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventMintONFT) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventMintONFT: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventMintONFT: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DenomId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DenomId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Uri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventEditONFT) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventEditONFT: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventEditONFT: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DenomId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DenomId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventTransferONFT) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventTransferONFT: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventTransferONFT: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DenomId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DenomId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Recipient = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventBurnONFT) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventBurnONFT: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventBurnONFT: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DenomId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DenomId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvents(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvents + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvents + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvents + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/keys.go b/types/keys.go index 770cc9c..0b9d010 100644 --- a/types/keys.go +++ b/types/keys.go @@ -8,19 +8,19 @@ import ( ) const ( - ModuleName = "onft" - StoreKey = ModuleName - MemStoreKey = "mem_capability" + ModuleName = "onft" + StoreKey = ModuleName + MemStoreKey = "mem_capability" QuerierRoute = ModuleName - RouterKey = ModuleName + RouterKey = ModuleName ) var ( - PrefixONFT = []byte{0x01} - PrefixOwners = []byte{0x02} // key for a owner - PrefixCollection = []byte{0x03} // key for balance of oNFTs held by the denom - PrefixDenom = []byte{0x04} // key for denom of the onft - PrefixDenomSymbol = []byte{0x05} // key for denom symbol of the onft + PrefixONFT = []byte{0x01} + PrefixOwners = []byte{0x02} + PrefixCollection = []byte{0x03} + PrefixDenom = []byte{0x04} + PrefixDenomSymbol = []byte{0x05} delimiter = []byte("/") ) @@ -83,4 +83,4 @@ func KeyDenomID(id string) []byte { func KeyDenomSymbol(symbol string) []byte { key := append(PrefixDenomSymbol, delimiter...) return append(key, []byte(symbol)...) -} \ No newline at end of file +} diff --git a/types/msgs.go b/types/msgs.go index 3527d84..b803040 100644 --- a/types/msgs.go +++ b/types/msgs.go @@ -8,28 +8,34 @@ import ( ) const ( - TypeMsgCreateDenom = "create_denom" - TypeMsgMintONFT = "mint_onft" - TypeMsgEditONFT = "edit_onft" - TypeMsgTransferONFT = "transfer_onft" - TypeMsgBurnONFT = "burn_onft" + TypeMsgCreateDenom = "create_denom" + TypeMsgUpdateDenom = "update_denom" + TypeMsgTransferDenom = "transfer_denom" + TypeMsgMintONFT = "mint_onft" + TypeMsgEditONFT = "edit_onft" + TypeMsgTransferONFT = "transfer_onft" + TypeMsgBurnONFT = "burn_onft" ) var ( _ sdk.Msg = &MsgCreateDenom{} + _ sdk.Msg = &MsgUpdateDenom{} + _ sdk.Msg = &MsgTransferDenom{} _ sdk.Msg = &MsgMintONFT{} _ sdk.Msg = &MsgEditONFT{} _ sdk.Msg = &MsgTransferONFT{} _ sdk.Msg = &MsgBurnONFT{} ) -func NewMsgCreateDenom(symbol, name, schema, sender string) *MsgCreateDenom { +func NewMsgCreateDenom(symbol, name, schema, description, previewUri, sender string) *MsgCreateDenom { return &MsgCreateDenom{ - Sender: sender, - Id: GenUniqueID("onftdenom"), - Symbol: symbol, - Name: name, - Schema: schema, + Sender: sender, + Id: GenUniqueID("onftdenom"), + Symbol: symbol, + Name: name, + Schema: schema, + Description: description, + PreviewUri: previewUri, } } @@ -69,14 +75,96 @@ func (msg MsgCreateDenom) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{from} } -func NewMsgMintONFT(denom, sender, recipient string, metadata Metadata, assetType AssetType, transferable bool) *MsgMintONFT { +func NewMsgUpdateDenom(id, name, description, previewUri, sender string) *MsgUpdateDenom { + return &MsgUpdateDenom{ + Id: id, + Name: name, + Description: description, + PreviewUri: previewUri, + Sender: sender, + } +} + +func (msg MsgUpdateDenom) Route() string { return RouterKey } + +func (msg MsgUpdateDenom) Type() string { return TypeMsgUpdateDenom } + +func (msg MsgUpdateDenom) ValidateBasic() error { + if err := ValidateDenomID(msg.Id); err != nil { + return err + } + name := strings.TrimSpace(msg.Name) + if len(name) > 0 && !utf8.ValidString(name) { + return sdkerrors.Wrap(ErrInvalidDenom, "denom name is invalid") + } + + if _, err := sdk.AccAddressFromBech32(msg.Sender); err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid sender address (%s)", err) + } + return nil +} + +// GetSignBytes Implements Msg. +func (msg MsgUpdateDenom) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(&msg) + return sdk.MustSortJSON(bz) +} + +func (msg MsgUpdateDenom) GetSigners() []sdk.AccAddress { + from, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{from} +} + +func NewMsgTransferDenom(id, denomId, sender, recipient string) *MsgTransferDenom { + return &MsgTransferDenom{ + Id: id, + Sender: sender, + Recipient: recipient, + } +} + +func (msg MsgTransferDenom) Route() string { return RouterKey } + +func (msg MsgTransferDenom) Type() string { return TypeMsgTransferDenom } + +func (msg MsgTransferDenom) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Sender); err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid sender address; %s", err) + } + + if _, err := sdk.AccAddressFromBech32(msg.Recipient); err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid recipient address; %s", err) + } + return ValidateDenomID(msg.Id) +} + +func (msg MsgTransferDenom) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(&msg) + return sdk.MustSortJSON(bz) +} + +func (msg MsgTransferDenom) GetSigners() []sdk.AccAddress { + from, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{from} +} + +func NewMsgMintONFT( + denomId, sender, recipient string, metadata Metadata, + assetType AssetType, transferable, extensible bool) *MsgMintONFT { return &MsgMintONFT{ Id: GenUniqueID("onft"), - Denom: denom, + DenomId: denomId, Metadata: metadata, AssetType: assetType, Transferable: transferable, + Extensible: extensible, Sender: sender, Recipient: recipient, } @@ -96,7 +184,7 @@ func (msg MsgMintONFT) ValidateBasic() error { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid recipient address; %s", err) } - if err := ValidateDenomID(msg.Denom); err != nil { + if err := ValidateDenomID(msg.DenomId); err != nil { return err } @@ -120,11 +208,11 @@ func (msg MsgMintONFT) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{from} } -func NewMsgTransferONFT(id, denom, sender, recipient string) *MsgTransferONFT { +func NewMsgTransferONFT(id, denomId, sender, recipient string) *MsgTransferONFT { return &MsgTransferONFT{ Id: strings.ToLower(strings.TrimSpace(id)), - Denom: strings.TrimSpace(denom), + DenomId: strings.TrimSpace(denomId), Sender: sender, Recipient: recipient, } @@ -135,7 +223,7 @@ func (msg MsgTransferONFT) Route() string { return RouterKey } func (msg MsgTransferONFT) Type() string { return TypeMsgTransferONFT } func (msg MsgTransferONFT) ValidateBasic() error { - if err := ValidateDenomID(msg.Denom); err != nil { + if err := ValidateDenomID(msg.DenomId); err != nil { return err } @@ -162,13 +250,16 @@ func (msg MsgTransferONFT) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{from} } -func NewMsgEditONFT(id, denom string, metadata Metadata, assetType, transferable, sender string) *MsgEditONFT { +func NewMsgEditONFT( + id, denomId string, metadata Metadata, assetType, + transferable, extensible, sender string) *MsgEditONFT { return &MsgEditONFT{ Id: id, - Denom: denom, + DenomId: denomId, Metadata: metadata, AssetType: assetType, Transferable: transferable, + Extensible: extensible, Sender: sender, } } @@ -182,7 +273,7 @@ func (msg MsgEditONFT) ValidateBasic() error { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid sender address; %s", err) } - if err := ValidateDenomID(msg.Denom); err != nil { + if err := ValidateDenomID(msg.DenomId); err != nil { return err } @@ -205,11 +296,11 @@ func (msg MsgEditONFT) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{from} } -func NewMsgBurnONFT(denom, id, sender string) *MsgBurnONFT { +func NewMsgBurnONFT(denomId, id, sender string) *MsgBurnONFT { return &MsgBurnONFT{ - Denom: denom, - Id: id, - Sender: sender, + DenomId: denomId, + Id: id, + Sender: sender, } } @@ -222,7 +313,7 @@ func (msg MsgBurnONFT) ValidateBasic() error { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid sender address; %s", err) } - if err := ValidateDenomID(msg.Denom); err != nil { + if err := ValidateDenomID(msg.DenomId); err != nil { return err } return ValidateONFTID(msg.Id) diff --git a/types/onft.go b/types/onft.go index 9dfdbc2..30dc218 100644 --- a/types/onft.go +++ b/types/onft.go @@ -12,14 +12,18 @@ import ( var _ exported.ONFT = ONFT{} -func NewONFT(id string, metadata Metadata, assetType AssetType, transferable bool, owner sdk.AccAddress, createdTime time.Time) ONFT { +func NewONFT( + id string, metadata Metadata, assetType AssetType, + transferable, extensible bool, owner sdk.AccAddress, + createdTime time.Time) ONFT { return ONFT{ - Id: strings.ToLower(strings.TrimSpace(id)), - Metadata: metadata, - Type: assetType, - Owner: owner.String(), - TransferEnabled: transferable, - Created: createdTime, + Id: id, + Metadata: metadata, + Type: assetType, + Owner: owner.String(), + Transferable: transferable, + Extensible: extensible, + CreatedAt: createdTime, } } @@ -56,10 +60,13 @@ func (onft ONFT) GetType() string { return onft.Type.String() } func (onft ONFT) IsTransferable() bool { - return onft.TransferEnabled + return onft.Transferable +} +func (onft ONFT) IsExtensible() bool { + return onft.Extensible } func (onft ONFT) GetCreatedTime() time.Time { - return onft.Created + return onft.CreatedAt } // ONFT @@ -92,8 +99,8 @@ func ValidateMediaURI(mediaURI string) error { } func ValidatePreviewURI(previewURI string) error { - if len(previewURI) > MaxPreviewURIlen { - return sdkerrors.Wrapf(ErrInvalidPreviewURI, "invalid previewURI %s, only accepts value [0, %d]", previewURI, MaxPreviewURIlen) + if len(previewURI) > MaxPreviewURILen { + return sdkerrors.Wrapf(ErrInvalidPreviewURI, "invalid previewURI %s, only accepts value [0, %d]", previewURI, MaxPreviewURILen) } return nil } diff --git a/types/onft.pb.go b/types/onft.pb.go index 07af4af..0df0253 100644 --- a/types/onft.pb.go +++ b/types/onft.pb.go @@ -30,21 +30,24 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type AssetType int32 const ( - ARTWORK AssetType = 0 - AUDIO AssetType = 1 - VIDEO AssetType = 2 + ARTWORK AssetType = 0 + AUDIO AssetType = 1 + VIDEO AssetType = 2 + DOCUMENT AssetType = 3 ) var AssetType_name = map[int32]string{ 0: "ARTWORK", 1: "AUDIO", 2: "VIDEO", + 3: "DOCUMENT", } var AssetType_value = map[string]int32{ - "ARTWORK": 0, - "AUDIO": 1, - "VIDEO": 2, + "ARTWORK": 0, + "AUDIO": 1, + "VIDEO": 2, + "DOCUMENT": 3, } func (x AssetType) String() string { @@ -55,7 +58,7 @@ func (AssetType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_651c3270ad840fa5, []int{0} } -//ASSETS or collections +// Collection type Collection struct { Denom Denom `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom"` ONFTs []ONFT `protobuf:"bytes,2,rep,name=onfts,proto3" json:"onfts"` @@ -95,8 +98,8 @@ func (m *Collection) XXX_DiscardUnknown() { var xxx_messageInfo_Collection proto.InternalMessageInfo type IDCollection struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - Ids []string `protobuf:"bytes,2,rep,name=ids,proto3" json:"ids,omitempty"` + DenomId string `protobuf:"bytes,1,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` + OnftIds []string `protobuf:"bytes,2,rep,name=onft_ids,json=onftIds,proto3" json:"onft_ids,omitempty" yaml:"onft_ids"` } func (m *IDCollection) Reset() { *m = IDCollection{} } @@ -133,11 +136,13 @@ func (m *IDCollection) XXX_DiscardUnknown() { var xxx_messageInfo_IDCollection proto.InternalMessageInfo type Denom struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` - Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty" yaml:"symbol"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty" yaml:"name"` - Schema string `protobuf:"bytes,4,opt,name=schema,proto3" json:"schema,omitempty" yaml:"schema"` - Creator string `protobuf:"bytes,5,opt,name=creator,proto3" json:"creator,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Schema string `protobuf:"bytes,4,opt,name=schema,proto3" json:"schema,omitempty"` + Creator string `protobuf:"bytes,5,opt,name=creator,proto3" json:"creator,omitempty"` + Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` + PreviewUri string `protobuf:"bytes,7,opt,name=preview_uri,json=previewUri,proto3" json:"preview_uri,omitempty" yaml:"created_at"` } func (m *Denom) Reset() { *m = Denom{} } @@ -175,12 +180,14 @@ var xxx_messageInfo_Denom proto.InternalMessageInfo //ASSET or ONFT type ONFT struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Metadata Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata"` - Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` - Type AssetType `protobuf:"varint,4,opt,name=type,proto3,enum=OmniFlix.onft.v1beta1.AssetType" json:"type,omitempty"` - TransferEnabled bool `protobuf:"varint,5,opt,name=transfer_enabled,json=transferEnabled,proto3" json:"transfer_enabled,omitempty"` - Created time.Time `protobuf:"bytes,6,opt,name=created,proto3,stdtime" json:"created" yaml:"created"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Metadata Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata"` + Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + Owner string `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"` + Type AssetType `protobuf:"varint,5,opt,name=type,proto3,enum=OmniFlix.onft.v1beta1.AssetType" json:"type,omitempty"` + Transferable bool `protobuf:"varint,6,opt,name=transferable,proto3" json:"transferable,omitempty"` + Extensible bool `protobuf:"varint,7,opt,name=extensible,proto3" json:"extensible,omitempty"` + CreatedAt time.Time `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at" yaml:"created_at"` } func (m *ONFT) Reset() { *m = ONFT{} } @@ -217,10 +224,10 @@ func (m *ONFT) XXX_DiscardUnknown() { var xxx_messageInfo_ONFT proto.InternalMessageInfo type Metadata struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" yaml:"name"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` - Preview string `protobuf:"bytes,3,opt,name=preview,proto3" json:"preview,omitempty" yaml:"preview"` - Media string `protobuf:"bytes,4,opt,name=media,proto3" json:"media,omitempty" yaml:"media"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Preview string `protobuf:"bytes,3,opt,name=preview,proto3" json:"preview,omitempty"` + Media string `protobuf:"bytes,4,opt,name=media,proto3" json:"media,omitempty"` } func (m *Metadata) Reset() { *m = Metadata{} } @@ -256,6 +263,45 @@ func (m *Metadata) XXX_DiscardUnknown() { var xxx_messageInfo_Metadata proto.InternalMessageInfo +// Entry defines a type of owner +type Entry struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + IDCollections []IDCollection `protobuf:"bytes,2,rep,name=id_collections,json=idCollections,proto3" json:"id_collections" yaml:"idcs"` +} + +func (m *Entry) Reset() { *m = Entry{} } +func (m *Entry) String() string { return proto.CompactTextString(m) } +func (*Entry) ProtoMessage() {} +func (*Entry) Descriptor() ([]byte, []int) { + return fileDescriptor_651c3270ad840fa5, []int{5} +} +func (m *Entry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Entry.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 *Entry) XXX_Merge(src proto.Message) { + xxx_messageInfo_Entry.Merge(m, src) +} +func (m *Entry) XXX_Size() int { + return m.Size() +} +func (m *Entry) XXX_DiscardUnknown() { + xxx_messageInfo_Entry.DiscardUnknown(m) +} + +var xxx_messageInfo_Entry proto.InternalMessageInfo + func init() { proto.RegisterEnum("OmniFlix.onft.v1beta1.AssetType", AssetType_name, AssetType_value) proto.RegisterType((*Collection)(nil), "OmniFlix.onft.v1beta1.Collection") @@ -263,53 +309,59 @@ func init() { proto.RegisterType((*Denom)(nil), "OmniFlix.onft.v1beta1.Denom") proto.RegisterType((*ONFT)(nil), "OmniFlix.onft.v1beta1.ONFT") proto.RegisterType((*Metadata)(nil), "OmniFlix.onft.v1beta1.Metadata") + proto.RegisterType((*Entry)(nil), "OmniFlix.onft.v1beta1.Entry") } func init() { proto.RegisterFile("onft/v1beta1/onft.proto", fileDescriptor_651c3270ad840fa5) } var fileDescriptor_651c3270ad840fa5 = []byte{ - // 648 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x94, 0xcf, 0x6b, 0xd4, 0x40, - 0x14, 0xc7, 0x93, 0x6d, 0xd2, 0x76, 0x67, 0xfb, 0x63, 0x1d, 0xaa, 0x86, 0x55, 0x33, 0x25, 0x82, - 0xb4, 0x22, 0x09, 0x5d, 0x8b, 0x94, 0xe2, 0xc1, 0x5d, 0xb7, 0x85, 0x22, 0xba, 0x32, 0xac, 0x0a, - 0x5e, 0x24, 0xbb, 0x99, 0x6e, 0x07, 0x92, 0xcc, 0x92, 0x4c, 0x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, 0xed, 0xfb, - 0xb9, 0xad, 0xbd, 0xb5, 0x87, 0x94, 0x1f, 0x1c, 0xf6, 0xdd, 0x01, 0x8b, 0xbc, 0x72, 0xa1, 0xf2, - 0x0f, 0xe2, 0x89, 0xed, 0xa5, 0xfd, 0x59, 0x39, 0xfa, 0x87, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, - 0x28, 0x76, 0x5a, 0x39, 0x63, 0x04, 0x00, 0x00, + // 731 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0x4d, 0x6f, 0xd3, 0x4a, + 0x14, 0x8d, 0xd3, 0xb8, 0x49, 0x6e, 0xda, 0xbe, 0xbc, 0x79, 0xed, 0x7b, 0x56, 0x1e, 0xd8, 0x91, + 0x61, 0x51, 0xb1, 0x70, 0xd4, 0x80, 0x10, 0xaa, 0x58, 0x90, 0x34, 0xad, 0x14, 0xa1, 0x36, 0x92, + 0x95, 0x02, 0x62, 0x13, 0x39, 0x99, 0x69, 0x3a, 0x52, 0x6c, 0x47, 0x9e, 0xe9, 0x47, 0xfe, 0x01, + 0x2b, 0xd4, 0x2d, 0x3b, 0x24, 0xfe, 0x4c, 0x97, 0xdd, 0x20, 0xb1, 0x21, 0x40, 0xba, 0x61, 0xdd, + 0x5f, 0x80, 0x66, 0x3c, 0x2e, 0x2e, 0x6d, 0x76, 0x73, 0xee, 0x3d, 0xd7, 0x77, 0xce, 0xb9, 0x73, + 0x0d, 0xff, 0x85, 0xc1, 0x01, 0xaf, 0x1d, 0x6f, 0xf4, 0x09, 0xf7, 0x36, 0x6a, 0x02, 0x38, 0xe3, + 0x28, 0xe4, 0x21, 0x5a, 0xeb, 0xf8, 0x01, 0xdd, 0x19, 0xd1, 0x53, 0x47, 0x06, 0x15, 0xa3, 0xb2, + 0x3a, 0x0c, 0x87, 0xa1, 0x64, 0xd4, 0xc4, 0x29, 0x26, 0x57, 0xac, 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0xee, 0xe0, 0x90, 0xf8, 0x9e, 0x91, 0x53, 0x5c, 0x89, 0x90, 0x01, 0xf9, 0x41, 0x44, 0x3c, 0x1e, + 0x46, 0x86, 0x2e, 0x13, 0x09, 0x44, 0x55, 0x28, 0x61, 0xc2, 0x06, 0x11, 0x1d, 0x0b, 0xb1, 0xc6, + 0xa2, 0xcc, 0xa6, 0x43, 0xe8, 0x29, 0x94, 0xc6, 0x11, 0x39, 0xa6, 0xe4, 0xa4, 0x77, 0x14, 0x51, + 0x23, 0x2f, 0x2d, 0x58, 0xbb, 0x9a, 0x5a, 0x7f, 0xc7, 0x92, 0xe4, 0x97, 0x08, 0xee, 0x79, 0xdc, + 0x76, 0x41, 0x31, 0xf7, 0x23, 0xaa, 0x74, 0x7d, 0xcd, 0x42, 0x4e, 0x98, 0x7c, 0x4b, 0x56, 0x03, + 0x0a, 0x3e, 0xe1, 0x1e, 0xf6, 0xb8, 0x27, 0x85, 0x95, 0xea, 0xd6, 0x9c, 0x89, 0xed, 0x2a, 0x9a, + 0x1a, 0xf7, 0x75, 0x99, 0x70, 0x40, 0x96, 0x2b, 0x07, 0x64, 0x6c, 0x15, 0xf4, 0xf0, 0x24, 0x20, + 0x91, 0x32, 0x20, 0x06, 0xe8, 0x09, 0xe4, 0xf8, 0x64, 0x4c, 0xa4, 0xf8, 0x95, 0x7a, 0x75, 0x4e, + 0xa3, 0x06, 0x63, 0x84, 0x77, 0x27, 0x63, 0xe2, 0x4a, 0x36, 0xb2, 0x61, 0x89, 0x47, 0x5e, 0xc0, + 0x0e, 0x48, 0xe4, 0xf5, 0x47, 0x44, 0x9a, 0x53, 0x70, 0x6f, 0xc4, 0x90, 0x09, 0x40, 0x4e, 0x39, + 0x09, 0x18, 0x15, 0x8c, 0xbc, 0x64, 0xa4, 0x22, 0xe8, 0x0d, 0xc0, 0x6f, 0x83, 0x8c, 0x82, 0x14, + 0x5a, 0x71, 0xe2, 0xa5, 0x70, 0x92, 0xa5, 0x70, 0xba, 0x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99, 0x8b, 0x4b, + 0x33, 0xf3, 0xe5, 0xd2, 0xcc, 0xbc, 0x35, 0x87, 0x94, 0x1f, 0x1e, 0xf5, 0x9d, 0x41, 0xe8, 0xd7, + 0x12, 0x2d, 0xf2, 0x17, 0x59, 0x13, 0x0f, 0x87, 0xf5, 0x17, 0xe5, 0x64, 0x1f, 0xff, 0x0a, 0x00, + 0x00, 0xff, 0xff, 0x4b, 0x94, 0xd0, 0x60, 0x44, 0x05, 0x00, 0x00, } func (this *Collection) Equal(that interface{}) bool { @@ -344,6 +396,38 @@ func (this *Collection) Equal(that interface{}) bool { } return true } +func (this *IDCollection) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*IDCollection) + if !ok { + that2, ok := that.(IDCollection) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.DenomId != that1.DenomId { + return false + } + if len(this.OnftIds) != len(that1.OnftIds) { + return false + } + for i := range this.OnftIds { + if this.OnftIds[i] != that1.OnftIds[i] { + return false + } + } + return true +} func (this *Denom) Equal(that interface{}) bool { if that == nil { return this == nil @@ -378,6 +462,12 @@ func (this *Denom) Equal(that interface{}) bool { if this.Creator != that1.Creator { return false } + if this.Description != that1.Description { + return false + } + if this.PreviewUri != that1.PreviewUri { + return false + } return true } func (this *ONFT) Equal(that interface{}) bool { @@ -405,16 +495,22 @@ func (this *ONFT) Equal(that interface{}) bool { if !this.Metadata.Equal(&that1.Metadata) { return false } + if this.Data != that1.Data { + return false + } if this.Owner != that1.Owner { return false } if this.Type != that1.Type { return false } - if this.TransferEnabled != that1.TransferEnabled { + if this.Transferable != that1.Transferable { + return false + } + if this.Extensible != that1.Extensible { return false } - if !this.Created.Equal(that1.Created) { + if !this.CreatedAt.Equal(that1.CreatedAt) { return false } return true @@ -452,6 +548,38 @@ func (this *Metadata) Equal(that interface{}) bool { } return true } +func (this *Entry) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Entry) + if !ok { + that2, ok := that.(Entry) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Address != that1.Address { + return false + } + if len(this.IDCollections) != len(that1.IDCollections) { + return false + } + for i := range this.IDCollections { + if !this.IDCollections[i].Equal(&that1.IDCollections[i]) { + return false + } + } + return true +} func (m *Collection) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -519,19 +647,19 @@ func (m *IDCollection) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Ids) > 0 { - for iNdEx := len(m.Ids) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Ids[iNdEx]) - copy(dAtA[i:], m.Ids[iNdEx]) - i = encodeVarintOnft(dAtA, i, uint64(len(m.Ids[iNdEx]))) + if len(m.OnftIds) > 0 { + for iNdEx := len(m.OnftIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.OnftIds[iNdEx]) + copy(dAtA[i:], m.OnftIds[iNdEx]) + i = encodeVarintOnft(dAtA, i, uint64(len(m.OnftIds[iNdEx]))) i-- dAtA[i] = 0x12 } } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintOnft(dAtA, i, uint64(len(m.Denom))) + if len(m.DenomId) > 0 { + i -= len(m.DenomId) + copy(dAtA[i:], m.DenomId) + i = encodeVarintOnft(dAtA, i, uint64(len(m.DenomId))) i-- dAtA[i] = 0xa } @@ -558,6 +686,20 @@ func (m *Denom) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.PreviewUri) > 0 { + i -= len(m.PreviewUri) + copy(dAtA[i:], m.PreviewUri) + i = encodeVarintOnft(dAtA, i, uint64(len(m.PreviewUri))) + i-- + dAtA[i] = 0x3a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintOnft(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x32 + } if len(m.Creator) > 0 { i -= len(m.Creator) copy(dAtA[i:], m.Creator) @@ -616,34 +758,51 @@ func (m *ONFT) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Created, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Created):]) + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt):]) if err2 != nil { return 0, err2 } i -= n2 i = encodeVarintOnft(dAtA, i, uint64(n2)) i-- - dAtA[i] = 0x32 - if m.TransferEnabled { + dAtA[i] = 0x42 + if m.Extensible { i-- - if m.TransferEnabled { + if m.Extensible { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- - dAtA[i] = 0x28 + dAtA[i] = 0x38 + } + if m.Transferable { + i-- + if m.Transferable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 } if m.Type != 0 { i = encodeVarintOnft(dAtA, i, uint64(m.Type)) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x28 } if len(m.Owner) > 0 { i -= len(m.Owner) copy(dAtA[i:], m.Owner) i = encodeVarintOnft(dAtA, i, uint64(len(m.Owner))) i-- + dAtA[i] = 0x22 + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintOnft(dAtA, i, uint64(len(m.Data))) + i-- dAtA[i] = 0x1a } { @@ -717,6 +876,50 @@ func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Entry) 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 *Entry) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Entry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.IDCollections) > 0 { + for iNdEx := len(m.IDCollections) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.IDCollections[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOnft(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintOnft(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintOnft(dAtA []byte, offset int, v uint64) int { offset -= sovOnft(v) base := offset @@ -751,12 +954,12 @@ func (m *IDCollection) Size() (n int) { } var l int _ = l - l = len(m.Denom) + l = len(m.DenomId) if l > 0 { n += 1 + l + sovOnft(uint64(l)) } - if len(m.Ids) > 0 { - for _, s := range m.Ids { + if len(m.OnftIds) > 0 { + for _, s := range m.OnftIds { l = len(s) n += 1 + l + sovOnft(uint64(l)) } @@ -790,6 +993,14 @@ func (m *Denom) Size() (n int) { if l > 0 { n += 1 + l + sovOnft(uint64(l)) } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovOnft(uint64(l)) + } + l = len(m.PreviewUri) + if l > 0 { + n += 1 + l + sovOnft(uint64(l)) + } return n } @@ -805,6 +1016,10 @@ func (m *ONFT) Size() (n int) { } l = m.Metadata.Size() n += 1 + l + sovOnft(uint64(l)) + l = len(m.Data) + if l > 0 { + n += 1 + l + sovOnft(uint64(l)) + } l = len(m.Owner) if l > 0 { n += 1 + l + sovOnft(uint64(l)) @@ -812,10 +1027,13 @@ func (m *ONFT) Size() (n int) { if m.Type != 0 { n += 1 + sovOnft(uint64(m.Type)) } - if m.TransferEnabled { + if m.Transferable { n += 2 } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Created) + if m.Extensible { + n += 2 + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt) n += 1 + l + sovOnft(uint64(l)) return n } @@ -845,6 +1063,25 @@ func (m *Metadata) Size() (n int) { return n } +func (m *Entry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovOnft(uint64(l)) + } + if len(m.IDCollections) > 0 { + for _, e := range m.IDCollections { + l = e.Size() + n += 1 + l + sovOnft(uint64(l)) + } + } + return n +} + func sovOnft(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -999,7 +1236,7 @@ func (m *IDCollection) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DenomId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1027,11 +1264,11 @@ func (m *IDCollection) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.DenomId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OnftIds", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1059,7 +1296,7 @@ func (m *IDCollection) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) + m.OnftIds = append(m.OnftIds, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -1271,6 +1508,70 @@ func (m *Denom) Unmarshal(dAtA []byte) error { } m.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOnft + } + 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 ErrInvalidLengthOnft + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOnft + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PreviewUri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOnft + } + 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 ErrInvalidLengthOnft + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOnft + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PreviewUri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipOnft(dAtA[iNdEx:]) @@ -1387,6 +1688,38 @@ func (m *ONFT) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOnft + } + 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 ErrInvalidLengthOnft + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOnft + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) } @@ -1418,7 +1751,7 @@ func (m *ONFT) Unmarshal(dAtA []byte) error { } m.Owner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } @@ -1437,9 +1770,9 @@ func (m *ONFT) Unmarshal(dAtA []byte) error { break } } - case 5: + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TransferEnabled", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Transferable", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -1456,10 +1789,30 @@ func (m *ONFT) Unmarshal(dAtA []byte) error { break } } - m.TransferEnabled = bool(v != 0) - case 6: + m.Transferable = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Extensible", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOnft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Extensible = bool(v != 0) + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1486,7 +1839,7 @@ func (m *ONFT) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Created, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1689,6 +2042,122 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } return nil } +func (m *Entry) 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 ErrIntOverflowOnft + } + 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: Entry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Entry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOnft + } + 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 ErrInvalidLengthOnft + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOnft + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IDCollections", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOnft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOnft + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOnft + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IDCollections = append(m.IDCollections, IDCollection{}) + if err := m.IDCollections[len(m.IDCollections)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOnft(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOnft + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipOnft(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/types/query.pb.go b/types/query.pb.go index b44b41a..777ee03 100644 --- a/types/query.pb.go +++ b/types/query.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" @@ -30,7 +31,8 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type QueryCollectionRequest struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + DenomId string `protobuf:"bytes,1,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryCollectionRequest) Reset() { *m = QueryCollectionRequest{} } @@ -66,15 +68,23 @@ func (m *QueryCollectionRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryCollectionRequest proto.InternalMessageInfo -func (m *QueryCollectionRequest) GetDenom() string { +func (m *QueryCollectionRequest) GetDenomId() string { if m != nil { - return m.Denom + return m.DenomId } return "" } +func (m *QueryCollectionRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + type QueryCollectionResponse struct { - Collection *Collection `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"` + Collection *Collection `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryCollectionResponse) Reset() { *m = QueryCollectionResponse{} } @@ -117,8 +127,15 @@ func (m *QueryCollectionResponse) GetCollection() *Collection { return nil } +func (m *QueryCollectionResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + type QueryDenomRequest struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + DenomId string `protobuf:"bytes,1,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` } func (m *QueryDenomRequest) Reset() { *m = QueryDenomRequest{} } @@ -154,9 +171,9 @@ func (m *QueryDenomRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDenomRequest proto.InternalMessageInfo -func (m *QueryDenomRequest) GetDenom() string { +func (m *QueryDenomRequest) GetDenomId() string { if m != nil { - return m.Denom + return m.DenomId } return "" } @@ -206,6 +223,8 @@ func (m *QueryDenomResponse) GetDenom() *Denom { } type QueryDenomsRequest struct { + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryDenomsRequest) Reset() { *m = QueryDenomsRequest{} } @@ -241,8 +260,16 @@ func (m *QueryDenomsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDenomsRequest proto.InternalMessageInfo +func (m *QueryDenomsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + type QueryDenomsResponse struct { - Denoms []Denom `protobuf:"bytes,1,rep,name=denoms,proto3" json:"denoms"` + Denoms []Denom `protobuf:"bytes,1,rep,name=denoms,proto3" json:"denoms"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryDenomsResponse) Reset() { *m = QueryDenomsResponse{} } @@ -285,9 +312,16 @@ func (m *QueryDenomsResponse) GetDenoms() []Denom { return nil } +func (m *QueryDenomsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + type QueryONFTRequest struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + DenomId string `protobuf:"bytes,1,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` } func (m *QueryONFTRequest) Reset() { *m = QueryONFTRequest{} } @@ -323,9 +357,9 @@ func (m *QueryONFTRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryONFTRequest proto.InternalMessageInfo -func (m *QueryONFTRequest) GetDenom() string { +func (m *QueryONFTRequest) GetDenomId() string { if m != nil { - return m.Denom + return m.DenomId } return "" } @@ -382,8 +416,9 @@ func (m *QueryONFTResponse) GetONFT() *ONFT { } type QueryOwnerONFTsRequest struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` + DenomId string `protobuf:"bytes,1,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` + Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryOwnerONFTsRequest) Reset() { *m = QueryOwnerONFTsRequest{} } @@ -419,9 +454,9 @@ func (m *QueryOwnerONFTsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryOwnerONFTsRequest proto.InternalMessageInfo -func (m *QueryOwnerONFTsRequest) GetDenom() string { +func (m *QueryOwnerONFTsRequest) GetDenomId() string { if m != nil { - return m.Denom + return m.DenomId } return "" } @@ -433,8 +468,16 @@ func (m *QueryOwnerONFTsRequest) GetOwner() string { return "" } +func (m *QueryOwnerONFTsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + type QueryOwnerONFTsResponse struct { - Onfts []*ONFT `protobuf:"bytes,1,rep,name=onfts,proto3" json:"onfts,omitempty"` + Onfts []*ONFT `protobuf:"bytes,1,rep,name=onfts,proto3" json:"onfts,omitempty"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryOwnerONFTsResponse) Reset() { *m = QueryOwnerONFTsResponse{} } @@ -477,9 +520,16 @@ func (m *QueryOwnerONFTsResponse) GetOnfts() []*ONFT { return nil } +func (m *QueryOwnerONFTsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + type QuerySupplyRequest struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` + DenomId string `protobuf:"bytes,1,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` + Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` } func (m *QuerySupplyRequest) Reset() { *m = QuerySupplyRequest{} } @@ -515,9 +565,9 @@ func (m *QuerySupplyRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySupplyRequest proto.InternalMessageInfo -func (m *QuerySupplyRequest) GetDenom() string { +func (m *QuerySupplyRequest) GetDenomId() string { if m != nil { - return m.Denom + return m.DenomId } return "" } @@ -591,48 +641,55 @@ func init() { func init() { proto.RegisterFile("onft/v1beta1/query.proto", fileDescriptor_a1ea6e009202d761) } var fileDescriptor_a1ea6e009202d761 = []byte{ - // 641 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x95, 0xcf, 0x6f, 0x12, 0x41, - 0x14, 0xc7, 0x19, 0x04, 0xd4, 0xd7, 0xc4, 0xe8, 0x88, 0x2d, 0x59, 0xeb, 0xb6, 0x6e, 0xd2,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 0x9f, 0x8f, 0xee, 0x62, 0xe1, 0xb4, 0xaf, 0xb2, 0xb3, 0xbe, 0xca, 0x7e, 0xf7, 0x55, - 0xf6, 0x65, 0xa0, 0x26, 0xce, 0x06, 0x6a, 0xe2, 0xd7, 0x40, 0x4d, 0xbc, 0x51, 0x1b, 0x76, 0xf0, - 0xae, 0x5d, 0xd5, 0x6b, 0xa2, 0x69, 0x0c, 0x29, 0x64, 0xc5, 0xa0, 0xe3, 0x59, 0x7e, 0x35, 0x83, - 0x7f, 0x68, 0x0f, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x84, 0xae, 0x0b, 0x4d, 0x50, 0x07, 0x00, - 0x00, + // 756 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcf, 0x6e, 0xd3, 0x4e, + 0x10, 0xc7, 0xb3, 0x69, 0x92, 0xb6, 0x53, 0xe9, 0xf7, 0x67, 0x5b, 0xda, 0x28, 0x14, 0xa7, 0x58, + 0x82, 0x86, 0x4a, 0xb5, 0x49, 0xaa, 0x0a, 0x28, 0x27, 0x52, 0x54, 0xe0, 0xd2, 0x82, 0xe1, 0x54, + 0x21, 0x21, 0x27, 0x71, 0x8d, 0x25, 0xdb, 0xeb, 0x76, 0x1d, 0x68, 0x54, 0xf5, 0xc2, 0x81, 0x23, + 0xaa, 0x84, 0x40, 0x88, 0x1b, 0x08, 0x78, 0x96, 0x1e, 0x2b, 0x71, 0xe1, 0x54, 0xa1, 0x94, 0x27, + 0xe0, 0x09, 0x90, 0x77, 0xd7, 0x8d, 0x4d, 0x1a, 0x27, 0x8a, 0x7a, 0xb3, 0xb3, 0xdf, 0x99, 0xf9, + 0xcc, 0xcc, 0xce, 0xc4, 0x90, 0x27, 0xee, 0x96, 0xaf, 0xbe, 0x28, 0xd7, 0x0c, 0x5f, 0x2f, 0xab, + 0xdb, 0x4d, 0x63, 0xa7, 0xa5, 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f6, 0x40, 0x15, 0x60, 0x1d, 0xd2, 0x3d, 0x36, + 0x36, 0xfb, 0xf8, 0x03, 0x82, 0x1c, 0x9f, 0x99, 0xe4, 0x46, 0xc6, 0x66, 0x36, 0xb9, 0x91, 0xf1, + 0x11, 0xec, 0x8b, 0xd6, 0x5d, 0x45, 0xca, 0x1c, 0x54, 0x6f, 0x1e, 0xb6, 0x25, 0x74, 0xd4, 0x96, + 0xd0, 0xcf, 0xb6, 0x84, 0x0e, 0x4e, 0xa4, 0xd4, 0xd1, 0x89, 0x94, 0xfa, 0x71, 0x22, 0xa5, 0x36, + 0x25, 0xd3, 0xf2, 0x9f, 0x37, 0x6b, 0x4a, 0x9d, 0x38, 0x6a, 0x08, 0xc2, 0x9d, 0xfa, 0x2d, 0xcf, + 0xa0, 0xb5, 0x1c, 0xfb, 0x32, 0x5a, 0xfa, 0x13, 0x00, 0x00, 0xff, 0xff, 0x91, 0x94, 0xdd, 0xce, + 0xc5, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -915,10 +972,22 @@ func (m *QueryCollectionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.DenomId) > 0 { + i -= len(m.DenomId) + copy(dAtA[i:], m.DenomId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DenomId))) i-- dAtA[i] = 0xa } @@ -945,6 +1014,18 @@ func (m *QueryCollectionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } if m.Collection != nil { { size, err := m.Collection.MarshalToSizedBuffer(dAtA[:i]) @@ -980,10 +1061,10 @@ func (m *QueryDenomRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + if len(m.DenomId) > 0 { + i -= len(m.DenomId) + copy(dAtA[i:], m.DenomId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DenomId))) i-- dAtA[i] = 0xa } @@ -1045,6 +1126,18 @@ func (m *QueryDenomsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -1068,6 +1161,18 @@ func (m *QueryDenomsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } if len(m.Denoms) > 0 { for iNdEx := len(m.Denoms) - 1; iNdEx >= 0; iNdEx-- { { @@ -1112,10 +1217,10 @@ func (m *QueryONFTRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + if len(m.DenomId) > 0 { + i -= len(m.DenomId) + copy(dAtA[i:], m.DenomId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DenomId))) i-- dAtA[i] = 0xa } @@ -1177,6 +1282,18 @@ func (m *QueryOwnerONFTsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } if len(m.Owner) > 0 { i -= len(m.Owner) copy(dAtA[i:], m.Owner) @@ -1184,10 +1301,10 @@ func (m *QueryOwnerONFTsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x12 } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + if len(m.DenomId) > 0 { + i -= len(m.DenomId) + copy(dAtA[i:], m.DenomId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DenomId))) i-- dAtA[i] = 0xa } @@ -1214,6 +1331,18 @@ func (m *QueryOwnerONFTsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } if len(m.Onfts) > 0 { for iNdEx := len(m.Onfts) - 1; iNdEx >= 0; iNdEx-- { { @@ -1258,10 +1387,10 @@ func (m *QuerySupplyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + if len(m.DenomId) > 0 { + i -= len(m.DenomId) + copy(dAtA[i:], m.DenomId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DenomId))) i-- dAtA[i] = 0xa } @@ -1313,10 +1442,14 @@ func (m *QueryCollectionRequest) Size() (n int) { } var l int _ = l - l = len(m.Denom) + l = len(m.DenomId) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -1330,6 +1463,10 @@ func (m *QueryCollectionResponse) Size() (n int) { l = m.Collection.Size() n += 1 + l + sovQuery(uint64(l)) } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -1339,7 +1476,7 @@ func (m *QueryDenomRequest) Size() (n int) { } var l int _ = l - l = len(m.Denom) + l = len(m.DenomId) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } @@ -1365,6 +1502,10 @@ func (m *QueryDenomsRequest) Size() (n int) { } var l int _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -1380,6 +1521,10 @@ func (m *QueryDenomsResponse) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) } } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -1389,7 +1534,7 @@ func (m *QueryONFTRequest) Size() (n int) { } var l int _ = l - l = len(m.Denom) + l = len(m.DenomId) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } @@ -1419,7 +1564,7 @@ func (m *QueryOwnerONFTsRequest) Size() (n int) { } var l int _ = l - l = len(m.Denom) + l = len(m.DenomId) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } @@ -1427,6 +1572,10 @@ func (m *QueryOwnerONFTsRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -1442,6 +1591,10 @@ func (m *QueryOwnerONFTsResponse) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) } } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -1451,7 +1604,7 @@ func (m *QuerySupplyRequest) Size() (n int) { } var l int _ = l - l = len(m.Denom) + l = len(m.DenomId) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } @@ -1511,7 +1664,7 @@ func (m *QueryCollectionRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DenomId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1539,7 +1692,43 @@ func (m *QueryCollectionRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.DenomId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -1627,6 +1816,42 @@ func (m *QueryCollectionResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -1679,7 +1904,7 @@ func (m *QueryDenomRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DenomId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1707,7 +1932,7 @@ func (m *QueryDenomRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.DenomId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1845,6 +2070,42 @@ func (m *QueryDenomsRequest) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: QueryDenomsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -1929,6 +2190,42 @@ func (m *QueryDenomsResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -1981,7 +2278,7 @@ func (m *QueryONFTRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DenomId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2009,7 +2306,7 @@ func (m *QueryONFTRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.DenomId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -2181,7 +2478,7 @@ func (m *QueryOwnerONFTsRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DenomId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2209,7 +2506,7 @@ func (m *QueryOwnerONFTsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.DenomId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -2243,6 +2540,42 @@ func (m *QueryOwnerONFTsRequest) Unmarshal(dAtA []byte) error { } m.Owner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -2327,6 +2660,42 @@ func (m *QueryOwnerONFTsResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -2379,7 +2748,7 @@ func (m *QuerySupplyRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DenomId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2407,7 +2776,7 @@ func (m *QuerySupplyRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.DenomId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { diff --git a/types/query.pb.gw.go b/types/query.pb.gw.go index 00dfa36..69111e1 100644 --- a/types/query.pb.gw.go +++ b/types/query.pb.gw.go @@ -33,6 +33,10 @@ var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage var _ = metadata.Join +var ( + filter_Query_Collection_0 = &utilities.DoubleArray{Encoding: map[string]int{"denom_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + func request_Query_Collection_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryCollectionRequest var metadata runtime.ServerMetadata @@ -44,15 +48,22 @@ func request_Query_Collection_0(ctx context.Context, marshaler runtime.Marshaler _ = err ) - val, ok = pathParams["denom"] + val, ok = pathParams["denom_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom_id") } - protoReq.Denom, err = runtime.String(val) + protoReq.DenomId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Collection_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.Collection(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -71,15 +82,22 @@ func local_request_Query_Collection_0(ctx context.Context, marshaler runtime.Mar _ = err ) - val, ok = pathParams["denom"] + val, ok = pathParams["denom_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom_id") } - protoReq.Denom, err = runtime.String(val) + protoReq.DenomId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Collection_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.Collection(ctx, &protoReq) @@ -98,15 +116,15 @@ func request_Query_Denom_0(ctx context.Context, marshaler runtime.Marshaler, cli _ = err ) - val, ok = pathParams["denom"] + val, ok = pathParams["denom_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom_id") } - protoReq.Denom, err = runtime.String(val) + protoReq.DenomId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom_id", err) } msg, err := client.Denom(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -125,15 +143,15 @@ func local_request_Query_Denom_0(ctx context.Context, marshaler runtime.Marshale _ = err ) - val, ok = pathParams["denom"] + val, ok = pathParams["denom_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom_id") } - protoReq.Denom, err = runtime.String(val) + protoReq.DenomId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom_id", err) } msg, err := server.Denom(ctx, &protoReq) @@ -141,10 +159,21 @@ func local_request_Query_Denom_0(ctx context.Context, marshaler runtime.Marshale } +var ( + filter_Query_Denoms_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + func request_Query_Denoms_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryDenomsRequest var metadata runtime.ServerMetadata + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Denoms_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.Denoms(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -154,6 +183,13 @@ func local_request_Query_Denoms_0(ctx context.Context, marshaler runtime.Marshal var protoReq QueryDenomsRequest var metadata runtime.ServerMetadata + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Denoms_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.Denoms(ctx, &protoReq) return msg, metadata, err @@ -170,15 +206,15 @@ func request_Query_ONFT_0(ctx context.Context, marshaler runtime.Marshaler, clie _ = err ) - val, ok = pathParams["denom"] + val, ok = pathParams["denom_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom_id") } - protoReq.Denom, err = runtime.String(val) + protoReq.DenomId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom_id", err) } val, ok = pathParams["id"] @@ -208,15 +244,15 @@ func local_request_Query_ONFT_0(ctx context.Context, marshaler runtime.Marshaler _ = err ) - val, ok = pathParams["denom"] + val, ok = pathParams["denom_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom_id") } - protoReq.Denom, err = runtime.String(val) + protoReq.DenomId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom_id", err) } val, ok = pathParams["id"] @@ -235,6 +271,10 @@ func local_request_Query_ONFT_0(ctx context.Context, marshaler runtime.Marshaler } +var ( + filter_Query_OwnerONFTs_0 = &utilities.DoubleArray{Encoding: map[string]int{"denom_id": 0, "owner": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + func request_Query_OwnerONFTs_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryOwnerONFTsRequest var metadata runtime.ServerMetadata @@ -246,15 +286,15 @@ func request_Query_OwnerONFTs_0(ctx context.Context, marshaler runtime.Marshaler _ = err ) - val, ok = pathParams["denom"] + val, ok = pathParams["denom_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom_id") } - protoReq.Denom, err = runtime.String(val) + protoReq.DenomId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom_id", err) } val, ok = pathParams["owner"] @@ -268,6 +308,13 @@ func request_Query_OwnerONFTs_0(ctx context.Context, marshaler runtime.Marshaler return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_OwnerONFTs_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.OwnerONFTs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -284,15 +331,15 @@ func local_request_Query_OwnerONFTs_0(ctx context.Context, marshaler runtime.Mar _ = err ) - val, ok = pathParams["denom"] + val, ok = pathParams["denom_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom_id") } - protoReq.Denom, err = runtime.String(val) + protoReq.DenomId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom_id", err) } val, ok = pathParams["owner"] @@ -306,13 +353,20 @@ func local_request_Query_OwnerONFTs_0(ctx context.Context, marshaler runtime.Mar return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_OwnerONFTs_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.OwnerONFTs(ctx, &protoReq) return msg, metadata, err } var ( - filter_Query_Supply_0 = &utilities.DoubleArray{Encoding: map[string]int{"denom": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_Supply_0 = &utilities.DoubleArray{Encoding: map[string]int{"denom_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) func request_Query_Supply_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -326,15 +380,15 @@ func request_Query_Supply_0(ctx context.Context, marshaler runtime.Marshaler, cl _ = err ) - val, ok = pathParams["denom"] + val, ok = pathParams["denom_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom_id") } - protoReq.Denom, err = runtime.String(val) + protoReq.DenomId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom_id", err) } if err := req.ParseForm(); err != nil { @@ -360,15 +414,15 @@ func local_request_Query_Supply_0(ctx context.Context, marshaler runtime.Marshal _ = err ) - val, ok = pathParams["denom"] + val, ok = pathParams["denom_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom_id") } - protoReq.Denom, err = runtime.String(val) + protoReq.DenomId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom_id", err) } if err := req.ParseForm(); err != nil { @@ -692,17 +746,17 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Collection_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"omniflix", "onft", "v1beta1", "collections", "denom"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Collection_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"omniflix", "onft", "v1beta1", "collections", "denom_id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_Denom_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"omniflix", "onft", "v1beta1", "denoms", "denom"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Denom_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"omniflix", "onft", "v1beta1", "denoms", "denom_id"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_Denoms_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"omniflix", "onft", "v1beta1", "denoms"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_ONFT_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"omniflix", "onft", "v1beta1", "denoms", "denom", "onfts", "id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ONFT_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"omniflix", "onft", "v1beta1", "denoms", "denom_id", "onfts", "id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_OwnerONFTs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"omniflix", "onft", "v1beta1", "onfts", "denom", "owner"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_OwnerONFTs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"omniflix", "onft", "v1beta1", "onfts", "denom_id", "owner"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_Supply_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"omniflix", "onft", "v1beta1", "denoms", "denom", "supply"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Supply_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"omniflix", "onft", "v1beta1", "denoms", "denom_id", "supply"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( diff --git a/types/tx.pb.go b/types/tx.pb.go index 2b8fa98..a2a0d76 100644 --- a/types/tx.pb.go +++ b/types/tx.pb.go @@ -29,11 +29,13 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type MsgCreateDenom struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Schema string `protobuf:"bytes,4,opt,name=schema,proto3" json:"schema,omitempty"` - Sender string `protobuf:"bytes,5,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + PreviewUri string `protobuf:"bytes,5,opt,name=preview_uri,json=previewUri,proto3" json:"preview_uri,omitempty" yaml:"preview_uri"` + Schema string `protobuf:"bytes,6,opt,name=schema,proto3" json:"schema,omitempty"` + Sender string `protobuf:"bytes,7,opt,name=sender,proto3" json:"sender,omitempty"` } func (m *MsgCreateDenom) Reset() { *m = MsgCreateDenom{} } @@ -105,21 +107,175 @@ func (m *MsgCreateDenomResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreateDenomResponse proto.InternalMessageInfo +type MsgUpdateDenom struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + PreviewUri string `protobuf:"bytes,4,opt,name=preview_uri,json=previewUri,proto3" json:"preview_uri,omitempty" yaml:"preview_uri"` + Sender string `protobuf:"bytes,5,opt,name=sender,proto3" json:"sender,omitempty"` +} + +func (m *MsgUpdateDenom) Reset() { *m = MsgUpdateDenom{} } +func (m *MsgUpdateDenom) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateDenom) ProtoMessage() {} +func (*MsgUpdateDenom) Descriptor() ([]byte, []int) { + return fileDescriptor_d1b5149965e8edc7, []int{2} +} +func (m *MsgUpdateDenom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateDenom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateDenom.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 *MsgUpdateDenom) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateDenom.Merge(m, src) +} +func (m *MsgUpdateDenom) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateDenom) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateDenom.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateDenom proto.InternalMessageInfo + +type MsgUpdateDenomResponse struct { +} + +func (m *MsgUpdateDenomResponse) Reset() { *m = MsgUpdateDenomResponse{} } +func (m *MsgUpdateDenomResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateDenomResponse) ProtoMessage() {} +func (*MsgUpdateDenomResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d1b5149965e8edc7, []int{3} +} +func (m *MsgUpdateDenomResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateDenomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateDenomResponse.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 *MsgUpdateDenomResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateDenomResponse.Merge(m, src) +} +func (m *MsgUpdateDenomResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateDenomResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateDenomResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateDenomResponse proto.InternalMessageInfo + +type MsgTransferDenom struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + Recipient string `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"` +} + +func (m *MsgTransferDenom) Reset() { *m = MsgTransferDenom{} } +func (m *MsgTransferDenom) String() string { return proto.CompactTextString(m) } +func (*MsgTransferDenom) ProtoMessage() {} +func (*MsgTransferDenom) Descriptor() ([]byte, []int) { + return fileDescriptor_d1b5149965e8edc7, []int{4} +} +func (m *MsgTransferDenom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgTransferDenom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgTransferDenom.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 *MsgTransferDenom) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTransferDenom.Merge(m, src) +} +func (m *MsgTransferDenom) XXX_Size() int { + return m.Size() +} +func (m *MsgTransferDenom) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTransferDenom.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgTransferDenom proto.InternalMessageInfo + +type MsgTransferDenomResponse struct { +} + +func (m *MsgTransferDenomResponse) Reset() { *m = MsgTransferDenomResponse{} } +func (m *MsgTransferDenomResponse) String() string { return proto.CompactTextString(m) } +func (*MsgTransferDenomResponse) ProtoMessage() {} +func (*MsgTransferDenomResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d1b5149965e8edc7, []int{5} +} +func (m *MsgTransferDenomResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgTransferDenomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgTransferDenomResponse.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 *MsgTransferDenomResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTransferDenomResponse.Merge(m, src) +} +func (m *MsgTransferDenomResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgTransferDenomResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTransferDenomResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgTransferDenomResponse proto.InternalMessageInfo + type MsgMintONFT struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + DenomId string `protobuf:"bytes,2,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` Metadata Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata"` - AssetType AssetType `protobuf:"varint,4,opt,name=assetType,proto3,enum=OmniFlix.onft.v1beta1.AssetType" json:"assetType,omitempty"` - Transferable bool `protobuf:"varint,5,opt,name=transferable,proto3" json:"transferable,omitempty"` - Sender string `protobuf:"bytes,6,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` - Recipient string `protobuf:"bytes,7,opt,name=recipient,proto3" json:"recipient,omitempty" yaml:"recipient"` + Data string `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + AssetType AssetType `protobuf:"varint,5,opt,name=assetType,proto3,enum=OmniFlix.onft.v1beta1.AssetType" json:"assetType,omitempty"` + Transferable bool `protobuf:"varint,6,opt,name=transferable,proto3" json:"transferable,omitempty"` + Extensible bool `protobuf:"varint,7,opt,name=extensible,proto3" json:"extensible,omitempty"` + Sender string `protobuf:"bytes,8,opt,name=sender,proto3" json:"sender,omitempty"` + Recipient string `protobuf:"bytes,9,opt,name=recipient,proto3" json:"recipient,omitempty"` } func (m *MsgMintONFT) Reset() { *m = MsgMintONFT{} } func (m *MsgMintONFT) String() string { return proto.CompactTextString(m) } func (*MsgMintONFT) ProtoMessage() {} func (*MsgMintONFT) Descriptor() ([]byte, []int) { - return fileDescriptor_d1b5149965e8edc7, []int{2} + return fileDescriptor_d1b5149965e8edc7, []int{6} } func (m *MsgMintONFT) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -155,7 +311,7 @@ func (m *MsgMintONFTResponse) Reset() { *m = MsgMintONFTResponse{} } func (m *MsgMintONFTResponse) String() string { return proto.CompactTextString(m) } func (*MsgMintONFTResponse) ProtoMessage() {} func (*MsgMintONFTResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d1b5149965e8edc7, []int{3} + return fileDescriptor_d1b5149965e8edc7, []int{7} } func (m *MsgMintONFTResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -186,16 +342,16 @@ var xxx_messageInfo_MsgMintONFTResponse proto.InternalMessageInfo type MsgTransferONFT struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` - Recipient string `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient,omitempty" yaml:"recipient"` + DenomId string `protobuf:"bytes,2,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` + Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` + Recipient string `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient,omitempty"` } func (m *MsgTransferONFT) Reset() { *m = MsgTransferONFT{} } func (m *MsgTransferONFT) String() string { return proto.CompactTextString(m) } func (*MsgTransferONFT) ProtoMessage() {} func (*MsgTransferONFT) Descriptor() ([]byte, []int) { - return fileDescriptor_d1b5149965e8edc7, []int{4} + return fileDescriptor_d1b5149965e8edc7, []int{8} } func (m *MsgTransferONFT) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -231,7 +387,7 @@ func (m *MsgTransferONFTResponse) Reset() { *m = MsgTransferONFTResponse func (m *MsgTransferONFTResponse) String() string { return proto.CompactTextString(m) } func (*MsgTransferONFTResponse) ProtoMessage() {} func (*MsgTransferONFTResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d1b5149965e8edc7, []int{5} + return fileDescriptor_d1b5149965e8edc7, []int{9} } func (m *MsgTransferONFTResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -262,18 +418,19 @@ var xxx_messageInfo_MsgTransferONFTResponse proto.InternalMessageInfo type MsgEditONFT struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + DenomId string `protobuf:"bytes,2,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` Metadata Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata"` AssetType string `protobuf:"bytes,4,opt,name=assetType,proto3" json:"assetType,omitempty"` Transferable string `protobuf:"bytes,5,opt,name=transferable,proto3" json:"transferable,omitempty"` - Sender string `protobuf:"bytes,6,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` + Extensible string `protobuf:"bytes,6,opt,name=extensible,proto3" json:"extensible,omitempty"` + Sender string `protobuf:"bytes,7,opt,name=sender,proto3" json:"sender,omitempty"` } func (m *MsgEditONFT) Reset() { *m = MsgEditONFT{} } func (m *MsgEditONFT) String() string { return proto.CompactTextString(m) } func (*MsgEditONFT) ProtoMessage() {} func (*MsgEditONFT) Descriptor() ([]byte, []int) { - return fileDescriptor_d1b5149965e8edc7, []int{6} + return fileDescriptor_d1b5149965e8edc7, []int{10} } func (m *MsgEditONFT) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -309,7 +466,7 @@ func (m *MsgEditONFTResponse) Reset() { *m = MsgEditONFTResponse{} } func (m *MsgEditONFTResponse) String() string { return proto.CompactTextString(m) } func (*MsgEditONFTResponse) ProtoMessage() {} func (*MsgEditONFTResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d1b5149965e8edc7, []int{7} + return fileDescriptor_d1b5149965e8edc7, []int{11} } func (m *MsgEditONFTResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -339,16 +496,16 @@ func (m *MsgEditONFTResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgEditONFTResponse proto.InternalMessageInfo type MsgBurnONFT struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty" yaml:"recipient"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + DenomId string `protobuf:"bytes,2,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` + Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` } func (m *MsgBurnONFT) Reset() { *m = MsgBurnONFT{} } func (m *MsgBurnONFT) String() string { return proto.CompactTextString(m) } func (*MsgBurnONFT) ProtoMessage() {} func (*MsgBurnONFT) Descriptor() ([]byte, []int) { - return fileDescriptor_d1b5149965e8edc7, []int{8} + return fileDescriptor_d1b5149965e8edc7, []int{12} } func (m *MsgBurnONFT) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -384,7 +541,7 @@ func (m *MsgBurnONFTResponse) Reset() { *m = MsgBurnONFTResponse{} } func (m *MsgBurnONFTResponse) String() string { return proto.CompactTextString(m) } func (*MsgBurnONFTResponse) ProtoMessage() {} func (*MsgBurnONFTResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d1b5149965e8edc7, []int{9} + return fileDescriptor_d1b5149965e8edc7, []int{13} } func (m *MsgBurnONFTResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -416,6 +573,10 @@ var xxx_messageInfo_MsgBurnONFTResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgCreateDenom)(nil), "OmniFlix.onft.v1beta1.MsgCreateDenom") proto.RegisterType((*MsgCreateDenomResponse)(nil), "OmniFlix.onft.v1beta1.MsgCreateDenomResponse") + proto.RegisterType((*MsgUpdateDenom)(nil), "OmniFlix.onft.v1beta1.MsgUpdateDenom") + proto.RegisterType((*MsgUpdateDenomResponse)(nil), "OmniFlix.onft.v1beta1.MsgUpdateDenomResponse") + proto.RegisterType((*MsgTransferDenom)(nil), "OmniFlix.onft.v1beta1.MsgTransferDenom") + proto.RegisterType((*MsgTransferDenomResponse)(nil), "OmniFlix.onft.v1beta1.MsgTransferDenomResponse") proto.RegisterType((*MsgMintONFT)(nil), "OmniFlix.onft.v1beta1.MsgMintONFT") proto.RegisterType((*MsgMintONFTResponse)(nil), "OmniFlix.onft.v1beta1.MsgMintONFTResponse") proto.RegisterType((*MsgTransferONFT)(nil), "OmniFlix.onft.v1beta1.MsgTransferONFT") @@ -429,44 +590,53 @@ func init() { func init() { proto.RegisterFile("onft/v1beta1/tx.proto", fileDescriptor_d1b5149965e8edc7) } var fileDescriptor_d1b5149965e8edc7 = []byte{ - // 585 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0x8e, 0x93, 0x34, 0x24, 0x93, 0x12, 0x60, 0x49, 0x5a, 0x13, 0x21, 0xa7, 0xb2, 0x04, 0x02, - 0x04, 0x8e, 0x1a, 0x6e, 0x15, 0x42, 0x6a, 0x80, 0xde, 0x4c, 0x25, 0x2b, 0xa7, 0xde, 0x36, 0xf1, - 0xc6, 0xb5, 0x14, 0xaf, 0x2d, 0xef, 0x16, 0x35, 0x6f, 0xc1, 0x85, 0x1b, 0x07, 0xde, 0x84, 0x6b, - 0x8e, 0x3d, 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e, 0xa7, - 0xe6, 0xb6, 0x7c, 0x12, 0xcb, 0xea, 0x87, 0x85, 0xc2, 0xfa, 0xad, 0x9f, 0x39, 0xc8, 0xe9, 0xcc, - 0x42, 0x3d, 0x28, 0xc7, 0xff, 0x25, 0x8f, 0x56, 0x29, 0x9a, 0xb8, 0xdb, 0xf5, 0x17, 0x37, 0x82, - 0x85, 0xc5, 0xd0, 0x19, 0x14, 0xa3, 0xeb, 0xaf, 0xae, 0x0e, 0x0d, 0x31, 0xf5, 0x67, 0x9b, 0x31, - 0xf1, 0xdc, 0xd1, 0x1e, 0xad, 0xc9, 0x1d, 0x62, 0xd6, 0xe5, 0x4e, 0x0f, 0x09, 0xf5, 0x61, 0x37, - 0x71, 0xbb, 0x1e, 0xaf, 0x8e, 0x8d, 0xe3, 0xea, 0xda, 0xcd, 0x70, 0xf1, 0x1e, 0xa2, 0x4d, 0x58, - 0xd3, 0x43, 0x88, 0x59, 0xd7, 0x43, 0x7a, 0xd0, 0xed, 0x57, 0xa3, 0x1f, 0x4a, 0x66, 0x34, 0x51, - 0xa4, 0xab, 0x89, 0x22, 0x7d, 0x9f, 0x28, 0xd2, 0xc7, 0xa9, 0x92, 0xb9, 0x9a, 0x2a, 0x99, 0x6f, - 0x53, 0x25, 0x73, 0xa6, 0x58, 0x36, 0x3f, 0xbf, 0xe8, 0x6a, 0x3d, 0xd7, 0x69, 0x86, 0x39, 0xc5, - 0x73, 0xd3, 0xe4, 0x43, 0x8f, 0xb0, 0x6e, 0x41, 0xbc, 0x3a, 0x2f, 0xff, 0x04, 0x00, 0x00, 0xff, - 0xff, 0xed, 0x92, 0xb0, 0x26, 0xd4, 0x06, 0x00, 0x00, + // 735 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcd, 0x4e, 0xdb, 0x40, + 0x10, 0x8e, 0x93, 0x00, 0xc9, 0x84, 0x42, 0xb5, 0x14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x6d, 0xa3, 0x75, 0xa8, 0xb9, 0x98, 0x5b, 0xb6, 0xc5, 0x2d, 0x51, 0x4e, + 0x63, 0xb5, 0x65, 0x8c, 0x1d, 0x74, 0xa3, 0x1b, 0xc3, 0x3a, 0xd5, 0x93, 0xb3, 0x56, 0xc9, 0x4c, + 0xdd, 0x42, 0xd5, 0x84, 0x7b, 0x34, 0x7c, 0xe2, 0x8c, 0x9e, 0x43, 0xdd, 0x62, 0x0c, 0xf3, 0xad, + 0xa1, 0x8f, 0x45, 0x77, 0x67, 0x56, 0x97, 0x73, 0xe2, 0xae, 0x27, 0x38, 0xf3, 0xca, 0x05, 0xe9, + 0x30, 0xcd, 0x63, 0xfe, 0x56, 0x6f, 0x80, 0xc5, 0x08, 0xd6, 0xcc, 0x8c, 0x0d, 0x69, 0x00, 0xf8, + 0x88, 0x63, 0xca, 0x48, 0x88, 0x98, 0x12, 0x08, 0xc9, 0x22, 0x49, 0x50, 0xcb, 0x97, 0xa0, 0x3e, + 0x5e, 0x82, 0x79, 0x98, 0x93, 0xba, 0x9c, 0x76, 0xff, 0x83, 0x02, 0xb3, 0x92, 0x34, 0x7f, 0x45, + 0x81, 0xab, 0x32, 0x2b, 0xf9, 0x65, 0x56, 0xc7, 0x97, 0x79, 0x17, 0x16, 0x47, 0xca, 0x49, 0x4b, + 0x3d, 0x8e, 0x06, 0xe5, 0x95, 0x4d, 0xfe, 0x9b, 0x41, 0x59, 0x92, 0x87, 0x22, 0x66, 0x94, 0x2f, + 0x79, 0xf4, 0x9b, 0x2c, 0x92, 0x3c, 0xda, 0x4b, 0xe3, 0x25, 0x1f, 0xb7, 0x9b, 0x22, 0x51, 0x93, + 0x8e, 0xa4, 0x9d, 0x7a, 0x27, 0x1a, 0xd5, 0x39, 0x08, 0xe8, 0xbf, 0xd4, 0x33, 0x53, 0x43, 0x92, + 0x2c, 0xa9, 0x61, 0xf5, 0xf3, 0x04, 0x54, 0xba, 0xcc, 0x41, 0x7d, 0x68, 0xc8, 0x7f, 0x0d, 0xf7, + 0xf2, 0x5a, 0x9c, 0x59, 0xb1, 0xcd, 0xc7, 0x37, 0x82, 0x25, 0xc9, 0xc2, 0x24, 0xf2, 0x16, 0x2e, + 0x48, 0x22, 0xc1, 0x8a, 0x92, 0x8c, 0x59, 0x92, 0x88, 0xc0, 0xad, 0xec, 0x86, 0x7c, 0x90, 0xef, + 0x9f, 0x01, 0x36, 0xdb, 0x37, 0x04, 0xa6, 0xa9, 0x76, 0xa0, 0x96, 0xee, 0x43, 0x3d, 0xdf, 0x39, + 0xc1, 0x34, 0x1f, 0x5d, 0x8f, 0x91, 0x63, 0xa7, 0x3f, 0xa1, 0x82, 0xd8, 0x09, 0xa6, 0x28, 0xf6, + 0xe8, 0xe0, 0xa1, 0x3d, 0x98, 0xce, 0x6c, 0x92, 0xfb, 0xd7, 0x13, 0x17, 0x39, 0x8c, 0x9b, 0xe1, + 0x64, 0x0e, 0xe9, 0x74, 0x17, 0x70, 0x48, 0x30, 0x45, 0x1c, 0x46, 0x07, 0xb7, 0xf3, 0xec, 0xe4, + 0xbb, 0x56, 0x3a, 0x39, 0xd7, 0x94, 0xd3, 0x73, 0x4d, 0xf9, 0x76, 0xae, 0x29, 0xc7, 0x17, 0x5a, + 0xe9, 0xf4, 0x42, 0x2b, 0x7d, 0xb9, 0xd0, 0x4a, 0x3b, 0x9a, 0x43, 0xf8, 0xfe, 0x41, 0xcf, 0xe8, + 0x7b, 0x6e, 0x3b, 0x89, 0x29, 0xbe, 0x86, 0xda, 0x7c, 0xe8, 0x63, 0xd6, 0x9b, 0x14, 0x1f, 0x45, + 0x4f, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0xfe, 0xb0, 0x16, 0x00, 0x73, 0x09, 0x00, 0x00, } func (this *MsgCreateDenom) Equal(that interface{}) bool { @@ -497,6 +667,12 @@ func (this *MsgCreateDenom) Equal(that interface{}) bool { if this.Name != that1.Name { return false } + if this.Description != that1.Description { + return false + } + if this.PreviewUri != that1.PreviewUri { + return false + } if this.Schema != that1.Schema { return false } @@ -505,6 +681,72 @@ func (this *MsgCreateDenom) Equal(that interface{}) bool { } return true } +func (this *MsgUpdateDenom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgUpdateDenom) + if !ok { + that2, ok := that.(MsgUpdateDenom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + if this.Name != that1.Name { + return false + } + if this.Description != that1.Description { + return false + } + if this.PreviewUri != that1.PreviewUri { + return false + } + if this.Sender != that1.Sender { + return false + } + return true +} +func (this *MsgTransferDenom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgTransferDenom) + if !ok { + that2, ok := that.(MsgTransferDenom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + if this.Sender != that1.Sender { + return false + } + if this.Recipient != that1.Recipient { + return false + } + return true +} func (this *MsgMintONFT) Equal(that interface{}) bool { if that == nil { return this == nil @@ -527,18 +769,24 @@ func (this *MsgMintONFT) Equal(that interface{}) bool { if this.Id != that1.Id { return false } - if this.Denom != that1.Denom { + if this.DenomId != that1.DenomId { return false } if !this.Metadata.Equal(&that1.Metadata) { return false } + if this.Data != that1.Data { + return false + } if this.AssetType != that1.AssetType { return false } if this.Transferable != that1.Transferable { return false } + if this.Extensible != that1.Extensible { + return false + } if this.Sender != that1.Sender { return false } @@ -569,7 +817,7 @@ func (this *MsgTransferONFT) Equal(that interface{}) bool { if this.Id != that1.Id { return false } - if this.Denom != that1.Denom { + if this.DenomId != that1.DenomId { return false } if this.Sender != that1.Sender { @@ -602,7 +850,7 @@ func (this *MsgEditONFT) Equal(that interface{}) bool { if this.Id != that1.Id { return false } - if this.Denom != that1.Denom { + if this.DenomId != that1.DenomId { return false } if !this.Metadata.Equal(&that1.Metadata) { @@ -614,6 +862,9 @@ func (this *MsgEditONFT) Equal(that interface{}) bool { if this.Transferable != that1.Transferable { return false } + if this.Extensible != that1.Extensible { + return false + } if this.Sender != that1.Sender { return false } @@ -641,7 +892,7 @@ func (this *MsgBurnONFT) Equal(that interface{}) bool { if this.Id != that1.Id { return false } - if this.Denom != that1.Denom { + if this.DenomId != that1.DenomId { return false } if this.Sender != that1.Sender { @@ -663,6 +914,8 @@ const _ = grpc.SupportPackageIsVersion4 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { CreateDenom(ctx context.Context, in *MsgCreateDenom, opts ...grpc.CallOption) (*MsgCreateDenomResponse, error) + UpdateDenom(ctx context.Context, in *MsgUpdateDenom, opts ...grpc.CallOption) (*MsgUpdateDenomResponse, error) + TransferDenom(ctx context.Context, in *MsgTransferDenom, opts ...grpc.CallOption) (*MsgTransferDenomResponse, error) MintONFT(ctx context.Context, in *MsgMintONFT, opts ...grpc.CallOption) (*MsgMintONFTResponse, error) EditONFT(ctx context.Context, in *MsgEditONFT, opts ...grpc.CallOption) (*MsgEditONFTResponse, error) TransferONFT(ctx context.Context, in *MsgTransferONFT, opts ...grpc.CallOption) (*MsgTransferONFTResponse, error) @@ -686,6 +939,24 @@ func (c *msgClient) CreateDenom(ctx context.Context, in *MsgCreateDenom, opts .. return out, nil } +func (c *msgClient) UpdateDenom(ctx context.Context, in *MsgUpdateDenom, opts ...grpc.CallOption) (*MsgUpdateDenomResponse, error) { + out := new(MsgUpdateDenomResponse) + err := c.cc.Invoke(ctx, "/OmniFlix.onft.v1beta1.Msg/UpdateDenom", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) TransferDenom(ctx context.Context, in *MsgTransferDenom, opts ...grpc.CallOption) (*MsgTransferDenomResponse, error) { + out := new(MsgTransferDenomResponse) + err := c.cc.Invoke(ctx, "/OmniFlix.onft.v1beta1.Msg/TransferDenom", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) MintONFT(ctx context.Context, in *MsgMintONFT, opts ...grpc.CallOption) (*MsgMintONFTResponse, error) { out := new(MsgMintONFTResponse) err := c.cc.Invoke(ctx, "/OmniFlix.onft.v1beta1.Msg/MintONFT", in, out, opts...) @@ -725,6 +996,8 @@ func (c *msgClient) BurnONFT(ctx context.Context, in *MsgBurnONFT, opts ...grpc. // MsgServer is the server API for Msg service. type MsgServer interface { CreateDenom(context.Context, *MsgCreateDenom) (*MsgCreateDenomResponse, error) + UpdateDenom(context.Context, *MsgUpdateDenom) (*MsgUpdateDenomResponse, error) + TransferDenom(context.Context, *MsgTransferDenom) (*MsgTransferDenomResponse, error) MintONFT(context.Context, *MsgMintONFT) (*MsgMintONFTResponse, error) EditONFT(context.Context, *MsgEditONFT) (*MsgEditONFTResponse, error) TransferONFT(context.Context, *MsgTransferONFT) (*MsgTransferONFTResponse, error) @@ -738,6 +1011,12 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) CreateDenom(ctx context.Context, req *MsgCreateDenom) (*MsgCreateDenomResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateDenom not implemented") } +func (*UnimplementedMsgServer) UpdateDenom(ctx context.Context, req *MsgUpdateDenom) (*MsgUpdateDenomResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateDenom not implemented") +} +func (*UnimplementedMsgServer) TransferDenom(ctx context.Context, req *MsgTransferDenom) (*MsgTransferDenomResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TransferDenom not implemented") +} func (*UnimplementedMsgServer) MintONFT(ctx context.Context, req *MsgMintONFT) (*MsgMintONFTResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MintONFT not implemented") } @@ -773,6 +1052,42 @@ func _Msg_CreateDenom_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } +func _Msg_UpdateDenom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateDenom) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateDenom(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OmniFlix.onft.v1beta1.Msg/UpdateDenom", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateDenom(ctx, req.(*MsgUpdateDenom)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_TransferDenom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgTransferDenom) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).TransferDenom(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OmniFlix.onft.v1beta1.Msg/TransferDenom", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).TransferDenom(ctx, req.(*MsgTransferDenom)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_MintONFT_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgMintONFT) if err := dec(in); err != nil { @@ -853,6 +1168,14 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "CreateDenom", Handler: _Msg_CreateDenom_Handler, }, + { + MethodName: "UpdateDenom", + Handler: _Msg_UpdateDenom_Handler, + }, + { + MethodName: "TransferDenom", + Handler: _Msg_TransferDenom_Handler, + }, { MethodName: "MintONFT", Handler: _Msg_MintONFT_Handler, @@ -899,13 +1222,27 @@ func (m *MsgCreateDenom) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Sender) i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x3a } if len(m.Schema) > 0 { i -= len(m.Schema) copy(dAtA[i:], m.Schema) i = encodeVarintTx(dAtA, i, uint64(len(m.Schema))) i-- + dAtA[i] = 0x32 + } + if len(m.PreviewUri) > 0 { + i -= len(m.PreviewUri) + copy(dAtA[i:], m.PreviewUri) + i = encodeVarintTx(dAtA, i, uint64(len(m.PreviewUri))) + i-- + dAtA[i] = 0x2a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintTx(dAtA, i, uint64(len(m.Description))) + i-- dAtA[i] = 0x22 } if len(m.Name) > 0 { @@ -955,7 +1292,7 @@ func (m *MsgCreateDenomResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgMintONFT) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateDenom) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -965,59 +1302,224 @@ func (m *MsgMintONFT) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgMintONFT) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateDenom) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgMintONFT) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateDenom) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Recipient) > 0 { - i -= len(m.Recipient) - copy(dAtA[i:], m.Recipient) - i = encodeVarintTx(dAtA, i, uint64(len(m.Recipient))) - i-- - dAtA[i] = 0x3a - } if len(m.Sender) > 0 { i -= len(m.Sender) copy(dAtA[i:], m.Sender) i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x2a } - if m.Transferable { + if len(m.PreviewUri) > 0 { + i -= len(m.PreviewUri) + copy(dAtA[i:], m.PreviewUri) + i = encodeVarintTx(dAtA, i, uint64(len(m.PreviewUri))) i-- - if m.Transferable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + dAtA[i] = 0x22 + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintTx(dAtA, i, uint64(len(m.Description))) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x1a } - if m.AssetType != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.AssetType)) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x12 } - { - size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintTx(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateDenomResponse) 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 *MsgUpdateDenomResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateDenomResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgTransferDenom) 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 *MsgTransferDenom) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgTransferDenom) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Recipient) > 0 { + i -= len(m.Recipient) + copy(dAtA[i:], m.Recipient) + i = encodeVarintTx(dAtA, i, uint64(len(m.Recipient))) + i-- + dAtA[i] = 0x1a + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintTx(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgTransferDenomResponse) 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 *MsgTransferDenomResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgTransferDenomResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgMintONFT) 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 *MsgMintONFT) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgMintONFT) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Recipient) > 0 { + i -= len(m.Recipient) + copy(dAtA[i:], m.Recipient) + i = encodeVarintTx(dAtA, i, uint64(len(m.Recipient))) + i-- + dAtA[i] = 0x4a + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x42 + } + if m.Extensible { + i-- + if m.Extensible { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if m.Transferable { + i-- + if m.Transferable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.AssetType != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.AssetType)) + i-- + dAtA[i] = 0x28 + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintTx(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x22 + } + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size i = encodeVarintTx(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintTx(dAtA, i, uint64(len(m.Denom))) + if len(m.DenomId) > 0 { + i -= len(m.DenomId) + copy(dAtA[i:], m.DenomId) + i = encodeVarintTx(dAtA, i, uint64(len(m.DenomId))) i-- dAtA[i] = 0x12 } @@ -1088,10 +1590,10 @@ func (m *MsgTransferONFT) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintTx(dAtA, i, uint64(len(m.Denom))) + if len(m.DenomId) > 0 { + i -= len(m.DenomId) + copy(dAtA[i:], m.DenomId) + i = encodeVarintTx(dAtA, i, uint64(len(m.DenomId))) i-- dAtA[i] = 0x12 } @@ -1153,6 +1655,13 @@ func (m *MsgEditONFT) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Sender) i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) i-- + dAtA[i] = 0x3a + } + if len(m.Extensible) > 0 { + i -= len(m.Extensible) + copy(dAtA[i:], m.Extensible) + i = encodeVarintTx(dAtA, i, uint64(len(m.Extensible))) + i-- dAtA[i] = 0x32 } if len(m.Transferable) > 0 { @@ -1179,10 +1688,10 @@ func (m *MsgEditONFT) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x1a - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintTx(dAtA, i, uint64(len(m.Denom))) + if len(m.DenomId) > 0 { + i -= len(m.DenomId) + copy(dAtA[i:], m.DenomId) + i = encodeVarintTx(dAtA, i, uint64(len(m.DenomId))) i-- dAtA[i] = 0x12 } @@ -1246,10 +1755,10 @@ func (m *MsgBurnONFT) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintTx(dAtA, i, uint64(len(m.Denom))) + if len(m.DenomId) > 0 { + i -= len(m.DenomId) + copy(dAtA[i:], m.DenomId) + i = encodeVarintTx(dAtA, i, uint64(len(m.DenomId))) i-- dAtA[i] = 0x12 } @@ -1315,6 +1824,14 @@ func (m *MsgCreateDenom) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.PreviewUri) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } l = len(m.Schema) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -1335,6 +1852,74 @@ func (m *MsgCreateDenomResponse) Size() (n int) { return n } +func (m *MsgUpdateDenom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.PreviewUri) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateDenomResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgTransferDenom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Recipient) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgTransferDenomResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgMintONFT) Size() (n int) { if m == nil { return 0 @@ -1345,18 +1930,25 @@ func (m *MsgMintONFT) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Denom) + l = len(m.DenomId) if l > 0 { n += 1 + l + sovTx(uint64(l)) } l = m.Metadata.Size() n += 1 + l + sovTx(uint64(l)) + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } if m.AssetType != 0 { n += 1 + sovTx(uint64(m.AssetType)) } if m.Transferable { n += 2 } + if m.Extensible { + n += 2 + } l = len(m.Sender) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -1387,7 +1979,7 @@ func (m *MsgTransferONFT) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Denom) + l = len(m.DenomId) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -1421,7 +2013,7 @@ func (m *MsgEditONFT) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Denom) + l = len(m.DenomId) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -1435,6 +2027,10 @@ func (m *MsgEditONFT) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + l = len(m.Extensible) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } l = len(m.Sender) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -1461,7 +2057,7 @@ func (m *MsgBurnONFT) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Denom) + l = len(m.DenomId) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -1497,28 +2093,416 @@ func (m *MsgCreateDenom) Unmarshal(dAtA []byte) error { if shift >= 64 { return ErrIntOverflowTx } - if iNdEx >= l { + 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: MsgCreateDenom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateDenom: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", 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.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PreviewUri", 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.PreviewUri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Schema", 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.Schema = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateDenomResponse) 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: MsgCreateDenomResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateDenom) 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: MsgUpdateDenom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateDenom: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { return io.ErrUnexpectedEOF } - 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: MsgCreateDenom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateDenom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1546,11 +2530,11 @@ func (m *MsgCreateDenom) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) + m.Description = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PreviewUri", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1578,11 +2562,11 @@ func (m *MsgCreateDenom) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Symbol = string(dAtA[iNdEx:postIndex]) + m.PreviewUri = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1610,11 +2594,111 @@ func (m *MsgCreateDenom) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Sender = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateDenomResponse) 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: MsgUpdateDenomResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgTransferDenom) 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: MsgTransferDenom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgTransferDenom: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1642,9 +2726,9 @@ func (m *MsgCreateDenom) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Schema = string(dAtA[iNdEx:postIndex]) + m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) } @@ -1676,6 +2760,38 @@ func (m *MsgCreateDenom) Unmarshal(dAtA []byte) error { } m.Sender = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + 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 default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -1697,7 +2813,7 @@ func (m *MsgCreateDenom) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCreateDenomResponse) Unmarshal(dAtA []byte) error { +func (m *MsgTransferDenomResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1720,10 +2836,10 @@ func (m *MsgCreateDenomResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCreateDenomResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgTransferDenomResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgTransferDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -1810,7 +2926,7 @@ func (m *MsgMintONFT) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DenomId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1838,7 +2954,7 @@ func (m *MsgMintONFT) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.DenomId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -1874,6 +2990,38 @@ func (m *MsgMintONFT) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", 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.Data = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field AssetType", wireType) } @@ -1892,7 +3040,7 @@ func (m *MsgMintONFT) Unmarshal(dAtA []byte) error { break } } - case 5: + case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Transferable", wireType) } @@ -1912,7 +3060,27 @@ func (m *MsgMintONFT) Unmarshal(dAtA []byte) error { } } m.Transferable = bool(v != 0) - case 6: + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Extensible", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Extensible = bool(v != 0) + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) } @@ -1944,7 +3112,7 @@ func (m *MsgMintONFT) Unmarshal(dAtA []byte) error { } m.Sender = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) } @@ -2110,7 +3278,7 @@ func (m *MsgTransferONFT) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DenomId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2138,7 +3306,7 @@ func (m *MsgTransferONFT) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.DenomId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -2338,7 +3506,7 @@ func (m *MsgEditONFT) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DenomId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2366,7 +3534,7 @@ func (m *MsgEditONFT) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.DenomId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -2466,6 +3634,38 @@ func (m *MsgEditONFT) Unmarshal(dAtA []byte) error { m.Transferable = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Extensible", 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.Extensible = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) } @@ -2631,7 +3831,7 @@ func (m *MsgBurnONFT) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DenomId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2659,7 +3859,7 @@ func (m *MsgBurnONFT) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.DenomId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { From 74ec4b41a9fd269885aad9c6545cbd6a94470ebf Mon Sep 17 00:00:00 2001 From: harish Date: Tue, 9 Nov 2021 19:59:55 +0530 Subject: [PATCH 2/7] updated Denom and ONFT structures --- client/cli/flags.go | 14 +- client/cli/tx.go | 53 ++----- client/rest/rest.go | 4 +- client/rest/tx.go | 32 +--- exported/onft.go | 2 +- keeper/collection.go | 18 +-- keeper/keeper.go | 32 ++-- keeper/msg_server.go | 7 +- proto/onft/v1beta1/genesis.proto | 1 - proto/onft/v1beta1/onft.proto | 34 ++-- proto/onft/v1beta1/tx.proto | 19 ++- types/constants.go | 2 + types/msgs.go | 17 +- types/onft.go | 22 +-- types/onft.pb.go | 261 ++++++++++++------------------- types/tx.pb.go | 169 ++++++++------------ 16 files changed, 263 insertions(+), 424 deletions(-) diff --git a/client/cli/flags.go b/client/cli/flags.go index 4d03c6d..085d915 100644 --- a/client/cli/flags.go +++ b/client/cli/flags.go @@ -9,13 +9,13 @@ const ( FlagONFTDescription = "description" FlagONFTMediaURI = "media-uri" FlagONFTPreviewURI = "preview-uri" - FlagONFTType = "type" + FlagData = "data" FlagTransferable = "transferable" - FlagExtensible = "extensible" + FlagExtensible = "extensible" FlagRecipient = "recipient" FlagOwner = "owner" FlagDenomName = "name" - FlagDenom = "denom" + FlagDenomID = "denom-id" FlagSchema = "schema" FlagDenomDescription = "description" FlagDenomPreviewURI = "preview-uri" @@ -41,15 +41,17 @@ func init() { FsMintONFT.String(FlagONFTPreviewURI, "", "Preview uri of onft") FsMintONFT.String(FlagONFTName, "", "Name of onft") FsMintONFT.String(FlagONFTDescription, "", "Description of onft") - FsMintONFT.String(FlagONFTType, "video", "type of onft (artwork|audio|video)") - FsMintONFT.String(FlagTransferable, "yes", " transferability of onft (yes|no)") + FsMintONFT.String(FlagData, "", "custom data of onft") + + FsMintONFT.Bool(FlagTransferable, true, "transferability of onft (true | false)") + FsMintONFT.Bool(FlagExtensible, false, "extensisbility of onft (true | false)") FsEditONFT.String(FlagONFTMediaURI, "[do-not-modify]", "Media uri of onft") FsEditONFT.String(FlagONFTPreviewURI, "[do-not-modify]", "Preview uri of onft") FsEditONFT.String(FlagONFTName, "[do-not-modify]", "Name of nft") FsEditONFT.String(FlagONFTDescription, "[do-not-modify]", "Description of onft") - FsEditONFT.String(FlagONFTType, "[do-not-modify]", "type of onft") FsEditONFT.String(FlagTransferable, "[do-not-modify]", "transferability of onft") + FsEditONFT.String(FlagData, "[do-not-modify]", "custom data of onft") FsTransferONFT.String(FlagRecipient, "", "Receiver of the onft. default value is sender address of transaction") FsQuerySupply.String(FlagOwner, "", "The owner of a nft") diff --git a/client/cli/tx.go b/client/cli/tx.go index e02f904..871873b 100644 --- a/client/cli/tx.go +++ b/client/cli/tx.go @@ -159,48 +159,32 @@ $ %s tx onft mint [denom-id] --type --name --description onftMetadata.Description = onftDescription } if len(onftMediaURI) > 0 { - onftMetadata.Media = onftMediaURI + onftMetadata.MediaURI = onftMediaURI } if len(onftPreviewURI) > 0 { - onftMetadata.Preview = onftPreviewURI + onftMetadata.PreviewURI = onftPreviewURI } - var onftType types.AssetType - onftAssetType, err := cmd.Flags().GetString(FlagONFTType) + data, err := cmd.Flags().GetString(FlagData) if err != nil { return err } - onftAssetType = strings.ToLower(strings.TrimSpace(onftAssetType)) - switch onftAssetType { - case "artwork": - onftType = types.ARTWORK - case "audio": - onftType = types.AUDIO - case "video": - onftType = types.VIDEO - default: - return fmt.Errorf("invalid onft type, valid types are artwork,audio,video") - } - transferable := true - transferability, err := cmd.Flags().GetString(FlagTransferable) + + transferable, err := cmd.Flags().GetBool(FlagTransferable) if err != nil { return err } - transferability = strings.ToLower(strings.TrimSpace(transferability)) - if len(transferability) > 0 && (transferability == "no" || transferability == "false") { - transferable = false - } - extensible := true - extensibility, err := cmd.Flags().GetString(FlagTransferable) - extensibility = strings.ToLower(strings.TrimSpace(extensibility)) - if len(extensibility) > 0 && (extensibility == "no" || extensibility == "false") { - extensible = false + + extensible, err := cmd.Flags().GetBool(FlagExtensible) + if err != nil { + return err } + msg := types.NewMsgMintONFT( denomId, sender, recipient, onftMetadata, - onftType, + data, transferable, extensible, ) @@ -269,28 +253,23 @@ $ %s tx onft edit [denom-id] [onft-id] --name= --description= 0 { - onftMetadata.Media = onftMediaURI + onftMetadata.MediaURI = onftMediaURI } if len(onftPreviewURI) > 0 { - onftMetadata.Preview = onftPreviewURI + onftMetadata.PreviewURI = onftPreviewURI } - onftType, err := cmd.Flags().GetString(FlagONFTType) + data, err := cmd.Flags().GetString(FlagData) if err != nil { return err } - onftType = strings.ToLower(strings.TrimSpace(onftType)) - if len(onftType) > 0 && !(onftType == "artwork" || onftType == "audio" || onftType == "video" || - onftType == types.DoNotModify) { - return fmt.Errorf("invalid option for type flag , valid options are artwork|audio|video") - } transferable, err := cmd.Flags().GetString(FlagTransferable) if err != nil { return err } if !(len(transferable) > 0 && (transferable == "no" || transferable == "yes" || transferable == types.DoNotModify)) { - return fmt.Errorf("invalid option for transferable flag , valid options are yes|no") + return fmt.Errorf("invalid option for transferable flag , valid options are yes | no") } extensible, err := cmd.Flags().GetString(FlagExtensible) if err != nil { @@ -304,7 +283,7 @@ $ %s tx onft edit [denom-id] [onft-id] --name= --description= 0 { - metadata.Media = req.MediaURI + metadata.MediaURI = req.MediaURI } if len(req.PreviewURI) > 0 { - metadata.Preview = req.PreviewURI - } - var onftType types.AssetType - switch strings.ToLower(req.Type) { - case "artwork": - onftType = types.ARTWORK - case "audio": - onftType = types.AUDIO - case "video": - onftType = types.VIDEO - default: - rest.WriteErrorResponse(w, http.StatusBadRequest, "invalid onft type, valid types are artwork,audio,video") - return + metadata.PreviewURI = req.PreviewURI } transferable := true transferability := strings.ToLower(req.Transferable) @@ -126,7 +114,7 @@ func mintONFTHandlerFn(cliCtx client.Context) http.HandlerFunc { req.Sender.String(), req.Recipient.String(), metadata, - onftType, + req.Data, transferable, extensible, ) @@ -160,17 +148,13 @@ func editONFTHandlerFn(cliCtx client.Context) http.HandlerFunc { metadata.Description = req.Description } if len(req.MediaURI) > 0 { - metadata.Media = req.MediaURI + metadata.MediaURI = req.MediaURI } if len(req.PreviewURI) > 0 { - metadata.Preview = req.PreviewURI - } - onftType := strings.ToLower(req.Type) - if !(len(onftType) > 0 && (onftType == "artwork" || onftType == "audio" || onftType == "video" || - onftType == types.DoNotModify)) { - rest.WriteErrorResponse(w, http.StatusBadRequest, "invalid onft type, valid types are artwork,audio,video") - return + metadata.PreviewURI = req.PreviewURI } + + transferable := strings.ToLower(req.Transferable) if len(transferable) > 0 && !(transferable == "no" || transferable == "yes" || transferable == types.DoNotModify) { @@ -187,7 +171,7 @@ func editONFTHandlerFn(cliCtx client.Context) http.HandlerFunc { vars[RestParamONFTID], vars[RestParamDenom], metadata, - onftType, + req.Data, transferable, extensible, req.Sender.String(), diff --git a/exported/onft.go b/exported/onft.go index b340bc5..7ac2ea6 100644 --- a/exported/onft.go +++ b/exported/onft.go @@ -12,7 +12,7 @@ type ONFT interface { GetDescription() string GetMediaURI() string GetPreviewURI() string - GetType() string + GetData() string IsTransferable() bool IsExtensible() bool GetCreatedTime() time.Time diff --git a/keeper/collection.go b/keeper/collection.go index b44871a..f02ef47 100644 --- a/keeper/collection.go +++ b/keeper/collection.go @@ -12,25 +12,15 @@ func (k Keeper) SetCollection(ctx sdk.Context, collection types.Collection) erro metadata := types.Metadata{ Name: onft.GetName(), Description: onft.GetDescription(), - Media: onft.GetMediaURI(), - Preview: onft.GetPreviewURI(), - } - var aType types.AssetType - switch onft.GetType() { - case "artwork": - aType = types.ARTWORK - case "audio": - aType = types.AUDIO - case "video": - aType = types.VIDEO - default: - aType = types.VIDEO + MediaURI: onft.GetMediaURI(), + PreviewURI: onft.GetPreviewURI(), } + if err := k.MintONFT(ctx, collection.Denom.Id, onft.GetID(), metadata, - aType, + onft.GetData(), onft.IsTransferable(), onft.IsExtensible(), onft.GetOwner(), diff --git a/keeper/keeper.go b/keeper/keeper.go index e343947..c3ac717 100644 --- a/keeper/keeper.go +++ b/keeper/keeper.go @@ -34,7 +34,7 @@ func (k Keeper) CreateDenom(ctx sdk.Context, creator sdk.AccAddress, description, previewUri string) error { return k.SetDenom(ctx, types.NewDenom(id, symbol, name, schema, creator, description, previewUri)) } -func (k Keeper) UpdateDenom(ctx sdk.Context) { +func (k Keeper) UpdateDenom(ctx sdk.Context) { // TODO: Implement Update Denom keeper functionality } @@ -44,8 +44,8 @@ func (k Keeper) TransferDenomOwner(ctx sdk.Context) { func (k Keeper) MintONFT( ctx sdk.Context, denomID, onftID string, - metadata types.Metadata, assetType types.AssetType, - transferable, extensible bool, sender, recipient sdk.AccAddress) error { + metadata types.Metadata, data string, transferable, extensible bool, + sender, recipient sdk.AccAddress) error { if !k.HasPermissionToMint(ctx, denomID, sender) { return sdkerrors.Wrapf(types.ErrUnauthorized, "only creator of denom has permission to mint") } @@ -60,7 +60,7 @@ func (k Keeper) MintONFT( k.setONFT(ctx, denomID, types.NewONFT( onftID, metadata, - assetType, + data, transferable, extensible, recipient, @@ -70,7 +70,7 @@ func (k Keeper) MintONFT( return nil } -func (k Keeper) EditONFT(ctx sdk.Context, denomID, onftID string, metadata types.Metadata, assetType string, +func (k Keeper) EditONFT(ctx sdk.Context, denomID, onftID string, metadata types.Metadata, transferable string, owner sdk.AccAddress) error { if !k.HasDenomID(ctx, denomID) { return sdkerrors.Wrapf(types.ErrInvalidDenom, "denomID %s not exists", denomID) @@ -87,23 +87,11 @@ func (k Keeper) EditONFT(ctx sdk.Context, denomID, onftID string, metadata types if metadata.Description != types.DoNotModify { onft.Metadata.Description = metadata.Description } - if metadata.Preview != types.DoNotModify { - onft.Metadata.Preview = metadata.Preview + if metadata.PreviewURI != types.DoNotModify { + onft.Metadata.PreviewURI = metadata.PreviewURI } - if metadata.Media != types.DoNotModify { - onft.Metadata.Media = metadata.Media - } - if assetType != types.DoNotModify { - switch _type := strings.ToLower(assetType); _type { - case "artwork": - onft.Type = types.ARTWORK - case "audio": - onft.Type = types.AUDIO - case "video": - onft.Type = types.VIDEO - default: - onft.Type = types.ARTWORK - } + if metadata.MediaURI != types.DoNotModify { + onft.Metadata.MediaURI = metadata.MediaURI } if transferable != types.DoNotModify { denom, err := k.GetDenom(ctx, denomID) @@ -113,7 +101,7 @@ func (k Keeper) EditONFT(ctx sdk.Context, denomID, onftID string, metadata types if denom.Creator != onft.Owner { return sdkerrors.Wrapf( types.ErrNotEditable, - "onft %s: transferability can be modified only when creator and owner of onft are equal.", + "onft %s: transferability can be modified only when creator is the owner of onft.", onftID, ) } diff --git a/keeper/msg_server.go b/keeper/msg_server.go index 51bdff1..9d03f8c 100644 --- a/keeper/msg_server.go +++ b/keeper/msg_server.go @@ -84,7 +84,7 @@ func (m msgServer) MintONFT(goCtx context.Context, msg.DenomId, msg.Id, msg.Metadata, - msg.AssetType, + msg.Data, msg.Transferable, msg.Extensible, sender, @@ -98,7 +98,7 @@ func (m msgServer) MintONFT(goCtx context.Context, types.EventTypeMintONFT, sdk.NewAttribute(types.AttributeKeyONFTID, msg.Id), sdk.NewAttribute(types.AttributeKeyDenomID, msg.DenomId), - sdk.NewAttribute(types.AttributeKeyMediaURI, msg.Metadata.Media), + sdk.NewAttribute(types.AttributeKeyMediaURI, msg.Metadata.MediaURI), sdk.NewAttribute(types.AttributeKeyRecipient, msg.Recipient), ), sdk.NewEvent( @@ -122,7 +122,6 @@ func (m msgServer) EditONFT(goCtx context.Context, ctx := sdk.UnwrapSDKContext(goCtx) if err := m.Keeper.EditONFT(ctx, msg.DenomId, msg.Id, msg.Metadata, - msg.AssetType, msg.Transferable, sender, ); err != nil { @@ -134,7 +133,7 @@ func (m msgServer) EditONFT(goCtx context.Context, types.EventTypeEditONFT, sdk.NewAttribute(types.AttributeKeyONFTID, msg.Id), sdk.NewAttribute(types.AttributeKeyDenomID, msg.DenomId), - sdk.NewAttribute(types.AttributeKeyMediaURI, msg.Metadata.Media), + sdk.NewAttribute(types.AttributeKeyMediaURI, msg.Metadata.MediaURI), sdk.NewAttribute(types.AttributeKeyOwner, msg.Sender), ), sdk.NewEvent( diff --git a/proto/onft/v1beta1/genesis.proto b/proto/onft/v1beta1/genesis.proto index ab6007c..4381384 100644 --- a/proto/onft/v1beta1/genesis.proto +++ b/proto/onft/v1beta1/genesis.proto @@ -8,7 +8,6 @@ option go_package = "github.com/OmniFlix/onft/types"; // GenesisState defines the nft module's genesis state. message GenesisState { - repeated Collection collections = 1 [(gogoproto.nullable) = false]; } diff --git a/proto/onft/v1beta1/onft.proto b/proto/onft/v1beta1/onft.proto index 68577ed..df3c553 100644 --- a/proto/onft/v1beta1/onft.proto +++ b/proto/onft/v1beta1/onft.proto @@ -42,38 +42,32 @@ message ONFT { Metadata metadata = 2 [(gogoproto.nullable) = false]; string data = 3; string owner = 4; - AssetType type = 5; - bool transferable = 6; - bool extensible = 7; - google.protobuf.Timestamp created_at = 8 [ + bool transferable = 5; + bool extensible = 6; + google.protobuf.Timestamp created_at = 7 [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"created_at\"" ]; } - -enum AssetType { - option (gogoproto.goproto_enum_prefix) = false; - - ARTWORK = 0; - AUDIO = 1; - VIDEO = 2; - DOCUMENT = 3; -} - message Metadata { option (gogoproto.equal) = true; - string name = 1; - string description = 2; - string preview = 3; - string media = 4; + string name = 1 [(gogoproto.moretags) = "yaml:\"name\""]; + string description = 2 [(gogoproto.moretags) = "yaml:\"description\""]; + string media_uri = 3 [ + (gogoproto.moretags) = "yaml:\"media_uri\"", + (gogoproto.customname) = "MediaURI" + ]; + string preview_uri = 4 [ + (gogoproto.moretags) = "yaml:\"preview_uri\"", + (gogoproto.customname) = "PreviewURI" + ]; } -// Entry defines a type of owner -message Entry { +message Owner { option (gogoproto.equal) = true; string address = 1; diff --git a/proto/onft/v1beta1/tx.proto b/proto/onft/v1beta1/tx.proto index c91a0eb..009b8a4 100644 --- a/proto/onft/v1beta1/tx.proto +++ b/proto/onft/v1beta1/tx.proto @@ -62,15 +62,14 @@ message MsgTransferDenomResponse {} message MsgMintONFT { option (gogoproto.equal) = true; - string id = 1; - string denom_id = 2 [(gogoproto.moretags) = "yaml:\"denom_id\""]; - Metadata metadata = 3 [(gogoproto.nullable) = false]; - string data = 4; - AssetType assetType = 5; - bool transferable = 6; - bool extensible = 7; - string sender = 8; - string recipient = 9; + string id = 1; + string denom_id = 2 [(gogoproto.moretags) = "yaml:\"denom_id\""]; + Metadata metadata = 3 [(gogoproto.nullable) = false]; + string data = 4; + bool transferable = 5; + bool extensible = 6; + string sender = 7; + string recipient = 8; } message MsgMintONFTResponse {} @@ -93,7 +92,7 @@ message MsgEditONFT { string id = 1; string denom_id = 2 [(gogoproto.moretags) = "yaml:\"denom_id\""]; Metadata metadata = 3 [(gogoproto.nullable) = false]; - string assetType = 4; + string data = 4; string transferable = 5; string extensible = 6; string sender = 7; diff --git a/types/constants.go b/types/constants.go index 0f39706..af8ccd7 100644 --- a/types/constants.go +++ b/types/constants.go @@ -10,4 +10,6 @@ const ( MaxPreviewURILen = 256 MaxMediaURILen = 256 DoNotModify = "[do-not-modify]" + IDPrefix = "onft" + DenomPrefix = "onftdenom" ) diff --git a/types/msgs.go b/types/msgs.go index b803040..60beced 100644 --- a/types/msgs.go +++ b/types/msgs.go @@ -30,7 +30,7 @@ var ( func NewMsgCreateDenom(symbol, name, schema, description, previewUri, sender string) *MsgCreateDenom { return &MsgCreateDenom{ Sender: sender, - Id: GenUniqueID("onftdenom"), + Id: GenUniqueID(DenomPrefix), Symbol: symbol, Name: name, Schema: schema, @@ -155,14 +155,13 @@ func (msg MsgTransferDenom) GetSigners() []sdk.AccAddress { } func NewMsgMintONFT( - denomId, sender, recipient string, metadata Metadata, - assetType AssetType, transferable, extensible bool) *MsgMintONFT { + denomId, sender, recipient string, metadata Metadata, data string, transferable, extensible bool) *MsgMintONFT { return &MsgMintONFT{ - Id: GenUniqueID("onft"), + Id: GenUniqueID(IDPrefix), DenomId: denomId, Metadata: metadata, - AssetType: assetType, + Data: data, Transferable: transferable, Extensible: extensible, Sender: sender, @@ -188,7 +187,7 @@ func (msg MsgMintONFT) ValidateBasic() error { return err } - if err := ValidateMediaURI(msg.Metadata.Media); err != nil { + if err := ValidateMediaURI(msg.Metadata.MediaURI); err != nil { return err } @@ -251,13 +250,13 @@ func (msg MsgTransferONFT) GetSigners() []sdk.AccAddress { } func NewMsgEditONFT( - id, denomId string, metadata Metadata, assetType, + id, denomId string, metadata Metadata, data, transferable, extensible, sender string) *MsgEditONFT { return &MsgEditONFT{ Id: id, DenomId: denomId, Metadata: metadata, - AssetType: assetType, + Data: data, Transferable: transferable, Extensible: extensible, Sender: sender, @@ -277,7 +276,7 @@ func (msg MsgEditONFT) ValidateBasic() error { return err } - if err := ValidateMediaURI(msg.Metadata.Media); err != nil { + if err := ValidateMediaURI(msg.Metadata.MediaURI); err != nil { return err } return ValidateONFTID(msg.Id) diff --git a/types/onft.go b/types/onft.go index 30dc218..52d3545 100644 --- a/types/onft.go +++ b/types/onft.go @@ -13,13 +13,12 @@ import ( var _ exported.ONFT = ONFT{} func NewONFT( - id string, metadata Metadata, assetType AssetType, - transferable, extensible bool, owner sdk.AccAddress, + id string, metadata Metadata, data string, transferable, extensible bool, owner sdk.AccAddress, createdTime time.Time) ONFT { return ONFT{ Id: id, Metadata: metadata, - Type: assetType, + Data: data, Owner: owner.String(), Transferable: transferable, Extensible: extensible, @@ -40,11 +39,11 @@ func (onft ONFT) GetDescription() string { } func (onft ONFT) GetMediaURI() string { - return onft.Metadata.Media + return onft.Metadata.MediaURI } func (onft ONFT) GetPreviewURI() string { - return onft.Metadata.Preview + return onft.Metadata.PreviewURI } func (onft ONFT) GetOwner() sdk.AccAddress { @@ -55,9 +54,8 @@ func (onft ONFT) GetOwner() sdk.AccAddress { func (onft ONFT) GetMetadata() string { return onft.Metadata.String() } - -func (onft ONFT) GetType() string { - return onft.Type.String() +func (onft ONFT) GetData() string { + return onft.Data } func (onft ONFT) IsTransferable() bool { return onft.Transferable @@ -83,10 +81,14 @@ func NewONFTs(onfts ...exported.ONFT) ONFTs { func ValidateONFTID(onftID string) error { onftID = strings.TrimSpace(onftID) if len(onftID) < MinDenomLen || len(onftID) > MaxDenomLen { - return sdkerrors.Wrapf(ErrInvalidONFTID, "invalid onftID %s, only accepts value [%d, %d]", onftID, MinDenomLen, MaxDenomLen) + return sdkerrors.Wrapf( + ErrInvalidONFTID, + "invalid onftID %s, only accepts value [%d, %d]", onftID, MinDenomLen, MaxDenomLen) } if !IsBeginWithAlpha(onftID) || !IsAlphaNumeric(onftID) { - return sdkerrors.Wrapf(ErrInvalidONFTID, "invalid onftID %s, only accepts alphanumeric characters,and begin with an english letter", onftID) + return sdkerrors.Wrapf( + ErrInvalidONFTID, + "invalid onftID %s, only accepts alphanumeric characters,and begin with an english letter", onftID) } return nil } diff --git a/types/onft.pb.go b/types/onft.pb.go index 0df0253..8a3b602 100644 --- a/types/onft.pb.go +++ b/types/onft.pb.go @@ -27,37 +27,6 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type AssetType int32 - -const ( - ARTWORK AssetType = 0 - AUDIO AssetType = 1 - VIDEO AssetType = 2 - DOCUMENT AssetType = 3 -) - -var AssetType_name = map[int32]string{ - 0: "ARTWORK", - 1: "AUDIO", - 2: "VIDEO", - 3: "DOCUMENT", -} - -var AssetType_value = map[string]int32{ - "ARTWORK": 0, - "AUDIO": 1, - "VIDEO": 2, - "DOCUMENT": 3, -} - -func (x AssetType) String() string { - return proto.EnumName(AssetType_name, int32(x)) -} - -func (AssetType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_651c3270ad840fa5, []int{0} -} - // Collection type Collection struct { Denom Denom `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom"` @@ -184,10 +153,9 @@ type ONFT struct { Metadata Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata"` Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` Owner string `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"` - Type AssetType `protobuf:"varint,5,opt,name=type,proto3,enum=OmniFlix.onft.v1beta1.AssetType" json:"type,omitempty"` - Transferable bool `protobuf:"varint,6,opt,name=transferable,proto3" json:"transferable,omitempty"` - Extensible bool `protobuf:"varint,7,opt,name=extensible,proto3" json:"extensible,omitempty"` - CreatedAt time.Time `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at" yaml:"created_at"` + Transferable bool `protobuf:"varint,5,opt,name=transferable,proto3" json:"transferable,omitempty"` + Extensible bool `protobuf:"varint,6,opt,name=extensible,proto3" json:"extensible,omitempty"` + CreatedAt time.Time `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at" yaml:"created_at"` } func (m *ONFT) Reset() { *m = ONFT{} } @@ -224,10 +192,10 @@ func (m *ONFT) XXX_DiscardUnknown() { var xxx_messageInfo_ONFT proto.InternalMessageInfo type Metadata struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Preview string `protobuf:"bytes,3,opt,name=preview,proto3" json:"preview,omitempty"` - Media string `protobuf:"bytes,4,opt,name=media,proto3" json:"media,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" yaml:"name"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` + MediaURI string `protobuf:"bytes,3,opt,name=media_uri,json=mediaUri,proto3" json:"media_uri,omitempty" yaml:"media_uri"` + PreviewURI string `protobuf:"bytes,4,opt,name=preview_uri,json=previewUri,proto3" json:"preview_uri,omitempty" yaml:"preview_uri"` } func (m *Metadata) Reset() { *m = Metadata{} } @@ -263,24 +231,23 @@ func (m *Metadata) XXX_DiscardUnknown() { var xxx_messageInfo_Metadata proto.InternalMessageInfo -// Entry defines a type of owner -type Entry struct { +type Owner struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` IDCollections []IDCollection `protobuf:"bytes,2,rep,name=id_collections,json=idCollections,proto3" json:"id_collections" yaml:"idcs"` } -func (m *Entry) Reset() { *m = Entry{} } -func (m *Entry) String() string { return proto.CompactTextString(m) } -func (*Entry) ProtoMessage() {} -func (*Entry) Descriptor() ([]byte, []int) { +func (m *Owner) Reset() { *m = Owner{} } +func (m *Owner) String() string { return proto.CompactTextString(m) } +func (*Owner) ProtoMessage() {} +func (*Owner) Descriptor() ([]byte, []int) { return fileDescriptor_651c3270ad840fa5, []int{5} } -func (m *Entry) XXX_Unmarshal(b []byte) error { +func (m *Owner) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Owner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Entry.Marshal(b, m, deterministic) + return xxx_messageInfo_Owner.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -290,78 +257,76 @@ func (m *Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Entry) XXX_Merge(src proto.Message) { - xxx_messageInfo_Entry.Merge(m, src) +func (m *Owner) XXX_Merge(src proto.Message) { + xxx_messageInfo_Owner.Merge(m, src) } -func (m *Entry) XXX_Size() int { +func (m *Owner) XXX_Size() int { return m.Size() } -func (m *Entry) XXX_DiscardUnknown() { - xxx_messageInfo_Entry.DiscardUnknown(m) +func (m *Owner) XXX_DiscardUnknown() { + xxx_messageInfo_Owner.DiscardUnknown(m) } -var xxx_messageInfo_Entry proto.InternalMessageInfo +var xxx_messageInfo_Owner proto.InternalMessageInfo func init() { - proto.RegisterEnum("OmniFlix.onft.v1beta1.AssetType", AssetType_name, AssetType_value) proto.RegisterType((*Collection)(nil), "OmniFlix.onft.v1beta1.Collection") proto.RegisterType((*IDCollection)(nil), "OmniFlix.onft.v1beta1.IDCollection") proto.RegisterType((*Denom)(nil), "OmniFlix.onft.v1beta1.Denom") proto.RegisterType((*ONFT)(nil), "OmniFlix.onft.v1beta1.ONFT") proto.RegisterType((*Metadata)(nil), "OmniFlix.onft.v1beta1.Metadata") - proto.RegisterType((*Entry)(nil), "OmniFlix.onft.v1beta1.Entry") + proto.RegisterType((*Owner)(nil), "OmniFlix.onft.v1beta1.Owner") } func init() { proto.RegisterFile("onft/v1beta1/onft.proto", fileDescriptor_651c3270ad840fa5) } var fileDescriptor_651c3270ad840fa5 = []byte{ - // 731 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0x4d, 0x6f, 0xd3, 0x4a, - 0x14, 0x8d, 0xd3, 0xb8, 0x49, 0x6e, 0xda, 0xbe, 0xbc, 0x79, 0xed, 0x7b, 0x56, 0x1e, 0xd8, 0x91, - 0x61, 0x51, 0xb1, 0x70, 0xd4, 0x80, 0x10, 0xaa, 0x58, 0x90, 0x34, 0xad, 0x14, 0xa1, 0x36, 0x92, - 0x95, 0x02, 0x62, 0x13, 0x39, 0x99, 0x69, 0x3a, 0x52, 0x6c, 0x47, 0x9e, 0xe9, 0x47, 0xfe, 0x01, - 0x2b, 0xd4, 0x2d, 0x3b, 0x24, 0xfe, 0x4c, 0x97, 0xdd, 0x20, 0xb1, 0x21, 0x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- 0x6e, 0xf7, 0x75, 0xc7, 0x7d, 0x59, 0xce, 0xa0, 0x22, 0xe8, 0x8d, 0xfd, 0x56, 0xbb, 0x53, 0xd6, - 0xc4, 0xf1, 0x55, 0xbb, 0xb5, 0xdd, 0x29, 0x67, 0xd1, 0x12, 0x14, 0x5a, 0x9d, 0xad, 0xfd, 0xdd, - 0xed, 0xbd, 0x6e, 0x79, 0xa1, 0x92, 0x7b, 0xf7, 0xc9, 0xcc, 0x34, 0x9f, 0x9f, 0xff, 0x30, 0x33, - 0xe7, 0x33, 0x53, 0xbb, 0x98, 0x99, 0xda, 0xf7, 0x99, 0xa9, 0x9d, 0x5d, 0x9a, 0x99, 0x8b, 0x4b, - 0x33, 0xf3, 0xe5, 0xd2, 0xcc, 0xbc, 0x35, 0x87, 0x94, 0x1f, 0x1e, 0xf5, 0x9d, 0x41, 0xe8, 0xd7, - 0x12, 0x2d, 0xf2, 0x17, 0x59, 0x13, 0x0f, 0x87, 0xf5, 0x17, 0xe5, 0x64, 0x1f, 0xff, 0x0a, 0x00, - 0x00, 0xff, 0xff, 0x4b, 0x94, 0xd0, 0x60, 0x44, 0x05, 0x00, 0x00, + // 709 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0xcd, 0x4f, 0xdb, 0x4e, + 0x10, 0x8d, 0x43, 0xbe, 0x98, 0xf0, 0xf1, 0xfb, 0x6d, 0x81, 0x5a, 0xb4, 0xb5, 0x23, 0xc3, 0x81, + 0x93, 0x23, 0x52, 0xa9, 0x42, 0xa8, 0x95, 0x8a, 0x4b, 0x91, 0x72, 0xa0, 0x54, 0x16, 0x48, 0x55, + 0x2f, 0x91, 0x93, 0x5d, 0xc2, 0x4a, 0xb1, 0x1d, 0xd9, 0xcb, 0xd7, 0x3f, 0x51, 0x71, 0xed, 0xad, + 0xb7, 0xfe, 0x2b, 0x1c, 0xb9, 0x54, 0xea, 0xc9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 0xd7, 0x1e, 0xb0, 0x4c, 0xfe, 0x01, 0x3b, + 0xeb, 0xea, 0xb1, 0xcf, 0xe7, 0xd1, 0xf8, 0x4e, 0x52, 0x4e, 0x7b, 0xb1, 0xe5, 0xce, 0x73, 0x9a, + 0xcb, 0xa6, 0xbd, 0x39, 0x2f, 0xaf, 0x7f, 0x19, 0x85, 0xeb, 0x91, 0xa1, 0xdd, 0x8c, 0x0c, 0xed, + 0xe7, 0xc8, 0xd0, 0xae, 0x6e, 0x8d, 0xc2, 0xcd, 0xad, 0x51, 0xf8, 0x7e, 0x6b, 0x14, 0x3e, 0x1a, + 0x7d, 0x2e, 0x4e, 0x4e, 0xbb, 0x76, 0x2f, 0xf4, 0x9b, 0x59, 0x1f, 0xf8, 0xa3, 0x6c, 0x8a, 0xcb, + 0x21, 0x8b, 0xbb, 0x15, 0x74, 0xc5, 0xf3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7d, 0x44, 0x24, + 0x46, 0x4a, 0x05, 0x00, 0x00, } func (this *Collection) Equal(that interface{}) bool { @@ -501,9 +466,6 @@ func (this *ONFT) Equal(that interface{}) bool { if this.Owner != that1.Owner { return false } - if this.Type != that1.Type { - return false - } if this.Transferable != that1.Transferable { return false } @@ -540,22 +502,22 @@ func (this *Metadata) Equal(that interface{}) bool { if this.Description != that1.Description { return false } - if this.Preview != that1.Preview { + if this.MediaURI != that1.MediaURI { return false } - if this.Media != that1.Media { + if this.PreviewURI != that1.PreviewURI { return false } return true } -func (this *Entry) Equal(that interface{}) bool { +func (this *Owner) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*Entry) + that1, ok := that.(*Owner) if !ok { - that2, ok := that.(Entry) + that2, ok := that.(Owner) if ok { that1 = &that2 } else { @@ -765,7 +727,7 @@ func (m *ONFT) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= n2 i = encodeVarintOnft(dAtA, i, uint64(n2)) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x3a if m.Extensible { i-- if m.Extensible { @@ -774,7 +736,7 @@ func (m *ONFT) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x38 + dAtA[i] = 0x30 } if m.Transferable { i-- @@ -784,11 +746,6 @@ func (m *ONFT) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x30 - } - if m.Type != 0 { - i = encodeVarintOnft(dAtA, i, uint64(m.Type)) - i-- dAtA[i] = 0x28 } if len(m.Owner) > 0 { @@ -845,17 +802,17 @@ func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Media) > 0 { - i -= len(m.Media) - copy(dAtA[i:], m.Media) - i = encodeVarintOnft(dAtA, i, uint64(len(m.Media))) + if len(m.PreviewURI) > 0 { + i -= len(m.PreviewURI) + copy(dAtA[i:], m.PreviewURI) + i = encodeVarintOnft(dAtA, i, uint64(len(m.PreviewURI))) i-- dAtA[i] = 0x22 } - if len(m.Preview) > 0 { - i -= len(m.Preview) - copy(dAtA[i:], m.Preview) - i = encodeVarintOnft(dAtA, i, uint64(len(m.Preview))) + if len(m.MediaURI) > 0 { + i -= len(m.MediaURI) + copy(dAtA[i:], m.MediaURI) + i = encodeVarintOnft(dAtA, i, uint64(len(m.MediaURI))) i-- dAtA[i] = 0x1a } @@ -876,7 +833,7 @@ func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Entry) Marshal() (dAtA []byte, err error) { +func (m *Owner) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -886,12 +843,12 @@ func (m *Entry) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Entry) MarshalTo(dAtA []byte) (int, error) { +func (m *Owner) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Entry) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Owner) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1024,9 +981,6 @@ func (m *ONFT) Size() (n int) { if l > 0 { n += 1 + l + sovOnft(uint64(l)) } - if m.Type != 0 { - n += 1 + sovOnft(uint64(m.Type)) - } if m.Transferable { n += 2 } @@ -1052,18 +1006,18 @@ func (m *Metadata) Size() (n int) { if l > 0 { n += 1 + l + sovOnft(uint64(l)) } - l = len(m.Preview) + l = len(m.MediaURI) if l > 0 { n += 1 + l + sovOnft(uint64(l)) } - l = len(m.Media) + l = len(m.PreviewURI) if l > 0 { n += 1 + l + sovOnft(uint64(l)) } return n } -func (m *Entry) Size() (n int) { +func (m *Owner) Size() (n int) { if m == nil { return 0 } @@ -1752,25 +1706,6 @@ func (m *ONFT) Unmarshal(dAtA []byte) error { m.Owner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnft - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= AssetType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Transferable", wireType) } @@ -1790,7 +1725,7 @@ func (m *ONFT) Unmarshal(dAtA []byte) error { } } m.Transferable = bool(v != 0) - case 7: + case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Extensible", wireType) } @@ -1810,7 +1745,7 @@ func (m *ONFT) Unmarshal(dAtA []byte) error { } } m.Extensible = bool(v != 0) - case 8: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } @@ -1959,7 +1894,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Preview", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MediaURI", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1987,11 +1922,11 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Preview = string(dAtA[iNdEx:postIndex]) + m.MediaURI = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Media", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PreviewURI", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2019,7 +1954,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Media = string(dAtA[iNdEx:postIndex]) + m.PreviewURI = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2042,7 +1977,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } return nil } -func (m *Entry) Unmarshal(dAtA []byte) error { +func (m *Owner) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2065,10 +2000,10 @@ func (m *Entry) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Entry: wiretype end group for non-group") + return fmt.Errorf("proto: Owner: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Entry: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Owner: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/types/tx.pb.go b/types/tx.pb.go index a2a0d76..820dae7 100644 --- a/types/tx.pb.go +++ b/types/tx.pb.go @@ -260,15 +260,14 @@ func (m *MsgTransferDenomResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgTransferDenomResponse proto.InternalMessageInfo type MsgMintONFT struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - DenomId string `protobuf:"bytes,2,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` - Metadata Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata"` - Data string `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` - AssetType AssetType `protobuf:"varint,5,opt,name=assetType,proto3,enum=OmniFlix.onft.v1beta1.AssetType" json:"assetType,omitempty"` - Transferable bool `protobuf:"varint,6,opt,name=transferable,proto3" json:"transferable,omitempty"` - Extensible bool `protobuf:"varint,7,opt,name=extensible,proto3" json:"extensible,omitempty"` - Sender string `protobuf:"bytes,8,opt,name=sender,proto3" json:"sender,omitempty"` - Recipient string `protobuf:"bytes,9,opt,name=recipient,proto3" json:"recipient,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + DenomId string `protobuf:"bytes,2,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` + Metadata Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata"` + Data string `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + Transferable bool `protobuf:"varint,5,opt,name=transferable,proto3" json:"transferable,omitempty"` + Extensible bool `protobuf:"varint,6,opt,name=extensible,proto3" json:"extensible,omitempty"` + Sender string `protobuf:"bytes,7,opt,name=sender,proto3" json:"sender,omitempty"` + Recipient string `protobuf:"bytes,8,opt,name=recipient,proto3" json:"recipient,omitempty"` } func (m *MsgMintONFT) Reset() { *m = MsgMintONFT{} } @@ -420,7 +419,7 @@ type MsgEditONFT struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` DenomId string `protobuf:"bytes,2,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` Metadata Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata"` - AssetType string `protobuf:"bytes,4,opt,name=assetType,proto3" json:"assetType,omitempty"` + Data string `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` Transferable string `protobuf:"bytes,5,opt,name=transferable,proto3" json:"transferable,omitempty"` Extensible string `protobuf:"bytes,6,opt,name=extensible,proto3" json:"extensible,omitempty"` Sender string `protobuf:"bytes,7,opt,name=sender,proto3" json:"sender,omitempty"` @@ -590,53 +589,51 @@ func init() { func init() { proto.RegisterFile("onft/v1beta1/tx.proto", fileDescriptor_d1b5149965e8edc7) } var fileDescriptor_d1b5149965e8edc7 = []byte{ - // 735 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcd, 0x4e, 0xdb, 0x40, - 0x10, 0x8e, 0x93, 0x00, 0xc9, 0x84, 0x42, 0xb5, 0x14, 0x70, 0x23, 0xe4, 0x20, 0x4b, 0xfd, 0x51, - 0xa5, 0x3a, 0x82, 0x1e, 0x2a, 0xa1, 0xaa, 0x12, 0x69, 0x8b, 0xd4, 0x43, 0x8a, 0x64, 0xc1, 0x85, - 0x43, 0x91, 0x13, 0x2f, 0x66, 0xd5, 0x78, 0x6d, 0x79, 0x17, 0x4a, 0x1e, 0xa2, 0x12, 0x8f, 0xd0, - 0x17, 0xe8, 0xb5, 0xcf, 0xc0, 0x91, 0x63, 0x2f, 0x45, 0x2d, 0xf4, 0xd0, 0x33, 0x4f, 0x50, 0x79, - 0xfd, 0xc3, 0x3a, 0x8d, 0x0d, 0x95, 0x5a, 0xa9, 0xb7, 0xdd, 0xd9, 0x6f, 0x7e, 0xbe, 0xf9, 0x26, - 0x13, 0xc3, 0xbc, 0x47, 0xf7, 0x78, 0xfb, 0x70, 0xa5, 0x87, 0xb9, 0xb5, 0xd2, 0xe6, 0x47, 0x86, - 0x1f, 0x78, 0xdc, 0x43, 0xf3, 0x9b, 0x2e, 0x25, 0x1b, 0x03, 0x72, 0x64, 0x84, 0xef, 0x46, 0xf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 0x34, 0x7f, 0x45, - 0x81, 0xab, 0x32, 0x2b, 0xf9, 0x65, 0x56, 0xc7, 0x97, 0x79, 0x17, 0x16, 0x47, 0xca, 0x49, 0x4b, - 0x3d, 0x8e, 0x06, 0xe5, 0x95, 0x4d, 0xfe, 0x9b, 0x41, 0x59, 0x92, 0x87, 0x22, 0x66, 0x94, 0x2f, - 0x79, 0xf4, 0x9b, 0x2c, 0x92, 0x3c, 0xda, 0x4b, 0xe3, 0x25, 0x1f, 0xb7, 0x9b, 0x22, 0x51, 0x93, - 0x8e, 0xa4, 0x9d, 0x7a, 0x27, 0x1a, 0xd5, 0x39, 0x08, 0xe8, 0xbf, 0xd4, 0x33, 0x53, 0x43, 0x92, - 0x2c, 0xa9, 0x61, 0xf5, 0xf3, 0x04, 0x54, 0xba, 0xcc, 0x41, 0x7d, 0x68, 0xc8, 0x7f, 0x0d, 0xf7, - 0xf2, 0x5a, 0x9c, 0x59, 0xb1, 0xcd, 0xc7, 0x37, 0x82, 0x25, 0xc9, 0xc2, 0x24, 0xf2, 0x16, 0x2e, - 0x48, 0x22, 0xc1, 0x8a, 0x92, 0x8c, 0x59, 0x92, 0x88, 0xc0, 0xad, 0xec, 0x86, 0x7c, 0x90, 0xef, - 0x9f, 0x01, 0x36, 0xdb, 0x37, 0x04, 0xa6, 0xa9, 0x76, 0xa0, 0x96, 0xee, 0x43, 0x3d, 0xdf, 0x39, - 0xc1, 0x34, 0x1f, 0x5d, 0x8f, 0x91, 0x63, 0xa7, 0x3f, 0xa1, 0x82, 0xd8, 0x09, 0xa6, 0x28, 0xf6, - 0xe8, 0xe0, 0xa1, 0x3d, 0x98, 0xce, 0x6c, 0x92, 0xfb, 0xd7, 0x13, 0x17, 0x39, 0x8c, 0x9b, 0xe1, - 0x64, 0x0e, 0xe9, 0x74, 0x17, 0x70, 0x48, 0x30, 0x45, 0x1c, 0x46, 0x07, 0xb7, 0xf3, 0xec, 0xe4, - 0xbb, 0x56, 0x3a, 0x39, 0xd7, 0x94, 0xd3, 0x73, 0x4d, 0xf9, 0x76, 0xae, 0x29, 0xc7, 0x17, 0x5a, - 0xe9, 0xf4, 0x42, 0x2b, 0x7d, 0xb9, 0xd0, 0x4a, 0x3b, 0x9a, 0x43, 0xf8, 0xfe, 0x41, 0xcf, 0xe8, - 0x7b, 0x6e, 0x3b, 0x89, 0x29, 0xbe, 0x86, 0xda, 0x7c, 0xe8, 0x63, 0xd6, 0x9b, 0x14, 0x1f, 0x45, - 0x4f, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0xfe, 0xb0, 0x16, 0x00, 0x73, 0x09, 0x00, 0x00, + // 701 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcd, 0x6e, 0xd3, 0x4c, + 0x14, 0x8d, 0x93, 0x34, 0x4d, 0x6e, 0xfa, 0xb5, 0x9f, 0xa6, 0xb4, 0x35, 0x11, 0x72, 0x2a, 0x4b, + 0xfc, 0x08, 0x09, 0x5b, 0x2d, 0x0b, 0xa4, 0x8a, 0x0d, 0x01, 0x2a, 0xb1, 0x30, 0x95, 0xac, 0x76, + 0xd3, 0x05, 0x95, 0x13, 0x4f, 0xdd, 0x11, 0xf1, 0xd8, 0xb2, 0xa7, 0xa5, 0x7d, 0x01, 0x76, 0x48, + 0x3c, 0x02, 0x0b, 0xb6, 0x6c, 0x79, 0x86, 0x2e, 0xbb, 0x64, 0x43, 0x05, 0xed, 0x86, 0x75, 0x9f, + 0x00, 0x79, 0xfc, 0xd3, 0x71, 0x88, 0x9d, 0x20, 0xc1, 0x82, 0xdd, 0xcc, 0x9d, 0x33, 0xf7, 0x9e, + 0x73, 0xee, 0xf8, 0xca, 0xb0, 0xe4, 0xd1, 0x7d, 0xa6, 0x1f, 0xad, 0xf5, 0x31, 0xb3, 0xd6, 0x74, + 0x76, 0xac, 0xf9, 0x81, 0xc7, 0x3c, 0xb4, 0xb4, 0xe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43, 0xd8, 0xc1, 0x61, 0x5f, 0x1b, 0x78, 0xae, + 0x9e, 0xe6, 0xe4, 0xff, 0x30, 0x3a, 0x3b, 0xf1, 0x71, 0xd8, 0x6f, 0xf0, 0x5f, 0x99, 0x87, 0x3f, + 0x03, 0x00, 0x00, 0xff, 0xff, 0xd2, 0x3e, 0x94, 0x28, 0x29, 0x09, 0x00, 0x00, } func (this *MsgCreateDenom) Equal(that interface{}) bool { @@ -778,9 +775,6 @@ func (this *MsgMintONFT) Equal(that interface{}) bool { if this.Data != that1.Data { return false } - if this.AssetType != that1.AssetType { - return false - } if this.Transferable != that1.Transferable { return false } @@ -856,7 +850,7 @@ func (this *MsgEditONFT) Equal(that interface{}) bool { if !this.Metadata.Equal(&that1.Metadata) { return false } - if this.AssetType != that1.AssetType { + if this.Data != that1.Data { return false } if this.Transferable != that1.Transferable { @@ -1465,14 +1459,14 @@ func (m *MsgMintONFT) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Recipient) i = encodeVarintTx(dAtA, i, uint64(len(m.Recipient))) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x42 } if len(m.Sender) > 0 { i -= len(m.Sender) copy(dAtA[i:], m.Sender) i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x3a } if m.Extensible { i-- @@ -1482,7 +1476,7 @@ func (m *MsgMintONFT) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x38 + dAtA[i] = 0x30 } if m.Transferable { i-- @@ -1492,11 +1486,6 @@ func (m *MsgMintONFT) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x30 - } - if m.AssetType != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.AssetType)) - i-- dAtA[i] = 0x28 } if len(m.Data) > 0 { @@ -1671,10 +1660,10 @@ func (m *MsgEditONFT) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a } - if len(m.AssetType) > 0 { - i -= len(m.AssetType) - copy(dAtA[i:], m.AssetType) - i = encodeVarintTx(dAtA, i, uint64(len(m.AssetType))) + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintTx(dAtA, i, uint64(len(m.Data))) i-- dAtA[i] = 0x22 } @@ -1940,9 +1929,6 @@ func (m *MsgMintONFT) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.AssetType != 0 { - n += 1 + sovTx(uint64(m.AssetType)) - } if m.Transferable { n += 2 } @@ -2019,7 +2005,7 @@ func (m *MsgEditONFT) Size() (n int) { } l = m.Metadata.Size() n += 1 + l + sovTx(uint64(l)) - l = len(m.AssetType) + l = len(m.Data) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -3022,25 +3008,6 @@ func (m *MsgMintONFT) Unmarshal(dAtA []byte) error { m.Data = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetType", wireType) - } - m.AssetType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AssetType |= AssetType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Transferable", wireType) } @@ -3060,7 +3027,7 @@ func (m *MsgMintONFT) Unmarshal(dAtA []byte) error { } } m.Transferable = bool(v != 0) - case 7: + case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Extensible", wireType) } @@ -3080,7 +3047,7 @@ func (m *MsgMintONFT) Unmarshal(dAtA []byte) error { } } m.Extensible = bool(v != 0) - case 8: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) } @@ -3112,7 +3079,7 @@ func (m *MsgMintONFT) Unmarshal(dAtA []byte) error { } m.Sender = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 9: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) } @@ -3571,7 +3538,7 @@ func (m *MsgEditONFT) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3599,7 +3566,7 @@ func (m *MsgEditONFT) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.AssetType = string(dAtA[iNdEx:postIndex]) + m.Data = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { From af16734aa71b3875ebc1b0f6b84a62842a43db81 Mon Sep 17 00:00:00 2001 From: harish Date: Wed, 10 Nov 2021 20:31:23 +0530 Subject: [PATCH 3/7] new: updatedenom, denom transfer messages --- client/cli/tx.go | 27 +++--- keeper/collection.go | 4 +- keeper/denom.go | 12 +++ keeper/keeper.go | 76 +++++++++++++-- keeper/msg_server.go | 161 ++++++++++++++++++-------------- keeper/owner.go | 85 +++++++++++++++++ proto/onft/v1beta1/events.proto | 12 ++- proto/onft/v1beta1/onft.proto | 13 ++- proto/onft/v1beta1/tx.proto | 10 +- types/denom.go | 4 +- types/errors.go | 1 + types/events.go | 18 ---- types/events.pb.go | 76 ++++++++------- types/msgs.go | 4 +- types/onft.pb.go | 109 +++++++++++---------- types/owner.go | 87 +++++++++++++++++ types/tx.pb.go | 127 ++++++++++++------------- 17 files changed, 540 insertions(+), 286 deletions(-) create mode 100644 keeper/owner.go create mode 100644 types/owner.go diff --git a/client/cli/tx.go b/client/cli/tx.go index 871873b..7c3fe16 100644 --- a/client/cli/tx.go +++ b/client/cli/tx.go @@ -50,34 +50,34 @@ $ %s tx onft create [symbol] --name= --schema= --chain-id= --name --description if err != nil { return err } - denomId := strings.ToLower(strings.TrimSpace(args[0])) + denomId := args[0] sender := clientCtx.GetFromAddress().String() @@ -118,9 +118,9 @@ $ %s tx onft mint [denom-id] --type --name --description return err } - recipientStr := strings.TrimSpace(recipient) - if len(recipientStr) > 0 { - if _, err = sdk.AccAddressFromBech32(recipientStr); err != nil { + + if len(recipient) > 0 { + if _, err = sdk.AccAddressFromBech32(recipient); err != nil { return err } } else { @@ -132,25 +132,22 @@ $ %s tx onft mint [denom-id] --type --name --description if err != nil { return err } - onftName = strings.TrimSpace(onftName) onftDescription, err := cmd.Flags().GetString(FlagONFTDescription) if err != nil { return err } - onftDescription = strings.TrimSpace(onftDescription) + onftMediaURI, err := cmd.Flags().GetString(FlagONFTMediaURI) if err != nil { return err } - onftMediaURI = strings.TrimSpace(onftMediaURI) onftPreviewURI, err := cmd.Flags().GetString(FlagONFTPreviewURI) if err != nil { return err } - onftPreviewURI = strings.TrimSpace(onftPreviewURI) if len(onftName) > 0 { onftMetadata.Name = onftName diff --git a/keeper/collection.go b/keeper/collection.go index f02ef47..9a55576 100644 --- a/keeper/collection.go +++ b/keeper/collection.go @@ -12,8 +12,8 @@ func (k Keeper) SetCollection(ctx sdk.Context, collection types.Collection) erro metadata := types.Metadata{ Name: onft.GetName(), Description: onft.GetDescription(), - MediaURI: onft.GetMediaURI(), - PreviewURI: onft.GetPreviewURI(), + MediaURI: onft.GetMediaURI(), + PreviewURI: onft.GetPreviewURI(), } if err := k.MintONFT(ctx, diff --git a/keeper/denom.go b/keeper/denom.go index 9c3c8d8..f70c323 100644 --- a/keeper/denom.go +++ b/keeper/denom.go @@ -62,6 +62,18 @@ func (k Keeper) GetDenoms(ctx sdk.Context) (denoms []types.Denom) { } return denoms } +func (k Keeper) AuthorizeDenomCreator(ctx sdk.Context, id string, creator sdk.AccAddress) (types.Denom, error) { + denom, err := k.GetDenom(ctx, id) + if err != nil { + return types.Denom{}, err + } + + if creator.String() != denom.Creator { + return types.Denom{}, sdkerrors.Wrap(types.ErrUnauthorized, creator.String()) + } + return denom, nil +} + func (k Keeper) HasPermissionToMint(ctx sdk.Context, denomID string, sender sdk.AccAddress) bool { denom, err := k.GetDenom(ctx, denomID) if err != nil { diff --git a/keeper/keeper.go b/keeper/keeper.go index c3ac717..923ccb8 100644 --- a/keeper/keeper.go +++ b/keeper/keeper.go @@ -34,12 +34,43 @@ func (k Keeper) CreateDenom(ctx sdk.Context, creator sdk.AccAddress, description, previewUri string) error { return k.SetDenom(ctx, types.NewDenom(id, symbol, name, schema, creator, description, previewUri)) } -func (k Keeper) UpdateDenom(ctx sdk.Context) { - // TODO: Implement Update Denom keeper functionality +func (k Keeper) UpdateDenom(ctx sdk.Context, id, name, description, previewURI string, sender sdk.AccAddress) error { + if !k.HasDenomID(ctx, id) { + return sdkerrors.Wrapf(types.ErrInvalidDenom, "denom id %s not exists", id) + } + denom, err := k.AuthorizeDenomCreator(ctx, id, sender) + if err != nil { + return err + } + if len(name) > 0 && name != types.DoNotModify { + denom.Name = name + } + if len(description) > 0 && description != types.DoNotModify { + denom.Description = description + } + if len(previewURI) > 0 && previewURI != types.DoNotModify { + denom.PreviewURI = previewURI + } + return k.SetDenom(ctx, denom) } -func (k Keeper) TransferDenomOwner(ctx sdk.Context) { - // TODO: impletment transfer denom +func (k Keeper) TransferDenomOwner(ctx sdk.Context, id string, curOwner, newOwner sdk.AccAddress) error { + denom, err := k.GetDenom(ctx, id) + if err != nil { + return sdkerrors.Wrapf(types.ErrInvalidDenom, "denom ID %s not exists", id) + } + + if curOwner.String() != denom.Creator { + return sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "unauthorized address %s", curOwner.String()) + } + + denom.Creator = newOwner.String() + + err = k.SetDenom(ctx, denom) + if err != nil { + return err + } + return nil } func (k Keeper) MintONFT( @@ -66,15 +97,20 @@ func (k Keeper) MintONFT( recipient, ctx.BlockHeader().Time, )) + k.setOwner(ctx, denomID, onftID, recipient) k.increaseSupply(ctx, denomID) return nil } func (k Keeper) EditONFT(ctx sdk.Context, denomID, onftID string, metadata types.Metadata, - transferable string, owner sdk.AccAddress) error { + data, transferable, extensible string, owner sdk.AccAddress) error { if !k.HasDenomID(ctx, denomID) { return sdkerrors.Wrapf(types.ErrInvalidDenom, "denomID %s not exists", denomID) } + denom, err := k.GetDenom(ctx, denomID) + if err != nil { + return err + } onft, err := k.Authorize(ctx, denomID, onftID, owner) if err != nil { @@ -93,11 +129,10 @@ func (k Keeper) EditONFT(ctx sdk.Context, denomID, onftID string, metadata types if metadata.MediaURI != types.DoNotModify { onft.Metadata.MediaURI = metadata.MediaURI } + if data != types.DoNotModify { + onft.Data = data + } if transferable != types.DoNotModify { - denom, err := k.GetDenom(ctx, denomID) - if err != nil { - return err - } if denom.Creator != onft.Owner { return sdkerrors.Wrapf( types.ErrNotEditable, @@ -114,6 +149,27 @@ func (k Keeper) EditONFT(ctx sdk.Context, denomID, onftID string, metadata types onft.Transferable = true } } + if len(extensible) > 0 && extensible != types.DoNotModify { + if denom.Creator != onft.Owner { + return sdkerrors.Wrapf( + types.ErrNotEditable, + "onft %s: extensibility can be modified only when creator is the owner of the onft.", + onftID, + ) + } + switch extensible := strings.ToLower(extensible); extensible { + case "yes": + onft.Extensible = true + case "no": + onft.Extensible = false + default: + return sdkerrors.Wrapf( + types.ErrInvalidOption, + "%s is invalid option for extensible.", + extensible, + ) + } + } k.setONFT(ctx, denomID, onft) return nil @@ -135,6 +191,7 @@ func (k Keeper) TransferOwnership(ctx sdk.Context, denomID, onftID string, srcOw onft.Owner = dstOwner.String() k.setONFT(ctx, denomID, onft) + k.swapOwner(ctx, denomID, onftID, srcOwner, dstOwner) return nil } @@ -151,6 +208,7 @@ func (k Keeper) BurnONFT(ctx sdk.Context, } k.deleteONFT(ctx, denomID, onft) + k.deleteOwner(ctx, denomID, onftID, owner) k.decreaseSupply(ctx, denomID) return nil } diff --git a/keeper/msg_server.go b/keeper/msg_server.go index 9d03f8c..6f6d212 100644 --- a/keeper/msg_server.go +++ b/keeper/msg_server.go @@ -34,36 +34,76 @@ func (m msgServer) CreateDenom(goCtx context.Context, msg.Schema, sender, msg.Description, - msg.PreviewUri, + msg.PreviewURI, ); err != nil { return nil, err } - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeCreateDenom, - sdk.NewAttribute(types.AttributeKeyDenomID, msg.Id), - sdk.NewAttribute(types.AttributeKeyDenomName, msg.Symbol), - sdk.NewAttribute(types.AttributeKeyDenomName, msg.Name), - sdk.NewAttribute(types.AttributeKeyCreator, msg.Sender), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender), - ), - }) + ctx.EventManager().EmitTypedEvent( + &types.EventCreateDenom{ + Id: msg.Id, + Symbol: msg.Symbol, + Name: msg.Name, + Creator: msg.Sender, + }, + ) return &types.MsgCreateDenomResponse{}, nil } -// TODO: update UpdateDenom function func (m msgServer) UpdateDenom(goCtx context.Context, msg *types.MsgUpdateDenom) (*types.MsgUpdateDenomResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return nil, err + } + + err = m.Keeper.UpdateDenom(ctx, msg.Id, msg.Name, msg.Description, msg.PreviewURI, sender) + if err != nil { + return nil, err + } + + ctx.EventManager().EmitTypedEvent( + &types.EventUpdateDenom{ + Id: msg.Id, + Name: msg.Name, + Creator: msg.Sender, + }, + ) + return &types.MsgUpdateDenomResponse{}, nil } -// TODO: Update TransferDenom function func (m msgServer) TransferDenom(goCtx context.Context, msg *types.MsgTransferDenom) (*types.MsgTransferDenomResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return nil, err + } + recipient, err := sdk.AccAddressFromBech32(msg.Recipient) + if err != nil { + return nil, err + } + denom, err := m.Keeper.GetDenom(ctx, msg.Id) + if err != nil { + return nil, err + } + + err = m.Keeper.TransferDenomOwner(ctx, msg.Id, sender, recipient) + if err != nil { + return nil, err + } + ctx.EventManager().EmitTypedEvent( + &types.EventTransferDenom{ + Id: denom.Id, + Symbol: denom.Symbol, + Sender: msg.Sender, + Recipient: msg.Recipient, + }, + ) + return &types.MsgTransferDenomResponse{}, nil } @@ -93,20 +133,14 @@ func (m msgServer) MintONFT(goCtx context.Context, return nil, err } - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeMintONFT, - sdk.NewAttribute(types.AttributeKeyONFTID, msg.Id), - sdk.NewAttribute(types.AttributeKeyDenomID, msg.DenomId), - sdk.NewAttribute(types.AttributeKeyMediaURI, msg.Metadata.MediaURI), - sdk.NewAttribute(types.AttributeKeyRecipient, msg.Recipient), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender), - ), - }) + ctx.EventManager().EmitTypedEvent( + &types.EventMintONFT{ + Id: msg.Id, + DenomId: msg.DenomId, + URI: msg.Metadata.MediaURI, + Owner: msg.Recipient, + }, + ) return &types.MsgMintONFTResponse{}, nil } @@ -122,26 +156,21 @@ func (m msgServer) EditONFT(goCtx context.Context, ctx := sdk.UnwrapSDKContext(goCtx) if err := m.Keeper.EditONFT(ctx, msg.DenomId, msg.Id, msg.Metadata, + msg.Data, msg.Transferable, + msg.Extensible, sender, ); err != nil { return nil, err } - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeEditONFT, - sdk.NewAttribute(types.AttributeKeyONFTID, msg.Id), - sdk.NewAttribute(types.AttributeKeyDenomID, msg.DenomId), - sdk.NewAttribute(types.AttributeKeyMediaURI, msg.Metadata.MediaURI), - sdk.NewAttribute(types.AttributeKeyOwner, msg.Sender), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender), - ), - }) + ctx.EventManager().EmitTypedEvent( + &types.EventEditONFT{ + Id: msg.Id, + DenomId: msg.DenomId, + Owner: msg.Sender, + }, + ) return &types.MsgEditONFTResponse{}, nil } @@ -166,20 +195,14 @@ func (m msgServer) TransferONFT(goCtx context.Context, return nil, err } - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeTransferONFT, - sdk.NewAttribute(types.AttributeKeyONFTID, msg.Id), - sdk.NewAttribute(types.AttributeKeyDenomID, msg.DenomId), - sdk.NewAttribute(types.AttributeKeySender, msg.Sender), - sdk.NewAttribute(types.AttributeKeyRecipient, msg.Recipient), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender), - ), - }) + ctx.EventManager().EmitTypedEvent( + &types.EventTransferONFT{ + Id: msg.Id, + DenomId: msg.DenomId, + Sender: msg.Sender, + Recipient: msg.Recipient, + }, + ) return &types.MsgTransferONFTResponse{}, nil } @@ -197,19 +220,13 @@ func (m msgServer) BurnONFT(goCtx context.Context, return nil, err } - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeBurnONFT, - sdk.NewAttribute(types.AttributeKeyDenomID, msg.DenomId), - sdk.NewAttribute(types.AttributeKeyONFTID, msg.Id), - sdk.NewAttribute(types.AttributeKeyOwner, msg.Sender), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender), - ), - }) + ctx.EventManager().EmitTypedEvent( + &types.EventBurnONFT{ + Id: msg.Id, + DenomId: msg.DenomId, + Owner: msg.Sender, + }, + ) return &types.MsgBurnONFTResponse{}, nil } diff --git a/keeper/owner.go b/keeper/owner.go new file mode 100644 index 0000000..37027c9 --- /dev/null +++ b/keeper/owner.go @@ -0,0 +1,85 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/OmniFlix/onft/types" +) + +// GetOwner gets all the ID collections owned by an address and denom ID +func (k Keeper) GetOwner(ctx sdk.Context, address sdk.AccAddress, denomId string) types.Owner { + store := ctx.KVStore(k.storeKey) + iterator := sdk.KVStorePrefixIterator(store, types.KeyOwner(address, denomId, "")) + defer iterator.Close() + + owner := types.Owner{ + Address: address.String(), + IDCollections: types.IDCollections{}, + } + idsMap := make(map[string][]string) + + for ; iterator.Valid(); iterator.Next() { + _, denomID, onftId, _ := types.SplitKeyOwner(iterator.Key()) + if ids, ok := idsMap[denomID]; ok { + idsMap[denomID] = append(ids, onftId) + } else { + idsMap[denomID] = []string{onftId} + owner.IDCollections = append( + owner.IDCollections, + types.IDCollection{DenomId: denomID}, + ) + } + } + + for i := 0; i < len(owner.IDCollections); i++ { + owner.IDCollections[i].OnftIds = idsMap[owner.IDCollections[i].DenomId] + } + + return owner +} + +// GetOwners gets all the ID collections +func (k Keeper) GetOwners(ctx sdk.Context) (owners types.Owners) { + store := ctx.KVStore(k.storeKey) + iterator := sdk.KVStoreReversePrefixIterator(store, types.KeyOwner(nil, "", "")) + defer iterator.Close() + + idcsMap := make(map[string]types.IDCollections) + for ; iterator.Valid(); iterator.Next() { + key := iterator.Key() + address, denom, id, _ := types.SplitKeyOwner(key) + if _, ok := idcsMap[address.String()]; !ok { + idcsMap[address.String()] = types.IDCollections{} + owners = append( + owners, + types.Owner{Address: address.String()}, + ) + } + idcs := idcsMap[address.String()] + idcs = idcs.Add(denom, id) + idcsMap[address.String()] = idcs + } + for i, owner := range owners { + owners[i].IDCollections = idcsMap[owner.Address] + } + + return owners +} + +func (k Keeper) deleteOwner(ctx sdk.Context, denomID, onftId string, owner sdk.AccAddress) { + store := ctx.KVStore(k.storeKey) + store.Delete(types.KeyOwner(owner, denomID, onftId)) +} + +func (k Keeper) setOwner(ctx sdk.Context, + denomId, onftId string, + owner sdk.AccAddress) { + store := ctx.KVStore(k.storeKey) + + bz := types.MustMarshalONFTID(k.cdc, onftId) + store.Set(types.KeyOwner(owner, denomId, onftId), bz) +} + +func (k Keeper) swapOwner(ctx sdk.Context, denomID, tokenID string, srcOwner, dstOwner sdk.AccAddress) { + k.deleteOwner(ctx, denomID, tokenID, srcOwner) + k.setOwner(ctx, denomID, tokenID, dstOwner) +} \ No newline at end of file diff --git a/proto/onft/v1beta1/events.proto b/proto/onft/v1beta1/events.proto index 76efac3..f8981db 100644 --- a/proto/onft/v1beta1/events.proto +++ b/proto/onft/v1beta1/events.proto @@ -1,6 +1,8 @@ syntax = "proto3"; package OmniFlix.onft.v1beta1; +import "gogoproto/gogo.proto"; + option go_package = "github.com/OmniFlix/onft/types"; // EventCreateDenom is emitted on Denom Creation @@ -29,22 +31,22 @@ message EventTransferDenom { // EventMintONFT is emitted on Mint message EventMintONFT { - string denom_id = 1; + string denom_id = 1 [(gogoproto.moretags) = "yaml:\"denom_id\""]; string id = 2; - string uri = 3; + string uri = 3 [(gogoproto.customname) = "URI"]; string owner = 4; } // EventEditONFT is emitted on Edit message EventEditONFT { - string denom_id = 1; + string denom_id = 1 [(gogoproto.moretags) = "yaml:\"denom_id\""]; string id = 2; string owner = 3; } // EventTransferONFT is emitted on Transfer message EventTransferONFT { - string denom_id = 1; + string denom_id = 1 [(gogoproto.moretags) = "yaml:\"denom_id\""]; string id = 2; string sender = 3; string recipient = 4; @@ -52,7 +54,7 @@ message EventTransferONFT { // EventBurnONFT is emitted on Burn message EventBurnONFT { - string denom_id = 1; + string denom_id = 1 [(gogoproto.moretags) = "yaml:\"denom_id\""]; string id = 2; string owner = 3; } diff --git a/proto/onft/v1beta1/onft.proto b/proto/onft/v1beta1/onft.proto index df3c553..c4a4516 100644 --- a/proto/onft/v1beta1/onft.proto +++ b/proto/onft/v1beta1/onft.proto @@ -31,7 +31,10 @@ message Denom { string schema = 4; string creator = 5; string description = 6; - string preview_uri = 7 [(gogoproto.moretags) = "yaml:\"created_at\""]; + string preview_uri = 7 [ + (gogoproto.moretags) = "yaml:\"preview_uri\"", + (gogoproto.customname) = "PreviewURI" + ]; } //ASSET or ONFT @@ -56,12 +59,12 @@ message Metadata { string name = 1 [(gogoproto.moretags) = "yaml:\"name\""]; string description = 2 [(gogoproto.moretags) = "yaml:\"description\""]; - string media_uri = 3 [ - (gogoproto.moretags) = "yaml:\"media_uri\"", + string media_uri = 3 [ + (gogoproto.moretags) = "yaml:\"media_uri\"", (gogoproto.customname) = "MediaURI" ]; - string preview_uri = 4 [ - (gogoproto.moretags) = "yaml:\"preview_uri\"", + string preview_uri = 4 [ + (gogoproto.moretags) = "yaml:\"preview_uri\"", (gogoproto.customname) = "PreviewURI" ]; } diff --git a/proto/onft/v1beta1/tx.proto b/proto/onft/v1beta1/tx.proto index 009b8a4..d2d5dca 100644 --- a/proto/onft/v1beta1/tx.proto +++ b/proto/onft/v1beta1/tx.proto @@ -30,7 +30,10 @@ message MsgCreateDenom { string symbol = 2; string name = 3; string description = 4; - string preview_uri = 5 [(gogoproto.moretags) = "yaml:\"preview_uri\""]; + string preview_uri = 5 [ + (gogoproto.moretags) = "yaml:\"preview_uri\"", + (gogoproto.customname) = "PreviewURI" + ]; string schema = 6; string sender = 7; } @@ -43,7 +46,10 @@ message MsgUpdateDenom { string id = 1; string name = 2; string description = 3; - string preview_uri = 4 [(gogoproto.moretags) = "yaml:\"preview_uri\""]; + string preview_uri = 4 [ + (gogoproto.moretags) = "yaml:\"preview_uri\"", + (gogoproto.customname) = "PreviewURI" + ]; string sender = 5; } diff --git a/types/denom.go b/types/denom.go index 4824745..d58882a 100644 --- a/types/denom.go +++ b/types/denom.go @@ -7,7 +7,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) -func NewDenom(id, symbol, name, schema string, creator sdk.AccAddress, description, previewUri string) Denom { +func NewDenom(id, symbol, name, schema string, creator sdk.AccAddress, description, previewURI string) Denom { return Denom{ Id: id, Symbol: symbol, @@ -15,7 +15,7 @@ func NewDenom(id, symbol, name, schema string, creator sdk.AccAddress, descripti Schema: schema, Creator: creator.String(), Description: description, - PreviewUri: previewUri, + PreviewURI: previewURI, } } diff --git a/types/errors.go b/types/errors.go index 15b0eeb..98e869b 100644 --- a/types/errors.go +++ b/types/errors.go @@ -22,5 +22,6 @@ var ( ErrInvalidPreviewURI = sdkerrors.Register(ModuleName, 14, "invalid preview URI") ErrNotTransferable = sdkerrors.Register(ModuleName, 15, "onft is not transferable") ErrNotEditable = sdkerrors.Register(ModuleName, 16, "onft is not editable") + ErrInvalidOption = sdkerrors.Register(ModuleName, 17, "invalid option") // this line is used by starport scaffolding # ibc/errors ) diff --git a/types/events.go b/types/events.go index 2bd2492..d61757b 100644 --- a/types/events.go +++ b/types/events.go @@ -1,24 +1,6 @@ package types var ( - EventTypeCreateDenom = "create_denom" - EventTypeUpdateDenom = "update_denom" - EventTypeTransferDenom = "transfer_denom" - EventTypeMintONFT = "mint_onft" - EventTypeTransferONFT = "transfer_onft" - EventTypeEditONFT = "edit_onft" - EventTypeBurnONFT = "burn_onft" - AttributeValueCategory = ModuleName - AttributeKeySender = "sender" - AttributeKeyRecipient = "recipient" - AttributeKeyCreator = "creator" - AttributeKeyOwner = "owner" - AttributeKeyDenomID = "denom-id" - AttributeKeyDenomSymbol = "denom-symbol" - AttributeKeyDenomName = "denom-name" - AttributeKeyONFTID = "onft-id" - AttributeKeyMediaURI = "media-uri" - AttributeKeyPreviewURI = "preview-uri" ) diff --git a/types/events.pb.go b/types/events.pb.go index 82e7c4d..58cbeb0 100644 --- a/types/events.pb.go +++ b/types/events.pb.go @@ -5,6 +5,7 @@ package types import ( fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" @@ -231,9 +232,9 @@ func (m *EventTransferDenom) GetRecipient() string { // EventMintONFT is emitted on Mint type EventMintONFT struct { - DenomId string `protobuf:"bytes,1,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty"` + DenomId string `protobuf:"bytes,1,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Uri string `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty"` + URI string `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty"` Owner string `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"` } @@ -284,9 +285,9 @@ func (m *EventMintONFT) GetId() string { return "" } -func (m *EventMintONFT) GetUri() string { +func (m *EventMintONFT) GetURI() string { if m != nil { - return m.Uri + return m.URI } return "" } @@ -300,7 +301,7 @@ func (m *EventMintONFT) GetOwner() string { // EventEditONFT is emitted on Edit type EventEditONFT struct { - DenomId string `protobuf:"bytes,1,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty"` + DenomId string `protobuf:"bytes,1,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` } @@ -361,7 +362,7 @@ func (m *EventEditONFT) GetOwner() string { // EventTransferONFT is emitted on Transfer type EventTransferONFT struct { - DenomId string `protobuf:"bytes,1,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty"` + DenomId string `protobuf:"bytes,1,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` Recipient string `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient,omitempty"` @@ -430,7 +431,7 @@ func (m *EventTransferONFT) GetRecipient() string { // EventBurnONFT is emitted on Burn type EventBurnONFT struct { - DenomId string `protobuf:"bytes,1,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty"` + DenomId string `protobuf:"bytes,1,opt,name=denom_id,json=denomId,proto3" json:"denom_id,omitempty" yaml:"denom_id"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` } @@ -502,28 +503,31 @@ func init() { func init() { proto.RegisterFile("onft/v1beta1/events.proto", fileDescriptor_b4387dcba1ec9100) } var fileDescriptor_b4387dcba1ec9100 = []byte{ - // 334 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x93, 0xc1, 0x4a, 0xc3, 0x40, - 0x10, 0x86, 0x9b, 0xb4, 0xb6, 0x76, 0x40, 0xa9, 0x8b, 0x4a, 0x0a, 0xb2, 0x48, 0x4f, 0x9e, 0x12, - 0x8a, 0x17, 0xcf, 0xd5, 0x16, 0x3c, 0x68, 0x45, 0xea, 0xc5, 0x8b, 0x24, 0xdd, 0xa9, 0x5d, 0x68, - 0x76, 0xc3, 0x66, 0x5b, 0xed, 0x5b, 0xf8, 0x58, 0x1e, 0x7b, 0xf4, 0x28, 0xed, 0x8b, 0x48, 0xd6, - 0x4d, 0xd4, 0x63, 0x44, 0x6f, 0xf3, 0xff, 0x0c, 0xff, 0x37, 0x33, 0x30, 0xd0, 0x96, 0x62, 0xa2, - 0x83, 0x45, 0x37, 0x42, 0x1d, 0x76, 0x03, 0x5c, 0xa0, 0xd0, 0xa9, 0x9f, 0x28, 0xa9, 0x25, 0x39, - 0x18, 0xc6, 0x82, 0x0f, 0x66, 0xfc, 0xd9, 0xcf, 0x7a, 0x7c, 0xdb, 0xd3, 0x99, 0x42, 0xab, 0x9f, - 0xb5, 0x9d, 0x2b, 0x0c, 0x35, 0x5e, 0xa0, 0x90, 0x31, 0xd9, 0x05, 0x97, 0x33, 0xcf, 0x39, 0x76, - 0x4e, 0x9a, 0xb7, 0x2e, 0x67, 0xe4, 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 0x37, 0xdf, 0x71, - 0xfa, 0x11, 0x00, 0x00, 0xff, 0xff, 0xee, 0x6b, 0x26, 0x3d, 0x3a, 0x03, 0x00, 0x00, + // 380 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x93, 0xc1, 0x4e, 0xea, 0x40, + 0x14, 0x86, 0x69, 0xcb, 0x85, 0xcb, 0x24, 0xf7, 0xaa, 0x23, 0x9a, 0x62, 0x4c, 0x31, 0x5d, 0xb9, + 0x6a, 0x43, 0xdc, 0x18, 0x97, 0x55, 0x48, 0x58, 0x28, 0x49, 0x03, 0x1b, 0x37, 0xa6, 0xa5, 0x07, + 0x98, 0x84, 0xce, 0x34, 0xd3, 0x01, 0x65, 0xe7, 0xd6, 0x9d, 0x8f, 0xe5, 0x92, 0xa5, 0x2b, 0x62, + 0xca, 0x1b, 0xf8, 0x04, 0xa6, 0x43, 0x8b, 0xba, 0xd4, 0xc0, 0xee, 0x9c, 0xbf, 0x7f, 0xe7, 0xfb, + 0xcf, 0x49, 0x0e, 0xaa, 0x31, 0x3a, 0x10, 0xf6, 0xb4, 0xe1, 0x83, 0xf0, 0x1a, 0x36, 0x4c, 0x81, + 0x8a, 0xd8, 0x8a, 0x38, 0x13, 0x0c, 0x1f, 0x74, 0x42, 0x4a, 0x5a, 0x63, 0xf2, 0x60, 0xa5, 0x1e, + 0x2b, 0xf3, 0x1c, 0x55, 0x87, 0x6c, 0xc8, 0xa4, 0xc3, 0x4e, 0xab, 0x95, 0xd9, 0x1c, 0xa1, 0xdd, + 0x66, 0xfa, 0xf3, 0x25, 0x07, 0x4f, 0xc0, 0x15, 0x50, 0x16, 0xe2, 0xff, 0x48, 0x25, 0x81, 0xae, + 0x9c, 0x28, 0xa7, 0x15, 0x57, 0x25, 0x01, 0x3e, 0x44, 0xa5, 0x78, 0x16, 0xfa, 0x6c, 0xac, 0xab, + 0x52, 0xcb, 0x3a, 0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44, 0x8c, 0x26, 0xbe, 0xd5, 0x67, 0xa1, + 0x9d, 0x9f, 0x9d, 0x2d, 0x4f, 0x53, 0xcc, 0x22, 0x88, 0xfd, 0x92, 0xbc, 0xb2, 0xb3, 0x8f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xaa, 0x35, 0xb8, 0x6d, 0xaf, 0x03, 0x00, 0x00, } func (m *EventCreateDenom) Marshal() (dAtA []byte, err error) { @@ -706,10 +710,10 @@ func (m *EventMintONFT) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - if len(m.Uri) > 0 { - i -= len(m.Uri) - copy(dAtA[i:], m.Uri) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Uri))) + if len(m.URI) > 0 { + i -= len(m.URI) + copy(dAtA[i:], m.URI) + i = encodeVarintEvents(dAtA, i, uint64(len(m.URI))) i-- dAtA[i] = 0x1a } @@ -969,7 +973,7 @@ func (m *EventMintONFT) Size() (n int) { if l > 0 { n += 1 + l + sovEvents(uint64(l)) } - l = len(m.Uri) + l = len(m.URI) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } @@ -1682,7 +1686,7 @@ func (m *EventMintONFT) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field URI", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1710,7 +1714,7 @@ func (m *EventMintONFT) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Uri = string(dAtA[iNdEx:postIndex]) + m.URI = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { diff --git a/types/msgs.go b/types/msgs.go index 60beced..dec4bc5 100644 --- a/types/msgs.go +++ b/types/msgs.go @@ -35,7 +35,7 @@ func NewMsgCreateDenom(symbol, name, schema, description, previewUri, sender str Name: name, Schema: schema, Description: description, - PreviewUri: previewUri, + PreviewURI: previewUri, } } @@ -80,7 +80,7 @@ func NewMsgUpdateDenom(id, name, description, previewUri, sender string) *MsgUpd Id: id, Name: name, Description: description, - PreviewUri: previewUri, + PreviewURI: previewUri, Sender: sender, } } diff --git a/types/onft.pb.go b/types/onft.pb.go index 8a3b602..1ef7366 100644 --- a/types/onft.pb.go +++ b/types/onft.pb.go @@ -111,7 +111,7 @@ type Denom struct { Schema string `protobuf:"bytes,4,opt,name=schema,proto3" json:"schema,omitempty"` Creator string `protobuf:"bytes,5,opt,name=creator,proto3" json:"creator,omitempty"` Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` - PreviewUri string `protobuf:"bytes,7,opt,name=preview_uri,json=previewUri,proto3" json:"preview_uri,omitempty" yaml:"created_at"` + PreviewURI string `protobuf:"bytes,7,opt,name=preview_uri,json=previewUri,proto3" json:"preview_uri,omitempty" yaml:"preview_uri"` } func (m *Denom) Reset() { *m = Denom{} } @@ -281,52 +281,51 @@ func init() { func init() { proto.RegisterFile("onft/v1beta1/onft.proto", fileDescriptor_651c3270ad840fa5) } var fileDescriptor_651c3270ad840fa5 = []byte{ - // 709 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0xcd, 0x4f, 0xdb, 0x4e, - 0x10, 0x8d, 0x43, 0xbe, 0x98, 0xf0, 0xf1, 0xfb, 0x6d, 0x81, 0x5a, 0xb4, 0xb5, 0x23, 0xc3, 0x81, - 0x93, 0x23, 0x52, 0xa9, 0x42, 0xa8, 0x95, 0x8a, 0x4b, 0x91, 0x72, 0xa0, 0x54, 0x16, 0x48, 0x55, - 0x2f, 0x91, 0x93, 0x5d, 0xc2, 0x4a, 0xb1, 0x1d, 0xd9, 0xcb, 0xd7, 0x3f, 0x51, 0x71, 0xed, 0xad, - 0xb7, 0xfe, 0x2b, 0x1c, 0xb9, 0x54, 0xea, 0xc9, 0x6d, 0xc3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 0xb0, 0x4c, 0xfe, 0x01, 0x3b, - 0xeb, 0xea, 0xb1, 0xcf, 0xe7, 0xd1, 0xf8, 0x4e, 0x52, 0x4e, 0x7b, 0xb1, 0xe5, 0xce, 0x73, 0x9a, - 0xcb, 0xa6, 0xbd, 0x39, 0x2f, 0xaf, 0x7f, 0x19, 0x85, 0xeb, 0x91, 0xa1, 0xdd, 0x8c, 0x0c, 0xed, - 0xe7, 0xc8, 0xd0, 0xae, 0x6e, 0x8d, 0xc2, 0xcd, 0xad, 0x51, 0xf8, 0x7e, 0x6b, 0x14, 0x3e, 0x1a, - 0x7d, 0x2e, 0x4e, 0x4e, 0xbb, 0x76, 0x2f, 0xf4, 0x9b, 0x59, 0x1f, 0xf8, 0xa3, 0x6c, 0x8a, 0xcb, - 0x21, 0x8b, 0xbb, 0x15, 0x74, 0xc5, 0xf3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7d, 0x44, 0x24, - 0x46, 0x4a, 0x05, 0x00, 0x00, + // 701 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x3b, 0x6f, 0xd4, 0x4a, + 0x14, 0x5e, 0x6f, 0xf6, 0x95, 0xb3, 0x79, 0xdc, 0x3b, 0x37, 0x37, 0x58, 0x01, 0xec, 0x95, 0x93, + 0x22, 0x95, 0x57, 0x59, 0x9a, 0x28, 0x02, 0x89, 0x98, 0x10, 0x69, 0x8b, 0x10, 0x64, 0x25, 0x12, + 0xa2, 0x59, 0x79, 0x77, 0x26, 0x9b, 0x91, 0x6c, 0xcf, 0xca, 0x9e, 0xbc, 0xfe, 0x04, 0x4a, 0x4b, + 0x47, 0xc7, 0x5f, 0x49, 0x99, 0x92, 0xca, 0xc0, 0x86, 0x82, 0x7a, 0x25, 0x7a, 0x34, 0x0f, 0x27, + 0x5e, 0x20, 0x15, 0xdd, 0x9c, 0xef, 0x7c, 0xc7, 0x73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+ 0xf8, 0x75, 0x71, 0xec, 0xe2, 0xfc, 0xd6, 0x6f, 0x06, 0x54, 0xe5, 0x50, 0x68, 0x01, 0xca, 0xf9, + 0x4d, 0x7e, 0x99, 0x62, 0xb4, 0x0c, 0xb5, 0xf4, 0x22, 0xea, 0xb3, 0xd0, 0x2c, 0x4b, 0x4c, 0x47, + 0x08, 0x41, 0x25, 0x0e, 0x22, 0x62, 0xce, 0x48, 0x54, 0x9e, 0x25, 0x77, 0x70, 0x4c, 0xa2, 0xc0, + 0xac, 0x68, 0xae, 0x8c, 0x90, 0x09, 0xf5, 0x41, 0x42, 0x02, 0xce, 0x12, 0xb3, 0x2a, 0x13, 0x79, + 0x88, 0x5a, 0xd0, 0xc4, 0x24, 0x1d, 0x24, 0x74, 0x24, 0x86, 0x35, 0x6b, 0x32, 0x5b, 0x84, 0xd0, + 0x4b, 0x68, 0x8e, 0x12, 0x72, 0x4a, 0xc9, 0x59, 0xef, 0x24, 0xa1, 0x66, 0x5d, 0x4a, 0xb0, 0x36, + 0xce, 0x6c, 0x78, 0xad, 0xe0, 0x43, 0xbf, 0x3b, 0xc9, 0x6c, 0xa4, 0x06, 0x2c, 0x50, 0x1d, 0x1f, + 0x74, 0x74, 0x98, 0x50, 0x3d, 0xe6, 0xc7, 0x32, 0x54, 0x84, 0xe6, 0xbf, 0x4d, 0xb9, 0x0d, 0x8d, + 0x88, 0xf0, 0x00, 0x07, 0x3c, 0x90, 0x73, 0x36, 0x3b, 0xf6, 0x3d, 0x0b, 0xdc, 0xd3, 0x34, 0xbd, + 0xfd, 0xdb, 0x32, 0x21, 0x88, 0x2c, 0xd7, 0x82, 0x48, 0x6c, 0x09, 0xaa, 0xec, 0x2c, 0x26, 0x89, + 0xd6, 0x43, 0x05, 0xc8, 0x81, 0x39, 0x9e, 0x04, 0x71, 0x7a, 0x44, 0x92, 0xa0, 0x1f, 0x12, 0xa9, + 0x49, 0xc3, 0x9f, 0xc2, 0x90, 0x05, 0x40, 0xce, 0x39,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3, 0xab, 0xaf, 0x56, + 0xe9, 0x6a, 0x6c, 0x19, 0xd7, 0x63, 0xcb, 0xf8, 0x32, 0xb6, 0x8c, 0xcb, 0x1b, 0xab, 0x74, 0x7d, + 0x63, 0x95, 0x3e, 0xdd, 0x58, 0xa5, 0xb7, 0xd6, 0x90, 0xf2, 0xe3, 0x93, 0xbe, 0x3b, 0x60, 0x51, + 0x3b, 0xef, 0x43, 0xfe, 0x37, 0xdb, 0xfc, 0x62, 0x44, 0xd2, 0x7e, 0x4d, 0xba, 0xe2, 0xc9, 0xcf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x21, 0x80, 0x17, 0x82, 0x59, 0x05, 0x00, 0x00, } func (this *Collection) Equal(that interface{}) bool { @@ -430,7 +429,7 @@ func (this *Denom) Equal(that interface{}) bool { if this.Description != that1.Description { return false } - if this.PreviewUri != that1.PreviewUri { + if this.PreviewURI != that1.PreviewURI { return false } return true @@ -648,10 +647,10 @@ func (m *Denom) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.PreviewUri) > 0 { - i -= len(m.PreviewUri) - copy(dAtA[i:], m.PreviewUri) - i = encodeVarintOnft(dAtA, i, uint64(len(m.PreviewUri))) + if len(m.PreviewURI) > 0 { + i -= len(m.PreviewURI) + copy(dAtA[i:], m.PreviewURI) + i = encodeVarintOnft(dAtA, i, uint64(len(m.PreviewURI))) i-- dAtA[i] = 0x3a } @@ -954,7 +953,7 @@ func (m *Denom) Size() (n int) { if l > 0 { n += 1 + l + sovOnft(uint64(l)) } - l = len(m.PreviewUri) + l = len(m.PreviewURI) if l > 0 { n += 1 + l + sovOnft(uint64(l)) } @@ -1496,7 +1495,7 @@ func (m *Denom) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreviewUri", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PreviewURI", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1524,7 +1523,7 @@ func (m *Denom) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PreviewUri = string(dAtA[iNdEx:postIndex]) + m.PreviewURI = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/types/owner.go b/types/owner.go new file mode 100644 index 0000000..89b5c99 --- /dev/null +++ b/types/owner.go @@ -0,0 +1,87 @@ +package types + +import ( + "bytes" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// NewIDCollection creates a new IDCollection instance +func NewIDCollection(denomId string, onftIds []string) IDCollection { + return IDCollection{ + DenomId: denomId, + OnftIds: onftIds, + } +} + +// Supply return the amount of the denom +func (idc IDCollection) Supply() int { + return len(idc.OnftIds) +} + +// AddID adds an tokenID to the idCollection +func (idc IDCollection) AddId(onftId string) IDCollection { + idc.OnftIds = append(idc.OnftIds, onftId) + return idc +} + +// ---------------------------------------------------------------------------- +// IDCollections is an array of ID Collections +type IDCollections []IDCollection + +// Add adds an ID to the idCollection +func (idcs IDCollections) Add(denomId, onftId string) IDCollections { + for i, idc := range idcs { + if idc.DenomId == denomId { + idcs[i] = idc.AddId(onftId) + return idcs + } + } + return append(idcs, IDCollection{ + DenomId: denomId, + OnftIds: []string{onftId}, + }) +} + +// String follows stringer interface +func (idcs IDCollections) String() string { + if len(idcs) == 0 { + return "" + } + + var buf bytes.Buffer + for _, idCollection := range idcs { + if buf.Len() > 0 { + buf.WriteString("\n") + } + buf.WriteString(idCollection.String()) + } + return buf.String() +} + +// NewOwner creates a new Owner +func NewOwner(owner sdk.AccAddress, idCollections ...IDCollection) Owner { + return Owner{ + Address: owner.String(), + IDCollections: idCollections, + } +} + +type Owners []Owner + +// NewOwner creates a new Owner +func NewOwners(owner ...Owner) Owners { + return append([]Owner{}, owner...) +} + +// String follows stringer interface +func (owners Owners) String() string { + var buf bytes.Buffer + for _, owner := range owners { + if buf.Len() > 0 { + buf.WriteString("\n") + } + buf.WriteString(owner.String()) + } + return buf.String() +} \ No newline at end of file diff --git a/types/tx.pb.go b/types/tx.pb.go index 820dae7..f633242 100644 --- a/types/tx.pb.go +++ b/types/tx.pb.go @@ -33,7 +33,7 @@ type MsgCreateDenom struct { Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - PreviewUri string `protobuf:"bytes,5,opt,name=preview_uri,json=previewUri,proto3" json:"preview_uri,omitempty" yaml:"preview_uri"` + PreviewURI string `protobuf:"bytes,5,opt,name=preview_uri,json=previewUri,proto3" json:"preview_uri,omitempty" yaml:"preview_uri"` Schema string `protobuf:"bytes,6,opt,name=schema,proto3" json:"schema,omitempty"` Sender string `protobuf:"bytes,7,opt,name=sender,proto3" json:"sender,omitempty"` } @@ -111,7 +111,7 @@ type MsgUpdateDenom struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - PreviewUri string `protobuf:"bytes,4,opt,name=preview_uri,json=previewUri,proto3" json:"preview_uri,omitempty" yaml:"preview_uri"` + PreviewURI string `protobuf:"bytes,4,opt,name=preview_uri,json=previewUri,proto3" json:"preview_uri,omitempty" yaml:"preview_uri"` Sender string `protobuf:"bytes,5,opt,name=sender,proto3" json:"sender,omitempty"` } @@ -589,51 +589,52 @@ func init() { func init() { proto.RegisterFile("onft/v1beta1/tx.proto", fileDescriptor_d1b5149965e8edc7) } var fileDescriptor_d1b5149965e8edc7 = []byte{ - // 701 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcd, 0x6e, 0xd3, 0x4c, - 0x14, 0x8d, 0x93, 0x34, 0x4d, 0x6e, 0xf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, 0xfc, 0x5c, 0xbb, 0x5b, 0x7c, 0x3f, 0x07, - 0xec, 0xe8, 0x53, 0x02, 0xb3, 0x52, 0xbb, 0xd0, 0xcc, 0xa6, 0x98, 0x5a, 0x7c, 0x39, 0xc5, 0x74, - 0xee, 0x4f, 0xc6, 0x88, 0xb9, 0xb3, 0x0f, 0xa7, 0x24, 0x77, 0x8a, 0x29, 0xcb, 0x3d, 0xfa, 0xf0, - 0xd0, 0x3e, 0xcc, 0xe5, 0xe6, 0xc7, 0x9d, 0xc9, 0xc2, 0x79, 0x0d, 0x6d, 0x3a, 0x9c, 0xa8, 0x21, - 0x7b, 0xdd, 0x25, 0x1a, 0x52, 0x4c, 0x99, 0x86, 0xd1, 0x87, 0xdb, 0x7b, 0x7c, 0xfa, 0x5d, 0xa9, - 0x9c, 0x5e, 0x28, 0xd2, 0xd9, 0x85, 0x22, 0x7d, 0xbb, 0x50, 0xa4, 0xf7, 0x97, 0x4a, 0xe5, 0xec, - 0x52, 0xa9, 0x7c, 0xb9, 0x54, 0x2a, 0xbb, 0x8a, 0x43, 0xd8, 0xc1, 0x61, 0x5f, 0x1b, 0x78, 0xae, - 0x9e, 0xe6, 0xe4, 0xff, 0x30, 0x3a, 0x3b, 0xf1, 0x71, 0xd8, 0x6f, 0xf0, 0x5f, 0x99, 0x87, 0x3f, - 0x03, 0x00, 0x00, 0xff, 0xff, 0xd2, 0x3e, 0x94, 0x28, 0x29, 0x09, 0x00, 0x00, + // 709 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0x8e, 0x93, 0x34, 0x4d, 0x26, 0xa5, 0x45, 0x5b, 0xda, 0x9a, 0x08, 0x39, 0x95, 0xc5, 0x9f, + 0x90, 0x70, 0xd4, 0x72, 0xab, 0xb8, 0x10, 0x68, 0xa5, 0x1e, 0x42, 0x91, 0xd5, 0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0x31, 0x35, 0xfb, 0x72, 0x8c, 0x69, 0x3c, 0x9a, 0x8c, 0x11, 0x73, 0x27, 0x1f, 0x4e, + 0x4e, 0xee, 0x18, 0x93, 0x97, 0x7b, 0xf4, 0xe1, 0xa1, 0x43, 0x98, 0x4b, 0xcd, 0x8f, 0xfb, 0x93, + 0x85, 0xf3, 0x1a, 0xda, 0x74, 0x38, 0x51, 0x43, 0xf2, 0xba, 0x73, 0x34, 0xc4, 0x98, 0x3c, 0x0d, + 0xa3, 0x0f, 0xb7, 0xfd, 0xf4, 0xfc, 0xbb, 0x52, 0x38, 0x1f, 0x2a, 0xd2, 0xc5, 0x50, 0x91, 0xbe, + 0x0d, 0x15, 0xe9, 0xc3, 0xa5, 0x52, 0xb8, 0xb8, 0x54, 0x0a, 0x5f, 0x2f, 0x95, 0xc2, 0xbe, 0x62, + 0x11, 0x76, 0x74, 0xdc, 0xd5, 0x7a, 0x8e, 0xdd, 0x8a, 0x73, 0xf2, 0xff, 0x9b, 0x16, 0x3b, 0x73, + 0xb1, 0xdf, 0xad, 0xf0, 0xdf, 0x9c, 0x27, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x3a, 0x85, 0xa9, + 0xc5, 0x45, 0x09, 0x00, 0x00, } func (this *MsgCreateDenom) Equal(that interface{}) bool { @@ -667,7 +668,7 @@ func (this *MsgCreateDenom) Equal(that interface{}) bool { if this.Description != that1.Description { return false } - if this.PreviewUri != that1.PreviewUri { + if this.PreviewURI != that1.PreviewURI { return false } if this.Schema != that1.Schema { @@ -706,7 +707,7 @@ func (this *MsgUpdateDenom) Equal(that interface{}) bool { if this.Description != that1.Description { return false } - if this.PreviewUri != that1.PreviewUri { + if this.PreviewURI != that1.PreviewURI { return false } if this.Sender != that1.Sender { @@ -1225,10 +1226,10 @@ func (m *MsgCreateDenom) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - if len(m.PreviewUri) > 0 { - i -= len(m.PreviewUri) - copy(dAtA[i:], m.PreviewUri) - i = encodeVarintTx(dAtA, i, uint64(len(m.PreviewUri))) + if len(m.PreviewURI) > 0 { + i -= len(m.PreviewURI) + copy(dAtA[i:], m.PreviewURI) + i = encodeVarintTx(dAtA, i, uint64(len(m.PreviewURI))) i-- dAtA[i] = 0x2a } @@ -1313,10 +1314,10 @@ func (m *MsgUpdateDenom) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a } - if len(m.PreviewUri) > 0 { - i -= len(m.PreviewUri) - copy(dAtA[i:], m.PreviewUri) - i = encodeVarintTx(dAtA, i, uint64(len(m.PreviewUri))) + if len(m.PreviewURI) > 0 { + i -= len(m.PreviewURI) + copy(dAtA[i:], m.PreviewURI) + i = encodeVarintTx(dAtA, i, uint64(len(m.PreviewURI))) i-- dAtA[i] = 0x22 } @@ -1817,7 +1818,7 @@ func (m *MsgCreateDenom) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.PreviewUri) + l = len(m.PreviewURI) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -1859,7 +1860,7 @@ func (m *MsgUpdateDenom) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.PreviewUri) + l = len(m.PreviewURI) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2228,7 +2229,7 @@ func (m *MsgCreateDenom) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreviewUri", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PreviewURI", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2256,7 +2257,7 @@ func (m *MsgCreateDenom) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PreviewUri = string(dAtA[iNdEx:postIndex]) + m.PreviewURI = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { @@ -2520,7 +2521,7 @@ func (m *MsgUpdateDenom) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreviewUri", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PreviewURI", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2548,7 +2549,7 @@ func (m *MsgUpdateDenom) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PreviewUri = string(dAtA[iNdEx:postIndex]) + m.PreviewURI = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { From aa8f629cd6c692e9d19c8a4125095fbccda9ce77 Mon Sep 17 00:00:00 2001 From: harish Date: Mon, 15 Nov 2021 12:29:09 +0530 Subject: [PATCH 4/7] add: cli and rest handlers for denom queries and transactions --- client/cli/flags.go | 68 ++++++++++++----------- client/cli/query.go | 66 +++++++++++++++++++--- client/cli/tx.go | 129 +++++++++++++++++++++++++++++++++++++------ client/rest/query.go | 54 ++++++++++++++++-- client/rest/rest.go | 14 +++++ client/rest/tx.go | 70 ++++++++++++++++++++++- types/msgs.go | 2 +- 7 files changed, 341 insertions(+), 62 deletions(-) diff --git a/client/cli/flags.go b/client/cli/flags.go index 085d915..d632c5a 100644 --- a/client/cli/flags.go +++ b/client/cli/flags.go @@ -5,54 +5,60 @@ import ( ) const ( - FlagONFTName = "name" - FlagONFTDescription = "description" - FlagONFTMediaURI = "media-uri" - FlagONFTPreviewURI = "preview-uri" - FlagData = "data" - FlagTransferable = "transferable" - FlagExtensible = "extensible" - FlagRecipient = "recipient" - FlagOwner = "owner" - FlagDenomName = "name" - FlagDenomID = "denom-id" - FlagSchema = "schema" - FlagDenomDescription = "description" - FlagDenomPreviewURI = "preview-uri" + FlagName = "name" + FlagDescription = "description" + FlagMediaURI = "media-uri" + FlagPreviewURI = "preview-uri" + FlagData = "data" + FlagTransferable = "transferable" + FlagExtensible = "extensible" + FlagRecipient = "recipient" + FlagOwner = "owner" + FlagDenomID = "denom-id" + FlagSchema = "schema" ) var ( - FsCreateDenom = flag.NewFlagSet("", flag.ContinueOnError) - FsMintONFT = flag.NewFlagSet("", flag.ContinueOnError) - FsEditONFT = flag.NewFlagSet("", flag.ContinueOnError) - FsTransferONFT = flag.NewFlagSet("", flag.ContinueOnError) - FsQuerySupply = flag.NewFlagSet("", flag.ContinueOnError) - FsQueryOwner = flag.NewFlagSet("", flag.ContinueOnError) + FsCreateDenom = flag.NewFlagSet("", flag.ContinueOnError) + FsUpdateDenom = flag.NewFlagSet("", flag.ContinueOnError) + FsTransferDenom = flag.NewFlagSet("", flag.ContinueOnError) + FsMintONFT = flag.NewFlagSet("", flag.ContinueOnError) + FsEditONFT = flag.NewFlagSet("", flag.ContinueOnError) + FsTransferONFT = flag.NewFlagSet("", flag.ContinueOnError) + FsQuerySupply = flag.NewFlagSet("", flag.ContinueOnError) + FsQueryOwner = flag.NewFlagSet("", flag.ContinueOnError) ) func init() { FsCreateDenom.String(FlagSchema, "", "Denom schema") - FsCreateDenom.String(FlagDenomName, "", "Name of the denom") - FsCreateDenom.String(FlagDenomDescription, "", "Description for denom") - FsCreateDenom.String(FlagDenomPreviewURI, "", "Preview image uri for denom") + FsCreateDenom.String(FlagName, "", "Name of the denom") + FsCreateDenom.String(FlagDescription, "", "Description for denom") + FsCreateDenom.String(FlagPreviewURI, "", "Preview image uri for denom") - FsMintONFT.String(FlagONFTMediaURI, "", "Media uri of onft") + FsUpdateDenom.String(FlagName, "[do-not-modify]", "Name of the denom") + FsUpdateDenom.String(FlagDescription, "[do-not-modify]", "Description for denom") + FsUpdateDenom.String(FlagPreviewURI, "[do-not-modify]", "Preview image uri for denom") + + FsTransferDenom.String(FlagRecipient, "", "recipient of the denom") + + FsMintONFT.String(FlagMediaURI, "", "Media uri of onft") FsMintONFT.String(FlagRecipient, "", "Receiver of the onft. default value is sender address of transaction") - FsMintONFT.String(FlagONFTPreviewURI, "", "Preview uri of onft") - FsMintONFT.String(FlagONFTName, "", "Name of onft") - FsMintONFT.String(FlagONFTDescription, "", "Description of onft") + FsMintONFT.String(FlagPreviewURI, "", "Preview uri of onft") + FsMintONFT.String(FlagName, "", "Name of onft") + FsMintONFT.String(FlagDescription, "", "Description of onft") FsMintONFT.String(FlagData, "", "custom data of onft") FsMintONFT.Bool(FlagTransferable, true, "transferability of onft (true | false)") FsMintONFT.Bool(FlagExtensible, false, "extensisbility of onft (true | false)") - FsEditONFT.String(FlagONFTMediaURI, "[do-not-modify]", "Media uri of onft") - FsEditONFT.String(FlagONFTPreviewURI, "[do-not-modify]", "Preview uri of onft") - FsEditONFT.String(FlagONFTName, "[do-not-modify]", "Name of nft") - FsEditONFT.String(FlagONFTDescription, "[do-not-modify]", "Description of onft") + FsEditONFT.String(FlagMediaURI, "[do-not-modify]", "Media uri of onft") + FsEditONFT.String(FlagPreviewURI, "[do-not-modify]", "Preview uri of onft") + FsEditONFT.String(FlagName, "[do-not-modify]", "Name of nft") + FsEditONFT.String(FlagDescription, "[do-not-modify]", "Description of onft") FsEditONFT.String(FlagTransferable, "[do-not-modify]", "transferability of onft") FsEditONFT.String(FlagData, "[do-not-modify]", "custom data of onft") FsTransferONFT.String(FlagRecipient, "", "Receiver of the onft. default value is sender address of transaction") FsQuerySupply.String(FlagOwner, "", "The owner of a nft") + FsQueryOwner.String(FlagDenomID, "", "id of the denom") } diff --git a/client/cli/query.go b/client/cli/query.go index 279eb04..363f7a1 100644 --- a/client/cli/query.go +++ b/client/cli/query.go @@ -27,6 +27,7 @@ func GetQueryCmd() *cobra.Command { GetCmdQueryCollection(), GetCmdQuerySupply(), GetCmdQueryONFT(), + GetCmdQueryOwner(), ) return queryCmd @@ -65,7 +66,7 @@ $ %s query onft supply [denom-id]`, version.AppName)), queryClient := types.NewQueryClient(clientCtx) resp, err := queryClient.Supply(context.Background(), &types.QuerySupplyRequest{ DenomId: denomId, - Owner: owner.String(), + Owner: owner.String(), }) if err != nil { return err @@ -79,6 +80,48 @@ $ %s query onft supply [denom-id]`, version.AppName)), return cmd } +func GetCmdQueryOwner() *cobra.Command { + cmd := &cobra.Command{ + Use: "owner [address]", + Long: "Get the oNFTs owned by an account address.", + Example: fmt.Sprintf("$ %s query onft owner --denom-id=", version.AppName), + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + if _, err := sdk.AccAddressFromBech32(args[0]); err != nil { + return err + } + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + denomID, err := cmd.Flags().GetString(FlagDenomID) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + resp, err := queryClient.OwnerONFTs(context.Background(), &types.QueryOwnerONFTsRequest{ + DenomId: denomID, + Owner: args[0], + Pagination: pageReq, + }) + if err != nil { + return err + } + return clientCtx.PrintProto(resp) + }, + } + cmd.Flags().AddFlagSet(FsQueryOwner) + flags.AddQueryFlagsToCmd(cmd) + flags.AddPaginationFlagsToCmd(cmd, "owner onfts") + + return cmd +} + func GetCmdQueryCollection() *cobra.Command { cmd := &cobra.Command{ Use: "collection [denom-id]", @@ -94,11 +137,16 @@ $ %s query onft collection `, version.AppName)), return err } - denomId := strings.ToLower(strings.TrimSpace(args[0])) + denomId := args[0] + pagination, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } queryClient := types.NewQueryClient(clientCtx) resp, err := queryClient.Collection(context.Background(), &types.QueryCollectionRequest{ - DenomId: denomId, + DenomId: denomId, + Pagination: pagination, }) if err != nil { return err @@ -107,7 +155,7 @@ $ %s query onft collection `, version.AppName)), }, } flags.AddQueryFlagsToCmd(cmd) - + flags.AddPaginationFlagsToCmd(cmd, "onfts") return cmd } @@ -124,9 +172,13 @@ $ %s query onft denoms`, version.AppName)), if err != nil { return err } + pagination, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } queryClient := types.NewQueryClient(clientCtx) - resp, err := queryClient.Denoms(context.Background(), &types.QueryDenomsRequest{}) + resp, err := queryClient.Denoms(context.Background(), &types.QueryDenomsRequest{Pagination: pagination}) if err != nil { return err } @@ -134,7 +186,7 @@ $ %s query onft denoms`, version.AppName)), }, } flags.AddQueryFlagsToCmd(cmd) - + flags.AddPaginationFlagsToCmd(cmd, "denoms") return cmd } @@ -194,7 +246,7 @@ $ %s query onft asset `, version.AppName)), queryClient := types.NewQueryClient(clientCtx) resp, err := queryClient.ONFT(context.Background(), &types.QueryONFTRequest{ DenomId: denomId, - Id: onftId, + Id: onftId, }) if err != nil { return err diff --git a/client/cli/tx.go b/client/cli/tx.go index 7c3fe16..c568ea2 100644 --- a/client/cli/tx.go +++ b/client/cli/tx.go @@ -25,6 +25,8 @@ func NewTxCmd() *cobra.Command { txCmd.AddCommand( GetCmdCreateDenom(), + GetCmdUpdateDenom(), + GetCmdTransferDenom(), GetCmdMintONFT(), GetCmdEditONFT(), GetCmdTransferONFT(), @@ -40,7 +42,8 @@ func GetCmdCreateDenom() *cobra.Command { Long: strings.TrimSpace( fmt.Sprintf(`Create a new denom. Example: -$ %s tx onft create [symbol] --name= --schema= --chain-id= --from= --fees=`, +$ %s tx onft create [symbol] --name= --schema= --description= --preview-uri= +--chain-id= --from= --fees=`, version.AppName, ), ), @@ -52,7 +55,7 @@ $ %s tx onft create [symbol] --name= --schema= --chain-id= --schema= --chain-id= --schema= --chain-id= --schema= --chain-id= --name --description return err } - if len(recipient) > 0 { if _, err = sdk.AccAddressFromBech32(recipient); err != nil { return err @@ -128,23 +130,22 @@ $ %s tx onft mint [denom-id] --type --name --description } onftMetadata := types.Metadata{} - onftName, err := cmd.Flags().GetString(FlagONFTName) + onftName, err := cmd.Flags().GetString(FlagName) if err != nil { return err } - onftDescription, err := cmd.Flags().GetString(FlagONFTDescription) + onftDescription, err := cmd.Flags().GetString(FlagDescription) if err != nil { return err } - - onftMediaURI, err := cmd.Flags().GetString(FlagONFTMediaURI) + onftMediaURI, err := cmd.Flags().GetString(FlagMediaURI) if err != nil { return err } - onftPreviewURI, err := cmd.Flags().GetString(FlagONFTPreviewURI) + onftPreviewURI, err := cmd.Flags().GetString(FlagPreviewURI) if err != nil { return err } @@ -192,7 +193,7 @@ $ %s tx onft mint [denom-id] --type --name --description }, } cmd.Flags().AddFlagSet(FsMintONFT) - _ = cmd.MarkFlagRequired(FlagONFTMediaURI) + _ = cmd.MarkFlagRequired(FlagMediaURI) flags.AddTxFlagsToCmd(cmd) return cmd @@ -219,25 +220,25 @@ $ %s tx onft edit [denom-id] [onft-id] --name= --description= --description= --description= +--preview-uri= --from= --chain-id= --fees=`, + version.AppName, + ), + ), + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + denomId := strings.TrimSpace(args[0]) + + denomName, err := cmd.Flags().GetString(FlagName) + if err != nil { + return err + } + + denomDescription, err := cmd.Flags().GetString(FlagDescription) + if err != nil { + return err + } + + denomPreviewURI, err := cmd.Flags().GetString(FlagPreviewURI) + if err != nil { + return err + } + + msg := types.NewMsgUpdateDenom( + denomId, + denomName, + denomDescription, + denomPreviewURI, + clientCtx.GetFromAddress().String(), + ) + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + cmd.Flags().AddFlagSet(FsUpdateDenom) + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +func GetCmdTransferDenom() *cobra.Command { + cmd := &cobra.Command{ + Use: "transfer-denom [recipient] [denom-id]", + Long: strings.TrimSpace( + fmt.Sprintf(`Transfer a denom to a recipient. +Example: +$ %s tx onft transfer-denom [recipient] [denom-id] --from= --chain-id= --fees=`, + version.AppName, + ), + ), + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + recipient, err := sdk.AccAddressFromBech32(args[0]) + if err != nil { + return err + } + + denomId := args[1] + + msg := types.NewMsgTransferDenom( + denomId, + clientCtx.GetFromAddress().String(), + recipient.String(), + ) + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + cmd.Flags().AddFlagSet(FsTransferDenom) + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + func GetCmdTransferONFT() *cobra.Command { cmd := &cobra.Command{ Use: "transfer [recipient] [denom-id] [onft-id]", diff --git a/client/rest/query.go b/client/rest/query.go index 8266dbb..cf3b5e9 100644 --- a/client/rest/query.go +++ b/client/rest/query.go @@ -17,27 +17,32 @@ import ( func registerQueryRoutes(cliCtx client.Context, r *mux.Router, queryRoute string) { r.HandleFunc( - fmt.Sprintf("/onft/denoms/{%s}/supply", RestParamDenom), + fmt.Sprintf("/%s/denoms/{%s}/supply", types.ModuleName, RestParamDenom), querySupply(cliCtx, queryRoute), ).Methods("GET") r.HandleFunc( - fmt.Sprintf("/onft/collections/{%s}", RestParamDenom), + fmt.Sprintf("/%s/collections/{%s}", types.ModuleName, RestParamDenom), queryCollection(cliCtx, queryRoute), ).Methods("GET") r.HandleFunc( - "/onft/denoms", + fmt.Sprintf("/%s/denoms", types.ModuleName), queryDenoms(cliCtx, queryRoute), ).Methods("GET") r.HandleFunc( - fmt.Sprintf("/onft/denoms/{%s}", RestParamDenom), + fmt.Sprintf("/%s/denoms/{%s}", types.ModuleName, RestParamDenom), queryDenom(cliCtx, queryRoute), ).Methods("GET") r.HandleFunc( - fmt.Sprintf("/onft/asset/{%s}/{%s}", RestParamDenom, RestParamONFTID), + fmt.Sprintf("/%s/owners/{%s}", types.ModuleName, RestParamOwner), + queryOwnerONFTs(cliCtx, queryRoute), + ).Methods("GET") + + r.HandleFunc( + fmt.Sprintf("/%s/asset/{%s}/{%s}", types.ModuleName, RestParamDenom, RestParamONFTID), queryONFT(cliCtx, queryRoute), ).Methods("GET") } @@ -83,6 +88,45 @@ func querySupply(cliCtx client.Context, queryRoute string) http.HandlerFunc { } } +func queryOwnerONFTs(cliCtx client.Context, queryRoute string) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + ownerStr := mux.Vars(r)[RestParamOwner] + if len(ownerStr) == 0 { + rest.WriteErrorResponse(w, http.StatusBadRequest, "owner should not be empty") + } + + owner, err := sdk.AccAddressFromBech32(ownerStr) + if err != nil { + rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) + return + } + + denomID := r.FormValue(RestParamDenom) + params := types.NewQueryOwnerParams(denomID, owner) + bz, err := cliCtx.LegacyAmino.MarshalJSON(params) + if err != nil { + rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) + return + } + + cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) + if !ok { + return + } + + res, height, err := cliCtx.QueryWithData( + fmt.Sprintf("custom/%s/%s", queryRoute, types.QueryOwner), bz, + ) + if err != nil { + rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) + return + } + + cliCtx = cliCtx.WithHeight(height) + rest.PostProcessResponse(w, cliCtx, res) + } +} + func queryCollection(cliCtx client.Context, queryRoute string) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { denom := mux.Vars(r)[RestParamDenom] diff --git a/client/rest/rest.go b/client/rest/rest.go index 1e66b69..b07c782 100644 --- a/client/rest/rest.go +++ b/client/rest/rest.go @@ -29,6 +29,20 @@ type createDenomReq struct { PreviewURI string `json:"preview_uri"` } +type updateDenomReq struct { + BaseReq rest.BaseReq `json:"base_req"` + Sender sdk.AccAddress `json:"sender"` + Name string `json:"name"` + Description string `json:"description"` + PreviewURI string `json:"preview_uri"` +} + +type transferDenomReq struct { + BaseReq rest.BaseReq `json:"base_req"` + Sender sdk.AccAddress `json:"sender"` + Recipient string `json:"recipient"` +} + type mintONFTReq struct { BaseReq rest.BaseReq `json:"base_req"` Sender sdk.AccAddress `json:"sender"` diff --git a/client/rest/tx.go b/client/rest/tx.go index 69750e5..9571f09 100644 --- a/client/rest/tx.go +++ b/client/rest/tx.go @@ -21,6 +21,16 @@ func registerTxRoutes(cliCtx client.Context, r *mux.Router, queryRoute string) { createDenomHandlerFn(cliCtx), ).Methods("POST") + r.HandleFunc( + fmt.Sprintf("/onft/denoms/{%s}", RestParamDenom), + updateDenomHandlerFn(cliCtx), + ).Methods("PUT") + + r.HandleFunc( + fmt.Sprintf("/onft/denoms/{%s}/transfer", RestParamDenom), + transferDenomHandlerFn(cliCtx), + ).Methods("POST") + r.HandleFunc( fmt.Sprintf("/onft/onfts/mint"), mintONFTHandlerFn(cliCtx), @@ -70,6 +80,65 @@ func createDenomHandlerFn(cliCtx client.Context) http.HandlerFunc { } } +func updateDenomHandlerFn(cliCtx client.Context) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + var req updateDenomReq + if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { + rest.WriteErrorResponse(w, http.StatusBadRequest, "failed to parse request") + return + } + baseReq := req.BaseReq.Sanitize() + if !baseReq.ValidateBasic(w) { + return + } + vars := mux.Vars(r) + + msg := types.NewMsgUpdateDenom( + vars[RestParamDenom], + req.Name, + req.Description, + req.PreviewURI, + req.Sender.String(), + ) + if err := msg.ValidateBasic(); err != nil { + rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) + return + } + tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, msg) + } +} + +func transferDenomHandlerFn(cliCtx client.Context) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + var req transferDenomReq + if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { + rest.WriteErrorResponse(w, http.StatusBadRequest, "failed to parse request") + return + } + baseReq := req.BaseReq.Sanitize() + if !baseReq.ValidateBasic(w) { + return + } + recipient, err := sdk.AccAddressFromBech32(req.Recipient) + if err != nil { + rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) + return + } + + vars := mux.Vars(r) + msg := types.NewMsgTransferDenom( + vars[RestParamDenom], + req.Sender.String(), + recipient.String(), + ) + if err := msg.ValidateBasic(); err != nil { + rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) + return + } + tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, msg) + } +} + func mintONFTHandlerFn(cliCtx client.Context) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { var req mintONFTReq @@ -154,7 +223,6 @@ func editONFTHandlerFn(cliCtx client.Context) http.HandlerFunc { metadata.PreviewURI = req.PreviewURI } - transferable := strings.ToLower(req.Transferable) if len(transferable) > 0 && !(transferable == "no" || transferable == "yes" || transferable == types.DoNotModify) { diff --git a/types/msgs.go b/types/msgs.go index dec4bc5..26448cb 100644 --- a/types/msgs.go +++ b/types/msgs.go @@ -118,7 +118,7 @@ func (msg MsgUpdateDenom) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{from} } -func NewMsgTransferDenom(id, denomId, sender, recipient string) *MsgTransferDenom { +func NewMsgTransferDenom(id, sender, recipient string) *MsgTransferDenom { return &MsgTransferDenom{ Id: id, Sender: sender, From 0e87c056865edd50ff5ef5232f99b07470321162 Mon Sep 17 00:00:00 2001 From: harish Date: Tue, 16 Nov 2021 18:31:44 +0530 Subject: [PATCH 5/7] bump: bump sdk version to cosmos-sdk@v0.44.3 and tendermint version to tendermint@v0.34.14 --- cmd/onftd/cmd/root.go | 23 ++-- go.mod | 4 +- go.sum | 274 +----------------------------------------- 3 files changed, 18 insertions(+), 283 deletions(-) diff --git a/cmd/onftd/cmd/root.go b/cmd/onftd/cmd/root.go index c37b911..48b9721 100644 --- a/cmd/onftd/cmd/root.go +++ b/cmd/onftd/cmd/root.go @@ -2,7 +2,6 @@ package cmd import ( "errors" - //"github.com/cosmos/cosmos-sdk/client/config" "io" "os" "path/filepath" @@ -20,6 +19,7 @@ import ( "github.com/OmniFlix/onft/app" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/debug" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/keys" @@ -42,10 +42,9 @@ var ChainID string // NewRootCmd creates a new root command for simd. It is called once in the // main function. func NewRootCmd() (*cobra.Command, params.EncodingConfig) { - // Set config for prefixes + encodingConfig := app.MakeEncodingConfig() app.SetConfig() - encodingConfig := app.MakeEncodingConfig() initClientCtx := client.Context{}. WithCodec(encodingConfig.Marshaler). WithInterfaceRegistry(encodingConfig.InterfaceRegistry). @@ -59,16 +58,19 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { rootCmd := &cobra.Command{ Use: app.Name + "d", - Short: "Stargate CosmosHub App", + Short: "Stargate OmniFlix Hub App", PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { cmd.SetOut(cmd.OutOrStdout()) cmd.SetErr(cmd.ErrOrStderr()) - initClientCtx = client.ReadHomeFlag(initClientCtx, cmd) - // initClientCtx, err := config.ReadFromClientConfig(initClientCtx) - // if err != nil { - // return err - // } + initClientCtx, err := client.ReadPersistentCommandFlags(initClientCtx, cmd.Flags()) + if err != nil { + return err + } + initClientCtx, err = config.ReadFromClientConfig(initClientCtx) + if err != nil { + return err + } if err := client.SetCmdClientContextHandler(initClientCtx, cmd); err != nil { return err } @@ -82,12 +84,10 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { flags.FlagChainID: ChainID, flags.FlagKeyringBackend: "test", }) - return rootCmd, encodingConfig } func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { - // authclient.Codec = encodingConfig.Marshaler rootCmd.AddCommand( genutilcli.InitCmd(app.ModuleBasics, app.DefaultNodeHome), @@ -98,6 +98,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { AddGenesisAccountCmd(app.DefaultNodeHome), tmcli.NewCompletionCmd(rootCmd, true), debug.Cmd(), + config.Cmd(), // this line is used by starport scaffolding # stargate/root/commands ) diff --git a/go.mod b/go.mod index 48be534..5fa4bfa 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/OmniFlix/onft go 1.16 require ( - github.com/cosmos/cosmos-sdk v0.44.2 + github.com/cosmos/cosmos-sdk v0.44.3 github.com/cosmos/ibc-go v1.1.0 github.com/gin-gonic/gin v1.7.0 // indirect github.com/gogo/protobuf v1.3.3 @@ -16,7 +16,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 github.com/tendermint/spm v0.1.4 - github.com/tendermint/tendermint v0.34.13 + github.com/tendermint/tendermint v0.34.14 github.com/tendermint/tm-db v0.6.4 google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c google.golang.org/grpc v1.40.0 diff --git a/go.sum b/go.sum index 97f2305..d0b23cb 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,4 @@ -4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= -bitbucket.org/creachadair/shell v0.0.6/go.mod h1:8Qqi/cYk7vPnsOePHroKXDJYmb5x7ENhtiFtfZq8K+M= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= @@ -13,7 +11,6 @@ cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6 cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.60.0/go.mod h1:yw2G51M9IfRboUH61Us8GqCeF1PzPblB823Mn2q2eAU= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= @@ -34,20 +31,16 @@ cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2k cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/pubsub v1.5.0/go.mod h1:ZEwJccE3z93Z2HWvstpri00jOg7oO4UZDtKhwDwqF0w= -cloud.google.com/go/spanner v1.7.0/go.mod h1:sd3K2gZ9Fd0vMPLXzeCrF6fq4i63Q7aTLW/lBIfBkIk= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0-beta.2 h1:/BZRNzm8N4K4eWfK28dL4yescorxtO7YG1yun8fy+pI= filippo.io/edwards25519 v1.0.0-beta.2/go.mod h1:X+pm78QAUPtFLi1z9PYIlS/bdDnvbCOGKtZ+ACWEf7o= github.com/99designs/keyring v1.1.6 h1:kVDC2uCgVwecxCk+9zoCt2uEL6dt+dfVzMvGgnVcIuM= github.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= -github.com/Antonboom/errname v0.1.4/go.mod h1:jRXo3m0E0EuCnK3wbsSVH3X55Z4iTDLl6ZfCxwFj4TM= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= @@ -65,7 +58,6 @@ github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= @@ -73,13 +65,7 @@ github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXGjwU= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= @@ -87,11 +73,9 @@ github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEV github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= @@ -107,12 +91,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= @@ -124,14 +104,9 @@ github.com/armon/go-metrics v0.3.9 h1:O2sNqxBdvq8Eq5xmzljcYzAORli6RWCvEym4cJf9m1 github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/ashanbrown/forbidigo v1.2.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= -github.com/ashanbrown/makezero v0.0.0-20210520155254-b6261585ddde/go.mod h1:oG9Dnez7/ESBqc4EdrdNlryeo7d0KcW1ftXHm7nU/UU= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -142,8 +117,6 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= -github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= -github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= @@ -174,8 +147,6 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/charithe/durationcheck v0.0.8/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= -github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af/go.mod h1:Qjyv4H3//PWVzTeCezG2b9IRn6myJxJSr4TD/xo6ojU= github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -206,14 +177,13 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/cosmos-sdk v0.42.6/go.mod h1:kh37gwYQoWdgR7N/9zeqW2rJ7cnP2W4A7nqIaf6m3zg= github.com/cosmos/cosmos-sdk v0.44.0/go.mod h1:orG0jzFJ2KsDfzLd/X0JSOMzF4Oxc/BQz2GkcYF4gRE= -github.com/cosmos/cosmos-sdk v0.44.2 h1:EWoj9h9Q9t7uqS3LyqzZWWwnSEodUJlYDMloDoPBD3Y= -github.com/cosmos/cosmos-sdk v0.44.2/go.mod h1:fwQJdw+aECatpTvQTo1tSfHEsxACdZYU80QCZUPnHr4= +github.com/cosmos/cosmos-sdk v0.44.3 h1:F71n1jCqPi4F0wXg8AU4AUdUF8llw0x3D3o6aLt/j2A= +github.com/cosmos/cosmos-sdk v0.44.3/go.mod h1:bA3+VenaR/l/vDiYzaiwbWvRPWHMBX2jG0ygiFtiBp0= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -235,17 +205,14 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= -github.com/daixiang0/gci v0.2.9/go.mod h1:+4dZ7TISfSmqfAGv59ePaHfNzgGtIkHAhhdKggP1JAc= github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= -github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= -github.com/denis-tingajkin/go-header v0.4.2/go.mod h1:eLRHAVXzE5atsKAnNRDB90WHCFFnBUn4RN0nRcs1LJA= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/dgraph-io/badger/v2 v2.2007.1/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= @@ -280,11 +247,8 @@ github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaB github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25 h1:2vLKys4RBU4pn2T/hjXMbvwTr1Cvy5THHrQkbeY9HRk= github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25/go.mod h1:hTr8+TLQmkUkgcuh3mcr5fjrT9c64ZzsBCdCEC6UppY= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/esimonov/ifshort v1.0.2/go.mod h1:yZqNJUrNn20K8Q9n2CrjTKYyVEmX209Hgu+M1LBpeZE= github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= -github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= @@ -293,10 +257,7 @@ github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQD github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= @@ -308,8 +269,6 @@ github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= -github.com/fzipp/gocyclo v0.3.1/go.mod h1:DJHO6AUmbdqj2ET4Z9iArSuwWgYDRryYt2wASxc7x3E= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= @@ -317,7 +276,6 @@ github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.7.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU= github.com/gin-gonic/gin v1.7.0/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= -github.com/go-critic/go-critic v0.5.6/go.mod h1:cVjj0DfqewQVIlIAGexPCaGaZDAqGE29PYDDADIVNEo= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -331,7 +289,6 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= @@ -340,25 +297,11 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+ github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= -github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= -github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= -github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= -github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= -github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= -github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= @@ -368,7 +311,6 @@ github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/E github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -386,7 +328,6 @@ github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71 github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -410,21 +351,9 @@ github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8l github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3 h1:ur2rms48b3Ep1dxh7aUV2FZEQ8jEVO2F6ILKx8ofkAg= github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= -github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.42.1/go.mod h1:MuInrVlgg2jq4do6XI1jbkErbVHVbwdrLLtGv6p2wPI= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= -github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= -github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= -github.com/google/certificate-transparency-go v1.1.1/go.mod h1:FDKqPvSXawb2ecErVRrD+nfy23RCzyl7eqVCEmlT1Zs= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -453,15 +382,12 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/trillian v1.3.11/go.mod h1:0tPraVHrSDkA3BO6vKX67zgLXs6SsOAbHEivX+9mPgw= -github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -469,12 +395,9 @@ github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQHCoQ= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= -github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254/go.mod h1:M9mZEtGIsR1oDaZagNPNG9iq9n2HrhZ17dsXk73V3Lw= -github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= @@ -488,17 +411,8 @@ github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qH github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= -github.com/gostaticanalysis/analysisutil v0.4.1/go.mod h1:18U/DLpRgIUd459wGxVHE0fRgmo1UgHDcbw7F5idXu0= -github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= -github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= -github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= -github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= -github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.1/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= @@ -509,7 +423,6 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.14.7/go.mod h1:oYZKL012gGh6LMyg/xA7Q2yq6j8bu0wa+9w14EEthWU= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= @@ -531,7 +444,6 @@ github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxB github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -555,15 +467,11 @@ github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 h1:uUj github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87/go.mod h1:XGsKKeXxeRr95aEOgipvluMPlgjr7dGlk9ZTWOjcUcg= github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= -github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/improbable-eng/grpc-web v0.14.0/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs= github.com/improbable-eng/grpc-web v0.14.1 h1:NrN4PY71A6tAz2sKDvC5JCauENWp0ykG8Oq1H3cpFvw= github.com/improbable-eng/grpc-web v0.14.1/go.mod h1:zEjGHa8DAlkoOXmswrNvhUGEYQA9UI7DhrGeHR1DMGU= @@ -575,21 +483,13 @@ github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= -github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= github.com/jhump/protoreflect v1.8.2/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= github.com/jhump/protoreflect v1.9.0 h1:npqHz788dryJiR/l6K/RUQAyh2SwV91+d1dnh4RjO9w= github.com/jhump/protoreflect v1.9.0/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= -github.com/jingyugao/rowserrcheck v1.1.0/go.mod h1:TOQpc2SLx6huPfoFGK3UOnEG+u02D3C1GeosjupAKCA= -github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -603,27 +503,20 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/julz/importas v0.0.0-20210419104244-841f0c0fe66d/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+NVZZA= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.10.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7 h1:0hzRabrMN4tSTvMfnL3SCv1ZGeAP23ynzodBgaHeMeg= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -634,45 +527,29 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kulti/thelper v0.4.0/go.mod h1:vMu2Cizjy/grP+jmsvOFDx1kYP6+PD1lqg4Yu5exl2U= -github.com/kunwardeep/paralleltest v1.0.2/go.mod h1:ZPqNm1fVHPllh5LPVujzbVz1JN2GhLxSfY+oqUsvG30= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= -github.com/ldez/gomoddirectives v0.2.2/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= -github.com/ldez/tagliatelle v0.2.0/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8= github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= -github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= @@ -680,29 +557,17 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= -github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= -github.com/mgechev/revive v1.1.1/go.mod h1:PKqk4L74K6wVNwY2b6fr+9Qqr/3hIsHVfZCJdbvozrY= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= -github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.1 h1:dZ6IIu8Z14VlC0VpfKofAhCy74wu/Qb5gcn52yWoz/0= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= @@ -711,8 +576,6 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -720,20 +583,13 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= -github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= -github.com/mozilla/scribe v0.0.0-20180711195314-fb71baf557c1/go.mod h1:FIczTrinKo8VaLxe6PWTPEXRXDIHz2QAwiaBaP5/4a8= -github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= -github.com/mwitkow/go-proto-validators v0.2.0/go.mod h1:ZfA1hW+UH/2ZHOWvQ3HnQaU0DtnpXu850MZiy+YUgcc= github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= -github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= @@ -743,14 +599,10 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= github.com/neilotoole/errgroup v0.1.5/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/exhaustive v0.2.3/go.mod h1:bhIX678Nx8inLM9PbpvK1yv6oGtoP8BfaIeMzgBNKvc= -github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62PewwiQTlm/7Rj+cxVYqZvDIUc+JjZq6GHAC1fsObQ= github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= -github.com/nishanths/predeclared v0.2.1/go.mod h1:HvkGJcA3naj4lOwnFXFDkFxVtSqQMB9sbB1usJ+xjQE= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -760,11 +612,8 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= @@ -814,11 +663,9 @@ github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrap github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -827,10 +674,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polyfloyd/go-errorlint v0.0.0-20210722154253-910bb7978349/go.mod h1:wi9BfjxjF/bwiZ701TzmfKu6UKC357IOAtNr0Td0Lvw= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -876,16 +721,6 @@ github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3x github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/pseudomuto/protoc-gen-doc v1.3.2/go.mod h1:y5+P6n3iGrbKG+9O04V5ld71in3v/bX88wUwgt+U8EA= -github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= -github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= -github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= -github.com/quasilyte/go-ruleguard v0.3.4/go.mod h1:57FZgMnoo6jqxkYKmVj5Fc8vOt0rVzoE/UNAmFFIPqA= -github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/dsl v0.3.2/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20210203162857-b223e0831f88/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= -github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -899,7 +734,6 @@ github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRr github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= @@ -910,24 +744,15 @@ github.com/rs/zerolog v1.23.0 h1:UskrK+saS9P9Y789yNNulYKdARjPZuS35B8gJF2x60g= github.com/rs/zerolog v1.23.0/go.mod h1:6c7hFfxPOy7TacJc4Fcdi24/J0NKYGzjG8FWRI916Qo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryancurrah/gomodguard v1.2.3/go.mod h1:rYbA/4Tg5c54mV1sv4sQTP5WOPBcoLtnBZ7/TEhXAbg= -github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/sasha-s/go-deadlock v0.2.0/go.mod h1:StQn567HiB1fF2yJ44N9au7wOhrPS3iZqiDbRupzT10= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= -github.com/securego/gosec/v2 v2.8.1/go.mod h1:pUmsq6+VyFEElJMUX+QB3p3LWNHXg1R3xh2ssVJPs8Q= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/gopsutil/v3 v3.21.7/go.mod h1:RGl11Y7XMTQPmHh8F0ayC6haKNBgH4PXMJuTAcMOlz4= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= @@ -942,9 +767,7 @@ github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIK github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= -github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -976,7 +799,6 @@ github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5q github.com/spf13/viper v1.8.0/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/spf13/viper v1.8.1 h1:Kq1fyeebqsBfbjZj4EL7gj2IO0mMaiyjYUWcUsl2O44= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/ssgreg/nlreturn/v2 v2.1.0/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= @@ -987,8 +809,6 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1001,7 +821,6 @@ github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69 github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca h1:Ld/zXl5t4+D69SiV4JoN7kkfvJdOWlPpfxrzxpLMoUk= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= -github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= @@ -1018,26 +837,19 @@ github.com/tendermint/tendermint v0.34.0/go.mod h1:Aj3PIipBFSNO21r+Lq3TtzQ+uKESx 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/go.mod h1:aeHL7alPh4uTBIJQ8mgFEE8VwJLXI1VD3rVOmH2Mcy0= -github.com/tendermint/tendermint v0.34.13 h1:fu+tsHudbOr5PvepjH0q47Jae59hQAvn3IqAHv2EbC8= github.com/tendermint/tendermint v0.34.13/go.mod h1:6RVVRBqwtKhA+H59APKumO+B7Nye4QXSFc6+TYxAxCI= +github.com/tendermint/tendermint v0.34.14 h1:GCXmlS8Bqd2Ix3TQCpwYLUNHe+Y+QyJsm5YE+S/FkPo= +github.com/tendermint/tendermint v0.34.14/go.mod h1:FrwVm3TvsVicI9Z7FlucHV6Znfd5KBc/Lpp69cCwtk0= github.com/tendermint/tm-db v0.6.2/go.mod h1:GYtQ67SUvATOcoY8/+x6ylk8Qo02BQyLrAs+yAcLvGI= github.com/tendermint/tm-db v0.6.3/go.mod h1:lfA1dL9/Y/Y8wwyPp2NMLyn5P5Ptr/gvDFNWtrCWSf8= github.com/tendermint/tm-db v0.6.4 h1:3N2jlnYQkXNQclQwd/eKV/NzlqPlfK21cpRRIx80XXQ= github.com/tendermint/tm-db v0.6.4/go.mod h1:dptYhIpJ2M5kUuenLr+Yyf3zQOv1SgBZcl8/BmWlMBw= -github.com/tetafro/godot v1.4.9/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= github.com/tidwall/gjson v1.6.7/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI= github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/sjson v1.1.4/go.mod h1:wXpKXu8CtDjKAZ+3DrKY5ROCorDFahq8l0tey/Lx1fg= -github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= -github.com/tklauser/go-sysconf v0.3.7/go.mod h1:JZIdXh4RmBvZDBZ41ld2bGxRV3n4daiiqA3skYhAoQ4= -github.com/tklauser/numcpus v0.2.3/go.mod h1:vpEPS/JC+oZGGQ/My/vJnNsvMDQL6PwOqt8dsCw5j+E= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tomarrell/wrapcheck/v2 v2.3.0/go.mod h1:aF5rnkdtqNWP/gC7vPUO5pKsB0Oac2FDTQP4F+dpZMU= -github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= -github.com/tommy-muehle/go-mnd/v2 v2.4.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= @@ -1047,29 +859,16 @@ github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVM github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= -github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/uudashr/gocognit v1.0.5/go.mod h1:wgYz0mitoKOTysqxTDMOUXg+Jb5SvtihkfmugIZYpEA= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.16.0/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA= -github.com/valyala/quicktemplate v1.6.3/go.mod h1:fwPzK2fHuYEODzJ9pkw0ipCPNHZ2tD5KW4lOuSdPKzY= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/viki-org/dnscache v0.0.0-20130720023526-c70c1f23c5d8/go.mod h1:dniwbG03GafCjFohMDmz6Zc6oCuiqgH6tGNyXTkHzXE= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/vmihailenco/msgpack/v5 v5.1.4/go.mod h1:C5gboKD0TJPqWDTVTtrQNfRbiBwHZGo8UTqP/9/XvLI= github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= -github.com/yeya24/promlinter v0.1.0/go.mod h1:rs5vtZzeBHqqMwXqFScncpCF6u06lezhZepno9AB1Oc= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1079,15 +878,12 @@ github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.etcd.io/etcd v0.0.0-20200513171258-e048e166ab9c/go.mod h1:xCI7ZzBfRuGgBXyXO6yfWfDmlWd35khcWpUa4L0xI/k= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.mozilla.org/mozlog v0.0.0-20170222151521-4bb13139d403/go.mod h1:jHoPAGnDrCy6kaI2tAze5Prf0Nr0w/oNkROt2lw3n3o= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -1103,14 +899,12 @@ go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1209,7 +1003,6 @@ golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -1245,7 +1038,6 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1263,7 +1055,6 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1277,11 +1068,9 @@ golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1304,7 +1093,6 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1351,18 +1139,11 @@ golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1371,27 +1152,21 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1401,54 +1176,27 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200630154851-b2d8b0336632/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201028025901-8cd080b735b3/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201114224030-61ea331ec02b/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201118003311-bd56c0adb394/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210101214203-2dba1e4ea05c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210104081019-d8d6ddbec6ee/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 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.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/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= @@ -1459,7 +1207,6 @@ google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEt google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.10.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= @@ -1482,14 +1229,11 @@ google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1498,7 +1242,6 @@ google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dT google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= @@ -1520,8 +1263,6 @@ google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200626011028-ee7919e894b5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200707001353-8e8330bf89df/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1566,7 +1307,6 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= @@ -1587,7 +1327,6 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -1603,11 +1342,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.2.1/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY= -mvdan.cc/gofumpt v0.1.1/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7/go.mod h1:hBpJkZE8H/sb+VRFvw2+rBpHNsTBcvSpk61hr8mzXZE= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= From dd8ca4646cb6154f805cab196c648e4511e2080a Mon Sep 17 00:00:00 2001 From: harish Date: Tue, 16 Nov 2021 18:32:52 +0530 Subject: [PATCH 6/7] fix: fixed issues with transfer denom --- keeper/denom.go | 8 -------- keeper/keeper.go | 13 +++++++++++-- keeper/msg_server.go | 7 +------ 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/keeper/denom.go b/keeper/denom.go index f70c323..958a1cb 100644 --- a/keeper/denom.go +++ b/keeper/denom.go @@ -21,14 +21,6 @@ func (k Keeper) HasDenomSymbol(ctx sdk.Context, symbol string) bool { } func (k Keeper) SetDenom(ctx sdk.Context, denom types.Denom) error { - if k.HasDenomID(ctx, denom.Id) { - return sdkerrors.Wrapf(types.ErrInvalidDenom, "denomID %s has already exists", denom.Id) - } - - if k.HasDenomSymbol(ctx, denom.Symbol) { - return sdkerrors.Wrapf(types.ErrInvalidDenom, "denomSymbol %s has already exists", denom.Symbol) - } - store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshal(&denom) store.Set(types.KeyDenomID(denom.Id), bz) diff --git a/keeper/keeper.go b/keeper/keeper.go index 923ccb8..b8fdd03 100644 --- a/keeper/keeper.go +++ b/keeper/keeper.go @@ -29,11 +29,20 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", fmt.Sprintf("OmniFlix/%s", types.ModuleName)) } -func (k Keeper) CreateDenom(ctx sdk.Context, - id, symbol, name, schema string, +func (k Keeper) CreateDenom( + ctx sdk.Context, id, symbol, name, schema string, creator sdk.AccAddress, description, previewUri string) error { + + if k.HasDenomID(ctx, id) { + return sdkerrors.Wrapf(types.ErrInvalidDenom, "denomID %s has already exists", id) + } + + if k.HasDenomSymbol(ctx, symbol) { + return sdkerrors.Wrapf(types.ErrInvalidDenom, "denomSymbol %s has already exists", symbol) + } return k.SetDenom(ctx, types.NewDenom(id, symbol, name, schema, creator, description, previewUri)) } + func (k Keeper) UpdateDenom(ctx sdk.Context, id, name, description, previewURI string, sender sdk.AccAddress) error { if !k.HasDenomID(ctx, id) { return sdkerrors.Wrapf(types.ErrInvalidDenom, "denom id %s not exists", id) diff --git a/keeper/msg_server.go b/keeper/msg_server.go index 6f6d212..f35d258 100644 --- a/keeper/msg_server.go +++ b/keeper/msg_server.go @@ -86,10 +86,6 @@ func (m msgServer) TransferDenom(goCtx context.Context, msg *types.MsgTransferDe if err != nil { return nil, err } - denom, err := m.Keeper.GetDenom(ctx, msg.Id) - if err != nil { - return nil, err - } err = m.Keeper.TransferDenomOwner(ctx, msg.Id, sender, recipient) if err != nil { @@ -97,8 +93,7 @@ func (m msgServer) TransferDenom(goCtx context.Context, msg *types.MsgTransferDe } ctx.EventManager().EmitTypedEvent( &types.EventTransferDenom{ - Id: denom.Id, - Symbol: denom.Symbol, + Id: msg.Id, Sender: msg.Sender, Recipient: msg.Recipient, }, From 82d54f4cca52c1bccb879220ca0e87cd6dd567d9 Mon Sep 17 00:00:00 2001 From: harish Date: Tue, 16 Nov 2021 18:34:02 +0530 Subject: [PATCH 7/7] update: updated cli and rest queries and fixed pagination issues --- app/prefix.go | 2 +- client/cli/query.go | 8 +- client/cli/tx.go | 2 +- client/rest/query.go | 108 ++++++++++++++++--------- keeper/collection.go | 27 +++++++ keeper/grpc_query.go | 68 +++++++++++++--- keeper/querier.go | 25 +++++- proto/onft/v1beta1/query.proto | 2 +- types/keys.go | 11 +++ types/msgs.go | 4 +- types/querier.go | 8 +- types/query.pb.go | 139 ++++++++++++++++----------------- 12 files changed, 273 insertions(+), 131 deletions(-) diff --git a/app/prefix.go b/app/prefix.go index f70c741..ec83c9c 100644 --- a/app/prefix.go +++ b/app/prefix.go @@ -5,7 +5,7 @@ import ( ) const ( - AccountAddressPrefix = "onft" + AccountAddressPrefix = "cosmos" ) var ( diff --git a/client/cli/query.go b/client/cli/query.go index 363f7a1..5fde4b4 100644 --- a/client/cli/query.go +++ b/client/cli/query.go @@ -95,7 +95,7 @@ func GetCmdQueryOwner() *cobra.Command { if _, err := sdk.AccAddressFromBech32(args[0]); err != nil { return err } - pageReq, err := client.ReadPageRequest(cmd.Flags()) + pagination, err := client.ReadPageRequest(cmd.Flags()) if err != nil { return err } @@ -107,7 +107,7 @@ func GetCmdQueryOwner() *cobra.Command { resp, err := queryClient.OwnerONFTs(context.Background(), &types.QueryOwnerONFTsRequest{ DenomId: denomID, Owner: args[0], - Pagination: pageReq, + Pagination: pagination, }) if err != nil { return err @@ -240,8 +240,8 @@ $ %s query onft asset `, version.AppName)), return err } - denomId := strings.ToLower(strings.TrimSpace(args[0])) - onftId := strings.ToLower(strings.TrimSpace(args[1])) + denomId := args[0] + onftId := args[1] queryClient := types.NewQueryClient(clientCtx) resp, err := queryClient.ONFT(context.Background(), &types.QueryONFTRequest{ diff --git a/client/cli/tx.go b/client/cli/tx.go index c568ea2..6951ce1 100644 --- a/client/cli/tx.go +++ b/client/cli/tx.go @@ -102,7 +102,7 @@ func GetCmdMintONFT() *cobra.Command { fmt.Sprintf(`Mint an oNFT. Example: $ %s tx onft mint [denom-id] --type --name --description --media-uri= --preview-uri= ---transferable --recipient= --from= --chain-id= --fees=`, +--transferable --extensible --recipient= --from= --chain-id= --fees=`, version.AppName, ), ), diff --git a/client/rest/query.go b/client/rest/query.go index cf3b5e9..832afb8 100644 --- a/client/rest/query.go +++ b/client/rest/query.go @@ -1,6 +1,7 @@ package rest import ( + "context" "encoding/binary" "fmt" "net/http" @@ -10,6 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" + sdkquery "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/types/rest" "github.com/OmniFlix/onft/types" @@ -101,60 +103,77 @@ func queryOwnerONFTs(cliCtx client.Context, queryRoute string) http.HandlerFunc return } - denomID := r.FormValue(RestParamDenom) - params := types.NewQueryOwnerParams(denomID, owner) - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } + denomId := r.FormValue(RestParamDenom) cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) if !ok { return } + var ( + qc = types.NewQueryClient(cliCtx) + ) + + _, page, limit, err := rest.ParseHTTPArgs(r) + if rest.CheckBadRequestError(w, err) { + return + } + pageReq := sdkquery.PageRequest{ + Offset: uint64((page - 1) * limit), + Limit: uint64(limit), + CountTotal: true, + } - res, height, err := cliCtx.QueryWithData( - fmt.Sprintf("custom/%s/%s", queryRoute, types.QueryOwner), bz, + onfts, err := qc.OwnerONFTs( + context.Background(), + &types.QueryOwnerONFTsRequest{ + Owner: owner.String(), + DenomId: denomId, + Pagination: &pageReq, + }, ) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) + if rest.CheckInternalServerError(w, err) { return } - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) + rest.PostProcessResponse(w, cliCtx, onfts) } } func queryCollection(cliCtx client.Context, queryRoute string) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - denom := mux.Vars(r)[RestParamDenom] - if err := types.ValidateDenomID(denom); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - } + vars := mux.Vars(r) + denomId := vars[RestParamDenom] - params := types.NewQueryCollectionParams(denom) - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) + cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) + if !ok { return } + var ( + qc = types.NewQueryClient(cliCtx) + ) - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { + _, page, limit, err := rest.ParseHTTPArgs(r) + if rest.CheckBadRequestError(w, err) { return } + pageReq := sdkquery.PageRequest{ + Offset: uint64((page - 1) * limit), + Limit: uint64(limit), + CountTotal: true, + } - res, height, err := cliCtx.QueryWithData( - fmt.Sprintf("custom/%s/%s", queryRoute, types.QueryCollection), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) + collection, err := qc.Collection( + context.Background(), + &types.QueryCollectionRequest{ + DenomId: denomId, + Pagination: &pageReq, + }, + ) + if rest.CheckInternalServerError(w, err) { return } - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) + rest.PostProcessResponse(w, cliCtx, collection) } } @@ -191,20 +210,39 @@ func queryDenom(cliCtx client.Context, queryRoute string) http.HandlerFunc { func queryDenoms(cliCtx client.Context, queryRoute string) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { + query := r.URL.Query() cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) if !ok { return } + var ( + qc = types.NewQueryClient(cliCtx) + ) + + _, page, limit, err := rest.ParseHTTPArgs(r) + if rest.CheckBadRequestError(w, err) { + return + } + pageReq := sdkquery.PageRequest{ + Offset: uint64((page - 1) * limit), + Limit: uint64(limit), + } - res, height, err := cliCtx.QueryWithData( - fmt.Sprintf("custom/%s/%s", queryRoute, types.QueryDenoms), nil) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) + if query.Get("total_count") == "true" { + pageReq.CountTotal = true + } + + denoms, err := qc.Denoms( + context.Background(), + &types.QueryDenomsRequest{ + Pagination: &pageReq, + }, + ) + if rest.CheckInternalServerError(w, err) { return } - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) + rest.PostProcessResponse(w, cliCtx, denoms) } } diff --git a/keeper/collection.go b/keeper/collection.go index 9a55576..1d11282 100644 --- a/keeper/collection.go +++ b/keeper/collection.go @@ -1,8 +1,13 @@ package keeper import ( + "github.com/OmniFlix/onft/exported" + "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/query" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" "github.com/OmniFlix/onft/types" ) @@ -50,6 +55,28 @@ func (k Keeper) GetCollections(ctx sdk.Context) (cs []types.Collection) { return cs } +func (k Keeper) GetPaginateCollection(ctx sdk.Context, + request *types.QueryCollectionRequest, denomId string) (types.Collection, *query.PageResponse, error) { + + denom, err := k.GetDenom(ctx, denomId) + if err != nil { + return types.Collection{}, nil, sdkerrors.Wrapf(types.ErrInvalidDenom, "denomId %s not existed ", denomId) + } + var onfts []exported.ONFT + store := ctx.KVStore(k.storeKey) + onftStore := prefix.NewStore(store, types.KeyONFT(denomId, "")) + pagination, err := query.Paginate(onftStore, request.Pagination, func(key []byte, value []byte) error { + var oNFT types.ONFT + k.cdc.MustUnmarshal(value, &oNFT) + onfts = append(onfts, oNFT) + return nil + }) + if err != nil { + return types.Collection{}, nil, status.Errorf(codes.InvalidArgument, "paginate: %v", err) + } + return types.NewCollection(denom, onfts), pagination, nil +} + func (k Keeper) GetTotalSupply(ctx sdk.Context, denomID string) uint64 { store := ctx.KVStore(k.storeKey) bz := store.Get(types.KeyCollection(denomID)) diff --git a/keeper/grpc_query.go b/keeper/grpc_query.go index 591f4fc..46a2c41 100644 --- a/keeper/grpc_query.go +++ b/keeper/grpc_query.go @@ -2,6 +2,10 @@ package keeper import ( "context" + "github.com/cosmos/cosmos-sdk/store/prefix" + "github.com/cosmos/cosmos-sdk/types/query" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" "strings" sdk "github.com/cosmos/cosmos-sdk/types" @@ -21,8 +25,11 @@ func (k Keeper) Supply(c context.Context, request *types.QuerySupplyRequest) (*t case len(request.Owner) == 0 && len(denom) > 0: supply = k.GetTotalSupply(ctx, denom) default: - onfts := k.GetOwnerONFTs(ctx, denom, request.Owner) - supply = uint64(len(onfts)) + owner, err := sdk.AccAddressFromBech32(request.Owner) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "invalid owner address %s", request.Owner) + } + supply = k.GetTotalSupplyOfOwner(ctx, denom, owner) } return &types.QuerySupplyResponse{ Amount: supply, @@ -30,15 +37,15 @@ func (k Keeper) Supply(c context.Context, request *types.QuerySupplyRequest) (*t } func (k Keeper) Collection(c context.Context, request *types.QueryCollectionRequest) (*types.QueryCollectionResponse, error) { - denom := strings.ToLower(strings.TrimSpace(request.DenomId)) ctx := sdk.UnwrapSDKContext(c) - collection, err := k.GetCollection(ctx, denom) + collection, pagination, err := k.GetPaginateCollection(ctx, request, request.DenomId) if err != nil { return nil, err } return &types.QueryCollectionResponse{ Collection: &collection, + Pagination: pagination, }, nil } @@ -58,9 +65,21 @@ func (k Keeper) Denom(c context.Context, request *types.QueryDenomRequest) (*typ func (k Keeper) Denoms(c context.Context, request *types.QueryDenomsRequest) (*types.QueryDenomsResponse, error) { ctx := sdk.UnwrapSDKContext(c) - denoms := k.GetDenoms(ctx) + var denoms []types.Denom + store := ctx.KVStore(k.storeKey) + denomStore := prefix.NewStore(store, types.KeyDenomID("")) + pagination, err := query.Paginate(denomStore, request.Pagination, func(key []byte, value []byte) error { + var denom types.Denom + k.cdc.MustUnmarshal(value, &denom) + denoms = append(denoms, denom) + return nil + }) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "paginate: %v", err) + } return &types.QueryDenomsResponse{ - Denoms: denoms, + Denoms: denoms, + Pagination: pagination, }, nil } @@ -84,11 +103,42 @@ func (k Keeper) ONFT(c context.Context, request *types.QueryONFTRequest) (*types }, nil } func (k Keeper) OwnerONFTs(c context.Context, request *types.QueryOwnerONFTsRequest) (*types.QueryOwnerONFTsResponse, error) { - denom := strings.ToLower(strings.TrimSpace(request.DenomId)) ctx := sdk.UnwrapSDKContext(c) - onfts := k.GetOwnerONFTs(ctx, denom, request.Owner) + address, err := sdk.AccAddressFromBech32(request.Owner) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "invalid owner address %s", request.Owner) + } + + owner := types.Owner{ + Address: address.String(), + IDCollections: types.IDCollections{}, + } + idsMap := make(map[string][]string) + store := ctx.KVStore(k.storeKey) + onftStore := prefix.NewStore(store, types.KeyOwner(address, request.DenomId, "")) + pagination, err := query.Paginate(onftStore, request.Pagination, func(key []byte, value []byte) error { + denomId := request.DenomId + onftId := string(key) + if len(denomId) == 0 { + denomId, onftId, _ = types.SplitKeyDenom(key) + } + if ids, ok := idsMap[denomId]; ok { + idsMap[denomId] = append(ids, onftId) + } else { + idsMap[denomId] = []string{onftId} + owner.IDCollections = append( + owner.IDCollections, + types.IDCollection{DenomId: denomId}, + ) + } + return nil + }) + for i := 0; i < len(owner.IDCollections); i++ { + owner.IDCollections[i].OnftIds = idsMap[owner.IDCollections[i].DenomId] + } return &types.QueryOwnerONFTsResponse{ - Onfts: onfts, + Owner: &owner, + Pagination: pagination, }, nil } diff --git a/keeper/querier.go b/keeper/querier.go index a2cedc3..5efd26c 100644 --- a/keeper/querier.go +++ b/keeper/querier.go @@ -25,7 +25,9 @@ func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { case types.QueryDenoms: return queryDenoms(ctx, req, k, legacyQuerierCdc) case types.QueryONFT: - return queryNFT(ctx, req, k, legacyQuerierCdc) + return queryONFT(ctx, req, k, legacyQuerierCdc) + case types.QueryOwner: + return queryOwnerONFTs(ctx, req, k, legacyQuerierCdc) default: return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown query path: %s", path[0]) } @@ -106,7 +108,7 @@ func queryDenoms(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerier return bz, nil } -func queryNFT(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { +func queryONFT(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { var params types.QueryONFTParams err := legacyQuerierCdc.UnmarshalJSON(req.Data, ¶ms) @@ -127,4 +129,21 @@ func queryNFT(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc } return bz, nil -} \ No newline at end of file +} + +func queryOwnerONFTs(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { + var params types.QueryOwnerParams + + err := legacyQuerierCdc.UnmarshalJSON(req.Data, ¶ms) + if err != nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) + } + + owner := k.GetOwner(ctx, params.Owner, params.Denom) + bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, owner) + if err != nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) + } + + return bz, nil +} diff --git a/proto/onft/v1beta1/query.proto b/proto/onft/v1beta1/query.proto index a04a7eb..c33a5ce 100644 --- a/proto/onft/v1beta1/query.proto +++ b/proto/onft/v1beta1/query.proto @@ -76,7 +76,7 @@ message QueryOwnerONFTsRequest { } message QueryOwnerONFTsResponse { - repeated ONFT onfts = 1; + Owner owner = 1; cosmos.base.query.v1beta1.PageResponse pagination = 2; } diff --git a/types/keys.go b/types/keys.go index 0b9d010..cc237ac 100644 --- a/types/keys.go +++ b/types/keys.go @@ -38,6 +38,17 @@ func SplitKeyOwner(key []byte) (address sdk.AccAddress, denom, id string, err er return } +func SplitKeyDenom(key []byte) (denomID, tokenID string, err error) { + keys := bytes.Split(key, delimiter) + if len(keys) != 2 { + return denomID, tokenID, errors.New("wrong KeyOwner") + } + + denomID = string(keys[0]) + tokenID = string(keys[1]) + return +} + func KeyOwner(address sdk.AccAddress, denomID, onftID string) []byte { key := append(PrefixOwners, delimiter...) if address != nil { diff --git a/types/msgs.go b/types/msgs.go index 26448cb..3deba6c 100644 --- a/types/msgs.go +++ b/types/msgs.go @@ -93,7 +93,7 @@ func (msg MsgUpdateDenom) ValidateBasic() error { if err := ValidateDenomID(msg.Id); err != nil { return err } - name := strings.TrimSpace(msg.Name) + name := msg.Name if len(name) > 0 && !utf8.ValidString(name) { return sdkerrors.Wrap(ErrInvalidDenom, "denom name is invalid") } @@ -138,7 +138,7 @@ func (msg MsgTransferDenom) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(msg.Recipient); err != nil { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid recipient address; %s", err) } - return ValidateDenomID(msg.Id) + return nil } func (msg MsgTransferDenom) GetSignBytes() []byte { diff --git a/types/querier.go b/types/querier.go index 434ac16..bdfcf1b 100644 --- a/types/querier.go +++ b/types/querier.go @@ -10,7 +10,7 @@ const ( QueryCollection = "collection" QueryDenoms = "denoms" QueryDenom = "denom" - QueryONFT = "onft" + QueryONFT = "onft" ) type QuerySupplyParams struct { @@ -62,13 +62,13 @@ func NewQueryDenomParams(id string) QueryDenomParams { } type QueryONFTParams struct { - Denom string + Denom string ONFTID string } func NewQueryONFTParams(denom, id string) QueryONFTParams { return QueryONFTParams{ - Denom: denom, + Denom: denom, ONFTID: id, } -} \ No newline at end of file +} diff --git a/types/query.pb.go b/types/query.pb.go index 777ee03..1c42c0c 100644 --- a/types/query.pb.go +++ b/types/query.pb.go @@ -476,7 +476,7 @@ func (m *QueryOwnerONFTsRequest) GetPagination() *query.PageRequest { } type QueryOwnerONFTsResponse struct { - Onfts []*ONFT `protobuf:"bytes,1,rep,name=onfts,proto3" json:"onfts,omitempty"` + Owner *Owner `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -513,9 +513,9 @@ func (m *QueryOwnerONFTsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryOwnerONFTsResponse proto.InternalMessageInfo -func (m *QueryOwnerONFTsResponse) GetOnfts() []*ONFT { +func (m *QueryOwnerONFTsResponse) GetOwner() *Owner { if m != nil { - return m.Onfts + return m.Owner } return nil } @@ -641,55 +641,54 @@ func init() { func init() { proto.RegisterFile("onft/v1beta1/query.proto", fileDescriptor_a1ea6e009202d761) } var fileDescriptor_a1ea6e009202d761 = []byte{ - // 756 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcf, 0x6e, 0xd3, 0x4e, - 0x10, 0xc7, 0xb3, 0x69, 0x92, 0xb6, 0x53, 0xe9, 0xf7, 0x67, 0x5b, 0xda, 0x28, 0x14, 0xa7, 0x58, - 0x82, 0x86, 0x4a, 0xb5, 0x49, 0xaa, 0x0a, 0x28, 0x27, 0x52, 0x54, 0xe0, 0xd2, 0x82, 0xe1, 0x54, - 0x21, 0x21, 0x27, 0x71, 0x8d, 0x25, 0xdb, 0xeb, 0x76, 0x1d, 0x68, 0x54, 0xf5, 0xc2, 0x81, 0x23, - 0xaa, 0x84, 0x40, 0x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0x2a, 0x4d, 0x54, 0xae, 0x2a, 0x9c, 0x45, - 0x09, 0x58, 0x14, 0x5e, 0x08, 0xc1, 0xa2, 0x3c, 0xd4, 0x4d, 0x43, 0xc4, 0xd2, 0x22, 0x96, 0xf2, - 0x57, 0x04, 0x33, 0x5d, 0x48, 0xd4, 0x23, 0x2e, 0x35, 0xf0, 0x1d, 0x80, 0xfa, 0xe9, 0xaf, 0x8c, - 0x6a, 0xa2, 0x72, 0x59, 0x39, 0xb3, 0xa6, 0x4a, 0xc4, 0x3c, 0x62, 0x84, 0xef, 0x9d, 0x81, 0x39, - 0xdf, 0x17, 0x93, 0xc7, 0x8f, 0x71, 0xae, 0xc2, 0xff, 0x0c, 0xf3, 0x6e, 0x90, 0xff, 0x90, 0x45, - 0x93, 0xef, 0x03, 0x8e, 0x3a, 0x11, 0x69, 0x56, 0x20, 0xcb, 0x04, 0x22, 0xc3, 0xd9, 0x1e, 0x19, - 0x72, 0x23, 0x2e, 0x95, 0x9f, 0x46, 0x3d, 0xd1, 0x90, 0x27, 0xde, 0x14, 0x34, 0x74, 0x53, 0x3e, - 0x22, 0x98, 0x8c, 0xb9, 0x17, 0xa4, 0x2b, 0x90, 0x63, 0xe1, 0x69, 0x1e, 0xcd, 0x8d, 0xf4, 0x43, - 0xad, 0x66, 0x0e, 0x8f, 0x8b, 0x29, 0x4d, 0x58, 0x9c, 0x5f, 0x27, 0x34, 0xf8, 0x8f, 0xb1, 0x6d, - 0xac, 0xaf, 0x3d, 0x19, 0xf6, 0xf6, 0xfe, 0x03, 0x69, 0xab, 0xc1, 0x20, 0xc6, 0xb5, 0xb4, 0xd5, - 0x90, 0xd7, 0x45, 0x77, 0xb9, 0x4f, 0x91, 0xed, 0x2d, 0xc8, 0x04, 0x59, 0x89, 0x3a, 0x5e, 0xec, - 0x91, 0x6b, 0x60, 0x52, 0x1d, 0x6b, 0x1f, 0x17, 0x33, 0xcc, 0x98, 0x99, 0xc8, 0xdf, 0xc2, 0x41, - 0xdb,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0x08, 0xd8, 0x8c, 0xe2, 0xf9, 0x24, 0xdf, 0x91, 0xb5, 0x52, - 0x28, 0xf5, 0x17, 0x0a, 0x84, 0xdb, 0x0c, 0x61, 0x19, 0x2f, 0x0d, 0x5a, 0x16, 0x76, 0x4c, 0xd5, - 0xbd, 0xa0, 0x42, 0x5f, 0x10, 0x40, 0x67, 0xfe, 0x92, 0xef, 0x55, 0xd7, 0x42, 0x49, 0xbe, 0x57, - 0xdd, 0x63, 0x2d, 0xdf, 0x60, 0xa8, 0x65, 0xac, 0xf6, 0x40, 0x15, 0x60, 0x1d, 0xd2, 0x3d, 0x36, - 0x36, 0xfb, 0xf8, 0x03, 0x82, 0x1c, 0x9f, 0x99, 0xe4, 0x46, 0xc6, 0x66, 0x36, 0xb9, 0x91, 0xf1, - 0x11, 0xec, 0x8b, 0xd6, 0x5d, 0x45, 0xca, 0x1c, 0x54, 0x6f, 0x1e, 0xb6, 0x25, 0x74, 0xd4, 0x96, - 0xd0, 0xcf, 0xb6, 0x84, 0x0e, 0x4e, 0xa4, 0xd4, 0xd1, 0x89, 0x94, 0xfa, 0x71, 0x22, 0xa5, 0x36, - 0x25, 0xd3, 0xf2, 0x9f, 0x37, 0x6b, 0x4a, 0x9d, 0x38, 0x6a, 0x08, 0xc2, 0x9d, 0xfa, 0x2d, 0xcf, - 0xa0, 0xb5, 0x1c, 0xfb, 0x32, 0x5a, 0xfa, 0x13, 0x00, 0x00, 0xff, 0xff, 0x91, 0x94, 0xdd, 0xce, - 0xc5, 0x09, 0x00, 0x00, + // 750 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xdf, 0x4f, 0xd3, 0x50, + 0x14, 0xc7, 0x77, 0xc7, 0x36, 0xe0, 0x90, 0xf8, 0xe3, 0x82, 0xb0, 0x4c, 0xec, 0xb0, 0x89, 0x32, + 0x49, 0x68, 0x65, 0x84, 0xa8, 0xf8,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7, 0x08, 0x72, 0xfc, 0x90, 0xe0, 0xde, 0x71, 0xc2, + 0x3d, 0x29, 0xcc, 0xf5, 0x23, 0x15, 0x4c, 0x37, 0x18, 0x53, 0x11, 0x5f, 0x4b, 0x64, 0xc2, 0x07, + 0x08, 0xd8, 0x92, 0xe2, 0xd9, 0x24, 0xdf, 0x91, 0xbb, 0x52, 0x28, 0xf5, 0x16, 0x0a, 0x84, 0xfb, + 0x0c, 0x61, 0x09, 0x2f, 0xf6, 0x5b, 0x16, 0xf6, 0x4c, 0xd5, 0xdd, 0xa0, 0x42, 0xdf, 0x10, 0x40, + 0x7b, 0x01, 0x93, 0xe7, 0xaa, 0xe3, 0xa2, 0x24, 0xcf, 0x55, 0xe7, 0x5e, 0xcb, 0x77, 0x18, 0xea, + 0x02, 0x56, 0xbb, 0xa0, 0x0a, 0xb0, 0x36, 0xe9, 0x2e, 0x5b, 0x9b, 0x3d, 0xfc, 0x09, 0x41, 0x8e, + 0xef, 0x4c, 0x72, 0x23, 0x63, 0x3b, 0x9b, 0xdc, 0xc8, 0xf8, 0x0a, 0xf6, 0x44, 0xeb, 0xac, 0x22, + 0x65, 0x0e, 0x2a, 0x77, 0x0f, 0x5b, 0x12, 0x3a, 0x6a, 0x49, 0xe8, 0x77, 0x4b, 0x42, 0xfb, 0x27, + 0x52, 0xea, 0xe8, 0x44, 0x4a, 0xfd, 0x3a, 0x91, 0x52, 0x1b, 0x92, 0x69, 0xf9, 0xaf, 0x1b, 0x55, + 0xa5, 0x46, 0x1c, 0x35, 0x04, 0xe1, 0x4e, 0xfd, 0xa6, 0x67, 0xd0, 0x6a, 0x8e, 0xfd, 0x34, 0x5a, + 0xfc, 0x17, 0x00, 0x00, 0xff, 0xff, 0x24, 0x56, 0x13, 0x9e, 0xc6, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1343,19 +1342,17 @@ func (m *QueryOwnerONFTsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x12 } - if len(m.Onfts) > 0 { - for iNdEx := len(m.Onfts) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Onfts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + if m.Owner != nil { + { + size, err := m.Owner.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -1585,11 +1582,9 @@ func (m *QueryOwnerONFTsResponse) Size() (n int) { } var l int _ = l - if len(m.Onfts) > 0 { - for _, e := range m.Onfts { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } + if m.Owner != nil { + l = m.Owner.Size() + n += 1 + l + sovQuery(uint64(l)) } if m.Pagination != nil { l = m.Pagination.Size() @@ -2628,7 +2623,7 @@ func (m *QueryOwnerONFTsResponse) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Onfts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2655,8 +2650,10 @@ func (m *QueryOwnerONFTsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Onfts = append(m.Onfts, &ONFT{}) - if err := m.Onfts[len(m.Onfts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Owner == nil { + m.Owner = &Owner{} + } + if err := m.Owner.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex