tx · Bj8ozJGLjpXRX6GryS6z8JrfdQp18B9q19SCkhcb9E3S

3MzgLbskN82suZgkmqTvzQxDtZfjQfX1DLp:  -0.00100000 Waves

2024.11.11 01:59 [3365983] smart account 3MzgLbskN82suZgkmqTvzQxDtZfjQfX1DLp > SELF 0.00000000 Waves

{ "type": 13, "id": "Bj8ozJGLjpXRX6GryS6z8JrfdQp18B9q19SCkhcb9E3S", "fee": 100000, "feeAssetId": null, "timestamp": 1731279612935, "version": 1, "sender": "3MzgLbskN82suZgkmqTvzQxDtZfjQfX1DLp", "senderPublicKey": "B5p5JF1Hn7k2YwGxQxgFre8bM5pd7N2c6wPdyKdLzzd6", "proofs": [ "3i2sbB6c12zLaX6GexeVNXUK6GjrU6B9LEFtFwSvgZpkLccnCNwe5trqmczkvuP88ZXoDE7jP6Uq7Uz92tJscaG4" ], "script": "base64:CAIHCAISAwoBCAABAWkBGGNoZWNrQW5kSW5jcmVtZW50Q291bnRlcgEIZnVuY05hbWUECWhvdXJseUtleQkArAICBQhmdW5jTmFtZQIOX2hvdXJseVR4Q291bnQECGRhaWx5S2V5CQCsAgIFCGZ1bmNOYW1lAg1fZGFpbHlUeENvdW50BA1ob3VybHlUeENvdW50BAckbWF0Y2gwCQCaCAIFBHRoaXMFCWhvdXJseUtleQMJAAECBQckbWF0Y2gwAgNJbnQEAWEFByRtYXRjaDAFAWEAAAQMZGFpbHlUeENvdW50BAckbWF0Y2gwCQCaCAIFBHRoaXMFCGRhaWx5S2V5AwkAAQIFByRtYXRjaDACA0ludAQBYQUHJG1hdGNoMAUBYQAABAtob3VybHlMaW1pdAABBApkYWlseUxpbWl0AAIDCQBnAgUNaG91cmx5VHhDb3VudAULaG91cmx5TGltaXQJAAIBAhVIb3VybHkgbGltaXQgZXhjZWVkZWQDCQBnAgUMZGFpbHlUeENvdW50BQpkYWlseUxpbWl0CQACAQIURGFpbHkgbGltaXQgZXhjZWVkZWQEDm5ld0hvdXJseUNvdW50CQBkAgUNaG91cmx5VHhDb3VudAABBA1uZXdEYWlseUNvdW50CQBkAgUMZGFpbHlUeENvdW50AAEJAMwIAgkBDEludGVnZXJFbnRyeQIFCWhvdXJseUtleQUObmV3SG91cmx5Q291bnQJAMwIAgkBDEludGVnZXJFbnRyeQIFCGRhaWx5S2V5BQ1uZXdEYWlseUNvdW50CQDMCAIJAQxCb29sZWFuRW50cnkCAgZzdGF0dXMGCQDMCAIJAQxJbnRlZ2VyRW50cnkCAg5uZXdIb3VybHlDb3VudAUObmV3SG91cmx5Q291bnQJAMwIAgkBC1N0cmluZ0VudHJ5AgIHbWVzc2FnZQIWVHJhbnNhY3Rpb24gc3VjY2Vzc2Z1bAUDbmlsANtJINE=", "chainId": 84, "height": 3365983, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: CfgCYotALxRXTnzyYeyG3qhrCzh3naEXQJ17puEEucsr Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 8 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+
5+
6+@Callable(i)
7+func checkAndIncrementCounter (funcName) = {
8+ let hourlyKey = (funcName + "_hourlyTxCount")
9+ let dailyKey = (funcName + "_dailyTxCount")
10+ let hourlyTxCount = match getInteger(this, hourlyKey) {
11+ case a: Int =>
12+ a
13+ case _ =>
14+ 0
15+ }
16+ let dailyTxCount = match getInteger(this, dailyKey) {
17+ case a: Int =>
18+ a
19+ case _ =>
20+ 0
21+ }
22+ let hourlyLimit = 1
23+ let dailyLimit = 2
24+ if ((hourlyTxCount >= hourlyLimit))
25+ then throw("Hourly limit exceeded")
26+ else if ((dailyTxCount >= dailyLimit))
27+ then throw("Daily limit exceeded")
28+ else {
29+ let newHourlyCount = (hourlyTxCount + 1)
30+ let newDailyCount = (dailyTxCount + 1)
31+[IntegerEntry(hourlyKey, newHourlyCount), IntegerEntry(dailyKey, newDailyCount), BooleanEntry("status", true), IntegerEntry("newHourlyCount", newHourlyCount), StringEntry("message", "Transaction successful")]
32+ }
33+ }
34+
35+

github/deemru/w8io/026f985 
12.33 ms