tx · EcTv8ZCcJzLP5PEcHwPXtHmzSMdbtRn4ujp6gHFKYRJE

3N9K49ZpyQLL9gJjVdxQhu37f8YZdAzakR1:  -0.01000000 Waves

2022.05.18 09:40 [2056745] smart account 3N9K49ZpyQLL9gJjVdxQhu37f8YZdAzakR1 > SELF 0.00000000 Waves

{ "type": 13, "id": "EcTv8ZCcJzLP5PEcHwPXtHmzSMdbtRn4ujp6gHFKYRJE", "fee": 1000000, "feeAssetId": null, "timestamp": 1652856021923, "version": 2, "chainId": 84, "sender": "3N9K49ZpyQLL9gJjVdxQhu37f8YZdAzakR1", "senderPublicKey": "8rTCUHVm1p6iEchTjpJ1a7SbCaayaRrp4FegpAsirYag", "proofs": [ "2rGbwCUu2dYGGkwCokqT83ZBVSQnGp5LgPm7rYTkJ9TqdzBD48KoK4Ci7SsHJgUmb3CEeZLzAqekG5z16dLSwqT4" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIICAAAAA8AAAAADVBBWU1FTlRfQVNTRVQBAAAAIK2dSBaFkXln78NKeoaZ0d1Q6QVJPOT+QERHjOGDxML0AAAAAAxSRVdBUkRfQVNTRVQBAAAAIC03E4HTJDddn+FvdtPRD5PvLCz03YmtXEpW6HzJAXIbAAAAAAtSRVdBUkRfUE9PTAkBAAAAB0FkZHJlc3MAAAABAQAAABoBVJ00hqklv478ne8n0oVf2PyDdQ6EiI/4wgAAAAAGcGl4ZWxzBQAAAAxSRVdBUkRfQVNTRVQAAAAABHhNSU4AAAAAAAAAAAAAAAAABHhNQVgAAAAAAAAABLEAAAAABHlNSU4AAAAAAAAAAAAAAAAABHlNQVgAAAAAAAAAAlkAAAAADVJFV0FSRF9BTU9VTlQAAAAAAAX14QAAAAAAFFJFV0FSRF9QT09MX0RJVklTSU9OAAAAAAAAAAAEAAAAABJUT19USEVfUkVXQVJEX1BPT0wJAABpAAAAAgUAAAANUkVXQVJEX0FNT1VOVAUAAAAUUkVXQVJEX1BPT0xfRElWSVNJT04AAAAADFNUQVJUX0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AADHJld2FyZEFtb3VudAUAAAASVE9fVEhFX1JFV0FSRF9QT09MBAAAAAxyZXdhcmRIZWlnaHQFAAAABmhlaWdodAQAAAARcmV3YXJkUG9vbElmRW1wdHkJAAEsAAAAAgIAAAACMF8JAAGkAAAAAQUAAAAGaGVpZ2h0BAAAAApyZXdhcmREYXRhCQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMCAAAAC3Jld2FyZF9wb29sBQAAABFyZXdhcmRQb29sSWZFbXB0eQMDAwMJAABnAAAAAgUAAAABeAUAAAAEeE1JTgkAAGYAAAACBQAAAAR4TUFYBQAAAAF4BwkAAGcAAAACBQAAAAF5BQAAAAR5TUlOBwkAAGYAAAACBQAAAAR5TUFYBQAAAAF5BwMJAQAAAAtpc1BheW1lbnRPawAAAAEFAAAAAWkJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAAGd2FsbGV0BQAAAAR2ZXJpCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAANUkVXQVJEX0FNT1VOVAUAAAAGcGl4ZWxzCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAC1JFV0FSRF9QT09MBQAAABJUT19USEVfUkVXQVJEX1BPT0wFAAAABnBpeGVscwUAAAADbmlsCQAAAgAAAAECAAAAHVdyb25nIHBheW1lbnQgYW1vdW50IG9yIGFzc2V0CQAAAgAAAAECAAAADm91dCBvZiBjb250ZXh0CQAAAgAAAAECAAAAC3dyb25nIGNvbG9yCQAAAgAAAAECAAAAHGdhbWUgaXMgbm90IGFjdGl2ZSByaWdodCBub3cAAAAAy0laFQ==", "height": 2056745, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FfrCHxMLbFi5A7mJRVQx2ny3Cv9m4SvvCHLQxa2ixEWY Next: DDhGDvVVXoZLtxAmJbQmzXf5twVmRRXZtDQiMVHC88gX Diff:
OldNewDifferences
6666 else {
6767 let xy_new = ((toString(x) + "_") + toString(y))
6868 let wallet = (((currentKey + "_") + xy_new) + "_c")
69+ let rewardKey = "reward_pool"
70+ let rewardAmount = TO_THE_REWARD_POOL
71+ let rewardHeight = height
72+ let rewardPoolIfEmpty = ("0_" + toString(height))
73+ let rewardData = valueOrElse(getString(this, "reward_pool"), rewardPoolIfEmpty)
6974 if (if (if (if ((x >= xMIN))
7075 then (xMAX > x)
7176 else false)
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 REWARD_POOL = Address(base58'3N4FJncKAHRAiEz6Thz2FLpVSDnRR3w15xV')
99
1010 let pixels = REWARD_ASSET
1111
1212 let xMIN = 0
1313
1414 let xMAX = 1201
1515
1616 let yMIN = 0
1717
1818 let yMAX = 601
1919
2020 let REWARD_AMOUNT = 100000000
2121
2222 let REWARD_POOL_DIVISION = 4
2323
2424 let TO_THE_REWARD_POOL = (REWARD_AMOUNT / REWARD_POOL_DIVISION)
2525
2626 let START_HEIGHT = 2028020
2727
2828 let END_HEIGHT = (START_HEIGHT + (1440 * 30))
2929
3030 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"]
3131
3232 func isPaymentOk (i) = {
3333 let acceptableAssetId = PAYMENT_ASSET
3434 if ((size(i.payments) == 0))
3535 then throw("Payment not attached")
3636 else {
3737 let p = i.payments[0]
3838 match p.assetId {
3939 case assetId: ByteVector =>
4040 if ((assetId == acceptableAssetId))
4141 then (p.amount == 1000000)
4242 else false
4343 case _ =>
4444 throw("Wrong payment asset")
4545 }
4646 }
4747 }
4848
4949
5050 @Callable(i)
5151 func coordinates (veri,xy) = if (if ((height > START_HEIGHT))
5252 then (END_HEIGHT > height)
5353 else false)
5454 then {
5555 let color = containsElement(colors, veri)
5656 if (color)
5757 then {
5858 let currentKey = toBase58String(i.caller.bytes)
5959 let splitter = split(xy, "_")
6060 let x = valueOrElse(parseInt(splitter[0]), 0)
6161 let y = valueOrElse(parseInt(splitter[1]), 0)
6262 if (if (((x % 8) != 0))
6363 then ((y % 8) != 0)
6464 else false)
6565 then throw("not cool.")
6666 else {
6767 let xy_new = ((toString(x) + "_") + toString(y))
6868 let wallet = (((currentKey + "_") + xy_new) + "_c")
69+ let rewardKey = "reward_pool"
70+ let rewardAmount = TO_THE_REWARD_POOL
71+ let rewardHeight = height
72+ let rewardPoolIfEmpty = ("0_" + toString(height))
73+ let rewardData = valueOrElse(getString(this, "reward_pool"), rewardPoolIfEmpty)
6974 if (if (if (if ((x >= xMIN))
7075 then (xMAX > x)
7176 else false)
7277 then (y >= yMIN)
7378 else false)
7479 then (yMAX > y)
7580 else false)
7681 then if (isPaymentOk(i))
7782 then [StringEntry(wallet, veri), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels), ScriptTransfer(REWARD_POOL, TO_THE_REWARD_POOL, pixels)]
7883 else throw("Wrong payment amount or asset")
7984 else throw("out of context")
8085 }
8186 }
8287 else throw("wrong color")
8388 }
8489 else throw("game is not active right now")
8590
8691

github/deemru/w8io/026f985 
22.34 ms