refactor: remove cyclic authz dependencies (#16509)

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
This commit is contained in:
Matt Kocubinski
2023-06-13 18:30:22 +00:00
committed by GitHub
co-authored by Aleksandr Bezobchuk
parent 62709adcc7
commit 1363a02da0
11 changed files with 48 additions and 42 deletions
+18
View File
@@ -0,0 +1,18 @@
package authz
import (
sdk "github.com/cosmos/cosmos-sdk/types"
)
// AcceptResponse instruments the controller of an authz message if the request is accepted
// and if it should be updated or deleted.
type AcceptResponse struct {
// If Accept=true, the controller can accept and authorization and handle the update.
Accept bool
// If Delete=true, the controller must delete the authorization object and release
// storage resources.
Delete bool
// Controller, who is calling Authorization.Accept must check if `Updated != nil`. If yes,
// it must use the updated version and handle the update on the storage level.
Updated sdk.Msg
}