tx · Bgdm4soiajM5HHf7sZqpKUFXR55QeLV7zWJpuK7ETYif

3N1A95vbYuuE2ZFFUu6S1UubcE3eSpJNDE7:  -0.01000000 Waves

2022.11.09 14:32 [2309535] smart account 3N1A95vbYuuE2ZFFUu6S1UubcE3eSpJNDE7 > SELF 0.00000000 Waves

{ "type": 13, "id": "Bgdm4soiajM5HHf7sZqpKUFXR55QeLV7zWJpuK7ETYif", "fee": 1000000, "feeAssetId": null, "timestamp": 1667993583028, "version": 2, "chainId": 84, "sender": "3N1A95vbYuuE2ZFFUu6S1UubcE3eSpJNDE7", "senderPublicKey": "DTmTTp6Rb9XUrniBAnWwdNc39UfdmzmtFCBgey4hsnE", "proofs": [ "3r4gqvfkvF3mRkCxprpBipdg7nK2U89L4tMazM5DCgGRU7PGCq7fyF8rfX1gdHgfpJ7x7f1A8w1YRj8Yr2rhMmDS" ], "script": "base64:AAIFAAAAAAAAABkIAhIDCgEBEgUKAwEBARIDCgEEEgQKAggIAAAAEgAAAAANUEFZTUVOVF9BU1NFVAEAAAAgrZ1IFoWReWfvw0p6hpnR3VDpBUk85P5AREeM4YPEwvQAAAAADFJFV0FSRF9BU1NFVAEAAAAgITlE6Sl8X8+K+DOSOPUkvq8L9vq51QOPRS3GqFK/+rkAAAAABmFkbVB1YgEAAAAgAzE8E3rcXzF1OuMAzzMaXCnJteRr390CYXJiTeh4zHcAAAAABnBpeGVscwUAAAAMUkVXQVJEX0FTU0VUAAAAAAR4TUlOAAAAAAAAAAAAAAAAAAR4TUFYAAAAAAAAAASxAAAAAAR5TUlOAAAAAAAAAAAAAAAAAAR5TUFYAAAAAAAAAAJZAAAAAA1SRVdBUkRfQU1PVU5UAAAAAAAAD0JAAAAAAA5SRUlTU1VFX0FNT1VOVAAAAAAAABbjYAAAAAAMU1RBUlRfSEVJR0hUAAAAAAAAIw91AAAAAApFTkRfSEVJR0hUCQAAZAAAAAIFAAAADFNUQVJUX0hFSUdIVAkAAGgAAAACAAAAAAAAAAWgAAAAAA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ZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXmuJqWw", "height": 2309535, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8QeHooFcy7B7BNrugtGPFYtUEDRyEYX7FHVKosezBvS3 Next: EcHDeiVYvS4beYT3u6AEbvK1c9CSbjPNBNT2My8SThCk Diff:
OldNewDifferences
128128 }
129129
130130
131+@Verifier(tx)
132+func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
133+
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'3Eh6z6z6ouFpWxGKrPaPnZwmDnDjgYHV6tqCmZf2G7tk'
77
88 let admPub = base58'DTmTTp6Rb9XUrniBAnWwdNc39UfdmzmtFCBgey4hsnE'
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 = 1000000
2121
2222 let REISSUE_AMOUNT = 1500000
2323
2424 let START_HEIGHT = 2297717
2525
2626 let END_HEIGHT = (START_HEIGHT + (1440 * 7))
2727
2828 let paymentFee = 100000
2929
3030 let activeSessionKey = "active_session"
3131
3232 let maxPixel = 22500
3333
3434 let maxWallet = 1000
3535
3636 let colors = ["7076E9", "5FD8F1", "D30831", "183937", "FFD345", "B04249", "FFB087", "360A90", "000000", "969696", "FF0200", "800080", "020080", "183937", "09FEFF", "7076E9", "C0C0C0", "C3103B", "9F7E69", "FFEEE2", "983C95", "228F19", "F080C2", "F5DA19", "F56C19", "6CF519"]
3737
3838 func isPaymentOk (i) = {
3939 let acceptableAssetId = PAYMENT_ASSET
4040 if ((size(i.payments) == 0))
4141 then throw("Payment not attached")
4242 else {
4343 let p = i.payments[0]
4444 match p.assetId {
4545 case assetId: ByteVector =>
4646 if ((assetId == acceptableAssetId))
4747 then (p.amount == paymentFee)
4848 else false
4949 case _ =>
5050 throw("Wrong payment asset")
5151 }
5252 }
5353 }
5454
5555
5656 @Callable(i)
5757 func activeSession (session) = if ((i.callerPublicKey == admPub))
5858 then [IntegerEntry(activeSessionKey, session)]
5959 else throw("you are not allowed")
6060
6161
6262
6363 @Callable(i)
6464 func settings (session,startHeight,duration) = if ((i.callerPublicKey == admPub))
6565 then {
6666 let endHeight = (startHeight + (1440 * duration))
6767 [IntegerEntry((("settings_" + toString(session)) + "_startHeight"), startHeight), IntegerEntry((("settings_" + toString(session)) + "_endHeight"), endHeight)]
6868 }
6969 else throw("you are not allowed")
7070
7171
7272
7373 @Callable(i)
7474 func shutdown (shutdown) = if ((i.callerPublicKey == admPub))
7575 then [BooleanEntry("shutdown", shutdown)]
7676 else throw("you are not the chosen one")
7777
7878
7979
8080 @Callable(i)
8181 func coordinates (veri,xy) = {
8282 let session = valueOrElse(getInteger(this, activeSessionKey), 0)
8383 let currentKey = toBase58String(i.caller.bytes)
8484 let startHeight = valueOrElse(getInteger(this, (("settings_" + toString(session)) + "_startHeight")), START_HEIGHT)
8585 let endHeight = valueOrElse(getInteger(this, (("settings_" + toString(session)) + "_endHeight")), END_HEIGHT)
8686 let walletCount = valueOrElse(getInteger(this, ((("count_" + toString(session)) + "_") + currentKey)), 0)
8787 let shutdown = valueOrElse(getBoolean(this, "shutdown"), false)
8888 if (if (if ((height > startHeight))
8989 then (endHeight > height)
9090 else false)
9191 then !(shutdown)
9292 else false)
9393 then {
9494 let color = containsElement(colors, veri)
9595 if (color)
9696 then {
9797 let splitter = split(xy, "_")
9898 let x = valueOrElse(parseInt(splitter[0]), 0)
9999 let y = valueOrElse(parseInt(splitter[1]), 0)
100100 if (if (((x % 8) != 0))
101101 then ((y % 8) != 0)
102102 else false)
103103 then throw("not cool.")
104104 else {
105105 let xy_new = ((toString(x) + "_") + toString(y))
106106 let veri_count = valueOrElse(getInteger(this, ("stats_" + toString(session))), 0)
107107 let wallet = (((((currentKey + "_") + xy_new) + "_") + toString(session)) + "_c")
108108 if (if (if (if (if (if ((x >= xMIN))
109109 then (xMAX > x)
110110 else false)
111111 then (y >= yMIN)
112112 else false)
113113 then (yMAX > y)
114114 else false)
115115 then (maxPixel >= veri_count)
116116 else false)
117117 then (maxWallet >= walletCount)
118118 else false)
119119 then if (isPaymentOk(i))
120120 then [StringEntry(wallet, veri), IntegerEntry(("stats_" + toString(session)), (veri_count + 1)), IntegerEntry(((("count_" + toString(session)) + "_") + currentKey), (walletCount + 1)), Reissue(REWARD_ASSET, REISSUE_AMOUNT, true), ScriptTransfer(i.caller, REWARD_AMOUNT, REWARD_ASSET)]
121121 else throw("Wrong payment amount or asset")
122122 else throw("out of context")
123123 }
124124 }
125125 else throw("wrong color")
126126 }
127127 else throw("game is not active right now")
128128 }
129129
130130
131+@Verifier(tx)
132+func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
133+

github/deemru/w8io/026f985 
42.51 ms