Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bank): send-hooks #14660

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
176 changes: 157 additions & 19 deletions api/cosmos/bank/module/v1/module.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go.work.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ use (
./tools/confix
./x/nft
./x/circuit
)
)
5 changes: 5 additions & 0 deletions proto/cosmos/bank/module/v1/module.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,9 @@ message Module {

// authority defines the custom module authority. If not set, defaults to the governance module.
string authority = 2;

// hooks_order specifies the order of bank hooks and should be a list
// of module names which provide a send hooks instance. If no order is
// provided, then hooks will be applied in alphabetical order of module names.
repeated string send_hooks_order = 3;
}
5 changes: 5 additions & 0 deletions simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,11 @@ func NewSimApp(
BlockedAddresses(),
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)
app.BankKeeper.SetHooks(
Copy link
Member

@julienrbrt julienrbrt Jan 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good wanted to get the teams opinion on the changes first. implementing that now.

Copy link
Member

@julienrbrt julienrbrt Jan 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, this is why I commented:

If this proposal is accepted

Don't do it already, just in case :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lmk when and if the team is looking to move forward with this ser. Have a good weekend sers

banktypes.NewMultiSendHooks(
// register the send hooks here
),
)
app.StakingKeeper = stakingkeeper.NewKeeper(
appCodec, keys[stakingtypes.StoreKey], app.AccountKeeper, app.BankKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)
Expand Down
Loading