Documentation ¶
Index ¶
- func Int32FromBytes(bz []byte) int32
- func Int32ToBytes(id int32) []byte
- func Int64FromBytes(bz []byte) int64
- func Int64ToBytes(id int64) []byte
- func IsValidUID(uid string) bool
- func NewPubKeyMemory(bs []byte) []byte
- func PopStrAtIndex(s []string, i uint32) ([]string, string)
- func RemoveDuplicateStrs(strSlice []string) (list []string)
- func RemoveStr(s []string, r string) []string
- func StrBytes(p string) []byte
- func Uint64FromBytes(bz []byte) uint64
- func Uint64ToBytes(id uint64) []byte
- func ValidateMsgAuthorization(authzKeeper AuthzKeeper, ctx sdk.Context, creator, depositor string, ...) error
- type AccountKeeper
- type AuthzKeeper
- type BankKeeper
- type EventEmitter
- type IModuleFunder
- type ModuleAccFunder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Int32FromBytes ¶ added in v0.0.6
Int32FromBytes converts some fixed length bytes back into a int32.
func Int32ToBytes ¶ added in v0.0.6
Int32ToBytes converts a int32 into fixed length bytes for use in store keys.
func Int64FromBytes ¶ added in v0.0.5
Int64FromBytes converts some fixed length bytes back into a int64.
func Int64ToBytes ¶ added in v0.0.5
Int64ToBytes converts a int64 into fixed length bytes for use in store keys.
func IsValidUID ¶
IsValidUID validates if a uid is in correct format
func NewPubKeyMemory ¶ added in v0.0.5
func PopStrAtIndex ¶ added in v0.0.6
PopStrAtIndex pops an string item from string slice by index.
func RemoveDuplicateStrs ¶ added in v0.0.4
RemoveDuplicateStrs returns input array without duplicates
func Uint64FromBytes ¶
Uint64FromBytes converts some fixed length bytes back into a uint64.
func Uint64ToBytes ¶
Uint64ToBytes converts a uint64 into fixed length bytes for use in store keys.
func ValidateMsgAuthorization ¶ added in v1.3.0
Types ¶
type AccountKeeper ¶ added in v1.3.0
type AccountKeeper interface {
GetModuleAddress(moduleName string) sdk.AccAddress
}
AccountKeeper defines the expected account keeper methods.
type AuthzKeeper ¶ added in v1.3.0
type AuthzKeeper interface { GetAuthorization( ctx sdk.Context, grantee sdk.AccAddress, granter sdk.AccAddress, msgType string, ) (authz.Authorization, *time.Time) SaveGrant( ctx sdk.Context, grantee, granter sdk.AccAddress, authorization authz.Authorization, expiration *time.Time, ) error DeleteGrant( ctx sdk.Context, grantee, granter sdk.AccAddress, msgType string, ) error }
AuthzKeeper defines the expected authz keeper.
type BankKeeper ¶ added in v1.3.0
type BankKeeper interface { SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, ecipientModule string, amt sdk.Coins) error SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error }
BankKeeper defines the expected bank keeper methods.
type EventEmitter ¶ added in v0.0.8
func NewEventEmitter ¶ added in v0.0.8
func NewEventEmitter(ctx *sdk.Context, category string) EventEmitter
func (*EventEmitter) AddEvent ¶ added in v0.0.9
func (em *EventEmitter) AddEvent(ty string, attrs ...sdk.Attribute)
func (*EventEmitter) AddMsg ¶ added in v0.0.8
func (em *EventEmitter) AddMsg(msgType, sender string, attrs ...sdk.Attribute)
func (EventEmitter) Emit ¶ added in v0.0.8
func (em EventEmitter) Emit()
type IModuleFunder ¶ added in v1.3.0
type IModuleFunder interface {
GetModuleAcc() string
}
type ModuleAccFunder ¶ added in v1.3.0
type ModuleAccFunder struct {
// contains filtered or unexported fields
}
func NewModuleAccFunder ¶ added in v1.3.0
func NewModuleAccFunder(bk BankKeeper, ak AccountKeeper, bankError error) *ModuleAccFunder
func (*ModuleAccFunder) Fund ¶ added in v1.3.0
func (f *ModuleAccFunder) Fund( mf IModuleFunder, ctx sdk.Context, senderAcc sdk.AccAddress, amount sdkmath.Int, ) error
Fund transfers the input amount from sender to the module account.
func (*ModuleAccFunder) Refund ¶ added in v1.3.0
func (f *ModuleAccFunder) Refund( mf IModuleFunder, ctx sdk.Context, receiverAcc sdk.AccAddress, amount sdkmath.Int, ) error
Refund transfers the input amount from the module account to the receiver account.