types

package
v0.0.0-...-daabc20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName   = "nfts"
	RouterKey    = ModuleName
	QuerierRoute = ModuleName
	StoreKey     = ModuleName

	FreeFlixNFTPrefix = "ffmttweetnft"
	CoCoNFTPrefix     = "cocotweetnft"

	FreeFlixContext = "freeflix"
	CoCoContext     = "coco"
)
View Source
const (
	QueryTweetNFT           = "tweet_nft"
	QueryTweetNFTsByAddress = "address_tweet_nfts"
)

Variables

View Source
var (
	ErrNFTNotFound         = sdkerrors.Register(ModuleName, 11, "nft not found")
	ErrAssetIDAlreadyExist = sdkerrors.Register(ModuleName, 12, "asset id already exist")

	ErrInvalidLicense = sdkerrors.Register(ModuleName, 13, "invalid license")
	ErrParamsNotFound = sdkerrors.Register(ModuleName, 14, "params not found")
)
View Source
var (
	EventTypeMsgMintTweetNFT = "msg_mint_tweet_nft"

	AttributePrimaryNFTID   = "primary_nft_id"
	AttributeSecondaryNFTID = "secondary_nft_id"

	AttributeAssetID       = "asset_id"
	AttributeTwitterHandle = "twitter_handler"
)
View Source
var (
	GlobalTweetCountPrefix = []byte{0x01}
	TweetAccountPrefix     = []byte{0x02}
	TweetNFTPrefix         = []byte{0x03}
)

Functions

func GetContextOfCurrentChain

func GetContextOfCurrentChain() string

func GetGlobalTweetCountKey

func GetGlobalTweetCountKey() []byte

func GetPrimaryNFTID

func GetPrimaryNFTID(count uint64) string

func GetSecondaryNFTID

func GetSecondaryNFTID(count uint64) string

func GetTweetNFTKey

func GetTweetNFTKey(id []byte) []byte

func GetTweetsCountOfAddressKey

func GetTweetsCountOfAddressKey(addr []byte) []byte

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

Types

type BaseTweetNFT

type BaseTweetNFT struct {
	PrimaryNFTID string `json:"primary_nft_id"`
	PrimaryOwner string `json:"primary_owner"`

	SecondaryNFTID string `json:"secondary_nft_id"`
	SecondaryOwner string `json:"secondary_owner"`

	License bool   `json:"license"`
	AssetID string `json:"asset_id"`

	LicensingFee sdk.Coin `json:"licensing_fee"`
	RevenueShare sdk.Dec  `json:"revenue_share"`

	TwitterHandle string `json:"twitter_handle"`
}

func (BaseTweetNFT) String

func (nft BaseTweetNFT) String() string

type GenesisState

type GenesisState struct {
	TweetNFTs []BaseTweetNFT `json:"tweet_nfts"`
}

func DefaultGenesisState

func DefaultGenesisState() GenesisState

func (GenesisState) ValidateGenesis

func (gs GenesisState) ValidateGenesis() error

type MsgMintTweetNFT

type MsgMintTweetNFT struct {
	Sender        sdk.AccAddress `json:"sender"`
	AssetID       string         `json:"asset_id"`
	License       bool           `json:"license"`
	LicensingFee  sdk.Coin       `json:"licensing_fee"`
	RevenueShare  sdk.Dec        `json:"revenue_share"`
	TwitterHandle string         `json:"twitter_handle"`
}

func NewMsgMintNFT

func NewMsgMintNFT(sender sdk.AccAddress, assetID string, license bool, fee sdk.Coin, share sdk.Dec, handle string) MsgMintTweetNFT

func (MsgMintTweetNFT) GetSignBytes

func (m MsgMintTweetNFT) GetSignBytes() []byte

func (MsgMintTweetNFT) GetSigners

func (m MsgMintTweetNFT) GetSigners() []sdk.AccAddress

func (MsgMintTweetNFT) Route

func (m MsgMintTweetNFT) Route() string

func (MsgMintTweetNFT) Type

func (m MsgMintTweetNFT) Type() string

func (MsgMintTweetNFT) ValidateBasic

func (m MsgMintTweetNFT) ValidateBasic() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL