2024.04.20 00:37 [3070231] smart account 3NCPdPnLkaFuqq7Mvni1dr9G1u1gqwvVGUr > SELF 0.00000000 Waves

{ "type": 13, "id": "GNcjR8A4LSYwNYs3sS3eAyzkw5qwNoMUpb3mp8WHtfqp", "fee": 200000, "feeAssetId": null, "timestamp": 1713562662353, "version": 1, "sender": "3NCPdPnLkaFuqq7Mvni1dr9G1u1gqwvVGUr", "senderPublicKey": "2aHPpzkUniSJwBK7Lj2qiPnW9HN26KFcbdW6igZh1wA3", "proofs": [ "2TFvEBFfuinfxwPwiGC3YAATtwkpEeWmaaxTtN5TDVTBGN8V9e3HafApHCWt3xRdBwNYUnZZXvrtRW3srRoQZNG5" ], "script": "base64:BgIECAISAAMABkhFSUdIVAUGaGVpZ2h0AA1DYWxsZXJBZGRyZXNzCQEHQWRkcmVzcwEBGgFU8or31SqT5RJOrpq6yMotNBkGUFw/f6+3ABJMMk1wU3Rha2luZ0FkZHJlc3MJAQdBZGRyZXNzAQEaAVT3yNgyvRsCzHKoowop8elLl5bDoz4gLSQBAWkBCmZpbGxQZXJpb2QAAwkBAiE9AggFAWkGY2FsbGVyBQ1DYWxsZXJBZGRyZXNzCQACAQINQWNjZXNzIGRlbmllZAQOcGVyaW9kT2Zmc2V0SWQJAQt2YWx1ZU9yRWxzZQIJAJoIAgUSTDJNcFN0YWtpbmdBZGRyZXNzAgwlc19fb2Zmc2V0SWQAAAQMcGVyaW9kTGVuZ3RoCQELdmFsdWVPckVsc2UCCQCaCAIFEkwyTXBTdGFraW5nQWRkcmVzcwIQJXNfX29mZnNldEhlaWdodACQTgQScGVyaW9kT2Zmc2V0SGVpZ2h0CQELdmFsdWVPckVsc2UCCQCaCAIFEkwyTXBTdGFraW5nQWRkcmVzcwIQJXNfX3BlcmlvZExlbmd0aAD///////////8BAwkAAAIFEnBlcmlvZE9mZnNldEhlaWdodAD///////////8BCQACAQIHbm90IHlldAQPY3VycmVudFBlcmlvZElkAwMJAGYCBQZIRUlHSFQFEnBlcmlvZE9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GFzdFN0b3JlZFBlcmlvZElkCQDMCAIJAQxJbnRlZ2VyRW50cnkCAgxsYXN0UGVyaW9kSWQJAGQCBRJsYXN0U3RvcmVkUGVyaW9kSWQAAQUDbmlsAEXUANA=", "chainId": 84, "height": 3070231, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 65jrXBzuBMvNwCDa46SBibjLGNM57bbXU6pLwcnVZkwa Next: FzP6fDo3ag8TYdikTav4h8aAHnj2WEtzeiHRCq6UNfTN Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let HEIGHT = height
55
6-let l2mpStakingAddress = Address(base58'3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h')
6+let CallerAddress = Address(base58'3NC2Xn1tUKEc7YxJS9oxdtY4x5NaQHhpH2e')
7+
8+let L2MpStakingAddress = Address(base58'3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h')
79
810 @Callable(i)
9-func fillPeriod () = {
10- let periodOffsetId = valueOrElse(getInteger(l2mpStakingAddress, "%s__offsetId"), 0)
11- let periodLength = valueOrElse(getInteger(l2mpStakingAddress, "%s__offsetHeight"), 10000)
12- let periodOffsetHeight = valueOrElse(getInteger(l2mpStakingAddress, "%s__periodLength"), -1)
13- if ((periodOffsetHeight == -1))
14- then throw("not yet")
15- else {
16- let currentPeriodId = if (if ((HEIGHT > periodOffsetHeight))
17- then (periodOffsetHeight != -1)
18- else false)
19- then (((HEIGHT - periodOffsetHeight) / periodLength) + periodOffsetId)
20- else max([0, (periodOffsetId - 1)])
21- let currentPeriodHeight = if (if ((periodOffsetHeight == -1))
22- then true
23- else if ((currentPeriodId == 0))
24- then (periodOffsetHeight > HEIGHT)
11+func fillPeriod () = if ((i.caller != CallerAddress))
12+ then throw("Access denied")
13+ else {
14+ let periodOffsetId = valueOrElse(getInteger(L2MpStakingAddress, "%s__offsetId"), 0)
15+ let periodLength = valueOrElse(getInteger(L2MpStakingAddress, "%s__offsetHeight"), 10000)
16+ let periodOffsetHeight = valueOrElse(getInteger(L2MpStakingAddress, "%s__periodLength"), -1)
17+ if ((periodOffsetHeight == -1))
18+ then throw("not yet")
19+ else {
20+ let currentPeriodId = if (if ((HEIGHT > periodOffsetHeight))
21+ then (periodOffsetHeight != -1)
2522 else false)
26- then 0
27- else (periodOffsetHeight + ((currentPeriodId - periodOffsetId) * periodLength))
28- let nextPeriodHeight = if (if ((periodOffsetHeight == -1))
29- then true
30- else if ((currentPeriodId == 0))
31- then (periodOffsetHeight > HEIGHT)
32- else false)
33- then 0
34- else (currentPeriodHeight + periodLength)
35- let lastStoredPeriodId = valueOrElse(getInteger(this, "lastPeriodId"), 0)
36- let key = ((("period_" + toString(currentPeriodHeight)) + "_") + toString((nextPeriodHeight - 1)))
37- let currentStoredPeriodId = valueOrElse(getInteger(this, key), -1)
38- if ((currentStoredPeriodId != -1))
39- then throw("already stored")
40- else [IntegerEntry(key, lastStoredPeriodId), IntegerEntry("lastPeriodId", (lastStoredPeriodId + 1))]
41- }
42- }
23+ then (((HEIGHT - periodOffsetHeight) / periodLength) + periodOffsetId)
24+ else max([0, (periodOffsetId - 1)])
25+ let currentPeriodHeight = if (if ((periodOffsetHeight == -1))
26+ then true
27+ else if ((currentPeriodId == 0))
28+ then (periodOffsetHeight > HEIGHT)
29+ else false)
30+ then 0
31+ else (periodOffsetHeight + ((currentPeriodId - periodOffsetId) * periodLength))
32+ let nextPeriodHeight = if (if ((periodOffsetHeight == -1))
33+ then true
34+ else if ((currentPeriodId == 0))
35+ then (periodOffsetHeight > HEIGHT)
36+ else false)
37+ then 0
38+ else (currentPeriodHeight + periodLength)
39+ let lastStoredPeriodId = valueOrElse(getInteger(this, "lastPeriodId"), 0)
40+ let key = ((("period_" + toString(currentPeriodHeight)) + "_") + toString((nextPeriodHeight - 1)))
41+ let currentStoredPeriodId = valueOrElse(getInteger(this, key), -1)
42+ if ((currentStoredPeriodId != -1))
43+ then throw("already stored")
44+ else [IntegerEntry(key, lastStoredPeriodId), IntegerEntry("lastPeriodId", (lastStoredPeriodId + 1))]
45+ }
46+ }
4347
4448
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let HEIGHT = height
55
6-let l2mpStakingAddress = Address(base58'3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h')
6+let CallerAddress = Address(base58'3NC2Xn1tUKEc7YxJS9oxdtY4x5NaQHhpH2e')
7+
8+let L2MpStakingAddress = Address(base58'3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h')
79
810 @Callable(i)
9-func fillPeriod () = {
10- let periodOffsetId = valueOrElse(getInteger(l2mpStakingAddress, "%s__offsetId"), 0)
11- let periodLength = valueOrElse(getInteger(l2mpStakingAddress, "%s__offsetHeight"), 10000)
12- let periodOffsetHeight = valueOrElse(getInteger(l2mpStakingAddress, "%s__periodLength"), -1)
13- if ((periodOffsetHeight == -1))
14- then throw("not yet")
15- else {
16- let currentPeriodId = if (if ((HEIGHT > periodOffsetHeight))
17- then (periodOffsetHeight != -1)
18- else false)
19- then (((HEIGHT - periodOffsetHeight) / periodLength) + periodOffsetId)
20- else max([0, (periodOffsetId - 1)])
21- let currentPeriodHeight = if (if ((periodOffsetHeight == -1))
22- then true
23- else if ((currentPeriodId == 0))
24- then (periodOffsetHeight > HEIGHT)
11+func fillPeriod () = if ((i.caller != CallerAddress))
12+ then throw("Access denied")
13+ else {
14+ let periodOffsetId = valueOrElse(getInteger(L2MpStakingAddress, "%s__offsetId"), 0)
15+ let periodLength = valueOrElse(getInteger(L2MpStakingAddress, "%s__offsetHeight"), 10000)
16+ let periodOffsetHeight = valueOrElse(getInteger(L2MpStakingAddress, "%s__periodLength"), -1)
17+ if ((periodOffsetHeight == -1))
18+ then throw("not yet")
19+ else {
20+ let currentPeriodId = if (if ((HEIGHT > periodOffsetHeight))
21+ then (periodOffsetHeight != -1)
2522 else false)
26- then 0
27- else (periodOffsetHeight + ((currentPeriodId - periodOffsetId) * periodLength))
28- let nextPeriodHeight = if (if ((periodOffsetHeight == -1))
29- then true
30- else if ((currentPeriodId == 0))
31- then (periodOffsetHeight > HEIGHT)
32- else false)
33- then 0
34- else (currentPeriodHeight + periodLength)
35- let lastStoredPeriodId = valueOrElse(getInteger(this, "lastPeriodId"), 0)
36- let key = ((("period_" + toString(currentPeriodHeight)) + "_") + toString((nextPeriodHeight - 1)))
37- let currentStoredPeriodId = valueOrElse(getInteger(this, key), -1)
38- if ((currentStoredPeriodId != -1))
39- then throw("already stored")
40- else [IntegerEntry(key, lastStoredPeriodId), IntegerEntry("lastPeriodId", (lastStoredPeriodId + 1))]
41- }
42- }
23+ then (((HEIGHT - periodOffsetHeight) / periodLength) + periodOffsetId)
24+ else max([0, (periodOffsetId - 1)])
25+ let currentPeriodHeight = if (if ((periodOffsetHeight == -1))
26+ then true
27+ else if ((currentPeriodId == 0))
28+ then (periodOffsetHeight > HEIGHT)
29+ else false)
30+ then 0
31+ else (periodOffsetHeight + ((currentPeriodId - periodOffsetId) * periodLength))
32+ let nextPeriodHeight = if (if ((periodOffsetHeight == -1))
33+ then true
34+ else if ((currentPeriodId == 0))
35+ then (periodOffsetHeight > HEIGHT)
36+ else false)
37+ then 0
38+ else (currentPeriodHeight + periodLength)
39+ let lastStoredPeriodId = valueOrElse(getInteger(this, "lastPeriodId"), 0)
40+ let key = ((("period_" + toString(currentPeriodHeight)) + "_") + toString((nextPeriodHeight - 1)))
41+ let currentStoredPeriodId = valueOrElse(getInteger(this, key), -1)
42+ if ((currentStoredPeriodId != -1))
43+ then throw("already stored")
44+ else [IntegerEntry(key, lastStoredPeriodId), IntegerEntry("lastPeriodId", (lastStoredPeriodId + 1))]
45+ }
46+ }
4347
4448

github/deemru/w8io/786bc32 
24.81 ms