tx · 2qttdA8FW2zeUWqJu5FiAWrqsYNQuDR4cMy6C5mmdedD

3MzgLbskN82suZgkmqTvzQxDtZfjQfX1DLp:  -0.00100000 Waves

2024.11.11 04:12 [3366109] smart account 3MzgLbskN82suZgkmqTvzQxDtZfjQfX1DLp > SELF 0.00000000 Waves

{ "type": 13, "id": "2qttdA8FW2zeUWqJu5FiAWrqsYNQuDR4cMy6C5mmdedD", "fee": 100000, "feeAssetId": null, "timestamp": 1731287590162, "version": 1, "sender": "3MzgLbskN82suZgkmqTvzQxDtZfjQfX1DLp", "senderPublicKey": "B5p5JF1Hn7k2YwGxQxgFre8bM5pd7N2c6wPdyKdLzzd6", "proofs": [ "4RS6z6rACMJ5z7Jv7xBTbgX3PJjJTxVyQDQg9WWNVFjctYSrMCYmCGmBf6CZGWjkQK5bToMDtAVD7VAqvhRPxac" ], "script": "base64:CAIHCAISAwoBCAABAWkBGGNoZWNrQW5kSW5jcmVtZW50Q291bnRlcgEIZnVuY05hbWUECWhvdXJseUtleQkArAICBQhmdW5jTmFtZQIOX2hvdXJseVR4Q291bnQECGRhaWx5S2V5CQCsAgIFCGZ1bmNOYW1lAg1fZGFpbHlUeENvdW50BA1ob3VybHlUeENvdW50BAckbWF0Y2gwCQCaCAIFBHRoaXMFCWhvdXJseUtleQMJAAECBQckbWF0Y2gwAgNJbnQEAWEFByRtYXRjaDAFAWEAAAQMZGFpbHlUeENvdW50BAckbWF0Y2gwCQCaCAIFBHRoaXMFCGRhaWx5S2V5AwkAAQIFByRtYXRjaDACA0ludAQBYQUHJG1hdGNoMAUBYQAABAtob3VybHlMaW1pdABkBApkYWlseUxpbWl0AMgBAwkAZwIFDWhvdXJseVR4Q291bnQFC2hvdXJseUxpbWl0CQACAQIVSG91cmx5IGxpbWl0IGV4Y2VlZGVkAwkAZwIFDGRhaWx5VHhDb3VudAUKZGFpbHlMaW1pdAkAAgECFERhaWx5IGxpbWl0IGV4Y2VlZGVkBA5uZXdIb3VybHlDb3VudAkAZAIFDWhvdXJseVR4Q291bnQAAQQNbmV3RGFpbHlDb3VudAkAZAIFDGRhaWx5VHhDb3VudAABBA11cGRhdGVSZXN1bHRzCQDMCAIJAQxJbnRlZ2VyRW50cnkCBQlob3VybHlLZXkFDm5ld0hvdXJseUNvdW50CQDMCAIJAQxJbnRlZ2VyRW50cnkCBQhkYWlseUtleQUNbmV3RGFpbHlDb3VudAkAzAgCCQEMQm9vbGVhbkVudHJ5AgIYY2hlY2tBbmRJbmNyZW1lbnRDb3VudGVyBgUDbmlsBAtjaGVja0hvdXJseQkAmggCBQR0aGlzBQlob3VybHlLZXkECmNoZWNrRGFpbHkJAJoIAgUEdGhpcwUIZGFpbHlLZXkEByRtYXRjaDAFC2NoZWNrSG91cmx5AwkAAQIFByRtYXRjaDACA0ludAQBYQUHJG1hdGNoMAQHJG1hdGNoMQUKY2hlY2tEYWlseQMJAAECBQckbWF0Y2gxAgNJbnQEAWIFByRtYXRjaDEDAwkAAAIFAWEFDm5ld0hvdXJseUNvdW50CQAAAgUBYgUNbmV3RGFpbHlDb3VudAcFDXVwZGF0ZVJlc3VsdHMJAAIBAhJEYXRhIHVwZGF0ZSBmYWlsZWQJAAIBAhlGYWlsZWQgdG8gZ2V0IGRhaWx5IGNvdW50CQACAQIaRmFpbGVkIHRvIGdldCBob3VybHkgY291bnQAe2Z13g==", "chainId": 84, "height": 3366109, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5SX2a6whCeTiSWiFwFXefmbT8w4cnU9Rrt5RnGWVAL19 Next: 6aLMzw8QnK8tXCmDdAWjHbJB38jttvpeRFViZYRv6ij7 Diff:
OldNewDifferences
1919 case _ =>
2020 0
2121 }
22- let hourlyLimit = 1
23- let dailyLimit = 2
22+ let hourlyLimit = 100
23+ let dailyLimit = 200
2424 if ((hourlyTxCount >= hourlyLimit))
2525 then throw("Hourly limit exceeded")
2626 else if ((dailyTxCount >= dailyLimit))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 8 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func checkAndIncrementCounter (funcName) = {
88 let hourlyKey = (funcName + "_hourlyTxCount")
99 let dailyKey = (funcName + "_dailyTxCount")
1010 let hourlyTxCount = match getInteger(this, hourlyKey) {
1111 case a: Int =>
1212 a
1313 case _ =>
1414 0
1515 }
1616 let dailyTxCount = match getInteger(this, dailyKey) {
1717 case a: Int =>
1818 a
1919 case _ =>
2020 0
2121 }
22- let hourlyLimit = 1
23- let dailyLimit = 2
22+ let hourlyLimit = 100
23+ let dailyLimit = 200
2424 if ((hourlyTxCount >= hourlyLimit))
2525 then throw("Hourly limit exceeded")
2626 else if ((dailyTxCount >= dailyLimit))
2727 then throw("Daily limit exceeded")
2828 else {
2929 let newHourlyCount = (hourlyTxCount + 1)
3030 let newDailyCount = (dailyTxCount + 1)
3131 let updateResults = [IntegerEntry(hourlyKey, newHourlyCount), IntegerEntry(dailyKey, newDailyCount), BooleanEntry("checkAndIncrementCounter", true)]
3232 let checkHourly = getInteger(this, hourlyKey)
3333 let checkDaily = getInteger(this, dailyKey)
3434 match checkHourly {
3535 case a: Int =>
3636 match checkDaily {
3737 case b: Int =>
3838 if (if ((a == newHourlyCount))
3939 then (b == newDailyCount)
4040 else false)
4141 then updateResults
4242 else throw("Data update failed")
4343 case _ =>
4444 throw("Failed to get daily count")
4545 }
4646 case _ =>
4747 throw("Failed to get hourly count")
4848 }
4949 }
5050 }
5151
5252

github/deemru/w8io/026f985 
15.18 ms