Skip to content

Commit

Permalink
refactor: governance (#448)
Browse files Browse the repository at this point in the history
* fix: xgns

* refactor: execute-related functions

* test: parameter registry

* chore: remove function prefix from error messages

* test: executeParameterChange2, validateProposalState, checkProposalValidation

* move some util functions

* save

* feat: ProposalType

* refactor: Vote

* test: Vote

* refactor, test: `updateProposalsState`

* doc: proposal

* test: config

* test: proposal

* chore: remove unused functions

* test: execute

* change function name

* chore: create `fn_registry` file

* fix type except config

* change vote type

* update proposal test

* feat: change json

* change file name

* change file name

* fix: json

* add assert functions

* feat: use avl for history-related types

* fix: change type for rewards

* fix: addrLockedGns

* chore: format funcs

* decode

* refactor: gov

- known issue : we should update TODOs

* refactor: add xgns unit test code

* refactor: error message

* refactor: comments and unused code clean

* test: delefate_undelegate

* refactor: util test code for gov staker

* test: clean_delegation_stat_history

* fix: delegate_undelegate test

* test: staker test

* test: staker test code

* gov staker reward calculation optimization

* test: function register

* update execute

* fix: __TEST_governance_proposal_community_pool_spend_test

* update func registry test

* fix

* update test: status update

* remove duplicated test

* fix: __TEST_governance_vote_gov_delegated_test

* fix: rest tests

* update api test

* fmt

* apply json naming convention

* remove unnecessary functions

* remove unnecessary funcs 2

* update test: execute, registry

* Revert "remove unnecessary functions"

This reverts commit ba155f5.

* fix

* boundary value check tests for `gov/staker`

* remove `internal_` prefix from staker events

* add reward calculation to launchpad

* fix: param check

* fix: test case modified and bug fix

- bug:
When receiving a reward, check if the amount of GNS held by the GOV STAKER is more than the amount of reward that should be paid.

* fix: delegate amount boundary test

* fix: unit test code for gov staker

* fix wired bug

* apply comments

---------

Co-authored-by: 0xTopaz <[email protected]>
Co-authored-by: mconcat <[email protected]>
  • Loading branch information
3 people authored Jan 8, 2025
1 parent 2aff909 commit d973fab
Show file tree
Hide file tree
Showing 72 changed files with 6,096 additions and 2,481 deletions.
1 change: 1 addition & 0 deletions emission/emission.gno
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"gno.land/p/demo/ufmt"

"gno.land/r/gnoswap/v1/common"
"gno.land/r/gnoswap/v1/consts"
"gno.land/r/gnoswap/v1/gns"
)
Expand Down
113 changes: 0 additions & 113 deletions gov/governance/_GET_proposal.gno

This file was deleted.

130 changes: 0 additions & 130 deletions gov/governance/_GET_vote.gno

This file was deleted.

Loading

0 comments on commit d973fab

Please sign in to comment.