tx · DiQUcG2MHE1a3jrT1MSrL7rjTq7jqPxErjzDhy9KBHE6 3N9eE86dXUm7rfc2WWCMLHkaEM4Y8yoNj7u: -0.01440000 Waves 2021.01.26 19:06 [1370689] smart account 3N9eE86dXUm7rfc2WWCMLHkaEM4Y8yoNj7u > SELF 0.00000000 Waves
{ "type": 13, "id": "DiQUcG2MHE1a3jrT1MSrL7rjTq7jqPxErjzDhy9KBHE6", "fee": 1440000, "feeAssetId": null, "timestamp": 1611677221744, "version": 2, "chainId": 84, "sender": "3N9eE86dXUm7rfc2WWCMLHkaEM4Y8yoNj7u", "senderPublicKey": "FFDorDp8bC9dyUK2w8hYPWPVEcbbk9zYkpHn3gcq9svn", "proofs": [ "2vj1SLzaDY65SsyvqMZndZuiGf1rQR1exjvMZHqnQuFxHcXKBzUVPYYPrHgAojicMEWZvQndzED5h8bppVwmEn8H" ], "script": "base64:AAIDAAAAAAAAAAYIARIAEgAAAAAAAAAAAgAAAAFpAQAAAApQdXNoUmV3YXJkAAAAAAQAAAALU3Rha2VkVG9rZW4BAAAAILXRKGG85gSnPN40vyincnte9/w4CJZnKBhuOOwELCGyBAAAAAtHb3Zlcm5Ub2tlbgEAAAAgEID4OLobvW7l4Eafs479e9fJOrvsYRoAST8NKMW+XbkEAAAADG1pblB1c2hCbG9jawAAAAAAAAAAAAQAAAANbWluU3Rha2VCbG9jawAAAAAAAAAAAAQAAAAORGVsYXlBZnRlclB1c2gAAAAAAAAAABQEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwMJAABmAAAAAggFAAAAA3BtdAAAAAZhbW91bnQAAAAAAAAAAAAJAAAAAAAAAggFAAAAA3BtdAAAAAdhc3NldElkBQAAAAtHb3Zlcm5Ub2tlbgcEAAAACFVzZXJQdXNoCQABLAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAAFX1B1c2gEAAAAEVVzZXJMYXN0UHVzaEJsb2Nr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R292ZXJuVG9rZW4FAAAAA25pbAkAAAIAAAABAgAAABtDYW4gZGVwb3NpdCBvbmx5IFN0YWtlVG9rZW4AAAAApr2Adg==", "height": 1370689, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7zzrFh5cKoUHAfqXUfWp7SWpdJYtwNJAFxwP2KPW2h4d Next: 3ktCiR6y9Vumie3VmMfpLEcAA9hZPrE8HF19nkrzXRgz Diff:
Old | New | Differences | |
---|---|---|---|
90 | 90 | 0 | |
91 | 91 | } | |
92 | 92 | let UserPushvalue = (pmt.amount + UserLastPushvalue) | |
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))) | |
93 | + | if (if (if (if (if ((UserPushvalue > 0)) | |
94 | + | then ((height - UserLastStakeBlockValue) > (1440 * minStakeBlock)) | |
95 | + | else false) | |
96 | + | then ((height - UserLastPushBlockValue) > minPushBlock) | |
97 | + | else false) | |
98 | + | then (UserPushvalue > HighestPushValue) | |
99 | + | else false) | |
100 | + | then (UserStakeValue > 0) | |
101 | + | else false) | |
102 | + | then WriteSet([DataEntry(UserPush, UserPushvalue), DataEntry("HighestPushAddress", toBase58String(i.caller.bytes)), DataEntry("HighestPush", UserPushvalue), DataEntry("PrizeHeight", height), DataEntry("Delay", NewDelay)]) | |
103 | + | else throw((("Your Push dot not comply one of the following conditions: " + " | |
104 | + | 1. Positive Value | |
105 | + | 2. Must Staked ASIMI Token for a minimum of week | |
106 | + | ") + "3. Should be Higher than last Highest Push | |
107 | + | 4. Should wait required time between Pushes")) | |
94 | 108 | } | |
95 | 109 | else throw("Can deposit only positive amounts of ASIMI Token") | |
96 | 110 | } |
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 | 10 | let minPushBlock = 0 | |
11 | 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 | - | 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))) | |
93 | + | if (if (if (if (if ((UserPushvalue > 0)) | |
94 | + | then ((height - UserLastStakeBlockValue) > (1440 * minStakeBlock)) | |
95 | + | else false) | |
96 | + | then ((height - UserLastPushBlockValue) > minPushBlock) | |
97 | + | else false) | |
98 | + | then (UserPushvalue > HighestPushValue) | |
99 | + | else false) | |
100 | + | then (UserStakeValue > 0) | |
101 | + | else false) | |
102 | + | then WriteSet([DataEntry(UserPush, UserPushvalue), DataEntry("HighestPushAddress", toBase58String(i.caller.bytes)), DataEntry("HighestPush", UserPushvalue), DataEntry("PrizeHeight", height), DataEntry("Delay", NewDelay)]) | |
103 | + | else throw((("Your Push dot not comply one of the following conditions: " + " | |
104 | + | 1. Positive Value | |
105 | + | 2. Must Staked ASIMI Token for a minimum of week | |
106 | + | ") + "3. Should be Higher than last Highest Push | |
107 | + | 4. Should wait required time between Pushes")) | |
94 | 108 | } | |
95 | 109 | else throw("Can deposit only positive amounts of ASIMI Token") | |
96 | 110 | } | |
97 | 111 | ||
98 | 112 | ||
99 | 113 | ||
100 | 114 | @Callable(i) | |
101 | 115 | func Stake () = { | |
102 | 116 | let StakedToken = base58'DEjmrvdViZH7trtuAqaKQFjNjfbK6D7yMHm18UQ8Hj21' | |
103 | 117 | let GovernToken = base58'27RauQwTvdbcPqeFkzoTf5WPt3HtEAmRDVxprWUNp6bA' | |
104 | 118 | let GovernTokenSmartContractBalance = assetBalance(this, GovernToken) | |
105 | 119 | let UserAPY = (toBase58String(i.caller.bytes) + "_APY") | |
106 | 120 | let pmt = extract(i.payment) | |
107 | 121 | if (if ((pmt.amount > 0)) | |
108 | 122 | then (pmt.assetId == StakedToken) | |
109 | 123 | else false) | |
110 | 124 | then { | |
111 | 125 | let UserStakedTokenKey = (toBase58String(i.caller.bytes) + "_Staking") | |
112 | 126 | let UserGovernTokenKey = (toBase58String(i.caller.bytes) + "_Earnings") | |
113 | 127 | let UserLastStakeBlock = (toBase58String(i.caller.bytes) + "_UserLastStakeBlock") | |
114 | 128 | let UserStakeTransactionsKey = (toBase58String(i.caller.bytes) + "_StakedTransactions") | |
115 | 129 | let AddressHeight = (toBase58String(i.caller.bytes) + "_PrizeHeight") | |
116 | 130 | let UserStakeTransactions = match getInteger(this, UserStakeTransactionsKey) { | |
117 | 131 | case a: Int => | |
118 | 132 | a | |
119 | 133 | case _ => | |
120 | 134 | 0 | |
121 | 135 | } | |
122 | 136 | let NewUserStakeTransactions = (UserStakeTransactions + 1) | |
123 | 137 | let currentAmountStakedToken = match getInteger(this, UserStakedTokenKey) { | |
124 | 138 | case a: Int => | |
125 | 139 | a | |
126 | 140 | case _ => | |
127 | 141 | 0 | |
128 | 142 | } | |
129 | 143 | let newAmountStakedToken = (currentAmountStakedToken + pmt.amount) | |
130 | 144 | let ContractWalletStakeBalance = assetBalance(this, StakedToken) | |
131 | 145 | let StakeBalance = match getInteger(this, "StakeBalance") { | |
132 | 146 | case a: Int => | |
133 | 147 | a | |
134 | 148 | case _ => | |
135 | 149 | 0 | |
136 | 150 | } | |
137 | 151 | let StakeBalanceAmount = (StakeBalance + pmt.amount) | |
138 | 152 | let PrizeAmount = (ContractWalletStakeBalance - StakeBalance) | |
139 | 153 | let currentAmountGovernToken = match getInteger(this, UserGovernTokenKey) { | |
140 | 154 | case a: Int => | |
141 | 155 | a | |
142 | 156 | case _ => | |
143 | 157 | 0 | |
144 | 158 | } | |
145 | 159 | let HeightTransactFundBox = match getInteger(this, "PrizeHeight") { | |
146 | 160 | case a: Int => | |
147 | 161 | a | |
148 | 162 | case _ => | |
149 | 163 | 0 | |
150 | 164 | } | |
151 | 165 | let PrizeHeightValue = if (if ((HeightTransactFundBox == 0)) | |
152 | 166 | then (PrizeAmount == 0) | |
153 | 167 | else false) | |
154 | 168 | then 0 | |
155 | 169 | else if (if ((HeightTransactFundBox == 0)) | |
156 | 170 | then (PrizeAmount != 0) | |
157 | 171 | else false) | |
158 | 172 | then height | |
159 | 173 | else if (if ((HeightTransactFundBox != 0)) | |
160 | 174 | then (PrizeAmount != 0) | |
161 | 175 | else false) | |
162 | 176 | then HeightTransactFundBox | |
163 | 177 | else 0 | |
164 | 178 | if ((100000000 > GovernTokenSmartContractBalance)) | |
165 | 179 | then throw("No enough GovernToken In Contract, Please deposit GovernTokens") | |
166 | 180 | else { | |
167 | 181 | let Reward = if ((StakeBalance == 0)) | |
168 | 182 | then 10000 | |
169 | 183 | else if ((NewUserStakeTransactions > 10)) | |
170 | 184 | then ((10000 * NewUserStakeTransactions) * (1 + (newAmountStakedToken / StakeBalance))) | |
171 | 185 | else (10000 * (1 + (newAmountStakedToken / StakeBalance))) | |
172 | 186 | let UserAPYValue = if ((currentAmountGovernToken > 0)) | |
173 | 187 | then ((100 * Reward) / currentAmountGovernToken) | |
174 | 188 | else 0 | |
175 | 189 | let newAmountGovernToken = (currentAmountGovernToken + Reward) | |
176 | 190 | 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 | 191 | } | |
178 | 192 | } | |
179 | 193 | else throw("Can deposit only StakeToken") | |
180 | 194 | } | |
181 | 195 | ||
182 | 196 |
github/deemru/w8io/169f3d6 42.01 ms ◑