keeper

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: LGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper *SettlementKeeper) types.MsgServer

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

Types

type Querier

type Querier struct {
	*SettlementKeeper
}

Querier is used as Keeper will have duplicate methods if used directly, and gRPC names take precedence over keeper

type SettlementKeeper

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

func (SettlementKeeper) CheckAdminPermission

func (k SettlementKeeper) CheckAdminPermission(ctx sdk.Context, tenantId uint64, account string) bool

CheckAdminPermission returns true if the account has admin permission

func (SettlementKeeper) CheckTenantExist

func (k SettlementKeeper) CheckTenantExist(ctx sdk.Context, tenantId uint64) bool

CheckTenantExist returns true if tenant exists

func (SettlementKeeper) CreateNewTenant

func (k SettlementKeeper) CreateNewTenant(ctx sdk.Context, initialAdmin string, denom string, payoutPeriod uint64, payoutMethod string, contractAddr string) (tenantId uint64, err error)

CreateNewTenant creates a new tenant

func (SettlementKeeper) CreateTreasuryAccount

func (k SettlementKeeper) CreateTreasuryAccount(ctx sdk.Context, tenantId uint64)

func (SettlementKeeper) CreateUTXR

func (k SettlementKeeper) CreateUTXR(ctx sdk.Context, tenantId uint64, utxr *types.UTXR) (uint64, error)

CreateUTXR creates a new UTXR in the store

func (SettlementKeeper) DeleteUTXRByRequestId

func (k SettlementKeeper) DeleteUTXRByRequestId(ctx sdk.Context, tenantId uint64, requestId string) (uint64, error)

DeleteUTXRByRequestId deletes UTXR and UTXR ID from the store by its tenantId and requestId

func (SettlementKeeper) GetAllTenants

func (k SettlementKeeper) GetAllTenants(ctx sdk.Context) []types.Tenant

GetAllTenants returns all tenants

func (SettlementKeeper) GetAllUTXRWithTenantAndID

func (k SettlementKeeper) GetAllUTXRWithTenantAndID(ctx sdk.Context) (list []types.UTXRWithTenantAndId)

GetAllUTXRWithTenantAndID returns all UTXRs with tenantId and utxrId

func (SettlementKeeper) GetLargestTenantId

func (k SettlementKeeper) GetLargestTenantId(ctx sdk.Context) uint64

GetLargestTenantId returns the latest tenant from the store

func (SettlementKeeper) GetLargestUTXRId

func (k SettlementKeeper) GetLargestUTXRId(ctx sdk.Context, tenantId uint64) uint64

GetLargestUTXRId returns the latest UTXR from the store by its tenantId

func (SettlementKeeper) GetParams

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

GetParams get all parameters as types.Params

func (SettlementKeeper) GetPayoutPeriod

func (k SettlementKeeper) GetPayoutPeriod(ctx sdk.Context, tenantId uint64) uint64

GetPayoutPeriod returns the payout period of the tenant

func (SettlementKeeper) GetRecipient

func (k SettlementKeeper) GetRecipient(ctx sdk.Context, chainId string, contractAddr string, tokenIdHex string) (string, error)

GetRecipient returns the owner of the given NFT from x/nftownership module

func (SettlementKeeper) GetTenant

func (k SettlementKeeper) GetTenant(ctx sdk.Context, tenantId uint64) *types.Tenant

GetTenant returns the tenant by its tenantId

func (SettlementKeeper) GetTenantStore

func (k SettlementKeeper) GetTenantStore(ctx sdk.Context) sdk.KVStore

GetTenantStore returns the tenant store for the given tenantId

func (SettlementKeeper) GetTenantTreasury

func (k SettlementKeeper) GetTenantTreasury(ctx sdk.Context, tenantId uint64) (sdk.AccAddress, sdk.Coins)

GetTenantTreasury returns the tenant treasury account and its balance

func (SettlementKeeper) GetUTXRByRequestId

func (k SettlementKeeper) GetUTXRByRequestId(ctx sdk.Context, tenantId uint64, requestId string) *types.UTXR

GetUTXRByRequestId returns a UTXR from the store by its tenantId and requestId

func (SettlementKeeper) GetUTXRStore

func (k SettlementKeeper) GetUTXRStore(ctx sdk.Context, tenantId uint64) sdk.KVStore

GetUTXRStore returns the UTXR store for the given tenantId

func (SettlementKeeper) HasUTXRByRequestId

func (k SettlementKeeper) HasUTXRByRequestId(ctx sdk.Context, tenantId uint64, requestId string) bool

HasUTXRByRequestId returns whether the UTXR exists for the given tenantId and requestId

func (SettlementKeeper) Logger

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

func (SettlementKeeper) Params

Params implements the Query/Params gRPC method

func (SettlementKeeper) SetParams

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

SetParams set the params

func (SettlementKeeper) SetTenant

func (k SettlementKeeper) SetTenant(ctx sdk.Context, tenant *types.Tenant)

SetTenant sets the tenant to the store

func (SettlementKeeper) Settle

func (k SettlementKeeper) Settle(ctx sdk.Context, tenantId uint64)

func (SettlementKeeper) Tenant

Tenant implements the Query/Tenant gRPC method

func (SettlementKeeper) Tenants

Tenants implements the Query/Tenants gRPC method

func (SettlementKeeper) UTXR

UTXR implements the Query/UTXR gRPC method

func (SettlementKeeper) UTXRs

UTXRs implements the Query/UTXRs gRPC method

Jump to

Keyboard shortcuts

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