Skip to content

Commit

Permalink
feat: add foundation treasury feature to x/foundation (#518)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
0Tech authored May 13, 2022
1 parent 19355d6 commit 93ba6b0
Show file tree
Hide file tree
Showing 106 changed files with 45,263 additions and 19,069 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Features
* (x/wasm) [\#470](https://github.com/line/lbm-sdk/pull/470) remove contract activation control by actor
* (x/wasm) [\#513](https://github.com/line/lbm-sdk/pull/513) fix message representation for signing
* (x/foundation) [\#518](https://github.com/line/lbm-sdk/pull/518) add foundation treasury feature to x/foundation

### Improvements

Expand Down
2 changes: 1 addition & 1 deletion baseapp/block_gas_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func TestBaseApp_BlockGas(t *testing.T) {
txBuilder.SetFeeAmount(feeAmount)
txBuilder.SetGasLimit(txtypes.MaxGasWanted) // tx validation checks that gasLimit can't be bigger than this

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

Expand Down
9 changes: 7 additions & 2 deletions client/docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,15 @@
"url": "./tmp-swagger-gen/lbm/wasm/v1/query.swagger.json"
},
{
"url": "./tmp-swagger-gen/lbm/consortium/v1/query.swagger.json",
"url": "./tmp-swagger-gen/lbm/foundation/v1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "ConsortiumParams"
"Params": "FoundationParams",
"Proposal": "FoundationProposal",
"Proposals": "FoundationProposals",
"Vote": "FoundationVote",
"Votes": "FoundationVotes",
"TallyResult": "FoundationTallyResult"
}
}
},
Expand Down
9 changes: 5 additions & 4 deletions client/docs/statik/statik.go

Large diffs are not rendered by default.

Loading

0 comments on commit 93ba6b0

Please sign in to comment.