tx · 8hBUeuB97gPFHdy76vXaNxKpaYbBc3jsGzbEtjEGMsHd

3N5Sns8QYmySnDbSZWqMC869WJDRaxnDX19:  -0.01000000 Waves

2022.05.11 22:54 [2047451] smart account 3N5Sns8QYmySnDbSZWqMC869WJDRaxnDX19 > SELF 0.00000000 Waves

{ "type": 13, "id": "8hBUeuB97gPFHdy76vXaNxKpaYbBc3jsGzbEtjEGMsHd", "fee": 1000000, "feeAssetId": null, "timestamp": 1652298895808, "version": 2, "chainId": 84, "sender": "3N5Sns8QYmySnDbSZWqMC869WJDRaxnDX19", "senderPublicKey": "E9qCg8KrCfnpnZKmDXGtU2DZfAGHR2xnPnTqtwYjsjto", "proofs": [ "3zwS6tPHBanLTGDauR19KSkwQqoKgdJyqrfXrRGytvLwt3zWhSkfSjappncumD9wKcc1aRhnq3x9EHYgwXXYUdJs" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIICAAAAAwAAAAADVBBWU1FTlRfQVNTRVQBAAAAIK2dSBaFkXln78NKeoaZ0d1Q6QVJPOT+QERHjOGDxML0AAAAAAxSRVdBUkRfQVNTRVQBAAAAIC03E4HTJDddn+FvdtPRD5PvLCz03YmtXEpW6HzJAXIbAAAAAAZwaXhlbHMFAAAADFJFV0FSRF9BU1NFVAAAAAAEeE1JTgAAAAAAAAAAAAAAAAAEeE1BWAAAAAAAAAAEsQAAAAAEeU1JTgAAAAAAAAAAAAAAAAAEeU1BWAAAAAAAAAACWQAAAAANUkVXQVJEX0FNT1VOVAAAAAAABfXhAAAAAAAMU1RBUlRfSEVJR0hUAAAAAAAAHvH0AAAAAApFTkRfSEVJR0hUCQAAZAAAAAIFAAAADFNUQVJUX0hFSUdIVAkAAGgAAAACAAAAAAAAAAWgAAAAAAAAAAAeAAAAAAZjb2xvcnMJAARMAAAAAgIAAAADMDAwCQAETAAAAAICAAAAA2ZmZgkABEwAAAACAgAAAAYwMDAwMDAJAARMAAAAAgIAAAAGZmZmZmZmCQAETAAAAAICAAAABkZGMDIw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AFpAAAABmNhbGxlcgUAAAANUkVXQVJEX0FNT1VOVAUAAAAGcGl4ZWxzBQAAAANuaWwJAAACAAAAAQIAAAAdV3JvbmcgcGF5bWVudCBhbW91bnQgb3IgYXNzZXQJAAACAAAAAQIAAAAOb3V0IG9mIGNvbnRleHQJAAACAAAAAQIAAAALd3JvbmcgY29sb3IJAAACAAAAAQIAAAAcZ2FtZSBpcyBub3QgYWN0aXZlIHJpZ2h0IG5vdwAAAACskK+T", "height": 2047451, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5bZqzSzxmtLPEnJ4Ps6wvtSXejsGfabLYwN3kvR7QkJZ Next: none Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let PAYMENT_ASSET = base58''
4+let PAYMENT_ASSET = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh'
55
66 let REWARD_ASSET = base58'43W4FcqA1rEpSmUGHoGiXvpSLfhadws9LS5j3SJsKxxS'
77
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let PAYMENT_ASSET = base58''
4+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 START_HEIGHT = 2028020
2121
2222 let END_HEIGHT = (START_HEIGHT + (1440 * 30))
2323
2424 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"]
2525
2626 func isPaymentOk (i) = {
2727 let acceptableAssetId = PAYMENT_ASSET
2828 if ((size(i.payments) == 0))
2929 then throw("Payment not attached")
3030 else {
3131 let p = i.payments[0]
3232 match p.assetId {
3333 case assetId: ByteVector =>
3434 if ((assetId == acceptableAssetId))
3535 then (p.amount == 1000000)
3636 else false
3737 case _ =>
3838 throw("Wrong payment asset")
3939 }
4040 }
4141 }
4242
4343
4444 @Callable(i)
4545 func coordinates (veri,xy) = if (if ((height > START_HEIGHT))
4646 then (END_HEIGHT > height)
4747 else false)
4848 then {
4949 let color = containsElement(colors, veri)
5050 if (color)
5151 then {
5252 let currentKey = toBase58String(i.caller.bytes)
5353 let splitter = split(xy, "_")
5454 let x = valueOrElse(parseInt(splitter[0]), 0)
5555 let y = valueOrElse(parseInt(splitter[1]), 0)
5656 if (if (((x % 8) != 0))
5757 then ((y % 8) != 0)
5858 else false)
5959 then throw("not cool.")
6060 else {
6161 let xy_new = ((toString(x) + "_") + toString(y))
6262 let wallet = (((currentKey + "_") + xy_new) + "_c")
6363 if (if (if (if ((x >= xMIN))
6464 then (xMAX > x)
6565 else false)
6666 then (y >= yMIN)
6767 else false)
6868 then (yMAX > y)
6969 else false)
7070 then if (isPaymentOk(i))
7171 then [StringEntry(wallet, veri), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels)]
7272 else throw("Wrong payment amount or asset")
7373 else throw("out of context")
7474 }
7575 }
7676 else throw("wrong color")
7777 }
7878 else throw("game is not active right now")
7979
8080

github/deemru/w8io/026f985 
30.16 ms