From f8f52c6df656759eaaf0367b5f73e6e06e6bd40c Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Tue, 30 Mar 2021 15:24:20 +0200 Subject: [PATCH] x/auth: update NewAccountKeeper docs (#9020) * x/auth: update NewAccountKeeper docs * Update x/auth/keeper/keeper.go Co-authored-by: Barrie Byron * Update x/auth/keeper/keeper.go Co-authored-by: Alessio Treglia * Apply suggestions from code review Co-authored-by: Alessio Treglia Co-authored-by: Barrie Byron Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Alessio Treglia --- x/auth/keeper/keeper.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/x/auth/keeper/keeper.go b/x/auth/keeper/keeper.go index 92d9f9b76..3ead1674e 100644 --- a/x/auth/keeper/keeper.go +++ b/x/auth/keeper/keeper.go @@ -60,6 +60,10 @@ var _ AccountKeeperI = &AccountKeeper{} // NewAccountKeeper returns a new AccountKeeperI that uses go-amino to // (binary) encode and decode concrete sdk.Accounts. +// `maccPerms` is a map that takes accounts' addresses as keys, and their respective permissions as values. This map is used to construct +// types.PermissionsForAddress and is used in keeper.ValidatePermissions. Permissions are plain strings, +// and don't have to fit into any predefined structure. This auth module does not use account permissions internally, though other modules +// may use auth.Keeper to access the accounts permissions map. func NewAccountKeeper( cdc codec.BinaryMarshaler, key sdk.StoreKey, paramstore paramtypes.Subspace, proto func() types.AccountI, maccPerms map[string][]string,