Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
liquidfarming
module (#332)
* chore: scaffold liquidfarming module * chore: apply updated spec * feat: adding handlers for both msgs and proposal * feat: adding keeper logics * chore: fix proto numbering and add msg server boilerplate * feat: add keys and proposal handler * feat: add params and genesis * feat: add more getter and setter stores * chore: update store and add cli boilerplate * feat: follow naming convention * chore: apply updated spec and add keeper test suite boilerplate 1. LiquidFarm object doesn't need to be stored 2. Use param change proposal instead of a custom gov proposal 3. Clean up codebase * feat: add winner bid id * feat: update proto files * feat: register liquid farming in app * feat: implement deposit, cancel, and withdraw * feat: add transaction commands * docs: add spec docs * docs: update README.md * chore: fix indentation, add farming keeper, and add helper and short-cut functions for tests * feat: apply updated specs * feat: add liquidfarms and liquidfarm grpc queries * feat: imposing deposit gas fee for deposit request * feat: add logic to impose more gas as there are more number of deposit requests made by a depositor * feat: add AfterAllocateRewardsHook for the farming module * docs: add hooks * feat: apply suggestions from the review * feat: work in progress * feat: update names * feat: apply updated spec * feat: clean up keeper and add missing logics * feat: add AfterStaked hook in the farming module * feat: set hooks in app * chore: add queued farming, update params to meet naming convention, and fixing cancel queued farming logic * test: adding store to cancel queued farming * chore: fix farm and cancel queued farming logic and add test cases * feat: mint LFCoin in hook * chore: add test cases to verify farm, unfarm, cancel * feat: set time nullable false and add create rewards auction function * fix: add unsafe hooks to fix the case * WIP: adding PlaceBid * WIP: apply updated spec * feat: rename some fields and add bid stores * chore: apply updated spec, fix bugs, and add test cases * chore: update deposit to farm and add refund bid test case * WIP: adding after allocate rewards hook * chore: add CreateRewardsAuction, AfterAllocateRewards hook, and remove unnecessary comments * feat: adding gRPC queries * WIP: fixing registerservices and adding test case * feat: terminate rewards auction and create new one, add logic for auto-compounding * chore: organize codes and inline comments * feat: remove end blocker * test: add liquidfarms and liquifarm grpc queries * feat: add refund bid cmd * feat: update grpc queries endpoints * test: add msgs and params test cases * chore: remove selling reserve address in rewards auction, add grpc queries, add grpc test codes * WIP: adding query commands * feat: add query commands * feat: add genesis import and export * chore: add genesis test case, clean up codes * refactor: make error handling consistent, follow naming convention, and clean up codes * feat: adding unfarm and withdraw msg server * feat: remove unused codes * feat: add UnfarmAndWithdraw and remove liquid farm exist validation for unfarm msg service * test: add test case for UnfarmAndWithdraw * chore: fix broken test cases and refactor hook * WIP: fixing bug * feat: update AdvancedEpoch * refactor: add necessary comments * chore: remove LiquidFarmCreationFee and add test cases for types * test: add more tests * fix: remove pointer * fix: typo in query endpoints * fix: rename lfCoin to UnfarmingCoin and add validation check for the liquid coin denom * chore: fix RewardsAuctions query command, apply updated spec to store LiquidFarm object * fix: rename reward-auction to rewards-auction query command * chore: apply updated spec and adding test cases * test: adding test case * chore: add unfarm fee rate param, add more test cases, organize codebase * fix: broken tests * feat: make liquidFarmSet map deterministic * feat: `liquidfarming` module apply changed spec (#345) * feat: remove AfterStaked hook in the farming module * chore: remove QueuedFarming and its related codebase, remove CanceldQueuedFarming tx * chore: update unfarm msg server, add compounding rewards, update calculate functions * feat: use MulTruncate for conservative approach * test: add more test cases to increase coverage * fix: resolve golang-lint ci * test: add boilerplate for integration cli tests * test: add unfarm partial test case * chore: fix delete bid location and add unfarm complex test case * feat: use panic in RemoveLiquidFarm instead of returning error * feat: remove DelayedFarmGasFee * feat: add edge test case * feat: add stakedCoins zero validation before unstake * feat: organize events * docs: add drafts of specs for liquidfarming module (#343) * add docs * docs: draft specs for liquidfarming module * docs: update specs * docs: update specs * docs: update specs * docs: update spec * docs: update spec * docs: update docs * docs: update cli/api docs * docs: updates * docs: update API/CLI * docs: updated docs for deactivation of liquidFarms * Revert "docs: updated docs for deactivation of liquidFarms" This reverts commit 2a0545d. * Revert "Revert "docs: updated docs for deactivation of liquidFarms"" This reverts commit 07a063d. * docs: update liquidfarming spec * docs: update spec docs * docs: updates * docs: update spec/api/cli * review: applying almost all suggestions * review: refund previous bid if exists in PlaceBid * review: apply the rest suggestions * chore: rename minimum to min for convention and fix broken test cases * test: add tx query integration tests * fix: fix daed links in spec docs * fix: move denom verification to message level * fix: add bidding coin denom verification and winning bid verification must be checked first * test: add integration tests * docs: update cli docs * test: add boilerplate for simulation tests * feat: rename UnfarmFeeRate to FeeRate and move it inside LiquidFarm * feat: add deduct fees logic * feat: add mint/burn rate queries * fix: fix genesis validation test * test: add tests for mint/burn rates grpc queries * fix: fix simulation params * test: add param test for simulation * chore: add liquidfarming in labeler workflow and remove mistakenly added struct * feat: remove hooks in farming and liquidfarming modules as they are not needed anymore * feat: change names from Farm and Unfarm to LiquidFarm and LiquidUnfarm * feat: switch farming module to farm module and update with new functions * feat: add auction period hours * feat: updating RewardsAuction creation * feat: complete BeginBlocker logics * feat: add NewLiquidUnfarmAndWithdrawCmd CLI command * feat: rename BurningCoin to UnfarmingCoin * test: add more test cases for types * feat: add TODO comments and use Rewards * test: fixing test case * fix: SetRewardsAuctionEndTime * test: updating test cases * test: resolve TODO comments * test: update more test cases * test: update all keeper and type test cases for the farm module * fix: fix broken test cases due to relying on the farming module * test: add missing param in simulation test * test: update simulation tests and fix golangci-lint issues * fix: fix params test * chore: update api and cli docs * docs: updating spec docs with the latest version * test: update test cases * chore: update comments, clean up, update docs * feat: remove typo * feat: apply suggestions from the review * chore: fix broken integration test and add test cases * fix: fix error messages * revert: revert incorrectly fixed error message * docs: update spec docs * feat: resolve TODO comments * fix: add includeWinningBid when refunding all bids to fix an edge case * fix: simulation halted due to position * feat: add auction id as param for PlaceBid and RefundBid, add WinningAmount in RewardsAuction * fix: test cases by applying the previous commit * docs: update spec docs * docs: update CHANGELOG.md * env: add farm and liquidfarming modules in c-sync labeler.yml Co-authored-by: Jeongho Yeo <[email protected]>
- Loading branch information