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

Refactor/pool total #442

Merged
merged 10 commits into from
Dec 18, 2024
Merged

Refactor/pool total #442

merged 10 commits into from
Dec 18, 2024

Conversation

onlyhyde
Copy link
Member

@onlyhyde onlyhyde commented Dec 16, 2024

  • refactoring pool's mint function

screenshot

스크린샷 2024-12-17 오후 3 20 49

@onlyhyde onlyhyde marked this pull request as draft December 16, 2024 14:24
@onlyhyde onlyhyde self-assigned this Dec 16, 2024
@onlyhyde onlyhyde added refactoring pool Pool contract related tasks labels Dec 16, 2024
@onlyhyde onlyhyde force-pushed the refactor/pool-total branch from 29efa92 to f12d970 Compare December 17, 2024 10:05
@onlyhyde onlyhyde marked this pull request as ready for review December 18, 2024 04:23
pool/pool_manager.gno Outdated Show resolved Hide resolved
pool/pool_manager.gno Outdated Show resolved Hide resolved
pool/pool_manager.gno Outdated Show resolved Hide resolved
pool/position_test.gno Outdated Show resolved Hide resolved
Copy link
Member

@r3v4s r3v4s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done, very few changes needed.

Copy link
Member

@r3v4s r3v4s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@onlyhyde onlyhyde merged commit c2a133b into main Dec 18, 2024
1 of 2 checks passed
@onlyhyde onlyhyde deleted the refactor/pool-total branch December 18, 2024 06:47
onlyhyde added a commit that referenced this pull request Dec 18, 2024
* refactor: pool mint
* refactor: name change transferFromAndVerify to safeTransferFrom
* refactor: support checkTick when position modify
* refactor: tick and position update
* refactor: pool mint
* refactor: collect and burn
* refactor: collectProtocol
* refactor: setFeeProtocol
* refactor: createPool
* refactor: Modify code based on code review comments
onlyhyde added a commit that referenced this pull request Jan 15, 2025
* refactor, test: calculateCollectReward
* helper test
* change getTokenPairBalanceFromPosition params
* update doc
* change emit param name
* remove function prefix from panic
* pool tier reward cache, pool reward cache, halving, warmup
* chore: remove `Pool` prefix from pool's receiver getter (#423)
* GSW-1838 test: swap_math unitest
* test: define test helper function
* test: remove unnecessary initialization
* refactor: Use Clone data in function calls to protect original data
* GSW-1838 test: sqrt_price_math unitest (#425)
* refactor: sqrt_price_math
- added testcase
* refactor: add test code and comments
* refactor: Overflow check for type conversion to int256 in delta amount calculation
* refactor: dry swap (#421)
* remove duplicate functions
* GSW-1838 refactor: Using the new constructor to protect raw data in sqrtRatio calculations
* GSW-1838 refactor: need to lock pool.slot0 to prevent re-entry
* refactor: Using clone data to protect original data
* refactor: remove unused import
* fix: sqrtRatio calculation default value issue
* refactor: swap and swap math
* refactor: computeSwapStep
- edge case test (amount : zero and over liquidity)
- EXACT IN / EXACT OUT Case
* refactor: Separate pool transfer-related test code
* refactor: Rename a receiver function param and liquidity math bug fix
- Fix absolute value before checking if delta value is negative to fix handling error issue if negative.
- Rename the param in the receiver function from pool to p.
* refactor: Changed large numbers to const for readability & removed some comments
* refactor: Remove unnecessary function usage
* refactor: Fix error messages to make their meaning clear
* GSW-1839 refactor: integrated helper and test code (#432)
* GSW-1839 Refactor/position contract utils (#433)
* GSW-1839 refactor: integrated helper and test code
- integrated helper with nft helper
- add test helper code
- add test code for helper
- change file filename
* GSW-1839 refactor: utils
- add assert functions
- refactor original util functions
* Update position/utils_test.gno
* test: Update to use the correct test values
* GSW-1968 feat: check emission is caller or not (#435)
* feat: add check logic for caller is emission or not
* fix: remove deprecated require from gno.mod
* Refactor/pool total (#442)
* refactor: pool mint
* refactor: name change transferFromAndVerify to safeTransferFrom
* refactor: support checkTick when position modify
* refactor: tick and position update
* refactor: pool mint
* refactor: collect and burn
* refactor: collectProtocol
* refactor: setFeeProtocol
* refactor: createPool
* refactor: Modify code based on code review comments
* fix u256 error
* rm: reward_internal_emission, reward_manager
* rm: staker_type
* rm: unnecessary test (staker_test)
* rm: reward_recipient_store
* rm: function prefix from panic messages
* rm: tier_ratio, warm_up
* rm: external_incentive_calculator
* chore: change file name _GET_no_receiver -> getter
* test: GetPoolStakedLiquidityUpdates
* test, fix: api_calculation
* modify external reward to be indexed by incentive id
* test: more helpers
* chore: exclude unittests
* add per warmup retrieval
* add warmup test
* feat: getPrintInfo()
* fix: gnoVM panics
* fix: internal 01 test
* fix: divide by zero
* refactor: use grc20reg

---------

Co-authored-by: Lee ByeongJun <[email protected]>
Co-authored-by: Blake <[email protected]>
Co-authored-by: n3wbie <[email protected]>
Co-authored-by: 0xTopaz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pool Pool contract related tasks refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants