Skip to content

Commit 80fea98

Browse files
committed
apply comments
1 parent 33cb763 commit 80fea98

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

gov/staker/staker.gno

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,13 @@ var (
3131
lockedAmount = uint64(0)
3232
)
3333

34-
var (
35-
minimumAmount = uint64(1_000_000)
36-
)
34+
var minimumAmount = uint64(1_000_000)
3735

3836
// Delegate delegates GNS tokens to a specified address.
3937
// ref: https://docs.gnoswap.io/contracts/governance/staker.gno#delegate
4038
func Delegate(to std.Address, amount uint64) {
4139
if running {
42-
cleanDelegationStatHistory() // 함수명 변경
40+
cleanDelegationStatHistory()
4341
}
4442

4543
if amount == 0 {
@@ -92,15 +90,15 @@ func Delegate(to std.Address, amount uint64) {
9290
// xGNS mint to caller
9391
xgns.Mint(a2u(caller), amount)
9492

95-
//prevAddr, prevPkgPath := getPrev()
96-
//std.Emit(
97-
// "Delegate",
98-
// "prevAddr", prevAddr,
99-
// "prevRealm", prevPkgPath,
100-
// "from", caller.String(),
101-
// "to", to.String(),
102-
// "amount", formatUint(amount),
103-
//)
93+
prevAddr, prevPkgPath := getPrev()
94+
std.Emit(
95+
"Delegate",
96+
"prevAddr", prevAddr,
97+
"prevRealm", prevPkgPath,
98+
"from", caller.String(),
99+
"to", to.String(),
100+
"amount", formatUint(amount),
101+
)
104102
}
105103

106104
// Redelegate redelegates xGNS from existing delegate to another.

0 commit comments

Comments
 (0)