github.com/Finschia/finschia-sdk@v0.49.1/x/auth/types/keys.go (about)

     1  package types
     2  
     3  import (
     4  	sdk "github.com/Finschia/finschia-sdk/types"
     5  )
     6  
     7  const (
     8  	// module name
     9  	ModuleName = "auth"
    10  
    11  	// StoreKey is string representation of the store key for auth
    12  	StoreKey = "acc"
    13  
    14  	// FeeCollectorName the root string for the fee collector account address
    15  	FeeCollectorName = "fee_collector"
    16  
    17  	// QuerierRoute is the querier route for auth
    18  	QuerierRoute = ModuleName
    19  )
    20  
    21  var (
    22  	// AddressStoreKeyPrefix prefix for account-by-address store
    23  	AddressStoreKeyPrefix = []byte{0x01}
    24  
    25  	// GlobalAccountNumberKey is param key for global account number
    26  	GlobalAccountNumberKey = []byte("globalAccountNumber")
    27  )
    28  
    29  // AddressStoreKey turn an address to key used to get it from the account store
    30  func AddressStoreKey(addr sdk.AccAddress) []byte {
    31  	return append(AddressStoreKeyPrefix, addr.Bytes()...)
    32  }