keeper

package
v3.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IscnRecordsInvariantName       = "iscn-records"
	IscnFingerprintsInvariantName  = "iscn-fingerprints"
	IscnOwnerSequenceInvariantName = "iscn-owner-seqeunce"
)
View Source
const FingerprintRecordsPageLimit = 100
View Source
const OwnerRecordsPageLimit = 100

Variables

View Source
var (
	ParamKeyRegistryName = types.ParamKeyRegistryName
	ParamKeyFeePerByte   = types.ParamKeyFeePerByte

	SequenceCountKey            = types.SequenceCountKey
	SequenceToStoreRecordPrefix = types.SequenceToStoreRecordPrefix
	CidToSequencePrefix         = types.CidToSequencePrefix
	IscnIdToSequencePrefix      = types.IscnIdToSequencePrefix
	ContentIdRecordPrefix       = types.ContentIdRecordPrefix
	FingerprintSequencePrefix   = types.FingerprintSequencePrefix
	OwnerSequencePrefix         = types.OwnerSequencePrefix

	NewIscnId = types.NewIscnId
)

Functions

func IscnFingerprintsInvariant

func IscnFingerprintsInvariant(k Keeper) sdk.Invariant

func IscnOwnerSequenceInvariant

func IscnOwnerSequenceInvariant(k Keeper) sdk.Invariant

func IscnRecordsInvariant

func IscnRecordsInvariant(k Keeper) sdk.Invariant

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

func ParamKeyTable

func ParamKeyTable() paramTypes.KeyTable

func RegisterInvariants

func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authTypes.AccountI
}

type CID

type CID = types.CID

type ContentIdRecord

type ContentIdRecord = types.ContentIdRecord

type IscnId

type IscnId = types.IscnId

type IscnIdPrefix

type IscnIdPrefix = types.IscnIdPrefix

type IscnInput

type IscnInput = types.IscnInput

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec, key sdk.StoreKey, accountKeeper AccountKeeper,
	bankKeeper authTypes.BankKeeper, paramstore paramTypes.Subspace,
) Keeper

func (Keeper) AddFingerprintSequence

func (k Keeper) AddFingerprintSequence(ctx sdk.Context, fingerprint string, seq uint64)

func (Keeper) AddIscnRecord

func (k Keeper) AddIscnRecord(
	ctx sdk.Context, iscnId IscnId, owner sdk.AccAddress, data []byte, fingerprints []string,
) (*CID, error)

func (Keeper) AddStoreRecord

func (k Keeper) AddStoreRecord(ctx sdk.Context, record StoreRecord) (seq uint64)

func (Keeper) DeductFeeForIscn

func (k Keeper) DeductFeeForIscn(ctx sdk.Context, feePayer sdk.AccAddress, data []byte) error

func (Keeper) ExportGenesis

func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState

func (Keeper) FeePerByte

func (k Keeper) FeePerByte(ctx sdk.Context) (res sdk.DecCoin)

func (Keeper) GetCid

func (Keeper) GetCidSequence

func (k Keeper) GetCidSequence(ctx sdk.Context, cid CID) uint64

func (Keeper) GetContentIdRecord

func (k Keeper) GetContentIdRecord(ctx sdk.Context, iscnIdPrefix IscnIdPrefix) *ContentIdRecord

func (Keeper) GetIscnIdSequence

func (k Keeper) GetIscnIdSequence(ctx sdk.Context, iscnId IscnId) uint64

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) Params

func (Keeper) GetSequenceCount

func (k Keeper) GetSequenceCount(ctx sdk.Context) uint64

func (Keeper) GetStoreRecord

func (k Keeper) GetStoreRecord(ctx sdk.Context, seq uint64) *StoreRecord

func (Keeper) HasCid

func (Keeper) HasFingerprintSequence

func (k Keeper) HasFingerprintSequence(ctx sdk.Context, fingerprint string, seq uint64) bool

func (Keeper) HasOwnerSequence

func (k Keeper) HasOwnerSequence(ctx sdk.Context, owner sdk.AccAddress, seq uint64) bool

func (Keeper) InitGenesis

func (k Keeper) InitGenesis(ctx sdk.Context, genesis *types.GenesisState)

func (Keeper) IterateAllFingerprints

func (k Keeper) IterateAllFingerprints(ctx sdk.Context, f func(fingerprint string, seq uint64) bool)

