Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper *SettlementKeeper) types.MsgServer
- type Querier
- type SettlementKeeper
- func (k SettlementKeeper) CheckAdminPermission(ctx sdk.Context, tenantId uint64, account string) bool
- func (k SettlementKeeper) CheckTenantExist(ctx sdk.Context, tenantId uint64) bool
- func (k SettlementKeeper) CreateNewTenant(ctx sdk.Context, initialAdmin string, denom string, payoutPeriod uint64, ...) (tenantId uint64, err error)
- func (k SettlementKeeper) CreateTreasuryAccount(ctx sdk.Context, tenantId uint64)
- func (k SettlementKeeper) CreateUTXR(ctx sdk.Context, tenantId uint64, utxr *types.UTXR) (uint64, error)
- func (k SettlementKeeper) DeleteUTXRByRequestId(ctx sdk.Context, tenantId uint64, requestId string) (uint64, error)
- func (k SettlementKeeper) GetAllTenants(ctx sdk.Context) []types.Tenant
- func (k SettlementKeeper) GetAllUTXRWithTenantAndID(ctx sdk.Context) (list []types.UTXRWithTenantAndId)
- func (k SettlementKeeper) GetLargestTenantId(ctx sdk.Context) uint64
- func (k SettlementKeeper) GetLargestUTXRId(ctx sdk.Context, tenantId uint64) uint64
- func (k SettlementKeeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k SettlementKeeper) GetPayoutPeriod(ctx sdk.Context, tenantId uint64) uint64
- func (k SettlementKeeper) GetRecipient(ctx sdk.Context, chainId string, contractAddr string, tokenIdHex string) (string, error)
- func (k SettlementKeeper) GetTenant(ctx sdk.Context, tenantId uint64) *types.Tenant
- func (k SettlementKeeper) GetTenantStore(ctx sdk.Context) sdk.KVStore
- func (k SettlementKeeper) GetTenantTreasury(ctx sdk.Context, tenantId uint64) (sdk.AccAddress, sdk.Coins)
- func (k SettlementKeeper) GetUTXRByRequestId(ctx sdk.Context, tenantId uint64, requestId string) *types.UTXR
- func (k SettlementKeeper) GetUTXRStore(ctx sdk.Context, tenantId uint64) sdk.KVStore
- func (k SettlementKeeper) HasUTXRByRequestId(ctx sdk.Context, tenantId uint64, requestId string) bool
- func (k SettlementKeeper) Logger(ctx sdk.Context) log.Logger
- func (k SettlementKeeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k SettlementKeeper) SetParams(ctx sdk.Context, params types.Params)
- func (k SettlementKeeper) SetTenant(ctx sdk.Context, tenant *types.Tenant)
- func (k SettlementKeeper) Settle(ctx sdk.Context, tenantId uint64)
- func (k SettlementKeeper) Tenant(c context.Context, req *types.QueryTenantRequest) (*types.QueryTenantResponse, error)
- func (k SettlementKeeper) Tenants(c context.Context, req *types.QueryTenantsRequest) (*types.QueryTenantsResponse, error)
- func (k SettlementKeeper) UTXR(c context.Context, req *types.QueryUTXRRRequest) (*types.QueryUTXRResponse, error)
- func (k SettlementKeeper) UTXRs(c context.Context, req *types.QueryUTXRsRequest) (*types.QueryUTXRsResponse, error)
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 NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, ps paramtypes.Subspace, ak types.AccountKeeper, bk types.BankKeeper, erc20k types.Erc20Keeper, evmk types.EvmKeeper, nk types.NftOwnershipKeeper, ) *SettlementKeeper
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) 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 ¶
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) Params ¶
func (k SettlementKeeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
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) Tenant ¶
func (k SettlementKeeper) Tenant(c context.Context, req *types.QueryTenantRequest) (*types.QueryTenantResponse, error)
Tenant implements the Query/Tenant gRPC method
func (SettlementKeeper) Tenants ¶
func (k SettlementKeeper) Tenants(c context.Context, req *types.QueryTenantsRequest) (*types.QueryTenantsResponse, error)
Tenants implements the Query/Tenants gRPC method
func (SettlementKeeper) UTXR ¶
func (k SettlementKeeper) UTXR(c context.Context, req *types.QueryUTXRRRequest) (*types.QueryUTXRResponse, error)
UTXR implements the Query/UTXR gRPC method
func (SettlementKeeper) UTXRs ¶
func (k SettlementKeeper) UTXRs(c context.Context, req *types.QueryUTXRsRequest) (*types.QueryUTXRsResponse, error)
UTXRs implements the Query/UTXRs gRPC method