tx · 7zzrFh5cKoUHAfqXUfWp7SWpdJYtwNJAFxwP2KPW2h4d 3N9eE86dXUm7rfc2WWCMLHkaEM4Y8yoNj7u: -0.01440000 Waves 2021.01.26 19:06 [1370689] smart account 3N9eE86dXUm7rfc2WWCMLHkaEM4Y8yoNj7u > SELF 0.00000000 Waves
{ "type": 13, "id": "7zzrFh5cKoUHAfqXUfWp7SWpdJYtwNJAFxwP2KPW2h4d", "fee": 1440000, "feeAssetId": null, "timestamp": 1611677178696, "version": 2, "chainId": 84, "sender": "3N9eE86dXUm7rfc2WWCMLHkaEM4Y8yoNj7u", "senderPublicKey": "FFDorDp8bC9dyUK2w8hYPWPVEcbbk9zYkpHn3gcq9svn", "proofs": [ "2eL8xbhQMjwvY6X6HVig9PwR7U5ePyH9f57KgYf12QfrjcbzEeLcCc2bb3tkuegxB5ab4jYXycKPJNYpMNWMvTsi" ], "script": "base64:AAIDAAAAAAAAAAYIARIAEgAAAAAAAAAAAgAAAAFpAQAAAApQdXNoUmV3YXJkAAAAAAQAAAALU3Rha2VkVG9rZW4BAAAAILXRKGG85gSnPN40vyincnte9/w4CJZnKBhuOOwELCGyBAAAAAtHb3Zlcm5Ub2tlbgEAAAAgEID4OLobvW7l4Eafs479e9fJOrvsYRoAST8NKMW+XbkEAAAADG1pblB1c2hCbG9jawAAAAAAAAAAAAQAAAANbWluU3Rha2VCbG9jawAAAAAAAAAAAAQAAAAORGVsYXlBZnRlclB1c2gAAAAAAAAAABQEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwMJAABmAAAAAggFAAAAA3BtdAAAAAZhbW91bnQAAAAAAAAAAAAJAAAAAAAAAggFAAAAA3BtdAAAAAdhc3NldElkBQAAAAtHb3Zlcm5Ub2tlbgcEAAAACFVzZXJQdXNoCQABLAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAAFX1B1c2gEAAAAEVVzZXJMYXN0UHVzaE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HRSZXN1bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABJVc2VyR292ZXJuVG9rZW5LZXkFAAAAFG5ld0Ftb3VudEdvdmVyblRva2VuCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABJVc2VyU3Rha2VkVG9rZW5LZXkFAAAAFG5ld0Ftb3VudFN0YWtlZFRva2VuCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABhVc2VyU3Rha2VUcmFuc2FjdGlvbnNLZXkFAAAAGE5ld1VzZXJTdGFrZVRyYW5zYWN0aW9ucwkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAAMU3Rha2VCYWxhbmNlBQAAABJTdGFrZUJhbGFuY2VBbW91bnQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAAB0Z1bmRCb3gFAAAAC1ByaXplQW1vdW50CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAtQcml6ZUhlaWdodAUAAAAQUHJpemVIZWlnaHRWYWx1ZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAHVXNlckFQWQUAAAAMVXNlckFQWVZhbHVlCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABJVc2VyTGFzdFN0YWtlQmxvY2sFAAAABmhlaWdodAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGUmV3YXJkBQAAAAtHb3Zlcm5Ub2tlbgUAAAADbmlsCQAAAgAAAAECAAAAG0NhbiBkZXBvc2l0IG9ubHkgU3Rha2VUb2tlbgAAAADigkQ6", "height": 1370689, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CnoivzeQmyqoXwtiUiZNonyQJvidSdSYZ9WgP9WHoN4P Next: DiQUcG2MHE1a3jrT1MSrL7rjTq7jqPxErjzDhy9KBHE6 Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | func PushReward () = { | |
8 | 8 | let StakedToken = base58'DEjmrvdViZH7trtuAqaKQFjNjfbK6D7yMHm18UQ8Hj21' | |
9 | 9 | let GovernToken = base58'27RauQwTvdbcPqeFkzoTf5WPt3HtEAmRDVxprWUNp6bA' | |
10 | - | let minPushBlock = | |
11 | - | let minStakeBlock = | |
10 | + | let minPushBlock = 0 | |
11 | + | let minStakeBlock = 0 | |
12 | 12 | let DelayAfterPush = 20 | |
13 | 13 | let pmt = extract(i.payment) | |
14 | 14 | if (if ((pmt.amount > 0)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func PushReward () = { | |
8 | 8 | let StakedToken = base58'DEjmrvdViZH7trtuAqaKQFjNjfbK6D7yMHm18UQ8Hj21' | |
9 | 9 | let GovernToken = base58'27RauQwTvdbcPqeFkzoTf5WPt3HtEAmRDVxprWUNp6bA' | |
10 | - | let minPushBlock = | |
11 | - | let minStakeBlock = | |
10 | + | let minPushBlock = 0 | |
11 | + | let minStakeBlock = 0 | |
12 | 12 | let DelayAfterPush = 20 | |
13 | 13 | let pmt = extract(i.payment) | |
14 | 14 | if (if ((pmt.amount > 0)) | |
15 | 15 | then (pmt.assetId == GovernToken) | |
16 | 16 | else false) | |
17 | 17 | then { | |
18 | 18 | let UserPush = (toBase58String(i.caller.bytes) + "_Push") | |
19 | 19 | let UserLastPushBlock = (toBase58String(i.caller.bytes) + "_UserLastPushBlock") | |
20 | 20 | let UserLastStakeBlock = (toBase58String(i.caller.bytes) + "_UserLastStakeBlock") | |
21 | 21 | let UserStake = (toBase58String(i.caller.bytes) + "_Staking") | |
22 | 22 | let ContractWalletStakeBalance = assetBalance(this, StakedToken) | |
23 | 23 | let StakeBalance = match getInteger(this, "StakeBalance") { | |
24 | 24 | case a: Int => | |
25 | 25 | a | |
26 | 26 | case _ => | |
27 | 27 | 0 | |
28 | 28 | } | |
29 | 29 | let PrizeAmount = (ContractWalletStakeBalance - StakeBalance) | |
30 | 30 | let HeightTransactFundBox = match getInteger(this, "PrizeHeight") { | |
31 | 31 | case a: Int => | |
32 | 32 | a | |
33 | 33 | case _ => | |
34 | 34 | 0 | |
35 | 35 | } | |
36 | 36 | let PrizeHeightValue = if (if ((HeightTransactFundBox == 0)) | |
37 | 37 | then (PrizeAmount == 0) | |
38 | 38 | else false) | |
39 | 39 | then 0 | |
40 | 40 | else if (if ((HeightTransactFundBox == 0)) | |
41 | 41 | then (PrizeAmount != 0) | |
42 | 42 | else false) | |
43 | 43 | then height | |
44 | 44 | else if (if ((HeightTransactFundBox != 0)) | |
45 | 45 | then (PrizeAmount != 0) | |
46 | 46 | else false) | |
47 | 47 | then HeightTransactFundBox | |
48 | 48 | else 0 | |
49 | 49 | let HighestPushValue = match getInteger(this, "HighestPush") { | |
50 | 50 | case a: Int => | |
51 | 51 | a | |
52 | 52 | case _ => | |
53 | 53 | 0 | |
54 | 54 | } | |
55 | 55 | let UserLastPushvalue = match getInteger(this, UserPush) { | |
56 | 56 | case a: Int => | |
57 | 57 | a | |
58 | 58 | case _ => | |
59 | 59 | 0 | |
60 | 60 | } | |
61 | 61 | let ActualDelay = match getInteger(this, "Delay") { | |
62 | 62 | case a: Int => | |
63 | 63 | a | |
64 | 64 | case _ => | |
65 | 65 | 0 | |
66 | 66 | } | |
67 | 67 | let NewDelay = (ActualDelay + DelayAfterPush) | |
68 | 68 | let HighestPushAddress = match getInteger(this, "HighestPushAddress") { | |
69 | 69 | case a: Int => | |
70 | 70 | a | |
71 | 71 | case _ => | |
72 | 72 | 0 | |
73 | 73 | } | |
74 | 74 | let UserLastPushBlockValue = match getInteger(this, UserLastPushBlock) { | |
75 | 75 | case a: Int => | |
76 | 76 | a | |
77 | 77 | case _ => | |
78 | 78 | 0 | |
79 | 79 | } | |
80 | 80 | let UserLastStakeBlockValue = match getInteger(this, UserLastStakeBlock) { | |
81 | 81 | case a: Int => | |
82 | 82 | a | |
83 | 83 | case _ => | |
84 | 84 | 0 | |
85 | 85 | } | |
86 | 86 | let UserStakeValue = match getInteger(this, UserStake) { | |
87 | 87 | case a: Int => | |
88 | 88 | a | |
89 | 89 | case _ => | |
90 | 90 | 0 | |
91 | 91 | } | |
92 | 92 | let UserPushvalue = (pmt.amount + UserLastPushvalue) | |
93 | 93 | throw(((((((((((((((((((("UserPushvalue: " + toString(UserPushvalue)) + " height-UserLastStakeBlockValue: ") + toString(UserLastStakeBlockValue)) + "__") + toString((height - UserLastStakeBlockValue))) + " > ") + toString((1440 * minStakeBlock))) + " height-UserLastPushBlockValue ") + toString(UserLastPushBlockValue)) + "__") + toString((height - UserLastPushBlockValue))) + " > ") + toString(minPushBlock)) + "UserPushvalue: ") + toString(UserPushvalue)) + " HighestPushValue ") + toString(HighestPushValue)) + " UserStakeValue: ") + toString(UserStakeValue))) | |
94 | 94 | } | |
95 | 95 | else throw("Can deposit only positive amounts of ASIMI Token") | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | ||
100 | 100 | @Callable(i) | |
101 | 101 | func Stake () = { | |
102 | 102 | let StakedToken = base58'DEjmrvdViZH7trtuAqaKQFjNjfbK6D7yMHm18UQ8Hj21' | |
103 | 103 | let GovernToken = base58'27RauQwTvdbcPqeFkzoTf5WPt3HtEAmRDVxprWUNp6bA' | |
104 | 104 | let GovernTokenSmartContractBalance = assetBalance(this, GovernToken) | |
105 | 105 | let UserAPY = (toBase58String(i.caller.bytes) + "_APY") | |
106 | 106 | let pmt = extract(i.payment) | |
107 | 107 | if (if ((pmt.amount > 0)) | |
108 | 108 | then (pmt.assetId == StakedToken) | |
109 | 109 | else false) | |
110 | 110 | then { | |
111 | 111 | let UserStakedTokenKey = (toBase58String(i.caller.bytes) + "_Staking") | |
112 | 112 | let UserGovernTokenKey = (toBase58String(i.caller.bytes) + "_Earnings") | |
113 | 113 | let UserLastStakeBlock = (toBase58String(i.caller.bytes) + "_UserLastStakeBlock") | |
114 | 114 | let UserStakeTransactionsKey = (toBase58String(i.caller.bytes) + "_StakedTransactions") | |
115 | 115 | let AddressHeight = (toBase58String(i.caller.bytes) + "_PrizeHeight") | |
116 | 116 | let UserStakeTransactions = match getInteger(this, UserStakeTransactionsKey) { | |
117 | 117 | case a: Int => | |
118 | 118 | a | |
119 | 119 | case _ => | |
120 | 120 | 0 | |
121 | 121 | } | |
122 | 122 | let NewUserStakeTransactions = (UserStakeTransactions + 1) | |
123 | 123 | let currentAmountStakedToken = match getInteger(this, UserStakedTokenKey) { | |
124 | 124 | case a: Int => | |
125 | 125 | a | |
126 | 126 | case _ => | |
127 | 127 | 0 | |
128 | 128 | } | |
129 | 129 | let newAmountStakedToken = (currentAmountStakedToken + pmt.amount) | |
130 | 130 | let ContractWalletStakeBalance = assetBalance(this, StakedToken) | |
131 | 131 | let StakeBalance = match getInteger(this, "StakeBalance") { | |
132 | 132 | case a: Int => | |
133 | 133 | a | |
134 | 134 | case _ => | |
135 | 135 | 0 | |
136 | 136 | } | |
137 | 137 | let StakeBalanceAmount = (StakeBalance + pmt.amount) | |
138 | 138 | let PrizeAmount = (ContractWalletStakeBalance - StakeBalance) | |
139 | 139 | let currentAmountGovernToken = match getInteger(this, UserGovernTokenKey) { | |
140 | 140 | case a: Int => | |
141 | 141 | a | |
142 | 142 | case _ => | |
143 | 143 | 0 | |
144 | 144 | } | |
145 | 145 | let HeightTransactFundBox = match getInteger(this, "PrizeHeight") { | |
146 | 146 | case a: Int => | |
147 | 147 | a | |
148 | 148 | case _ => | |
149 | 149 | 0 | |
150 | 150 | } | |
151 | 151 | let PrizeHeightValue = if (if ((HeightTransactFundBox == 0)) | |
152 | 152 | then (PrizeAmount == 0) | |
153 | 153 | else false) | |
154 | 154 | then 0 | |
155 | 155 | else if (if ((HeightTransactFundBox == 0)) | |
156 | 156 | then (PrizeAmount != 0) | |
157 | 157 | else false) | |
158 | 158 | then height | |
159 | 159 | else if (if ((HeightTransactFundBox != 0)) | |
160 | 160 | then (PrizeAmount != 0) | |
161 | 161 | else false) | |
162 | 162 | then HeightTransactFundBox | |
163 | 163 | else 0 | |
164 | 164 | if ((100000000 > GovernTokenSmartContractBalance)) | |
165 | 165 | then throw("No enough GovernToken In Contract, Please deposit GovernTokens") | |
166 | 166 | else { | |
167 | 167 | let Reward = if ((StakeBalance == 0)) | |
168 | 168 | then 10000 | |
169 | 169 | else if ((NewUserStakeTransactions > 10)) | |
170 | 170 | then ((10000 * NewUserStakeTransactions) * (1 + (newAmountStakedToken / StakeBalance))) | |
171 | 171 | else (10000 * (1 + (newAmountStakedToken / StakeBalance))) | |
172 | 172 | let UserAPYValue = if ((currentAmountGovernToken > 0)) | |
173 | 173 | then ((100 * Reward) / currentAmountGovernToken) | |
174 | 174 | else 0 | |
175 | 175 | let newAmountGovernToken = (currentAmountGovernToken + Reward) | |
176 | 176 | ScriptResult(WriteSet([DataEntry(UserGovernTokenKey, newAmountGovernToken), DataEntry(UserStakedTokenKey, newAmountStakedToken), DataEntry(UserStakeTransactionsKey, NewUserStakeTransactions), DataEntry("StakeBalance", StakeBalanceAmount), DataEntry("FundBox", PrizeAmount), DataEntry("PrizeHeight", PrizeHeightValue), DataEntry(UserAPY, UserAPYValue), DataEntry(UserLastStakeBlock, height)]), TransferSet([ScriptTransfer(i.caller, Reward, GovernToken)])) | |
177 | 177 | } | |
178 | 178 | } | |
179 | 179 | else throw("Can deposit only StakeToken") | |
180 | 180 | } | |
181 | 181 | ||
182 | 182 |
github/deemru/w8io/169f3d6 39.17 ms ◑