tx · 3ZCYgYoS7Er6kSoZ87K4dWK1p2WvTG7iHfS4ySvSFxpX

3N9K49ZpyQLL9gJjVdxQhu37f8YZdAzakR1:  -0.01000000 Waves

2022.05.18 11:21 [2056853] smart account 3N9K49ZpyQLL9gJjVdxQhu37f8YZdAzakR1 > SELF 0.00000000 Waves

{ "type": 13, "id": "3ZCYgYoS7Er6kSoZ87K4dWK1p2WvTG7iHfS4ySvSFxpX", "fee": 1000000, "feeAssetId": null, "timestamp": 1652862102380, "version": 2, "chainId": 84, "sender": "3N9K49ZpyQLL9gJjVdxQhu37f8YZdAzakR1", "senderPublicKey": "8rTCUHVm1p6iEchTjpJ1a7SbCaayaRrp4FegpAsirYag", "proofs": [ "5cjMPQBCivPCANFxMmTB3PgGcN2TuckKfw2MzTfNf4AQmmAP6oAPWEicKLHThWkBVBQUXZohw73BttMyxusjQg3T" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIICAAAAA8AAAAADVBBWU1FTlRfQVNTRVQBAAAAIK2dSBaFkXln78NKeoaZ0d1Q6QVJPOT+QERHjOGDxML0AAAAAAxSRVdBUkRfQVNTRVQBAAAAIC03E4HTJDddn+FvdtPRD5PvLCz03YmtXEpW6HzJAXIbAAAAABBTVEFLSU5HX0NPTlRSQUNUCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUjw3ifhq9EIoKzVKH33tj+QNuo3mChI2IAAAAAAZwaXhlbHMFAAAADFJFV0FSRF9BU1NFVAAAAAAEeE1JTgAAAAAAAAAAAAAAAAAEeE1BWAAAAAAAAAAEsQAAAAAEeU1JTgAAAAAAAAAAAAAAAAAEeU1BWAAAAAAAAAACWQAAAAANUkVXQVJEX0FNT1VOVAAAAAAABfXhAAAAAAAUUkVXQVJEX1BPT0xfRElWSVNJT04AAAAAAAAAAAQAAAAAElRPX1RIRV9SRVdBUkRfUE9PTAkAAGkAAAACBQAAAA1SRVdBUkRfQU1PVU5UBQAAABRSRVdBUkRfUE9PTF9ESVZJU0lPTgAAAAAM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EFZTUVOVF9BU1NFVAUAAAASVE9fVEhFX1JFV0FSRF9QT09MBQAAAANuaWwDCQAAAAAAAAIFAAAAA3JlcwUAAAADcmVzBAAAAAckbWF0Y2gwBQAAAANyZXMEAAAAAXIFAAAAByRtYXRjaDAJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAA1SRVdBUkRfQU1PVU5UBQAAAAZwaXhlbHMJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAAGd2FsbGV0BQAAAAR2ZXJpCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIFAAAACXJld2FyZEtleQkAASwAAAACCQABLAAAAAIJAAGkAAAAAQUAAAAJbmV3QW1vdW50AgAAAAFfCQABpAAAAAEFAAAABmhlaWdodAUAAAADbmlsCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAAIAAAABAgAAAB1Xcm9uZyBwYXltZW50IGFtb3VudCBvciBhc3NldAkAAAIAAAABAgAAAA5vdXQgb2YgY29udGV4dAkAAAIAAAABAgAAAAt3cm9uZyBjb2xvcgkAAAIAAAABAgAAABxnYW1lIGlzIG5vdCBhY3RpdmUgcmlnaHQgbm93AAAAABWtASw=", "height": 2056853, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C4Yrn9JEDYQqf53XaKB9ADZ7W4Uie3dK5dZGUoovGzeo Next: C5uE7yvEZAgLQFPEvixbb9CAS3Z64sB8pbngZsVMhQhf Diff:
OldNewDifferences
8888 let res = invoke(STAKING_CONTRACT, "rewardPool", [insert], [AttachedPayment(PAYMENT_ASSET, TO_THE_REWARD_POOL)])
8989 if ((res == res))
9090 then match res {
91- case r: Boolean =>
91+ case r =>
9292 [ScriptTransfer(i.caller, REWARD_AMOUNT, pixels), StringEntry(wallet, veri), StringEntry(rewardKey, ((toString(newAmount) + "_") + toString(height)))]
93- case _ =>
94- throw("Incorrect invoke result")
9593 }
9694 else throw("Strict value is not equal to itself.")
9795 }
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 STAKING_CONTRACT = Address(base58'3N2xV35dmGG8EYfhNfdKBPBq2xoSKHkmYxf')
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")
6969 if (if (if (if ((x >= xMIN))
7070 then (xMAX > x)
7171 else false)
7272 then (y >= yMIN)
7373 else false)
7474 then (yMAX > y)
7575 else false)
7676 then if (isPaymentOk(i))
7777 then {
7878 let rewardKey = "reward_pool"
7979 let rewardAmount = TO_THE_REWARD_POOL
8080 let rewardHeight = height
8181 let rewardPoolIfEmpty = ("0_" + toString(height))
8282 let rewardData = valueOrElse(getString(this, "reward_pool"), rewardPoolIfEmpty)
8383 let splitRewardData = split(rewardData, "_")
8484 let amount = valueOrElse(parseInt(splitRewardData[0]), 0)
8585 let lastRewardBlock = valueOrElse(parseInt(splitRewardData[1]), height)
8686 let newAmount = (amount + rewardAmount)
8787 let insert = ((toString(newAmount) + "_") + toString(height))
8888 let res = invoke(STAKING_CONTRACT, "rewardPool", [insert], [AttachedPayment(PAYMENT_ASSET, TO_THE_REWARD_POOL)])
8989 if ((res == res))
9090 then match res {
91- case r: Boolean =>
91+ case r =>
9292 [ScriptTransfer(i.caller, REWARD_AMOUNT, pixels), StringEntry(wallet, veri), StringEntry(rewardKey, ((toString(newAmount) + "_") + toString(height)))]
93- case _ =>
94- throw("Incorrect invoke result")
9593 }
9694 else throw("Strict value is not equal to itself.")
9795 }
9896 else throw("Wrong payment amount or asset")
9997 else throw("out of context")
10098 }
10199 }
102100 else throw("wrong color")
103101 }
104102 else throw("game is not active right now")
105103
106104

github/deemru/w8io/026f985 
31.08 ms