forked from TezosRio/taps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bp_proxy.cfm
executable file
·50 lines (37 loc) · 1.39 KB
/
bp_proxy.cfm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<cfif not isUserLoggedIn()>
<cflocation url="index.cfm">
</cfif>
<cfoutput>
<cfset result="">
<cfif isDefined("url.status")>
<cfinvoke component="components.database"
method="saveBondPoolSettings"
returnVariable="result"
status="#url.status#">
#result#
<cfelseif isDefined("url.repay") and isDefined("url.cycle")>
<!--- User has asked to do repay of rewards --->
<cfif #url.repay# EQ true>
<cfif #url.cycle# NEQ "">
<cfinvoke component="components.tezosGateway" method="getDelegators" bakerID="#application.bakerId#"
fromCycle="#url.cycle - 1#" toCycle="#url.cycle + 1#" returnVariable="myDelegators">
<!--- Pay rewards again (distribute rewards) --->
<cfinvoke component="components.taps" method="distributeRewards"
localPendingRewardsCycle="#url.cycle#"
networkPendingRewardsCycle="#url.cycle + 1#"
delegators="#myDelegators#">
</cfif>
</cfif>
<cfelse>
<cfinvoke component="components.database"
method="bondPoolMemberProxy"
returnVariable="result"
address="#url.address#"
name="#url.name#"
amount="#url.amount#"
fee="#url.fee#"
ismanager="#url.ismanager#"
operation="#url.operation#">
#result#
</cfif>
</cfoutput>