tx · GpqodifZrmhZk2U8NBpLZMV76VAgzjhdWHmUJzBtayuy

3MqQhA21mw1UHWmdGMV9M9xQL1cpC93LF8o:  -0.01000000 Waves

2022.04.28 10:53 [2028047] smart account 3MqQhA21mw1UHWmdGMV9M9xQL1cpC93LF8o > SELF 0.00000000 Waves

{ "type": 13, "id": "GpqodifZrmhZk2U8NBpLZMV76VAgzjhdWHmUJzBtayuy", "fee": 1000000, "feeAssetId": null, "timestamp": 1651132444156, "version": 2, "chainId": 84, "sender": "3MqQhA21mw1UHWmdGMV9M9xQL1cpC93LF8o", "senderPublicKey": "E3TwKTkJRoqHq8mpKDYP1GvftP8ECfnCUT5atXuMXq53", "proofs": [ "zrEEXFGeiNCAFvzMR2FPk2Z94rgpn2z277rpKa3xL9f8iMLubT87ux5K3rboNmmsYFtFfBnjz4oyPUGwbPaVbeo" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIICAAAAAMAAAAADVBBWU1FTlRfQVNTRVQBAAAAIK2dSBaFkXln78NKeoaZ0d1Q6QVJPOT+QERHjOGDxML0AAAAAAxSRVdBUkRfQVNTRVQBAAAAIC03E4HTJDddn+FvdtPRD5PvLCz03YmtXEpW6HzJAXIbAQAAAAtpc1BheW1lbnRPawAAAAEAAAABaQQAAAARYWNjZXB0YWJsZUFzc2V0SWQFAAAADVBBWU1FTlRfQVNTRVQDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAJAAACAAAAAQIAAAAUUGF5bWVudCBub3QgYXR0YWNoZWQEAAAAAXAJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAAByRtYXRjaDAIBQAAAAFwAAAAB2Fzc2V0SWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAB2Fzc2V0SWQFAAAAByRtYXRjaDADCQAAAAAAAAIFAAAAB2Fzc2V0SWQFAAAAEWFjY2VwdGFibGVBc3NldElk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AAQIAAAALd3JvbmcgY29sb3IJAAACAAAAAQIAAAAcZ2FtZSBpcyBub3QgYWN0aXZlIHJpZ2h0IG5vdwAAAABOA7/P", "height": 2028047, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 41D1jtCZCcF4CgQyDrD3JSKqEAjVCJqa1v9beLt3fDB6 Next: A8FLxY7xbtgRHVY26pCvB7R17CsCGiZntkjqAP9vXasd Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let PAYMENT_ASSET = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh'
5+
6+let REWARD_ASSET = base58'43W4FcqA1rEpSmUGHoGiXvpSLfhadws9LS5j3SJsKxxS'
7+
48 func isPaymentOk (i) = {
5- let acceptableAssetId = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh'
9+ let acceptableAssetId = PAYMENT_ASSET
610 if ((size(i.payments) == 0))
711 then throw("Payment not attached")
812 else {
2125
2226 @Callable(i)
2327 func coordinates (veri,xy) = {
24- let pixels = base58'43W4FcqA1rEpSmUGHoGiXvpSLfhadws9LS5j3SJsKxxS'
28+ let pixels = REWARD_ASSET
2529 let xMIN = 0
2630 let xMAX = 1201
2731 let yMIN = 0
2832 let yMAX = 601
33+ let REWARD_AMOUNT = 100000000
2934 let START_HEIGHT = 2028020
3035 let END_HEIGHT = (START_HEIGHT + (1440 * 30))
3136 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"]
5156 then {
5257 let isEmpty = getString(this, wallet)
5358 if (isPaymentOk(i))
54- then [StringEntry(wallet, veri), ScriptTransfer(i.caller, 100000000, pixels)]
59+ then [StringEntry(wallet, veri), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels)]
5560 else throw("Wrong payment amount or asset")
5661 }
5762 else throw("out of context")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let PAYMENT_ASSET = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh'
5+
6+let REWARD_ASSET = base58'43W4FcqA1rEpSmUGHoGiXvpSLfhadws9LS5j3SJsKxxS'
7+
48 func isPaymentOk (i) = {
5- let acceptableAssetId = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh'
9+ let acceptableAssetId = PAYMENT_ASSET
610 if ((size(i.payments) == 0))
711 then throw("Payment not attached")
812 else {
913 let p = i.payments[0]
1014 match p.assetId {
1115 case assetId: ByteVector =>
1216 if ((assetId == acceptableAssetId))
1317 then (p.amount == 1000000)
1418 else false
1519 case _ =>
1620 throw("Wrong payment asset")
1721 }
1822 }
1923 }
2024
2125
2226 @Callable(i)
2327 func coordinates (veri,xy) = {
24- let pixels = base58'43W4FcqA1rEpSmUGHoGiXvpSLfhadws9LS5j3SJsKxxS'
28+ let pixels = REWARD_ASSET
2529 let xMIN = 0
2630 let xMAX = 1201
2731 let yMIN = 0
2832 let yMAX = 601
33+ let REWARD_AMOUNT = 100000000
2934 let START_HEIGHT = 2028020
3035 let END_HEIGHT = (START_HEIGHT + (1440 * 30))
3136 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"]
3237 if (if ((height > START_HEIGHT))
3338 then (END_HEIGHT > height)
3439 else false)
3540 then {
3641 let color = containsElement(colors, veri)
3742 if (color)
3843 then {
3944 let currentKey = toBase58String(i.caller.bytes)
4045 let wallet = (((currentKey + "_") + xy) + "_c")
4146 let splitter = split(xy, "_")
4247 let x = valueOrElse(parseInt(splitter[0]), 0)
4348 let y = valueOrElse(parseInt(splitter[1]), 0)
4449 if (if (if (if ((x >= xMIN))
4550 then (xMAX > x)
4651 else false)
4752 then (y >= yMIN)
4853 else false)
4954 then (yMAX > y)
5055 else false)
5156 then {
5257 let isEmpty = getString(this, wallet)
5358 if (isPaymentOk(i))
54- then [StringEntry(wallet, veri), ScriptTransfer(i.caller, 100000000, pixels)]
59+ then [StringEntry(wallet, veri), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels)]
5560 else throw("Wrong payment amount or asset")
5661 }
5762 else throw("out of context")
5863 }
5964 else throw("wrong color")
6065 }
6166 else throw("game is not active right now")
6267 }
6368
6469

github/deemru/w8io/026f985 
32.34 ms