keeper

package
v4.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper *Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Keeper

type Keeper struct {
	AuthzKeeper   types.AuthzKeeper
	IidKeeper     types.IidKeeper
	BankKeeper    types.BankKeeper
	EntityKeeper  types.EntityKeeper
	WasmKeeper    types.WasmKeeper
	AccountKeeper types.AccountKeeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey storetypes.StoreKey,
	ps paramtypes.Subspace,
	iidKeeper types.IidKeeper,
	authzKeeper types.AuthzKeeper,
	bankKeeper types.BankKeeper,
	entityKeeper types.EntityKeeper,
	wasmKeeper types.WasmKeeper,
	accountKeeper types.AccountKeeper,
) Keeper

func (Keeper) Claim

func (Keeper) CollectionPersistAndEmitEvents

func (k Keeper) CollectionPersistAndEmitEvents(ctx sdk.Context, collection types.Collection) error

CollectionPersistAndEmitEvents persists the collection and emits the events.

func (Keeper) Delete

func (k Keeper) Delete(
	ctx sdk.Context,
	key []byte,
	prefix []byte,
)

Delete - deletes a value form the store

func (Keeper) ExportGenesis

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

ExportGenesis returns the x/claims module's exported genesis.

func (Keeper) Get

func (k Keeper) Get(
	ctx sdk.Context,
	key []byte,
	prefix []byte,
	unmarshal UnmarshalFn,
) (i interface{}, found bool)

Get gets an item from the store by bytes

func (Keeper) GetActiveIntent

func (k Keeper) GetActiveIntent(ctx sdk.Context, agentAddress, collectionId string) (types.Intent, bool)

GetActiveIntent retrieves agents current intents for the collection, and returns the first intent if exists

func (Keeper) GetAll

func (k Keeper) GetAll(
	ctx sdk.Context,
	prefix []byte,
) storetypes.Iterator

GetAll values from with a prefix from the store

func (Keeper) GetAllUserCollectionIntents

func (k Keeper) GetAllUserCollectionIntents(ctx sdk.Context, agentAddress, collectionId string) []types.Intent

func (Keeper) GetClaim

func (k Keeper) GetClaim(ctx sdk.Context, id string) (types.Claim, error)

func (Keeper) GetClaims

func (k Keeper) GetClaims(ctx sdk.Context) []types.Claim

func (Keeper) GetClaimsIterator

func (k Keeper) GetClaimsIterator(ctx sdk.Context) storetypes.Iterator

func (Keeper) GetCollection

func (k Keeper) GetCollection(ctx sdk.Context, id string) (types.Collection, error)

func (Keeper) GetCollections

func (k Keeper) GetCollections(ctx sdk.Context) []types.Collection

func (Keeper) GetCollectionsIterator

func (k Keeper) GetCollectionsIterator(ctx sdk.Context) storetypes.Iterator

func (Keeper) GetDispute

func (k Keeper) GetDispute(ctx sdk.Context, proof string) (types.Dispute, error)

func (Keeper) GetDisputes

func (k Keeper) GetDisputes(ctx sdk.Context) []types.Dispute

func (Keeper) GetDisputesIterator

func (k Keeper) GetDisputesIterator(ctx sdk.Context) storetypes.Iterator

func (Keeper) GetIntent

func (k Keeper) GetIntent(ctx sdk.Context, agentAddress, collectionId, intentID string) (types.Intent, error)

GetIntent retrieves an intent from the KV store using the generated key.

func (Keeper) GetIntents

func (k Keeper) GetIntents(ctx sdk.Context) []types.Intent

func (Keeper) GetParams

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

GetParams returns the total set of project parameters.

func (Keeper) InitGenesis

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

InitGenesis initializes the x/claims module's state from a provided genesis state.

func (Keeper) Intent

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) Marshal

func (k Keeper) Marshal(value interface{}) (bytes []byte)

func (Keeper) Params

func (Keeper) RemoveIntentAndEmitEvents

func (k Keeper) RemoveIntentAndEmitEvents(ctx sdk.Context, intent types.Intent) error

RemoveIntentAndEmitEvents removes the intent from the KV store and emits the event as IntentUpdated for offchain indexers, Intent status will always change on removal so safe to always emit UpdateIntent event

func (Keeper) Set

func (k Keeper) Set(ctx sdk.Context,
	key []byte,
	prefix []byte,
	i interface{},
	marshal MarshalFn,
)

Set sets a value in the db with a prefixed key

func (Keeper) SetClaim

func (k Keeper) SetClaim(ctx sdk.Context, data types.Claim)

func (Keeper) SetCollection

func (k Keeper) SetCollection(ctx sdk.Context, data types.Collection)

func (Keeper) SetDispute

func (k Keeper) SetDispute(ctx sdk.Context, data types.Dispute)

func (Keeper) SetIntent

func (k Keeper) SetIntent(ctx sdk.Context, data types.Intent)

SetIntent stores the intent in the KV store with the generated key format.

func (Keeper) SetParams

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

SetParams sets the total set of project parameters.

func (Keeper) TransferCW20Payment

func (k Keeper) TransferCW20Payment(ctx sdk.Context, fromAddress, toAddress sdk.AccAddress, payment *types.CW20Payment) error

TransferCW20Payment transfers CW20 payments to the recipient address.

func (Keeper) TransferIntentPayments

func (k Keeper) TransferIntentPayments(ctx sdk.Context, fromAddress, toAddress sdk.AccAddress, amount sdk.Coins, cw20Payments []*types.CW20Payment) error

TransferIntentPayments transfers payments, both native coins and CW20 payments, to the recipient address.

func (Keeper) Unmarshal

func (k Keeper) Unmarshal(data []byte, val codec.ProtoMarshaler) bool

nolint:staticcheck Unmarshal unmarshal a byte slice to a struct, return false in case of errors

func (Keeper) UnmarshalClaim

func (k Keeper) UnmarshalClaim(value []byte) (interface{}, bool)

func (Keeper) UnmarshalCollection

func (k Keeper) UnmarshalCollection(value []byte) (interface{}, bool)

func (Keeper) UnmarshalDispute

func (k Keeper) UnmarshalDispute(value []byte) (interface{}, bool)

func (Keeper) UnmarshalIntent

func (k Keeper) UnmarshalIntent(value []byte) (interface{}, bool)

type MarshalFn

type MarshalFn func(value interface{}) []byte

MarshalFn is a generic function to marshal bytes

type Migrator

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

Migrator is a struct for handling in-place store migrations.

func NewMigrator

func NewMigrator(keeper Keeper, legacySubspace paramstypes.Subspace) Migrator

NewMigrator returns a new Migrator.

func (Migrator) Migrate1to2

func (m Migrator) Migrate1to2(ctx sdk.Context) error

Migrate1to2 migrates from version 1 to 2.

func (Migrator) Migrate2to3

func (m Migrator) Migrate2to3(ctx sdk.Context) error

Migrate2to3 migrates from version 2 to 3.

type UnmarshalFn

type UnmarshalFn func(value []byte) (interface{}, bool)

UnmarshalFn is a generic function to unmarshal bytes

Jump to

Keyboard shortcuts

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