tx · 4dj42gwoP8PmJ1skb67H6qwZ9PT4FNWyn7dUpNbkEGZ3

3N9K49ZpyQLL9gJjVdxQhu37f8YZdAzakR1:  -0.01000000 Waves

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

{ "type": 13, "id": "4dj42gwoP8PmJ1skb67H6qwZ9PT4FNWyn7dUpNbkEGZ3", "fee": 1000000, "feeAssetId": null, "timestamp": 1652858129758, "version": 2, "chainId": 84, "sender": "3N9K49ZpyQLL9gJjVdxQhu37f8YZdAzakR1", "senderPublicKey": "8rTCUHVm1p6iEchTjpJ1a7SbCaayaRrp4FegpAsirYag", "proofs": [ "wFLwJUNKamXKX5Kne9qW8BUUavw4KFcxNcDQuE4MTPSUswFUwaavrANsYYC8rNsCkKzph18eJUC6d5QciF1XkDU" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIICAAAAA4AAAAADVBBWU1FTlRfQVNTRVQBAAAAIK2dSBaFkXln78NKeoaZ0d1Q6QVJPOT+QERHjOGDxML0AAAAAAxSRVdBUkRfQVNTRVQBAAAAIC03E4HTJDddn+FvdtPRD5PvLCz03YmtXEpW6HzJAXIbAAAAAAZwaXhlbHMFAAAADFJFV0FSRF9BU1NFVAAAAAAEeE1JTgAAAAAAAAAAAAAAAAAEeE1BWAAAAAAAAAAEsQAAAAAEeU1JTgAAAAAAAAAAAAAAAAAEeU1BWAAAAAAAAAACWQAAAAANUkVXQVJEX0FNT1VOVAAAAAAABfXhAAAAAAAUUkVXQVJEX1BPT0xfRElWSVNJT04AAAAAAAAAAAQAAAAAElRPX1RIRV9SRVdBUkRfUE9PTAkAAGkAAAACBQAAAA1SRVdBUkRfQU1PVU5UBQAAABRSRVdBUkRfUE9PTF9ESVZJU0lPTgAAAAAMU1RBUlRfSEVJR0hUAAAAAAAAHvH0AAAAAApFTkRfSEVJR0hUCQAAZAAAAAIFAAAADFNUQVJUX0hFSUdIVAkAAGgAAAACAA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cgcGF5bWVudCBhbW91bnQgb3IgYXNzZXQJAAACAAAAAQIAAAAOb3V0IG9mIGNvbnRleHQJAAACAAAAAQIAAAALd3JvbmcgY29sb3IJAAACAAAAAQIAAAAcZ2FtZSBpcyBub3QgYWN0aXZlIHJpZ2h0IG5vdwAAAADwRFRm", "height": 2056782, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4qnRHdcZffviYiMBbK3JiwXPtoQg1xLJZMskRp6m18mU Next: C4Yrn9JEDYQqf53XaKB9ADZ7W4Uie3dK5dZGUoovGzeo 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'
77
88 let pixels = REWARD_ASSET
99
1010 let xMIN = 0
1111
1212 let xMAX = 1201
1313
1414 let yMIN = 0
1515
1616 let yMAX = 601
1717
1818 let REWARD_AMOUNT = 100000000
1919
2020 let REWARD_POOL_DIVISION = 4
2121
2222 let TO_THE_REWARD_POOL = (REWARD_AMOUNT / REWARD_POOL_DIVISION)
2323
2424 let START_HEIGHT = 2028020
2525
2626 let END_HEIGHT = (START_HEIGHT + (1440 * 30))
2727
2828 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"]
2929
3030 func isPaymentOk (i) = {
3131 let acceptableAssetId = PAYMENT_ASSET
3232 if ((size(i.payments) == 0))
3333 then throw("Payment not attached")
3434 else {
3535 let p = i.payments[0]
3636 match p.assetId {
3737 case assetId: ByteVector =>
3838 if ((assetId == acceptableAssetId))
3939 then (p.amount == 1000000)
4040 else false
4141 case _ =>
4242 throw("Wrong payment asset")
4343 }
4444 }
4545 }
4646
4747
4848 @Callable(i)
4949 func coordinates (veri,xy) = if (if ((height > START_HEIGHT))
5050 then (END_HEIGHT > height)
5151 else false)
5252 then {
5353 let color = containsElement(colors, veri)
5454 if (color)
5555 then {
5656 let currentKey = toBase58String(i.caller.bytes)
5757 let splitter = split(xy, "_")
5858 let x = valueOrElse(parseInt(splitter[0]), 0)
5959 let y = valueOrElse(parseInt(splitter[1]), 0)
6060 if (if (((x % 8) != 0))
6161 then ((y % 8) != 0)
6262 else false)
6363 then throw("not cool.")
6464 else {
6565 let xy_new = ((toString(x) + "_") + toString(y))
6666 let wallet = (((currentKey + "_") + xy_new) + "_c")
6767 if (if (if (if ((x >= xMIN))
6868 then (xMAX > x)
6969 else false)
7070 then (y >= yMIN)
7171 else false)
7272 then (yMAX > y)
7373 else false)
7474 then if (isPaymentOk(i))
7575 then {
7676 let rewardKey = "reward_pool"
7777 let rewardAmount = TO_THE_REWARD_POOL
7878 let rewardHeight = height
7979 let rewardPoolIfEmpty = ("0_" + toString(height))
8080 let rewardData = valueOrElse(getString(this, "reward_pool"), rewardPoolIfEmpty)
8181 let splitRewardData = split(rewardData, "_")
8282 let amount = valueOrElse(parseInt(splitRewardData[0]), 0)
8383 let lastRewardBlock = valueOrElse(parseInt(splitRewardData[1]), height)
8484 let newAmount = (amount + rewardAmount)
8585 [StringEntry(wallet, veri), StringEntry(rewardKey, ((toString(newAmount) + "_") + toString(height))), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels)]
8686 }
8787 else throw("Wrong payment amount or asset")
8888 else throw("out of context")
8989 }
9090 }
9191 else throw("wrong color")
9292 }
9393 else throw("game is not active right now")
9494
9595

github/deemru/w8io/026f985 
29.53 ms