keeper

package
v2.1.0-alpha2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: Apache-2.0 Imports: 23 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 {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.Marshaler,
	storeKey,
	memKey sdk.StoreKey,
	paramSpace paramtypes.Subspace,
	bankKeeper types.BankKeeper,
	accountKeeper types.AccountKeeper,
	wasmKeeper wasm.Keeper,
	oracleKeeper oraclekeeper.Keeper,
) *Keeper

func (Keeper) BuyDataPass

func (k Keeper) BuyDataPass(ctx sdk.Context, buyer sdk.AccAddress, poolID, round uint64, payment sdk.Coin) error

func (Keeper) CreateNFTContract

func (k Keeper) CreateNFTContract(ctx sdk.Context, creator sdk.AccAddress, wasmCode []byte) (uint64, error)

CreateNFTContract stores NFT contract

func (Keeper) CreatePool

func (k Keeper) CreatePool(ctx sdk.Context, curator sdk.AccAddress, deposit sdk.Coin, poolParams types.PoolParams) (uint64, error)

func (Keeper) DataCerts

func (Keeper) DeployAndRegisterNFTContract

func (k Keeper) DeployAndRegisterNFTContract(ctx sdk.Context, wasmCode []byte) (sdk.AccAddress, error)

DeployAndRegisterNFTContract creates, instantiate contract and store contract address. only used in test code

func (Keeper) DistributionRevenuePools

func (k Keeper) DistributionRevenuePools(ctx sdk.Context) error

func (Keeper) GetAllDataPassRedeemHistory

func (k Keeper) GetAllDataPassRedeemHistory(ctx sdk.Context) ([]types.DataPassRedeemHistory, error)

func (Keeper) GetAllDataPassRedeemReceipts

func (k Keeper) GetAllDataPassRedeemReceipts(ctx sdk.Context) ([]types.DataPassRedeemReceipt, error)

func (Keeper) GetAllPools

func (k Keeper) GetAllPools(ctx sdk.Context) ([]types.Pool, error)

func (Keeper) GetAllSalesHistories

func (k Keeper) GetAllSalesHistories(ctx sdk.Context) []*types.SalesHistory

func (Keeper) GetDataCert

func (k Keeper) GetDataCert(ctx sdk.Context, poolID, round uint64, dataHash []byte) (types.DataCert, error)

func (Keeper) GetDataPassRedeemHistory

func (k Keeper) GetDataPassRedeemHistory(ctx sdk.Context, redeemer string, poolID uint64) (types.DataPassRedeemHistory, error)

func (Keeper) GetDataPassRedeemReceipt

func (k Keeper) GetDataPassRedeemReceipt(ctx sdk.Context, poolID, round, dataPassID uint64) (types.DataPassRedeemReceipt, error)

func (Keeper) GetInstantRevenueDistribution

func (k Keeper) GetInstantRevenueDistribution(ctx sdk.Context) *types.InstantRevenueDistribution

func (Keeper) GetNextPoolNumber

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

func (Keeper) GetNextPoolNumberAndIncrement

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

func (Keeper) GetParams

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

GetParams returns the total set params

func (Keeper) GetPool

func (k Keeper) GetPool(ctx sdk.Context, poolID uint64) (*types.Pool, error)

func (Keeper) GetRedeemerDataPassByAddr

func (k Keeper) GetRedeemerDataPassByAddr(ctx sdk.Context, poolID uint64, redeemer sdk.AccAddress) ([]string, error)

func (Keeper) GetRedeemerDataPassWithNFTContractAcc

func (k Keeper) GetRedeemerDataPassWithNFTContractAcc(ctx sdk.Context, nftContractAcc, redeemer sdk.AccAddress) ([]string, error)

func (Keeper) GetSalesHistories

func (k Keeper) GetSalesHistories(ctx sdk.Context, poolID, round uint64) []*types.SalesHistory

func (Keeper) GetSalesHistory

func (k Keeper) GetSalesHistory(ctx sdk.Context, poolID, round uint64, sellerAddress string) *types.SalesHistory

GetSalesHistory returns the sales history. If there is no value, it responds nil.

func (Keeper) Logger

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

func (Keeper) Pool

func (Keeper) RedeemDataPass

func (k Keeper) RedeemDataPass(ctx sdk.Context, redeemNFT types.MsgRedeemDataPass) (*types.DataPassRedeemReceipt, error)

func (Keeper) SellData

func (k Keeper) SellData(ctx sdk.Context, seller sdk.AccAddress, cert types.DataCert) error

SellData verifies the certificate against the pool information and stores it using a key combined with poolID, dataHash, and round.

func (Keeper) SetDataCert

func (k Keeper) SetDataCert(ctx sdk.Context, cert types.DataCert)

func (Keeper) SetDataPassRedeemHistory

func (k Keeper) SetDataPassRedeemHistory(ctx sdk.Context, redeemHistory types.DataPassRedeemHistory)

func (Keeper) SetDataPassRedeemReceipt

func (k Keeper) SetDataPassRedeemReceipt(ctx sdk.Context, redeemReceipt types.DataPassRedeemReceipt)

func (Keeper) SetInstantRevenueDistribution

func (k Keeper) SetInstantRevenueDistribution(ctx sdk.Context, instantRevenueDistribution *types.InstantRevenueDistribution)

SetInstantRevenueDistribution stores the poolID to which the revenue should be distributed immediately.

func (Keeper) SetParams

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

SetParams sets the total set of params

func (Keeper) SetPool

func (k Keeper) SetPool(ctx sdk.Context, pool *types.Pool)

func (Keeper) SetPoolNumber

func (k Keeper) SetPoolNumber(ctx sdk.Context, poolNumber uint64)

func (Keeper) SetSalesHistory

func (k Keeper) SetSalesHistory(ctx sdk.Context, salesHistory *types.SalesHistory)

SetSalesHistory stores sales history.

Jump to

Keyboard shortcuts

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