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(staker): add in-range staked liquidity tracker #438

Draft
wants to merge 154 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
f4e0254
fix: nipticks
notJoon Dec 12, 2024
59d1907
split staker file
notJoon Dec 13, 2024
2c32770
poolTiers
notJoon Dec 13, 2024
25c9777
poolIncentives
notJoon Dec 13, 2024
c35ecc6
incentives
notJoon Dec 13, 2024
16c1305
deposits
notJoon Dec 13, 2024
8254469
add tick cross hook, add staker side tracking
mconcat Dec 13, 2024
cdf960a
add more iter
notJoon Dec 13, 2024
16b2e63
save
notJoon Dec 13, 2024
78cd7b0
add tests
notJoon Dec 15, 2024
c37e0c4
add test for important functions
notJoon Dec 15, 2024
78ea459
refactor, test: calculateCollectReward
notJoon Dec 16, 2024
395492a
helper test
notJoon Dec 16, 2024
0edc86e
change getTokenPairBalanceFromPosition params
notJoon Dec 16, 2024
40fb74f
update doc
notJoon Dec 16, 2024
bad0c91
change emit param name
notJoon Dec 16, 2024
83da700
remove function prefix from panic
notJoon Dec 16, 2024
b10dfb7
fix
notJoon Dec 16, 2024
e645cda
fix
notJoon Dec 16, 2024
41804a6
Merge branch 'main' into refact-staker
notJoon Dec 16, 2024
e27eae4
fix
notJoon Dec 17, 2024
5b2c553
update test helper
notJoon Dec 17, 2024
96df3ab
pool tier reward cache, pool reward cache, halving, warmup
mconcat Dec 17, 2024
8b7b1dd
Merge branch 'main' into refact-staker
notJoon Dec 18, 2024
bb93d4c
Merge remote-tracking branch 'origin/main' into mconcat/refactor-emis…
mconcat Dec 18, 2024
adc3ce1
update for gnopls
mconcat Dec 18, 2024
8c917ff
chore: remove `Pool` prefix from pool's receiver getter (#423)
r3v4s Dec 15, 2024
ec2ac96
GSW-1838 test: swap_math unitest
r3v4s Dec 10, 2024
e048e5b
test: define test helper function
r3v4s Dec 10, 2024
0961749
test: remove unnecessary initialization
r3v4s Dec 10, 2024
430797e
refactor: Use Clone data in function calls to protect original data
onlyhyde Dec 15, 2024
b31b81e
GSW-1838 test: sqrt_price_math unitest (#425)
r3v4s Dec 16, 2024
168c7df
refactor: dry swap (#421)
notJoon Dec 16, 2024
7b62f12
GSW-1839 refactor: integrated helper and test code (#432)
onlyhyde Dec 16, 2024
6735233
GSW-1839 Refactor/position contract utils (#433)
onlyhyde Dec 16, 2024
96538fc
fix: run test code error (#441)
onlyhyde Dec 17, 2024
026d4cc
GSW-1968 feat: check emission is caller or not (#435)
r3v4s Dec 18, 2024
075aae0
Refactor/pool total (#442)
onlyhyde Dec 18, 2024
30610ae
update for gnopls
mconcat Dec 18, 2024
9dfd9b6
Merge remote-tracking branch 'origin/mconcat/refactor-emission-part-1…
mconcat Dec 18, 2024
f95d7d0
fix compile errors
mconcat Dec 18, 2024
877dc70
compile error fix WIP
mconcat Dec 19, 2024
4eb138e
fix errors
mconcat Dec 19, 2024
d135c73
add external incentive
mconcat Dec 19, 2024
ba7d799
Merge branch 'main' into refact-staker
notJoon Dec 20, 2024
982a34d
remove function name prefix from panic message
notJoon Dec 22, 2024
c753200
fix: no receiver getters
notJoon Dec 22, 2024
3151cec
fix some getter
notJoon Dec 22, 2024
46b409b
add testing
mconcat Dec 23, 2024
02a3e43
remove files
mconcat Dec 23, 2024
db35fbb
Merge branch 'mconcat/refactor-emission-part-1' of github.com:gnoswap…
mconcat Dec 23, 2024
0529cc8
add testing suite
mconcat Dec 24, 2024
fa33c96
testing works
mconcat Dec 26, 2024
9a1d977
overflow
notJoon Dec 26, 2024
a77e810
add tests
mconcat Dec 26, 2024
7b3e789
Merge branch 'refact-staker' into feature/staker
notJoon Dec 27, 2024
0753ab5
test: file tests to test scenarios
r3v4s Dec 28, 2024
a5dfa40
add tests
mconcat Dec 29, 2024
9ea3305
Merge branch 'feature/staker' of github.com:gnoswap-labs/gnoswap into…
mconcat Dec 29, 2024
c27a074
fix syntax errors
mconcat Dec 29, 2024
5d79f60
compiles
mconcat Dec 29, 2024
24c5cd1
compiles
mconcat Dec 30, 2024
5732cbd
fix nil reference issue
mconcat Dec 30, 2024
270cd7c
remove duplicate file
mconcat Dec 30, 2024
f5d97c0
fix u256 error
mconcat Dec 30, 2024
12b8045
fix
mconcat Dec 30, 2024
e826332
fix
mconcat Dec 30, 2024
cc0b767
fix
mconcat Dec 30, 2024
d28ef7b
rm: reward_internal_emission, reward_manager
notJoon Dec 30, 2024
fd13bc2
rm: staker_type
notJoon Dec 30, 2024
2e5f4dd
rm: unnecessary test (staker_test)
notJoon Dec 30, 2024
f0bc238
rm: reward_recipient_store
notJoon Dec 30, 2024
4355d63
rm: function prefix from panic messages
notJoon Dec 30, 2024
06aac8b
rm: tier_ratio, warm_up
notJoon Dec 30, 2024
2fa8ed3
remove: min, max function
notJoon Dec 30, 2024
4849bff
rm: external_incentive_calculator
notJoon Dec 30, 2024
0d4e5bc
chore: change file name _GET_no_receiver -> getter
notJoon Dec 30, 2024
be45723
fix: getter error
onlyhyde Dec 30, 2024
475911e
add external
mconcat Dec 30, 2024
fd7d9dd
Merge branch 'mconcat/refactor-emission-part-1' of github.com:gnoswap…
mconcat Dec 30, 2024
86f8831
fix multiple pools
mconcat Dec 30, 2024
f6f1c39
remove unused file
mconcat Dec 30, 2024
09aabee
remove more
mconcat Dec 30, 2024
13bfd75
test: GetPoolStakedLiquidityUpdates
notJoon Dec 30, 2024
a8371d1
fix
mconcat Dec 30, 2024
baa53f2
Merge branch 'mconcat/refactor-emission-part-1' of github.com:gnoswap…
mconcat Dec 30, 2024
a57e240
test, fix: api_calculation
notJoon Dec 30, 2024
e8da8bd
modify external reward to be indexed by incentive id
mconcat Dec 30, 2024
659fb7f
test: more helpers
r3v4s Dec 30, 2024
15faa92
fix type
r3v4s Dec 30, 2024
bc7046c
fix (maybe): GetPrintInfo
notJoon Dec 30, 2024
cf77377
Merge branch 'mconcat/refactor-emission-part-1' of https://github.com…
notJoon Dec 30, 2024
a50ce35
fix ratio 0
mconcat Dec 30, 2024
08c4de1
Merge branch 'mconcat/refactor-emission-part-1' of github.com:gnoswap…
mconcat Dec 30, 2024
fc5d629
make reward struct
mconcat Dec 30, 2024
fc9cecb
fix: 01.gnoA
r3v4s Dec 30, 2024
30e4225
fix penalty
mconcat Dec 30, 2024
f2691d0
Merge branch 'mconcat/refactor-emission-part-1' of github.com:gnoswap…
mconcat Dec 30, 2024
aef34d9
fix
r3v4s Dec 30, 2024
7c7fe45
chore: exclude unittests
r3v4s Dec 30, 2024
a83aae1
add per warmup retrieval
mconcat Dec 30, 2024
ddbcb73
Merge branch 'mconcat/refactor-emission-part-1' of github.com:gnoswap…
mconcat Dec 30, 2024
d70eaf2
fix: make 01 runnable
r3v4s Dec 30, 2024
573346c
add warmup test
mconcat Dec 30, 2024
34d956d
remove gnoa
mconcat Dec 30, 2024
937005f
Merge remote-tracking branch 'refs/remotes/origin/mconcat/refactor-em…
r3v4s Dec 30, 2024
7c4919d
fix warmup
mconcat Dec 30, 2024
60fdddc
fix: nft transfer gnoa
onlyhyde Dec 30, 2024
f972e15
feat: getPrintInfo()
r3v4s Dec 30, 2024
16a61fe
fix: gnoVM panics
r3v4s Dec 30, 2024
8809793
fix: internal 01 test
r3v4s Dec 30, 2024
94a34f3
fix: divide by zero
r3v4s Dec 30, 2024
3bac6b1
Merge remote-tracking branch 'refs/remotes/origin/mconcat/refactor-em…
r3v4s Dec 30, 2024
e41e0b0
refactor: use grc20reg
r3v4s Dec 31, 2024
d8eae02
fix: WIP (intertnal_01 + external_10)
r3v4s Dec 31, 2024
3845a89
fix: parameter ordering
r3v4s Dec 31, 2024
43f660d
fix: update deposit's lastCollectHeight when reward collected
r3v4s Dec 31, 2024
ae9b9dd
fix: IsExternallyIncentivizedPool
r3v4s Dec 31, 2024
51c1813
test(feat): mint and distribute gns
r3v4s Dec 31, 2024
0402512
fixme: new emission pool reward being 0
r3v4s Dec 31, 2024
8b40272
feat: gnft.MustOwnerOf
r3v4s Dec 31, 2024
85ef73b
fix: qa getter and warmup external 10 test
onlyhyde Dec 31, 2024
3f3895f
feat: UnitTree, RewardCacheTree Size Support
onlyhyde Dec 31, 2024
d69a0ce
fix: duplicated test code
onlyhyde Dec 31, 2024
d98779f
fix: nil pointer uint256
r3v4s Dec 31, 2024
de425c3
chore: gofmt
r3v4s Dec 31, 2024
ede2db1
fix:
r3v4s Dec 31, 2024
f269b3d
reimplement pooltier
mconcat Dec 31, 2024
b391b76
remove unused files
mconcat Dec 31, 2024
c99e7de
Merge branch 'mconcat/refactor-emission-part-1' of github.com:gnoswap…
mconcat Dec 31, 2024
83654e0
fix: panic with actual error to bypass VM panic
r3v4s Dec 31, 2024
74b9b83
chore: remove print
r3v4s Dec 31, 2024
ce21c50
(fixme) test: pool with no staked position should send reward to comm…
r3v4s Dec 31, 2024
4be2b37
chore: remove duplicated tests
r3v4s Dec 31, 2024
37f5f0b
chore: remove fixed
r3v4s Dec 31, 2024
b682b59
fix: small liq // internal
r3v4s Dec 31, 2024
951587e
save: __TEST_staker_short_wramup_period_staker_external_test
notJoon Dec 31, 2024
f58e271
Merge branch 'mconcat/refactor-emission-part-1' of https://github.com…
notJoon Dec 31, 2024
84379fc
fix: change pool tier // internal
r3v4s Dec 31, 2024
39e5269
Merge remote-tracking branch 'refs/remotes/origin/mconcat/refactor-em…
r3v4s Dec 31, 2024
0953c97
pool tier refactor
mconcat Dec 31, 2024
155c50a
fix: u256 nil
r3v4s Dec 31, 2024
6d67bc5
fix: type error for __TEST_staker_short_wramup_period_staker_external…
notJoon Dec 31, 2024
2d24f08
Merge branch 'mconcat/refactor-emission-part-1' of https://github.com…
notJoon Dec 31, 2024
b117097
fix: remove pool tier
r3v4s Dec 31, 2024
cae79db
test: changePoolTier helper
r3v4s Dec 31, 2024
fc4d377
Merge remote-tracking branch 'refs/remotes/origin/mconcat/refactor-em…
r3v4s Dec 31, 2024
200d8d1
add unclaimed
mconcat Dec 31, 2024
e830de0
Merge branch 'mconcat/refactor-emission-part-1' of github.com:gnoswap…
mconcat Dec 31, 2024
93564b2
add unclaimable refund
mconcat Dec 31, 2024
5610b7e
fix: type error for __TEST_staker_short_warmup_period_internal_08_pos…
notJoon Dec 31, 2024
11dd6d2
Merge branch 'mconcat/refactor-emission-part-1' of https://github.com…
notJoon Dec 31, 2024
5c66a51
!fixme: processing unclaimable reward in same height
r3v4s Jan 2, 2025
015c405
chore: move internal gnoA tests
r3v4s Jan 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,21 +1 @@
module gno.land/r/g1er355fkjksqpdtwmhf5penwa82p0rhqxkkyhk5/v2/register_gnodev

require (
gno.land/p/demo/users v0.0.0-latest
gno.land/r/demo/foo20 v0.0.0-latest
gno.land/r/demo/wugnot v0.0.0-latest
gno.land/r/gnoswap/v1/community_pool v0.0.0-latest
gno.land/r/gnoswap/v1/gns v0.0.0-latest
gno.land/r/gnoswap/v1/gov/staker v0.0.0-latest
gno.land/r/gnoswap/v1/launchpad v0.0.0-latest
gno.land/r/gnoswap/v1/pool v0.0.0-latest
gno.land/r/gnoswap/v1/protocol_fee v0.0.0-latest
gno.land/r/gnoswap/v1/router v0.0.0-latest
gno.land/r/gnoswap/v1/staker v0.0.0-latest
gno.land/r/onbloc/bar v0.0.0-latest
gno.land/r/onbloc/baz v0.0.0-latest
gno.land/r/onbloc/foo v0.0.0-latest
gno.land/r/onbloc/obl v0.0.0-latest
gno.land/r/onbloc/qux v0.0.0-latest
gno.land/r/onbloc/usdc v0.0.0-latest
)
module gno.land/r/g1er355fkjksqpdtwmhf5penwa82p0rhqxkkyhk5/v2/register_gnodev
11 changes: 1 addition & 10 deletions __local/grc20_tokens/onbloc/bar/gno.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
module gno.land/r/onbloc/bar

require (
gno.land/p/demo/grc/grc20 v0.0.0-latest
gno.land/p/demo/ownable v0.0.0-latest
gno.land/p/demo/ufmt v0.0.0-latest
gno.land/p/demo/users v0.0.0-latest
gno.land/r/demo/users v0.0.0-latest
gno.land/r/demo/grc20reg v0.0.0-latest
)
module gno.land/r/onbloc/bar
11 changes: 1 addition & 10 deletions __local/grc20_tokens/onbloc/baz/gno.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
module gno.land/r/onbloc/baz

require (
gno.land/p/demo/grc/grc20 v0.0.0-latest
gno.land/p/demo/ownable v0.0.0-latest
gno.land/p/demo/ufmt v0.0.0-latest
gno.land/p/demo/users v0.0.0-latest
gno.land/r/demo/users v0.0.0-latest
gno.land/r/demo/grc20reg v0.0.0-latest
)
module gno.land/r/onbloc/baz
11 changes: 1 addition & 10 deletions __local/grc20_tokens/onbloc/foo/gno.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
module gno.land/r/onbloc/foo

require (
gno.land/p/demo/grc/grc20 v0.0.0-latest
gno.land/p/demo/ownable v0.0.0-latest
gno.land/p/demo/ufmt v0.0.0-latest
gno.land/p/demo/users v0.0.0-latest
gno.land/r/demo/users v0.0.0-latest
gno.land/r/demo/grc20reg v0.0.0-latest
)
module gno.land/r/onbloc/foo
11 changes: 1 addition & 10 deletions __local/grc20_tokens/onbloc/obl/gno.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
module gno.land/r/onbloc/obl

require (
gno.land/p/demo/grc/grc20 v0.0.0-latest
gno.land/p/demo/ownable v0.0.0-latest
gno.land/p/demo/ufmt v0.0.0-latest
gno.land/p/demo/users v0.0.0-latest
gno.land/r/demo/users v0.0.0-latest
gno.land/r/demo/grc20reg v0.0.0-latest
)
module gno.land/r/onbloc/obl
11 changes: 1 addition & 10 deletions __local/grc20_tokens/onbloc/qux/gno.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
module gno.land/r/onbloc/qux

require (
gno.land/p/demo/grc/grc20 v0.0.0-latest
gno.land/p/demo/ownable v0.0.0-latest
gno.land/p/demo/ufmt v0.0.0-latest
gno.land/p/demo/users v0.0.0-latest
gno.land/r/demo/users v0.0.0-latest
gno.land/r/demo/grc20reg v0.0.0-latest
)
module gno.land/r/onbloc/qux
11 changes: 1 addition & 10 deletions __local/grc20_tokens/onbloc/usdc/gno.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
module gno.land/r/onbloc/usdc

require (
gno.land/p/demo/grc/grc20 v0.0.0-latest
gno.land/p/demo/ownable v0.0.0-latest
gno.land/p/demo/ufmt v0.0.0-latest
gno.land/p/demo/users v0.0.0-latest
gno.land/r/demo/users v0.0.0-latest
gno.land/r/demo/grc20reg v0.0.0-latest
)
module gno.land/r/onbloc/usdc
10 changes: 1 addition & 9 deletions _deploy/r/gnoswap/gnft/gno.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
module gno.land/r/gnoswap/v1/gnft

require (
gno.land/p/demo/grc/grc721 v0.0.0-latest
gno.land/p/demo/ufmt v0.0.0-latest
gno.land/p/demo/users v0.0.0-latest
gno.land/r/demo/users v0.0.0-latest
gno.land/r/gnoswap/v1/common v0.0.0-latest
)
module gno.land/r/gnoswap/v1/gnft
14 changes: 1 addition & 13 deletions _deploy/r/gnoswap/gns/gno.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1 @@
module gno.land/r/gnoswap/v1/gns

require (
gno.land/p/demo/grc/grc20 v0.0.0-latest
gno.land/p/demo/json v0.0.0-latest
gno.land/p/demo/ownable v0.0.0-latest
gno.land/p/demo/ufmt v0.0.0-latest
gno.land/p/demo/users v0.0.0-latest
gno.land/r/demo/users v0.0.0-latest
gno.land/r/demo/grc20reg v0.0.0-latest
gno.land/r/gnoswap/v1/common v0.0.0-latest
gno.land/r/gnoswap/v1/consts v0.0.0-latest
)
module gno.land/r/gnoswap/v1/gns
7 changes: 7 additions & 0 deletions _deploy/r/gnoswap/gns/gns.gno
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ func Mint(address pusers.AddressOrName) uint64 {
halvingYearMintAmount[year] += amount
amountToMint += amount
}
for i := fromYear; i < toYear; i++ {
amount := GetAmountByYear(i+1)
halvingHeight := halvingYearBlock[i]
addPerBlockMintUpdate(uint64(halvingHeight), amount)
}
}

err := privateLedger.Mint(users.Resolve(address), amountToMint)
Expand All @@ -165,6 +170,8 @@ func checkAndHandleIfLastBlockOfHalvingYear(height int64, amount uint64) uint64
if height == lastBlock {
leftForThisYear := halvingYearAmount[year] - halvingYearMintAmount[year]
amount = leftForThisYear
addPerBlockMintUpdate(uint64(height), amount)
addPerBlockMintUpdate(uint64(height+1), amountPerBlockPerHalvingYear[year+1])
return amount
}

Expand Down
37 changes: 37 additions & 0 deletions _deploy/r/gnoswap/gns/halving.gno
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import (
"std"
"time"

"gno.land/p/demo/avl"

"gno.land/p/demo/ufmt"

"gno.land/r/gnoswap/v1/common"
Expand Down Expand Up @@ -35,6 +37,38 @@ var (
startTimestamp int64
)

var perBlockMint *avl.Tree // height => uint64

// endHeight MUST be equal or before the current height(must not be future)
// setAvgBlockTimeInMsByAdmin does not change past emissions, safe
func LastPerBlockMintUpdate(endHeight uint64) (uint64, uint64) {
height := uint64(0)
amount := uint64(0)
perBlockMint.ReverseIterate("", EncodeUint(endHeight), func(key string, value interface{}) bool {
height = DecodeUint(key)
amount = value.(uint64)
return false
})

return height, amount
}

func PerBlockMintUpdates(startHeight, endHeight uint64) ([]uint64, []uint64) {
heights := make([]uint64, 0)
updates := make([]uint64, 0)
perBlockMint.Iterate(EncodeUint(startHeight), EncodeUint(endHeight), func(key string, value interface{}) bool {
heights = append(heights, DecodeUint(key))
updates = append(updates, value.(uint64))
return false
})

return heights, updates
}

func addPerBlockMintUpdate(height uint64, amount uint64) {
perBlockMint.Set(EncodeUint(height), amount)
}

var halvingYearBlock = make(map[int64]int64) // year => block
var halvingYearTimestamp = make(map[int64]int64) // year => timestamp

Expand Down Expand Up @@ -91,6 +125,8 @@ func init() {

amountPerBlockPerHalvingYear[i] = uint64(amountPerBlock)
}

addPerBlockMintUpdate(uint64(height), amountPerBlockPerHalvingYear[1])
}

func GetAvgBlockTimeInMs() int64 {
Expand Down Expand Up @@ -161,6 +197,7 @@ func setAvgBlockTimeInMs(ms int64) {

// update it
amountPerBlockPerHalvingYear[year] = adjustedAmountPerBlock
addPerBlockMintUpdate(uint64(height), adjustedAmountPerBlock)

// adjust halving block
for keyYear, _ := range halvingYearBlock {
Expand Down
19 changes: 19 additions & 0 deletions _deploy/r/gnoswap/gns/utils.gno
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
package gns

import (
"strconv"
"strings"
"std"
)

func getPrev() (string, string) {
prev := std.PrevRealm()
return prev.Addr().String(), prev.PkgPath()
}

func EncodeUint(num uint64) string {
// Convert the value to a decimal string.
s := strconv.FormatUint(num, 10)

// Zero-pad to a total length of 20 characters.
zerosNeeded := 20 - len(s)
return strings.Repeat("0", zerosNeeded) + s
}

func DecodeUint(s string) uint64 {
num, err := strconv.ParseUint(s, 10, 64)
if err != nil {
panic(err)
}
return num
}
9 changes: 1 addition & 8 deletions community_pool/gno.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
module gno.land/r/gnoswap/v1/community_pool

require (
gno.land/p/demo/ufmt v0.0.0-latest
gno.land/p/demo/users v0.0.0-latest
gno.land/r/gnoswap/v1/common v0.0.0-latest
gno.land/r/gnoswap/v1/consts v0.0.0-latest
)
module gno.land/r/gnoswap/v1/community_pool
10 changes: 1 addition & 9 deletions emission/gno.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
module gno.land/r/gnoswap/v1/emission

require (
gno.land/p/demo/ufmt v0.0.0-latest
gno.land/p/demo/users v0.0.0-latest
gno.land/r/gnoswap/v1/common v0.0.0-latest
gno.land/r/gnoswap/v1/consts v0.0.0-latest
gno.land/r/gnoswap/v1/gns v0.0.0-latest
)
module gno.land/r/gnoswap/v1/emission
20 changes: 1 addition & 19 deletions gov/governance/gno.mod
Original file line number Diff line number Diff line change
@@ -1,19 +1 @@
module gno.land/r/gnoswap/v1/gov/governance

require (
gno.land/p/demo/json v0.0.0-latest
gno.land/p/demo/ufmt v0.0.0-latest
gno.land/p/demo/users v0.0.0-latest
gno.land/p/gnoswap/uint256 v0.0.0-latest
gno.land/r/gnoswap/v1/common v0.0.0-latest
gno.land/r/gnoswap/v1/community_pool v0.0.0-latest
gno.land/r/gnoswap/v1/consts v0.0.0-latest
gno.land/r/gnoswap/v1/emission v0.0.0-latest
gno.land/r/gnoswap/v1/gns v0.0.0-latest
gno.land/r/gnoswap/v1/gov/staker v0.0.0-latest
gno.land/r/gnoswap/v1/gov/xgns v0.0.0-latest
gno.land/r/gnoswap/v1/pool v0.0.0-latest
gno.land/r/gnoswap/v1/protocol_fee v0.0.0-latest
gno.land/r/gnoswap/v1/router v0.0.0-latest
gno.land/r/gnoswap/v1/staker v0.0.0-latest
)
module gno.land/r/gnoswap/v1/gov/governance
14 changes: 1 addition & 13 deletions gov/staker/gno.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1 @@
module gno.land/r/gnoswap/v1/gov/staker

require (
gno.land/p/demo/json v0.0.0-latest
gno.land/p/demo/ufmt v0.0.0-latest
gno.land/p/demo/users v0.0.0-latest
gno.land/p/gnoswap/uint256 v0.0.0-latest
gno.land/r/gnoswap/v1/consts v0.0.0-latest
gno.land/r/gnoswap/v1/emission v0.0.0-latest
gno.land/r/gnoswap/v1/gns v0.0.0-latest
gno.land/r/gnoswap/v1/gov/xgns v0.0.0-latest
gno.land/r/gnoswap/v1/protocol_fee v0.0.0-latest
)
module gno.land/r/gnoswap/v1/gov/staker
12 changes: 1 addition & 11 deletions gov/xgns/gno.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
module gno.land/r/gnoswap/v1/gov/xgns

require (
gno.land/p/demo/grc/grc20 v0.0.0-latest
gno.land/p/demo/ownable v0.0.0-latest
gno.land/p/demo/ufmt v0.0.0-latest
gno.land/p/demo/users v0.0.0-latest
gno.land/r/demo/users v0.0.0-latest
gno.land/r/gnoswap/v1/common v0.0.0-latest
gno.land/r/gnoswap/v1/consts v0.0.0-latest
)
module gno.land/r/gnoswap/v1/gov/xgns
13 changes: 1 addition & 12 deletions launchpad/gno.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
module gno.land/r/gnoswap/v1/launchpad

require (
gno.land/p/demo/json v0.0.0-latest
gno.land/p/demo/ufmt v0.0.0-latest
gno.land/p/demo/users v0.0.0-latest
gno.land/p/gnoswap/uint256 v0.0.0-latest
gno.land/r/gnoswap/v1/consts v0.0.0-latest
gno.land/r/gnoswap/v1/gns v0.0.0-latest
gno.land/r/gnoswap/v1/gov/staker v0.0.0-latest
gno.land/r/gnoswap/v1/gov/xgns v0.0.0-latest
)
module gno.land/r/gnoswap/v1/launchpad
2 changes: 2 additions & 0 deletions pool/type.gno
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@ type Pool struct {
tickBitmaps TickBitmaps // maps tick index to tick bitmap

positions Positions // maps the key (caller, lower tick, upper tick) to a unique position

tickCrossHook func(poolPath string, tickId int32, zeroForOne bool)
r3v4s marked this conversation as resolved.
Show resolved Hide resolved
}

func newPool(poolInfo *createPoolParams) *Pool {
Expand Down
9 changes: 1 addition & 8 deletions protocol_fee/gno.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
module gno.land/r/gnoswap/v1/protocol_fee

require (
gno.land/p/demo/ufmt v0.0.0-latest
gno.land/p/demo/users v0.0.0-latest
gno.land/r/gnoswap/v1/common v0.0.0-latest
gno.land/r/gnoswap/v1/consts v0.0.0-latest
)
module gno.land/r/gnoswap/v1/protocol_fee
15 changes: 1 addition & 14 deletions router/gno.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
module gno.land/r/gnoswap/v1/router

require (
gno.land/p/demo/ufmt v0.0.0-latest
gno.land/p/demo/users v0.0.0-latest
gno.land/p/gnoswap/int256 v0.0.0-latest
gno.land/p/gnoswap/uint256 v0.0.0-latest
gno.land/r/demo/wugnot v0.0.0-latest
gno.land/r/gnoswap/v1/common v0.0.0-latest
gno.land/r/gnoswap/v1/consts v0.0.0-latest
gno.land/r/gnoswap/v1/emission v0.0.0-latest
gno.land/r/gnoswap/v1/pool v0.0.0-latest
gno.land/r/gnoswap/v1/staker v0.0.0-latest
)
module gno.land/r/gnoswap/v1/router
Loading
Loading