tx · HqbspicDkNotWLjfPktmfA9qKviod8xy8c1qeoKGh53o

3MwSJhsm3YngKUPgEMsjBNuq5JaETsywtcD:  -0.00500000 Waves

2022.08.02 14:16 [2166798] smart account 3MwSJhsm3YngKUPgEMsjBNuq5JaETsywtcD > SELF 0.00000000 Waves

{ "type": 13, "id": "HqbspicDkNotWLjfPktmfA9qKviod8xy8c1qeoKGh53o", "fee": 500000, "feeAssetId": null, "timestamp": 1659439013813, "version": 2, "chainId": 84, "sender": "3MwSJhsm3YngKUPgEMsjBNuq5JaETsywtcD", "senderPublicKey": "DuG16HmDLNnqp4eX1MeM1DX5DuWxFCARi1TAXvrekhGb", "proofs": [ "3VfRBi3BYeJdPGq6oUcbhsd8iCtoxEeepcFMrwFQYGEdFnHCLvkK3GEuweRu5YHxhpqQgMuPyToNXooYuhpsoxrA" ], "script": "base64:AAIFAAAAAAAAABQIAhIECgIBARIECgIECBIECgIICAAAABcAAAAADVBBWU1FTlRfQVNTRVQBAAAAIK2dSBaFkXln78NKeoaZ0d1Q6QVJPOT+QERHjOGDxML0AAAAAAxSRVdBUkRfQVNTRVQBAAAAIC03E4HTJDddn+FvdtPRD5PvLCz03YmtXEpW6HzJAXIbAAAAAAthZG1pblB1YktleQEAAAAgqLWmf98toNE9vqPG9aON6EpqB9vXYJJsZXUlC8eDPgUAAAAADlBBWU1FTlRfQU1PVU5UAAAAAAAAD0JAAAAAAAZwaXhlbHMFAAAADFJFV0FSRF9BU1NFVAAAAAAEeE1JTgAAAAAAAAAAAAAAAAAEeE1BWAAAAAAAAAAEsQAAAAAEeU1JTgAAAAAAAAAAAAAAAAAEeU1BWAAAAAAAAAACWQAAAAANUkVXQVJEX0FNT1VOVAAAAAAABfXhAAAAAAAMU1RBUlRfSEVJR0hUAAAAAAAAINEjAAAAAApFTkRfSEVJR0hUCQAAZAAAAAIFAAAADFNUQVJUX0hFSUdIVAkAAGgAAAACAAAAAAAAAAWgAAAAAAAAAAAOAAAAAAdNQVhFQUNIAAAAAA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AAAECAAAAEGFsbCBzb2xkLiB0aGFueC4JAAACAAAAAQIAAAALd3JvbmcgY29sb3IJAAACAAAAAQIAAAAcZ2FtZSBpcyBub3QgYWN0aXZlIHJpZ2h0IG5vdwAAAADlJRE9", "height": 2166798, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6hBVYB2pvmpeH75aKWcEPPyYvKTb2oUkp1qYqL5GxKmT Next: 5dTRutLZtGeqSQGHR53tzMy7SRjAPsJ9WhAFuy6RJMMX Diff:
OldNewDifferences
8181 func coordinates (veri,xy) = {
8282 let isOpen = valueOrElse(getBoolean(this, isOpenKey), true)
8383 let endBlock = (firstBlock + period)
84- let activeElseValue = (((toString(firstBlock) + "_") + toString(endBlock)) + "_0")
84+ let activeElseValue = ((((toString(firstBlock) + "_") + toString(endBlock)) + "_") + toString(ACTIVE_SESSION))
8585 let activeBlock = valueOrElse(getString(this, activeBlockKey), activeElseValue)
8686 let splitBlock = split(activeBlock, "_")
8787 let start_height = valueOrErrorMessage(parseInt(splitBlock[0]), "int_str err")
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 adminPubKey = base58'CMa9TJH8JthRv8Uq8pZc4FSpgZ9bvpk6XRsZktUm2ivx'
99
1010 let PAYMENT_AMOUNT = 1000000
1111
1212 let pixels = REWARD_ASSET
1313
1414 let xMIN = 0
1515
1616 let xMAX = 1201
1717
1818 let yMIN = 0
1919
2020 let yMAX = 601
2121
2222 let REWARD_AMOUNT = 100000000
2323
2424 let START_HEIGHT = 2150691
2525
2626 let END_HEIGHT = (START_HEIGHT + (1440 * 14))
2727
2828 let MAXEACH = 1000
2929
3030 let MAXIMUM = 2250000000000
3131
3232 let activeSessionKey = "activeSession"
3333
3434 let activeBlockKey = "activeBlock"
3535
3636 let isOpenKey = "isOpen"
3737
3838 let shutDownReasonKey = "shutDownReason"
3939
4040 let firstBlock = 2166753
4141
4242 let period = (1440 * 7)
4343
4444 let ACTIVE_SESSION = 1
4545
4646 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"]
4747
4848 func isPaymentOk (i) = {
4949 let acceptableAssetId = PAYMENT_ASSET
5050 if ((size(i.payments) == 0))
5151 then throw("Payment not attached")
5252 else {
5353 let p = i.payments[0]
5454 match p.assetId {
5555 case assetId: ByteVector =>
5656 if ((assetId == acceptableAssetId))
5757 then (p.amount == 1000000)
5858 else false
5959 case _ =>
6060 throw("Wrong payment asset")
6161 }
6262 }
6363 }
6464
6565
6666 @Callable(i)
6767 func activeSession (session,block) = if ((adminPubKey != i.callerPublicKey))
6868 then throw("you can not")
6969 else [IntegerEntry(activeSessionKey, session), StringEntry(activeBlockKey, ((((toString(block) + "_") + toString((block + period))) + "_") + toString(session)))]
7070
7171
7272
7373 @Callable(i)
7474 func shutdown (req,reason) = if ((adminPubKey != i.callerPublicKey))
7575 then throw("you can not")
7676 else [BooleanEntry(isOpenKey, req), StringEntry(shutDownReasonKey, reason)]
7777
7878
7979
8080 @Callable(i)
8181 func coordinates (veri,xy) = {
8282 let isOpen = valueOrElse(getBoolean(this, isOpenKey), true)
8383 let endBlock = (firstBlock + period)
84- let activeElseValue = (((toString(firstBlock) + "_") + toString(endBlock)) + "_0")
84+ let activeElseValue = ((((toString(firstBlock) + "_") + toString(endBlock)) + "_") + toString(ACTIVE_SESSION))
8585 let activeBlock = valueOrElse(getString(this, activeBlockKey), activeElseValue)
8686 let splitBlock = split(activeBlock, "_")
8787 let start_height = valueOrErrorMessage(parseInt(splitBlock[0]), "int_str err")
8888 let end_height = valueOrErrorMessage(parseInt(splitBlock[1]), "int_str err")
8989 let session = valueOrErrorMessage(parseInt(splitBlock[2]), "int_str err")
9090 if (if (if ((height > start_height))
9191 then (end_height > height)
9292 else false)
9393 then isOpen
9494 else false)
9595 then {
9696 let color = containsElement(colors, veri)
9797 if (color)
9898 then {
9999 let currentKey = toBase58String(i.caller.bytes)
100100 let splitter = split(xy, "_")
101101 let x = valueOrElse(parseInt(splitter[0]), 0)
102102 let y = valueOrElse(parseInt(splitter[1]), 0)
103103 if (if (((x % 8) != 0))
104104 then true
105105 else ((y % 8) != 0))
106106 then throw("not cool.")
107107 else {
108108 let xy_new = ((toString(x) + "_") + toString(y))
109109 let wallet = (((((currentKey + "_") + xy_new) + "_c") + "_") + toString(session))
110110 let count_key = ((currentKey + "_count") + toString(session))
111111 let pixels_count_key = ("pixels_count" + toString(session))
112112 let count = valueOrElse(getInteger(this, count_key), 0)
113113 let pixels_count = valueOrElse(getInteger(this, pixels_count_key), 0)
114114 if ((MAXIMUM >= pixels_count))
115115 then if ((MAXEACH >= count))
116116 then if (if (if (if ((x >= xMIN))
117117 then (xMAX > x)
118118 else false)
119119 then (y >= yMIN)
120120 else false)
121121 then (yMAX > y)
122122 else false)
123123 then if (isPaymentOk(i))
124124 then [IntegerEntry(count_key, (count + 1)), IntegerEntry(pixels_count_key, (pixels_count + 1)), StringEntry(wallet, veri), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels)]
125125 else throw("wrong payment amount or asset")
126126 else throw("out of context")
127127 else throw((("max " + toString(MAXEACH)) + " pixels for each wallet!"))
128128 else throw("all sold. thanx.")
129129 }
130130 }
131131 else throw("wrong color")
132132 }
133133 else throw("game is not active right now")
134134 }
135135
136136

github/deemru/w8io/026f985 
31.21 ms