Skip to content

Commit 47f2e35

Browse files
committed
chore: rename
1 parent 2f7efc4 commit 47f2e35

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

pool/pool.gno

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ func Mint(
2828
positionCaller std.Address,
2929
) (string, string) { // uint256 x2
3030
common.IsHalted()
31-
common.MustRegisteredToken(token0Path)
32-
common.MustRegisteredToken(token1Path)
31+
common.MustRegistered(token0Path)
32+
common.MustRegistered(token1Path)
3333

3434
if common.GetLimitCaller() {
3535
caller := std.PrevRealm().Addr()
@@ -83,8 +83,8 @@ func Burn(
8383
_liquidityAmount string, // uint128
8484
) (string, string) { // uint256 x2
8585
common.IsHalted()
86-
common.MustRegisteredToken(token0Path)
87-
common.MustRegisteredToken(token1Path)
86+
common.MustRegistered(token0Path)
87+
common.MustRegistered(token1Path)
8888

8989
caller := std.PrevRealm().Addr()
9090
if common.GetLimitCaller() {
@@ -139,8 +139,8 @@ func Collect(
139139
_amount1Requested string, // uint128
140140
) (string, string) { // uint128 x2
141141
common.IsHalted()
142-
common.MustRegisteredToken(token0Path)
143-
common.MustRegisteredToken(token1Path)
142+
common.MustRegistered(token0Path)
143+
common.MustRegistered(token1Path)
144144

145145
if common.GetLimitCaller() {
146146
caller := std.PrevRealm().Addr()
@@ -207,8 +207,8 @@ func Swap(
207207
payer std.Address, // router
208208
) (string, string) { // int256 x2
209209
common.IsHalted()
210-
common.MustRegisteredToken(token0Path)
211-
common.MustRegisteredToken(token1Path)
210+
common.MustRegistered(token0Path)
211+
common.MustRegistered(token1Path)
212212

213213
if common.GetLimitCaller() {
214214
caller := std.PrevRealm().Addr()
@@ -552,8 +552,8 @@ func CollectProtocolByAdmin(
552552
_amount0Requested string, // uint128
553553
_amount1Requested string, // uint128
554554
) (string, string) { // uint128 x2
555-
common.MustRegisteredToken(token0Path)
556-
common.MustRegisteredToken(token1Path)
555+
common.MustRegistered(token0Path)
556+
common.MustRegistered(token1Path)
557557

558558
caller := std.PrevRealm().Addr()
559559
if err := common.AdminOnly(caller); err != nil {
@@ -597,8 +597,8 @@ func CollectProtocol(
597597
_amount0Requested string, // uint128
598598
_amount1Requested string, // uint128
599599
) (string, string) { // uint128 x2
600-
common.MustRegisteredToken(token0Path)
601-
common.MustRegisteredToken(token1Path)
600+
common.MustRegistered(token0Path)
601+
common.MustRegistered(token1Path)
602602

603603
caller := std.PrevRealm().Addr()
604604
if err := common.GovernanceOnly(caller); err != nil {

pool/pool_manager.gno

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ func CreatePool(
150150
// wrap first
151151
token0Path, token1Path = poolInfo.wrap()
152152

153-
common.MustRegisteredToken(token0Path)
154-
common.MustRegisteredToken(token1Path)
153+
common.MustRegistered(token0Path)
154+
common.MustRegistered(token1Path)
155155

156156
// reinitialize poolInfo with wrapped tokens
157157
poolInfo = newPoolParams(token0Path, token1Path, fee, _sqrtPriceX96)
@@ -227,8 +227,8 @@ func DoesPoolPathExist(poolPath string) bool {
227227
// It constructs the poolPath from the given parameters and returns the corresponding pool.
228228
// Returns pool struct
229229
func GetPool(token0Path, token1Path string, fee uint32) *Pool {
230-
common.MustRegisteredToken(token0Path)
231-
common.MustRegisteredToken(token1Path)
230+
common.MustRegistered(token0Path)
231+
common.MustRegistered(token1Path)
232232

233233
poolPath := GetPoolPath(token0Path, token1Path, fee)
234234
pool, exist := pools[poolPath]
@@ -258,8 +258,8 @@ func GetPoolFromPoolPath(poolPath string) *Pool {
258258
// GetPoolPath generates a poolPath from the given token paths and fee.
259259
// The poolPath is constructed by joining the token paths and fee with colons.
260260
func GetPoolPath(token0Path, token1Path string, fee uint32) string {
261-
common.MustRegisteredToken(token0Path)
262-
common.MustRegisteredToken(token1Path)
261+
common.MustRegistered(token0Path)
262+
common.MustRegistered(token1Path)
263263

264264
// TODO: this check is not unnecessary, if we are sure that
265265
// all the token paths in the pool are sorted in alphabetical order.

0 commit comments

Comments
 (0)