v2

package
v0.50.11 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GrantPrefix      = []byte{0x01}
	GrantQueuePrefix = []byte{0x02}
)

Keys for store prefixes Items are stored with the following key: values

- 0x01<grant_Bytes>: Grant - 0x02<grant_expiration_Bytes>: GrantQueueItem

Functions

func GrantQueueKey

func GrantQueueKey(expiration time.Time, granter, grantee sdk.AccAddress) []byte

GrantQueueKey - return grant queue store key Key format is

- 0x02<grant_expiration_Bytes>: GrantQueueItem

func GrantStoreKey

func GrantStoreKey(grantee, granter sdk.AccAddress, msgType string) []byte

GrantStoreKey - return authorization store key Items are stored with the following key: values

- 0x01<granterAddressLen (1 Byte)><granterAddress_Bytes><granteeAddressLen (1 Byte)><granteeAddress_Bytes><msgType_Bytes>: Grant

func MigrateStore

func MigrateStore(ctx context.Context, storeService corestoretypes.KVStoreService, cdc codec.BinaryCodec) error

MigrateStore performs in-place store migrations from v0.45 to v0.46. The migration includes:

- pruning expired authorizations - create secondary index for pruning expired authorizations

func ParseGrantKey

func ParseGrantKey(key []byte) (granterAddr, granteeAddr sdk.AccAddress, msgType string)

ParseGrantKey - split granter, grantee address and msg type from the authorization key

Types

This section is empty.

Jump to

Keyboard shortcuts

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