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

Support for sending funds to the community pool #5249

Merged
merged 27 commits into from
Dec 10, 2019
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d2569c7
Support for sending funds to the community pool
RiccardoM Oct 25, 2019
6929767
Added the REST and CLI txs
RiccardoM Oct 25, 2019
b6bfcab
Reverted back all the changes and edited the blacklisted address as s…
RiccardoM Oct 28, 2019
f4d74b2
Merge branch 'master' of github.com:cosmos/cosmos-sdk into community-…
RiccardoM Nov 13, 2019
f1da9ff
Improved how allowed receiving accounts are specified inside the app
RiccardoM Nov 13, 2019
8b0870c
Merge branch 'master' into community-pool-funding
RiccardoM Nov 13, 2019
8d54b1e
Merge branch 'master' into community-pool-funding
alexanderbez Nov 29, 2019
8cb3615
Merge remote-tracking branch 'origin/community-pool-funding' into com…
RiccardoM Nov 29, 2019
3ea2eef
Added the changelod entry
RiccardoM Nov 29, 2019
31a38a3
Removed custom msg and handler (leftover from first implementation)
RiccardoM Nov 29, 2019
72d3776
Removed custom msg and handler (leftover from first implementation)
RiccardoM Nov 29, 2019
161e861
Removed bank usage from the dist module
RiccardoM Nov 29, 2019
8a6fcf5
Removed state machine changelog entry
RiccardoM Nov 30, 2019
5e13360
Merge branch 'master' into community-pool-funding
alexanderbez Nov 30, 2019
3b095e3
Merge branch 'master' into community-pool-funding
alexanderbez Dec 2, 2019
f4d8e61
Merge branch 'master' of github.com:cosmos/cosmos-sdk into community-…
RiccardoM Dec 9, 2019
a0217ab
Support for sending funds to the community pool
RiccardoM Oct 25, 2019
1c59821
Added the REST and CLI txs
RiccardoM Oct 25, 2019
6aabb39
Reverted to the usage of a custom message to send funds
RiccardoM Dec 9, 2019
a34b963
Update x/distribution/client/cli/tx.go
RiccardoM Dec 9, 2019
4bdfff9
Update x/distribution/keeper/keeper.go
RiccardoM Dec 9, 2019
3f8ce2c
Update x/distribution/client/cli/tx.go
RiccardoM Dec 9, 2019
ea765d2
Update x/distribution/client/cli/tx.go
RiccardoM Dec 9, 2019
53316f7
Update x/distribution/client/cli/tx.go
RiccardoM Dec 9, 2019
5977e15
Fixed some errors
RiccardoM Dec 10, 2019
95b64f1
Fixed some lint errors
RiccardoM Dec 10, 2019
837b5f3
Merge branch 'master' into community-pool-funding
alexanderbez Dec 10, 2019
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
14 changes: 13 additions & 1 deletion simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func NewSimApp(

// add keepers
app.AccountKeeper = auth.NewAccountKeeper(app.cdc, keys[auth.StoreKey], authSubspace, auth.ProtoBaseAccount)
app.BankKeeper = bank.NewBaseKeeper(app.AccountKeeper, bankSubspace, bank.DefaultCodespace, app.ModuleAccountAddrs())
app.BankKeeper = bank.NewBaseKeeper(app.AccountKeeper, bankSubspace, bank.DefaultCodespace, app.BlacklistedAccAddrs())
app.SupplyKeeper = supply.NewKeeper(app.cdc, keys[supply.StoreKey], app.AccountKeeper, app.BankKeeper, maccPerms)
stakingKeeper := staking.NewKeeper(app.cdc, keys[staking.StoreKey],
app.SupplyKeeper, stakingSubspace, staking.DefaultCodespace)
Expand Down Expand Up @@ -274,6 +274,18 @@ func (app *SimApp) ModuleAccountAddrs() map[string]bool {
return modAccAddrs
}

// BlacklistedAccAddrs returns all the app's module account addresses black listed for receiving tokens.
func (app *SimApp) BlacklistedAccAddrs() map[string]bool {
alexanderbez marked this conversation as resolved.
Show resolved Hide resolved
modAccAddrs := make(map[string]bool)
for acc := range maccPerms {
if acc != distr.ModuleName {
modAccAddrs[supply.NewModuleAddress(acc).String()] = true
}
}

return modAccAddrs
}

// Codec returns simapp's codec
func (app *SimApp) Codec() *codec.Codec {
return app.cdc
Expand Down