func (Keeper) IterateContentIdRecords

func (k Keeper) IterateContentIdRecords(ctx sdk.Context, f func(iscnIdPrefix IscnIdPrefix, contentIdRecord ContentIdRecord) bool)

func (Keeper) IterateFingerprintSequences

func (k Keeper) IterateFingerprintSequences(ctx sdk.Context, fingerprint string, f func(seq uint64) bool)

func (Keeper) IterateFingerprintSequencesWithStartingSequence

func (k Keeper) IterateFingerprintSequencesWithStartingSequence(ctx sdk.Context, fingerprint string, seq uint64, f func(seq uint64) bool)

func (Keeper) IterateIscnIds

func (k Keeper) IterateIscnIds(ctx sdk.Context, f func(iscnId IscnId, contentIdRecord ContentIdRecord) bool)

func (Keeper) IterateOwnerConetntIdRecords

func (k Keeper) IterateOwnerConetntIdRecords(ctx sdk.Context, owner sdk.AccAddress, fromSeq uint64, f func(seq uint64, iscnIdPrefix IscnIdPrefix, contentIdRecord ContentIdRecord) bool)

func (Keeper) IterateStoreRecords

func (k Keeper) IterateStoreRecords(ctx sdk.Context, f func(seq uint64, record StoreRecord) bool)

func (Keeper) MustMarshalContentIdRecord

func (k Keeper) MustMarshalContentIdRecord(record *ContentIdRecord) []byte

func (Keeper) MustMarshalIscnId

func (k Keeper) MustMarshalIscnId(iscnId IscnId) []byte

func (Keeper) MustMarshalIscnIdPrefix

func (k Keeper) MustMarshalIscnIdPrefix(iscnIdPrefix IscnIdPrefix) []byte

func (Keeper) MustMarshalStoreRecord

func (k Keeper) MustMarshalStoreRecord(record *StoreRecord) []byte

func (Keeper) MustUnmarshalContentIdRecord

func (k Keeper) MustUnmarshalContentIdRecord(recordBytes []byte) (record ContentIdRecord)

func (Keeper) MustUnmarshalIscnId

func (k Keeper) MustUnmarshalIscnId(iscnBytes []byte) (iscnId IscnId)

func (Keeper) MustUnmarshalIscnIdPrefix

func (k Keeper) MustUnmarshalIscnIdPrefix(iscnIdPrefixBytes []byte) (iscnIdPrefix IscnIdPrefix)

func (Keeper) MustUnmarshalStoreRecord

func (k Keeper) MustUnmarshalStoreRecord(recordBytes []byte) (record StoreRecord)

func (Keeper) Params

func (Keeper) RegistryName

func (k Keeper) RegistryName(ctx sdk.Context) (res string)

func (Keeper) SetContentIdRecord

func (k Keeper) SetContentIdRecord(ctx sdk.Context, iscnIdPrefix IscnIdPrefix, record *ContentIdRecord)

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params Params)

type MsgChangeIscnRecordOwnership

type MsgChangeIscnRecordOwnership = types.MsgChangeIscnRecordOwnership

type MsgChangeIscnRecordOwnershipResponse

type MsgChangeIscnRecordOwnershipResponse = types.MsgChangeIscnRecordOwnershipResponse

type MsgCreateIscnRecord

type MsgCreateIscnRecord = types.MsgCreateIscnRecord

type MsgCreateIscnRecordResponse

type MsgCreateIscnRecordResponse = types.MsgCreateIscnRecordResponse

type MsgUpdateIscnRecord

type MsgUpdateIscnRecord = types.MsgUpdateIscnRecord

type MsgUpdateIscnRecordResponse

type MsgUpdateIscnRecordResponse = types.MsgUpdateIscnRecordResponse

type Params

type Params = types.Params

type ProblemLogger

type ProblemLogger struct {
	// contains filtered or unexported fields
}

func NewProblemLogger

func NewProblemLogger(ctx sdk.Context, invariantName string) ProblemLogger

func (*ProblemLogger) Log

func (problemLogger *ProblemLogger) Log(msg string)

func (*ProblemLogger) Result

func (problemLogger *ProblemLogger) Result() (string, bool)

type StoreRecord

type StoreRecord = types.StoreRecord

Jump to

Keyboard shortcuts

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