Skip to content

Commit 93ba6b0

Browse files
authored
feat: add foundation treasury feature to x/foundation (#518)
* refactor: update protos * refactor: move expected_keepers.go * refactor: move keys.go * refactor: move module.go * refactor: move genesis.go * refactor: move codec.go * refactor: move proposal.go * refactor: remove folder `types` * refactor: move proposal.go * refactor: update grpc_query.go * refactor: remove legacy querier.go * refactor: apply package rename on x/consortium * refactor: apply package rename on x/stakingplus * refactor: apply package rename on app * docs: update CHANGELOG.md * fix: remove unused function * refactor: refactor handler * refactor: remove unused function * fix: change module name from consortium to foundation * feat: add treasury to x/foundation * feat: add query and msg servers for treasury * feat: implement proposal * feat: register msgs * feat: add cli cmd * feat: add beginblock to module * feat: set default foundation tax to 0.2 * fix: use decision policy interface * feat: add pruning active proposals * feat: add tx cmds for the tresury * feat: add group related tx cli * fix: do not copy address from `from` * fix: fix the number of args * fix: use non-nullables in genesis * feat: add proposal related data to the genesis * feat: add queries to proto * feat: add queries to grpc * feat: add query clis * feat: register ThresoldDecisionPolicy * fix: rename queries * docs: update cli helps * feat: add decision policy parser * feat: support PercentageDecisionPolicy * fix: fix signers * fix: fix interfaces * fix: make proposal id start from 1 * fix: set default min execution period to zero * fix: do not use file for the input * feat: add pruning logic * docs: update the examples of tx cli * fix: let a member execute a proposal * fix: add auth check into msg server * refactor: call getmember once in updatemembers * fix: add proposal to the queue on genesis init * fix: use non nullable on validatorauth * fix: make policy validate to use config only * fix: set validators as foundation members if genesis is empty * fix: set the number of validator to 2 on the test * fix: set default tax to zero and add validation * test: add keeper tests * test: add msg validations * test: add msg server tests * feat: add events * fix: fix bugs * fix: update error message * test: add integration tests * fix: add more information into EventVote * fix: update the account number in the tests * style: lint * style: lint * test: fix test of proposal * docs: update CHANGELOG.md * feat: validate metadata * refactor: expose keeper functions * test: add tests on member.go * test: add tests on proposal.go * test: add tests on treasury.go * test: reduce actors on member_test.go * test: reduce actors on tests * test: add tests on exec.go * test: add tests on vote.go * test: use default config in the policy test cases * test: add tests on genesis * docs: update CHANGELOG.md * docs: apply renames in the docs * style: proto lint * fix: move events * fix: remove deprecated SetBalance * docs: fix typo * fix: replace weight of Member into a boolean flag * style: lint * docs: update weight related statements * fix: remove weight related logics * chore: comment out the migration handler registration for now
1 parent 19355d6 commit 93ba6b0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+45263
-19069
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
4040
### Features
4141
* (x/wasm) [\#470](https://github.com/line/lbm-sdk/pull/470) remove contract activation control by actor
4242
* (x/wasm) [\#513](https://github.com/line/lbm-sdk/pull/513) fix message representation for signing
43+
* (x/foundation) [\#518](https://github.com/line/lbm-sdk/pull/518) add foundation treasury feature to x/foundation
4344

4445
### Improvements
4546

baseapp/block_gas_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func TestBaseApp_BlockGas(t *testing.T) {
101101
txBuilder.SetFeeAmount(feeAmount)
102102
txBuilder.SetGasLimit(txtypes.MaxGasWanted) // tx validation checks that gasLimit can't be bigger than this
103103

104-
privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{7}, []uint64{0}
104+
privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{8}, []uint64{0}
105105
_, txBytes, err := createTestTx(encCfg.TxConfig, txBuilder, privs, accNums, accSeqs, ctx.ChainID())
106106
require.NoError(t, err)
107107

client/docs/config.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,15 @@
151151
"url": "./tmp-swagger-gen/lbm/wasm/v1/query.swagger.json"
152152
},
153153
{
154-
"url": "./tmp-swagger-gen/lbm/consortium/v1/query.swagger.json",
154+
"url": "./tmp-swagger-gen/lbm/foundation/v1/query.swagger.json",
155155
"operationIds": {
156156
"rename": {
157-
"Params": "ConsortiumParams"
157+
"Params": "FoundationParams",
158+
"Proposal": "FoundationProposal",
159+
"Proposals": "FoundationProposals",
160+
"Vote": "FoundationVote",
161+
"Votes": "FoundationVotes",
162+
"TallyResult": "FoundationTallyResult"
158163
}
159164
}
160165
},

client/docs/statik/statik.go

+5-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)