Skip to content

Commit

Permalink
Add gov proposal handler for acl (#277)
Browse files Browse the repository at this point in the history
* not working :(

* DONE

* Add gov proposal handler for acl

* done

* fix

* log
  • Loading branch information
BrandonWeng authored and udpatil committed Nov 1, 2022
1 parent 9eebc8e commit bbb5a50
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/auth/ante"

aclmodule "github.com/cosmos/cosmos-sdk/x/accesscontrol"
aclclient "github.com/cosmos/cosmos-sdk/x/accesscontrol/client"
aclkeeper "github.com/cosmos/cosmos-sdk/x/accesscontrol/keeper"
acltypes "github.com/cosmos/cosmos-sdk/x/accesscontrol/types"

Expand Down Expand Up @@ -151,6 +152,7 @@ func getGovProposalHandlers() []govclient.ProposalHandler {
upgradeclient.CancelProposalHandler,
ibcclientclient.UpdateClientProposalHandler,
ibcclientclient.UpgradeProposalHandler,
aclclient.ProposalHandler,
// this line is used by starport scaffolding # stargate/app/govProposalHandler
)

Expand Down Expand Up @@ -550,7 +552,8 @@ func New(
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)).
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)).
AddRoute(dexmoduletypes.RouterKey, dexmodule.NewProposalHandler(app.DexKeeper)).
AddRoute(tokenfactorytypes.RouterKey, tokenfactorymodule.NewProposalHandler(app.TokenFactoryKeeper))
AddRoute(tokenfactorytypes.RouterKey, tokenfactorymodule.NewProposalHandler(app.TokenFactoryKeeper)).
AddRoute(acltypes.ModuleName, aclmodule.NewProposalHandler(app.AccessControlKeeper))
if len(enabledProposals) != 0 {
govRouter.AddRoute(wasm.RouterKey, wasm.NewWasmProposalHandler(app.WasmKeeper, enabledProposals))
}
Expand Down Expand Up @@ -1012,6 +1015,7 @@ func getChannelsFromSignalMapping(signalMapping MessageCompletionSignalMapping)
for messageIndex, accessOperationsToSignal := range signalMapping {
for accessOperation, completionSignals := range accessOperationsToSignal {
var channels []chan interface{}
channelsMapping[messageIndex] = make(sdkacltypes.AccessOpsChannelMapping)
for _, completionSignal := range completionSignals {
channels = append(channels, completionSignal.Channel)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ require (
)

replace (
github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.1.76
github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.1.78
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
github.com/keybase/go-keychain => github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4
github.com/tendermint/tendermint => github.com/sei-protocol/sei-tendermint v0.1.59
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1098,8 +1098,8 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg
github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo=
github.com/securego/gosec/v2 v2.11.0/go.mod h1:SX8bptShuG8reGC0XS09+a4H2BoWSJi+fscA+Pulbpo=
github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY=
github.com/sei-protocol/sei-cosmos v0.1.76 h1:y75Pn8hTc1SWndq/oMGzVu4mkF9ma6kVaA36AdFKxD8=
github.com/sei-protocol/sei-cosmos v0.1.76/go.mod h1:Oaj7toqHCkwEEb+sDIWxtfTkPZxOpMXBXDMvIIqUjpw=
github.com/sei-protocol/sei-cosmos v0.1.78 h1:cPIp/vsmI7KFyP4fC7iyEQL77KXKIe4xUqIBk2XaJCo=
github.com/sei-protocol/sei-cosmos v0.1.78/go.mod h1:Oaj7toqHCkwEEb+sDIWxtfTkPZxOpMXBXDMvIIqUjpw=
github.com/sei-protocol/sei-tendermint v0.1.59 h1:POGL60PumMQHF4EzAHzvkGfDnodQJLHpl65LuiwSO/Y=
github.com/sei-protocol/sei-tendermint v0.1.59/go.mod h1:Olwbjyagrpoxj5DAUhHxMTWDVEfQ3FYdpypaJ3+6Hs8=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
Expand Down

0 comments on commit bbb5a50

Please sign in to comment.