launchpad_protocol_fee.gno
1.08 Kb · 37 lines
1package launchpad
2
3import (
4 "errors"
5
6 gov_staker "gno.land/r/gnoswap/gov/staker"
7 "gno.land/r/gnoswap/halt"
8)
9
10// CollectProtocolFee collects protocol fee from gov/staker for project recipient wallets.
11// Only project recipients can call this function.
12func (lp *launchpadV1) CollectProtocolFee(_ int, rlm realm) {
13 if !rlm.IsCurrent() {
14 panic(errors.New(errSpoofedRealm))
15 }
16
17 halt.AssertIsNotHaltedWithdraw()
18
19 previousRealm := rlm.Previous()
20
21 caller := previousRealm.Address()
22 lp.assertHasProject(caller)
23
24 gov_staker.CollectRewardFromLaunchPad(cross(rlm), caller)
25}
26
27// CollectEmissionReward collects emission rewards from gov/staker for project recipient wallets.
28// Only project recipients can call this function.
29func (lp *launchpadV1) CollectEmissionReward(_ int, rlm realm) {
30 assertNotImplementYet()
31}
32
33// CollectProtocolFeeReward collects one token path of protocol fee rewards from gov/staker for project recipient wallets.
34// Only project recipients can call this function.
35func (lp *launchpadV1) CollectProtocolFeeReward(_ int, rlm realm, tokenPath string) {
36 assertNotImplementYet()
37}