tx · 4qnRHdcZffviYiMBbK3JiwXPtoQg1xLJZMskRp6m18mU

3N9K49ZpyQLL9gJjVdxQhu37f8YZdAzakR1:  -0.01000000 Waves

2022.05.18 10:14 [2056782] smart account 3N9K49ZpyQLL9gJjVdxQhu37f8YZdAzakR1 > SELF 0.00000000 Waves

{ "type": 13, "id": "4qnRHdcZffviYiMBbK3JiwXPtoQg1xLJZMskRp6m18mU", "fee": 1000000, "feeAssetId": null, "timestamp": 1652858106720, "version": 2, "chainId": 84, "sender": "3N9K49ZpyQLL9gJjVdxQhu37f8YZdAzakR1", "senderPublicKey": "8rTCUHVm1p6iEchTjpJ1a7SbCaayaRrp4FegpAsirYag", "proofs": [ "5kyVq7WLwmE5Jkf4ZR2W7j2MtnmoP4m6eAmzhFjGYtHzULz2nPR2HWGSg96opJAKWwExiAzzZEVeiTikrn9Rberq" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIICAAAAA4AAAAADVBBWU1FTlRfQVNTRVQBAAAAIK2dSBaFkXln78NKeoaZ0d1Q6QVJPOT+QERHjOGDxML0AAAAAAxSRVdBUkRfQVNTRVQBAAAAIC03E4HTJDddn+FvdtPRD5PvLCz03YmtXEpW6HzJAXIbAAAAAAZwaXhlbHMFAAAADFJFV0FSRF9BU1NFVAAAAAAEeE1JTgAAAAAAAAAAAAAAAAAEeE1BWAAAAAAAAAAEsQAAAAAEeU1JTgAAAAAAAAAAAAAAAAAEeU1BWAAAAAAAAAACWQAAAAANUkVXQVJEX0FNT1VOVAAAAAAABfXhAAAAAAAUUkVXQVJEX1BPT0xfRElWSVNJT04AAAAAAAAAAAQAAAAAElRPX1RIRV9SRVdBUkRfUE9PTAkAAGkAAAACBQAAAA1SRVdBUkRfQU1PVU5UBQAAABRSRVdBUkRfUE9PTF9ESVZJU0lPTgAAAAAMU1RBUlRfSEVJR0hUAAAAAAAAHvH0AAAAAApFTkRfSEVJR0hUCQAAZAAAAAIFAAAADFNUQVJUX0hFSUdIVAkAAGgAAAACAAAAA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GF5bWVudCBhbW91bnQgb3IgYXNzZXQJAAACAAAAAQIAAAAOb3V0IG9mIGNvbnRleHQJAAACAAAAAQIAAAALd3JvbmcgY29sb3IJAAACAAAAAQIAAAAcZ2FtZSBpcyBub3QgYWN0aXZlIHJpZ2h0IG5vdwAAAADwRFRm", "height": 2056782, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Gs88oAQvtkpTRnjQFsrF5GezNL7fh5CnoUVD5P4Nd81z Next: 4dj42gwoP8PmJ1skb67H6qwZ9PT4FNWyn7dUpNbkEGZ3 Diff:
OldNewDifferences
44 let PAYMENT_ASSET = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh'
55
66 let REWARD_ASSET = base58'43W4FcqA1rEpSmUGHoGiXvpSLfhadws9LS5j3SJsKxxS'
7-
8-let REWARD_POOL = Address(base58'3N4FJncKAHRAiEz6Thz2FLpVSDnRR3w15xV')
97
108 let pixels = REWARD_ASSET
119
8482 let amount = valueOrElse(parseInt(splitRewardData[0]), 0)
8583 let lastRewardBlock = valueOrElse(parseInt(splitRewardData[1]), height)
8684 let newAmount = (amount + rewardAmount)
87-[StringEntry(wallet, veri), StringEntry(rewardKey, ((toString(newAmount) + "_") + toString(height))), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels), ScriptTransfer(REWARD_POOL, TO_THE_REWARD_POOL, pixels)]
85+[StringEntry(wallet, veri), StringEntry(rewardKey, ((toString(newAmount) + "_") + toString(height))), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels)]
8886 }
8987 else throw("Wrong payment amount or asset")
9088 else throw("out of context")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let PAYMENT_ASSET = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh'
55
66 let REWARD_ASSET = base58'43W4FcqA1rEpSmUGHoGiXvpSLfhadws9LS5j3SJsKxxS'
7-
8-let REWARD_POOL = Address(base58'3N4FJncKAHRAiEz6Thz2FLpVSDnRR3w15xV')
97
108 let pixels = REWARD_ASSET
119
1210 let xMIN = 0
1311
1412 let xMAX = 1201
1513
1614 let yMIN = 0
1715
1816 let yMAX = 601
1917
2018 let REWARD_AMOUNT = 100000000
2119
2220 let REWARD_POOL_DIVISION = 4
2321
2422 let TO_THE_REWARD_POOL = (REWARD_AMOUNT / REWARD_POOL_DIVISION)
2523
2624 let START_HEIGHT = 2028020
2725
2826 let END_HEIGHT = (START_HEIGHT + (1440 * 30))
2927
3028 let colors = ["000", "fff", "000000", "ffffff", "FF0200", "800080", "FF00FF", "008001", "FEFF00", "020080", "0800FF", "183937", "09FEFF", "7076E9", "C0C0C0", "C3103B", "ff0200", "ff00ff", "feff00", "0800ff", "09feff", "7076e9", "c0c0c0", "c3103b"]
3129
3230 func isPaymentOk (i) = {
3331 let acceptableAssetId = PAYMENT_ASSET
3432 if ((size(i.payments) == 0))
3533 then throw("Payment not attached")
3634 else {
3735 let p = i.payments[0]
3836 match p.assetId {
3937 case assetId: ByteVector =>
4038 if ((assetId == acceptableAssetId))
4139 then (p.amount == 1000000)
4240 else false
4341 case _ =>
4442 throw("Wrong payment asset")
4543 }
4644 }
4745 }
4846
4947
5048 @Callable(i)
5149 func coordinates (veri,xy) = if (if ((height > START_HEIGHT))
5250 then (END_HEIGHT > height)
5351 else false)
5452 then {
5553 let color = containsElement(colors, veri)
5654 if (color)
5755 then {
5856 let currentKey = toBase58String(i.caller.bytes)
5957 let splitter = split(xy, "_")
6058 let x = valueOrElse(parseInt(splitter[0]), 0)
6159 let y = valueOrElse(parseInt(splitter[1]), 0)
6260 if (if (((x % 8) != 0))
6361 then ((y % 8) != 0)
6462 else false)
6563 then throw("not cool.")
6664 else {
6765 let xy_new = ((toString(x) + "_") + toString(y))
6866 let wallet = (((currentKey + "_") + xy_new) + "_c")
6967 if (if (if (if ((x >= xMIN))
7068 then (xMAX > x)
7169 else false)
7270 then (y >= yMIN)
7371 else false)
7472 then (yMAX > y)
7573 else false)
7674 then if (isPaymentOk(i))
7775 then {
7876 let rewardKey = "reward_pool"
7977 let rewardAmount = TO_THE_REWARD_POOL
8078 let rewardHeight = height
8179 let rewardPoolIfEmpty = ("0_" + toString(height))
8280 let rewardData = valueOrElse(getString(this, "reward_pool"), rewardPoolIfEmpty)
8381 let splitRewardData = split(rewardData, "_")
8482 let amount = valueOrElse(parseInt(splitRewardData[0]), 0)
8583 let lastRewardBlock = valueOrElse(parseInt(splitRewardData[1]), height)
8684 let newAmount = (amount + rewardAmount)
87-[StringEntry(wallet, veri), StringEntry(rewardKey, ((toString(newAmount) + "_") + toString(height))), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels), ScriptTransfer(REWARD_POOL, TO_THE_REWARD_POOL, pixels)]
85+[StringEntry(wallet, veri), StringEntry(rewardKey, ((toString(newAmount) + "_") + toString(height))), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels)]
8886 }
8987 else throw("Wrong payment amount or asset")
9088 else throw("out of context")
9189 }
9290 }
9391 else throw("wrong color")
9492 }
9593 else throw("game is not active right now")
9694
9795

github/deemru/w8io/026f985 
26.19 ms