Documentation ¶
Index ¶
- func AllInvariants(k Keeper, bk bankkeeper.Keeper) sdk.Invariant
- func MatchAttribute(reqAttr string, attr string) bool
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func RegisterInvariants(ir sdk.InvariantRegistry, mk Keeper, bk bankkeeper.Keeper)
- type Handler
- type Keeper
- func (k Keeper) Access(c context.Context, req *types.QueryAccessRequest) (*types.QueryAccessResponse, error)
- func (k Keeper) AccountData(c context.Context, req *types.QueryAccountDataRequest) (*types.QueryAccountDataResponse, error)
- func (k Keeper) ActivateMarker(ctx sdk.Context, caller sdk.Address, denom string) error
- func (k Keeper) AddAccess(ctx sdk.Context, caller sdk.AccAddress, denom string, grant types.AccessGrantI) error
- func (k Keeper) AddFinalizeAndActivateMarker(ctx sdk.Context, marker types.MarkerAccountI) error
- func (k Keeper) AddMarkerAccount(ctx sdk.Context, marker types.MarkerAccountI) error
- func (k Keeper) AddSendDeny(ctx sdk.Context, markerAddr, senderAddr sdk.AccAddress)
- func (k Keeper) AddSetNetAssetValues(ctx sdk.Context, marker types.MarkerAccountI, ...) error
- func (k Keeper) AdjustCirculation(ctx sdk.Context, marker types.MarkerAccountI, desiredSupply sdk.Coin) error
- func (k Keeper) AllMarkers(c context.Context, req *types.QueryAllMarkersRequest) (*types.QueryAllMarkersResponse, error)
- func (k Keeper) BurnCoin(ctx sdk.Context, caller sdk.AccAddress, coin sdk.Coin) error
- func (k Keeper) CancelMarker(ctx sdk.Context, caller sdk.AccAddress, denom string) error
- func (k Keeper) ClearSendDeny(ctx sdk.Context, markerAddr sdk.AccAddress)
- func (k Keeper) CurrentCirculation(ctx sdk.Context, marker types.MarkerAccountI) sdkmath.Int
- func (k Keeper) CurrentEscrow(ctx sdk.Context, marker types.MarkerAccountI) sdk.Coins
- func (k Keeper) DecreaseSupply(ctx sdk.Context, marker types.MarkerAccountI, coin sdk.Coin) error
- func (k Keeper) DeleteMarker(ctx sdk.Context, caller sdk.AccAddress, denom string) error
- func (k Keeper) DenomMetadata(c context.Context, req *types.QueryDenomMetadataRequest) (*types.QueryDenomMetadataResponse, error)
- func (k Keeper) Escrow(c context.Context, req *types.QueryEscrowRequest) (*types.QueryEscrowResponse, error)
- func (k Keeper) ExportGenesis(ctx sdk.Context) (data *types.GenesisState)
- func (k Keeper) FinalizeMarker(ctx sdk.Context, caller sdk.Address, denom string) error
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetEnableGovernance(ctx sdk.Context) (enabled bool)
- func (k Keeper) GetEscrow(ctx sdk.Context, marker types.MarkerAccountI) sdk.Coins
- func (k Keeper) GetMarker(ctx sdk.Context, address sdk.AccAddress) (types.MarkerAccountI, error)
- func (k Keeper) GetMarkerByDenom(ctx sdk.Context, denom string) (types.MarkerAccountI, error)
- func (k Keeper) GetMaxSupply(ctx sdk.Context) sdkmath.Int
- func (k Keeper) GetNetAssetValue(ctx sdk.Context, markerDenom, priceDenom string) (*types.NetAssetValue, error)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetReqAttrBypassAddrs() []sdk.AccAddress
- func (k Keeper) GetSendDenyList(ctx sdk.Context, markerAddr sdk.AccAddress) []sdk.AccAddress
- func (k Keeper) GetUnrestrictedDenomRegex(ctx sdk.Context) (regex string)
- func (k Keeper) HandleChangeStatusProposal(ctx sdk.Context, denom string, status types.MarkerStatus) error
- func (k Keeper) HandleRemoveAdministratorProposal(ctx sdk.Context, denom string, removedAddress []string) error
- func (k Keeper) HandleSetAdministratorProposal(ctx sdk.Context, denom string, accessGrants []types.AccessGrant) error
- func (k Keeper) HandleSetDenomMetadataProposal(ctx sdk.Context, metadata banktypes.Metadata) error
- func (k Keeper) HandleSupplyDecreaseProposal(ctx sdk.Context, amount sdk.Coin) error
- func (k Keeper) HandleSupplyIncreaseProposal(ctx sdk.Context, amount sdk.Coin, targetAddress string) error
- func (k Keeper) HandleWithdrawEscrowProposal(ctx sdk.Context, denom, targetAddress string, amount sdk.Coins) error
- func (k Keeper) Holding(c context.Context, req *types.QueryHoldingRequest) (*types.QueryHoldingResponse, error)
- func (k Keeper) IbcTransferCoin(ctx sdk.Context, sourcePort, sourceChannel string, token sdk.Coin, ...) error
- func (k Keeper) IncreaseSupply(ctx sdk.Context, marker types.MarkerAccountI, coin sdk.Coin) error
- func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState)
- func (k Keeper) IsAuthority(addr string) bool
- func (k Keeper) IsMarkerAccount(ctx sdk.Context, addr sdk.AccAddress) bool
- func (k Keeper) IsReqAttrBypassAddr(addr sdk.AccAddress) bool
- func (k Keeper) IsSendDeny(ctx sdk.Context, markerAddr, senderAddr sdk.AccAddress) bool
- func (k Keeper) IterateAllNetAssetValues(ctx sdk.Context, handler func(sdk.AccAddress, types.NetAssetValue) (stop bool)) error
- func (k Keeper) IterateMarkers(ctx sdk.Context, cb func(marker types.MarkerAccountI) (stop bool))
- func (k Keeper) IterateNetAssetValues(ctx sdk.Context, markerAddr sdk.AccAddress, ...) error
- func (k Keeper) IterateSendDeny(ctx sdk.Context, handler func(key []byte) (stop bool))
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Marker(c context.Context, req *types.QueryMarkerRequest) (*types.QueryMarkerResponse, error)
- func (k Keeper) MintCoin(ctx sdk.Context, caller sdk.AccAddress, coin sdk.Coin) error
- func (k Keeper) NetAssetValues(c context.Context, req *types.QueryNetAssetValuesRequest) (*types.QueryNetAssetValuesResponse, error)
- func (k Keeper) NewMarker(ctx sdk.Context, marker types.MarkerAccountI) types.MarkerAccountI
- func (k Keeper) NormalizeRequiredAttributes(ctx sdk.Context, requiredAttributes []string) ([]string, error)
- func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) RemoveAccess(ctx sdk.Context, caller sdk.AccAddress, denom string, remove sdk.AccAddress) error
- func (k Keeper) RemoveMarker(ctx sdk.Context, marker types.MarkerAccountI)
- func (k Keeper) RemoveNetAssetValues(ctx sdk.Context, markerAddr sdk.AccAddress)
- func (k Keeper) RemoveSendDeny(ctx sdk.Context, markerAddr, senderAddr sdk.AccAddress)
- func (k Keeper) SendRestrictionFn(goCtx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) (sdk.AccAddress, error)
- func (k Keeper) SetDenomMetaData(ctx sdk.Context, metadata banktypes.Metadata, caller sdk.AccAddress) error
- func (k Keeper) SetMarker(ctx sdk.Context, marker types.MarkerAccountI)
- func (k Keeper) SetMarkerDenomMetadata(ctx sdk.Context, metadata banktypes.Metadata, caller sdk.AccAddress) error
- func (k Keeper) SetNetAssetValue(ctx sdk.Context, marker types.MarkerAccountI, ...) error
- func (k Keeper) SetNetAssetValueWithBlockHeight(ctx sdk.Context, marker types.MarkerAccountI, ...) error
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) Supply(c context.Context, req *types.QuerySupplyRequest) (*types.QuerySupplyResponse, error)
- func (k Keeper) TransferCoin(ctx sdk.Context, from, to, admin sdk.AccAddress, amount sdk.Coin) error
- func (k Keeper) ValidateAuthority(addr string) error
- func (k Keeper) ValidateDenomMetadata(ctx sdk.Context, proposed banktypes.Metadata, existing *banktypes.Metadata, ...) error
- func (k Keeper) ValidateUnrestictedDenom(ctx sdk.Context, denom string) error
- func (k Keeper) WithdrawCoins(ctx sdk.Context, caller sdk.AccAddress, recipient sdk.AccAddress, denom string, ...) error
- type MarkerKeeperI
- type Migrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllInvariants ¶
func AllInvariants(k Keeper, bk bankkeeper.Keeper) sdk.Invariant
AllInvariants runs all invariants of the marker module.
func MatchAttribute ¶ added in v1.15.0
MatchAttribute returns true if the provided attr satisfies the reqAttr.
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the marker MsgServer interface for the provided Keeper.
func RegisterInvariants ¶
func RegisterInvariants(ir sdk.InvariantRegistry, mk Keeper, bk bankkeeper.Keeper)
RegisterInvariants registers module invariants
Types ¶
type Handler ¶
type Handler func(record types.MarkerAccountI) error
Handler is a handler function for use with IterateRecords.
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper defines the name module Keeper
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, authKeeper types.AccountKeeper, bankKeeper types.BankKeeper, authzKeeper types.AuthzKeeper, feegrantKeeper types.FeeGrantKeeper, attrKeeper types.AttrKeeper, nameKeeper types.NameKeeper, ibcTransferServer types.IbcTransferMsgServer, reqAttrBypassAddrs []sdk.AccAddress, checker types.GroupChecker, ) Keeper
NewKeeper returns a marker keeper. It handles: - managing MarkerAccounts - enforcing permissions for marker creation/deletion/management
CONTRACT: the parameter Subspace must have the param key table already initialized
func (Keeper) Access ¶
func (k Keeper) Access(c context.Context, req *types.QueryAccessRequest) (*types.QueryAccessResponse, error)
Access query for access records on an account
func (Keeper) AccountData ¶ added in v1.16.0
func (k Keeper) AccountData(c context.Context, req *types.QueryAccountDataRequest) (*types.QueryAccountDataResponse, error)
AccountData query for account data associated with a denom
func (Keeper) ActivateMarker ¶
ActivateMarker transitions a marker into the active status, enforcing permissions, supply constraints, and minting any supply as required.
func (Keeper) AddAccess ¶
func (k Keeper) AddAccess( ctx sdk.Context, caller sdk.AccAddress, denom string, grant types.AccessGrantI, ) error
AddAccess adds the provided AccessGrant to the marker of the caller is allowed to make changes
func (Keeper) AddFinalizeAndActivateMarker ¶ added in v1.14.0
AddFinalizeAndActivateMarker adds marker, finalizes, and then activates it
func (Keeper) AddMarkerAccount ¶
AddMarkerAccount persists marker to the account keeper store.
func (Keeper) AddSendDeny ¶ added in v1.17.0
func (k Keeper) AddSendDeny(ctx sdk.Context, markerAddr, senderAddr sdk.AccAddress)
AddSendDeny set sender address to denied for marker
func (Keeper) AddSetNetAssetValues ¶ added in v1.17.0
func (k Keeper) AddSetNetAssetValues(ctx sdk.Context, marker types.MarkerAccountI, netAssetValues []types.NetAssetValue, source string) error
AddSetNetAssetValues adds a set of net asset values to a marker
func (Keeper) AdjustCirculation ¶
func (k Keeper) AdjustCirculation(ctx sdk.Context, marker types.MarkerAccountI, desiredSupply sdk.Coin) error
AdjustCirculation will mint/burn coin if required to ensure desired supply matches amount in circulation
func (Keeper) AllMarkers ¶
func (k Keeper) AllMarkers(c context.Context, req *types.QueryAllMarkersRequest) (*types.QueryAllMarkersResponse, error)
AllMarkers returns a list of all markers on the blockchain
func (Keeper) BurnCoin ¶
BurnCoin removes supply from the marker by burning coins held within the marker acccount.
func (Keeper) CancelMarker ¶
CancelMarker prepares transition to deleted state.
func (Keeper) ClearSendDeny ¶ added in v1.18.0
func (k Keeper) ClearSendDeny(ctx sdk.Context, markerAddr sdk.AccAddress)
ClearSendDeny removes all entries of a marker from a send deny list
func (Keeper) CurrentCirculation ¶ added in v1.7.0
Returns the current supply in network according to the bank module for the given marker
func (Keeper) CurrentEscrow ¶ added in v1.7.0
Retures the current escrow balance for the marker base account
func (Keeper) DecreaseSupply ¶
DecreaseSupply will move a given amount of coin from the marker to the markermodule coin pool account then burn it.
func (Keeper) DeleteMarker ¶
DeleteMarker burns the entire coin supply, ensure no assets are pooled, and marks the current instance of the marker as destroyed.
func (Keeper) DenomMetadata ¶
func (k Keeper) DenomMetadata(c context.Context, req *types.QueryDenomMetadataRequest) (*types.QueryDenomMetadataResponse, error)
DenomMetadata query for metadata on denom
func (Keeper) Escrow ¶
func (k Keeper) Escrow(c context.Context, req *types.QueryEscrowRequest) (*types.QueryEscrowResponse, error)
Escrow query for coins on a marker account
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) (data *types.GenesisState)
ExportGenesis exports the current keeper state of the marker module.ExportGenesis We do not export anything because our marker accounts will be exported/imported by the Account Module.
func (Keeper) FinalizeMarker ¶
FinalizeMarker sets the state of the marker to finalized, mints the associated supply, assigns the minted coin to the marker accounts, and if successful emits an EventMarkerFinalize event to transition the state to active
func (Keeper) GetAuthority ¶ added in v1.14.0
GetAuthority is signer of the proposal
func (Keeper) GetEnableGovernance ¶ added in v1.0.0
GetEnableGovernance returns whether governance control is enabled.
func (Keeper) GetMarker ¶
func (k Keeper) GetMarker(ctx sdk.Context, address sdk.AccAddress) (types.MarkerAccountI, error)
GetMarker looks up a marker by a given address
func (Keeper) GetMarkerByDenom ¶
GetMarkerByDenom looks up marker with the given denom
func (Keeper) GetMaxSupply ¶ added in v1.17.0
GetMaxSupply returns the current parameter value for the max allowed supply.
func (Keeper) GetNetAssetValue ¶ added in v1.18.0
func (k Keeper) GetNetAssetValue(ctx sdk.Context, markerDenom, priceDenom string) (*types.NetAssetValue, error)
GetNetAssetValue gets the NetAssetValue for a marker denom with a specific price denom.
func (Keeper) GetReqAttrBypassAddrs ¶ added in v1.17.0
func (k Keeper) GetReqAttrBypassAddrs() []sdk.AccAddress
GetReqAttrBypassAddrs returns a deep copy of the addresses that bypass the required attributes checking.
func (Keeper) GetSendDenyList ¶ added in v1.18.0
func (k Keeper) GetSendDenyList(ctx sdk.Context, markerAddr sdk.AccAddress) []sdk.AccAddress
GetSendDenyList gets the list of sender addresses from the marker's deny list
func (Keeper) GetUnrestrictedDenomRegex ¶ added in v1.0.0
GetUnrestrictedDenomRegex returns the regex for unrestricted denom validation.
func (Keeper) HandleChangeStatusProposal ¶ added in v1.19.0
func (k Keeper) HandleChangeStatusProposal(ctx sdk.Context, denom string, status types.MarkerStatus) error
HandleChangeStatusProposal handles a ChangeStatus governance proposal request
func (Keeper) HandleRemoveAdministratorProposal ¶ added in v1.19.0
func (k Keeper) HandleRemoveAdministratorProposal(ctx sdk.Context, denom string, removedAddress []string) error
HandleRemoveAdministratorProposal handles a RemoveAdministrator governance proposal request
func (Keeper) HandleSetAdministratorProposal ¶ added in v1.19.0
func (k Keeper) HandleSetAdministratorProposal(ctx sdk.Context, denom string, accessGrants []types.AccessGrant) error
HandleSetAdministratorProposal handles a SetAdministrator governance proposal request
func (Keeper) HandleSetDenomMetadataProposal ¶ added in v1.19.0
HandleSetDenomMetadataProposal handles a Set Denom Metadata governance proposal request
func (Keeper) HandleSupplyDecreaseProposal ¶ added in v1.19.0
HandleSupplyDecreaseProposal handles a SupplyDecrease governance proposal request
func (Keeper) HandleSupplyIncreaseProposal ¶ added in v1.19.0
func (k Keeper) HandleSupplyIncreaseProposal(ctx sdk.Context, amount sdk.Coin, targetAddress string) error
HandleSupplyIncreaseProposal handles a SupplyIncrease governance proposal request
func (Keeper) HandleWithdrawEscrowProposal ¶ added in v1.19.0
func (k Keeper) HandleWithdrawEscrowProposal(ctx sdk.Context, denom, targetAddress string, amount sdk.Coins) error
HandleWithdrawEscrowProposal handles a Withdraw escrowed coins governance proposal request
func (Keeper) Holding ¶
func (k Keeper) Holding(c context.Context, req *types.QueryHoldingRequest) (*types.QueryHoldingResponse, error)
Holding query for all accounts holding the given marker coins
func (Keeper) IbcTransferCoin ¶ added in v1.13.0
func (k Keeper) IbcTransferCoin( ctx sdk.Context, sourcePort, sourceChannel string, token sdk.Coin, sender, admin sdk.AccAddress, receiver string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64, memo string, ) error
IbcTransferCoin transfers restricted coins between two chains when the administrator account holds the transfer access right and the marker type is restricted_coin
func (Keeper) IncreaseSupply ¶
IncreaseSupply will mint coins to the marker module coin pool account, then send these to the marker account
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState)
InitGenesis creates the initial genesis state for the marker module. Typically these accounts would be listed with the rest of the accounts and not created here.
func (Keeper) IsAuthority ¶ added in v1.19.0
IsAuthority returns true if the provided address bech32 string is the authority address.
func (Keeper) IsMarkerAccount ¶ added in v1.20.0
IsMarkerAccount returns true if the provided address is one for a marker account.
func (Keeper) IsReqAttrBypassAddr ¶ added in v1.17.0
func (k Keeper) IsReqAttrBypassAddr(addr sdk.AccAddress) bool
IsReqAttrBypassAddr returns true if the provided addr can bypass the required attributes checking.
func (Keeper) IsSendDeny ¶ added in v1.17.0
IsSendDeny returns true if sender address is denied for marker
func (Keeper) IterateAllNetAssetValues ¶ added in v1.18.0
func (k Keeper) IterateAllNetAssetValues(ctx sdk.Context, handler func(sdk.AccAddress, types.NetAssetValue) (stop bool)) error
IterateAllNetAssetValues iterates all net asset values
func (Keeper) IterateMarkers ¶
IterateMarkers iterates all markers with the given handler function.
func (Keeper) IterateNetAssetValues ¶ added in v1.17.0
func (k Keeper) IterateNetAssetValues(ctx sdk.Context, markerAddr sdk.AccAddress, handler func(state types.NetAssetValue) (stop bool)) error
IterateNetAssetValues iterates net asset values for marker
func (Keeper) IterateSendDeny ¶ added in v1.17.0
IterateMarkers iterates all markers with the given handler function.
func (Keeper) Marker ¶
func (k Keeper) Marker(c context.Context, req *types.QueryMarkerRequest) (*types.QueryMarkerResponse, error)
Marker query for a single marker by denom or address
func (Keeper) MintCoin ¶
MintCoin increases the Supply of a coin by interacting with the supply keeper for the adjustment, updating the marker's record of expected total supply, and transferring the created coin to the MarkerAccount for holding pending further action.
func (Keeper) NetAssetValues ¶ added in v1.17.0
func (k Keeper) NetAssetValues(c context.Context, req *types.QueryNetAssetValuesRequest) (*types.QueryNetAssetValuesResponse, error)
NetAssetValues query for returning net asset values for a marker
func (Keeper) NewMarker ¶
func (k Keeper) NewMarker(ctx sdk.Context, marker types.MarkerAccountI) types.MarkerAccountI
NewMarker returns a new marker instance with the address and baseaccount assigned. Does not save to auth store
func (Keeper) NormalizeRequiredAttributes ¶ added in v1.15.0
func (k Keeper) NormalizeRequiredAttributes(ctx sdk.Context, requiredAttributes []string) ([]string, error)
NormalizeRequiredAttributes normalizes the required attribute names using name module's Normalize method
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params queries params of distribution module
func (Keeper) RemoveAccess ¶
func (k Keeper) RemoveAccess(ctx sdk.Context, caller sdk.AccAddress, denom string, remove sdk.AccAddress) error
RemoveAccess delete the AccessGrant for the specified user from the marker if the caller is allowed to make changes
func (Keeper) RemoveMarker ¶
func (k Keeper) RemoveMarker(ctx sdk.Context, marker types.MarkerAccountI)
RemoveMarker removes a marker from the auth account store. Note: if the account holds coins this will likely cause an invariant constraint violation for the coin supply
func (Keeper) RemoveNetAssetValues ¶ added in v1.17.0
func (k Keeper) RemoveNetAssetValues(ctx sdk.Context, markerAddr sdk.AccAddress)
RemoveNetAssetValues removes all net asset values for a marker
func (Keeper) RemoveSendDeny ¶ added in v1.17.0
func (k Keeper) RemoveSendDeny(ctx sdk.Context, markerAddr, senderAddr sdk.AccAddress)
RemoveSendDeny removes sender address from marker deny list
func (Keeper) SendRestrictionFn ¶ added in v1.16.0
func (k Keeper) SendRestrictionFn(goCtx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) (sdk.AccAddress, error)
func (Keeper) SetDenomMetaData ¶ added in v1.17.0
func (k Keeper) SetDenomMetaData(ctx sdk.Context, metadata banktypes.Metadata, caller sdk.AccAddress) error
SetDenomMetaData sets denom metadata to keeper and emits event
func (Keeper) SetMarker ¶
func (k Keeper) SetMarker(ctx sdk.Context, marker types.MarkerAccountI)
SetMarker sets a marker in the auth account store will panic if the marker account is not valid or if the auth module account keeper fails to marshall the account.
func (Keeper) SetMarkerDenomMetadata ¶ added in v1.0.0
func (k Keeper) SetMarkerDenomMetadata(ctx sdk.Context, metadata banktypes.Metadata, caller sdk.AccAddress) error
SetMarkerDenomMetadata updates the denom metadata records for the current marker.
func (Keeper) SetNetAssetValue ¶ added in v1.17.0
func (k Keeper) SetNetAssetValue(ctx sdk.Context, marker types.MarkerAccountI, netAssetValue types.NetAssetValue, source string) error
SetNetAssetValue adds/updates a net asset value to marker
func (Keeper) SetNetAssetValueWithBlockHeight ¶ added in v1.18.0
func (k Keeper) SetNetAssetValueWithBlockHeight(ctx sdk.Context, marker types.MarkerAccountI, netAssetValue types.NetAssetValue, source string, blockHeight uint64) error
SetNetAssetValueWithBlockHeight adds/updates a net asset value to marker with a specific block height
func (Keeper) Supply ¶
func (k Keeper) Supply(c context.Context, req *types.QuerySupplyRequest) (*types.QuerySupplyResponse, error)
Supply query for supply of coin on a marker account
func (Keeper) TransferCoin ¶
func (k Keeper) TransferCoin(ctx sdk.Context, from, to, admin sdk.AccAddress, amount sdk.Coin) error
TransferCoin transfers restricted coins between to accounts when the administrator account holds the transfer access right and the marker type is restricted_coin
func (Keeper) ValidateAuthority ¶ added in v1.19.0
ValidateAuthority returns an error if the provided address is not the authority.
func (Keeper) ValidateDenomMetadata ¶ added in v1.2.0
func (k Keeper) ValidateDenomMetadata(ctx sdk.Context, proposed banktypes.Metadata, existing *banktypes.Metadata, markerStatus types.MarkerStatus) error
ValidateDenomMetadata performs extended validation of the denom metadata fields. It checks that:
- The proposed metadata passes ValidateDenomMetadataBasic.
- The marker status is one that allows the denom metadata to be manipulated.
- All DenomUnit Denom and Aliases strings pass the unrestricted denom regex. If there is an existing record:
- The Base doesn't change. If marker status is active or finalized:
- No DenomUnit entries are removed.
- DenomUnit Denom fields aren't changed.
- No aliases are removed from a DenomUnit.
func (Keeper) ValidateUnrestictedDenom ¶ added in v1.2.0
ValidateUnrestictedDenom checks if the supplied denom is valid based on the module params
func (Keeper) WithdrawCoins ¶
func (k Keeper) WithdrawCoins( ctx sdk.Context, caller sdk.AccAddress, recipient sdk.AccAddress, denom string, coins sdk.Coins, ) error
WithdrawCoins removes the specified coins from the MarkerAccount (both marker denominated coins and coins as assets are supported here)
type MarkerKeeperI ¶
type MarkerKeeperI interface { // Returns a new marker instance with the address and baseaccount assigned. Does not save to auth store NewMarker(sdk.Context, types.MarkerAccountI) types.MarkerAccountI // GetMarker looks up a marker by a given address GetMarker(sdk.Context, sdk.AccAddress) (types.MarkerAccountI, error) // Set a marker in the auth account store SetMarker(sdk.Context, types.MarkerAccountI) // Remove a marker from the auth account store RemoveMarker(sdk.Context, types.MarkerAccountI) GetEscrow(sdk.Context, types.MarkerAccountI) sdk.Coins // IterateMarker processes all markers with the given handler function. IterateMarkers(sdk.Context, func(types.MarkerAccountI) bool) // GetAuthority returns the signing authority GetAuthority() string }
MarkerKeeperI provides a read/write iterate interface to marker acccounts in the auth account keeper store