Skip to content

Commit 182c0ce

Browse files
committed
fix: missing helper
1 parent 5fd636f commit 182c0ce

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

staker/utils.gno

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ func poolKeyDivide(poolKey string) string {
2929
return ufmt.Sprintf("%s:%s:%s", pToken1, pToken0, fee)
3030
}
3131

32-
func require(condition bool, message string) {
33-
if !condition {
34-
panic(message)
35-
}
36-
}
37-
3832
func a2u(addr std.Address) users.AddressOrName {
3933
return users.AddressOrName(addr)
4034
}
@@ -79,3 +73,15 @@ func requireUnsigned(x bigint, msg string) {
7973
panic(msg)
8074
}
8175
}
76+
77+
func require(condition bool, message string) {
78+
if !condition {
79+
panic(message)
80+
}
81+
}
82+
83+
func requireExist(exist bool, msg string) {
84+
if !exist {
85+
panic(msg)
86+
}
87+
}

0 commit comments

Comments
 (0)