tx · 8o3juiN1Dev2zdt11ushde6rfK96F6bXZiyfxcsaBpnq

3MpwA3zztn9AiVLgzxtYyj21AAbvtWeBodX:  -0.01000000 Waves

2022.05.05 15:28 [2038395] smart account 3MpwA3zztn9AiVLgzxtYyj21AAbvtWeBodX > SELF 0.00000000 Waves

{ "type": 13, "id": "8o3juiN1Dev2zdt11ushde6rfK96F6bXZiyfxcsaBpnq", "fee": 1000000, "feeAssetId": null, "timestamp": 1651753698312, "version": 2, "chainId": 84, "sender": "3MpwA3zztn9AiVLgzxtYyj21AAbvtWeBodX", "senderPublicKey": "DiHcx3LJuz15WXcQqQE1gEhBzw6k7HqgBE7m1qn3APFw", "proofs": [ "W9DcGXafpUBHWFcHbuR9NiV71jrTwsenWLcCBqMSw5mxXvyGi39etmwjdfyJChc443DHQyWXhQnCnhsJLAaYacm" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEBAAAAAgAAAAANUEFZTUVOVF9BU1NFVAEAAAAgrZ1IFoWReWfvw0p6hpnR3VDpBUk85P5AREeM4YPEwvQBAAAAC2lzUGF5bWVudE9rAAAAAQAAAAFpBAAAABFhY2NlcHRhYmxlQXNzZXRJZAUAAAANUEFZTUVOVF9BU1NFVAMJAAAAAAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAkAAAIAAAABAgAAABRQYXltZW50IG5vdCBhdHRhY2hlZAQAAAABcAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAHJG1hdGNoMAgFAAAAAXAAAAAHYXNzZXRJZAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAKQnl0ZVZlY3RvcgQAAAAHYXNzZXRJZAUAAAAHJG1hdGNoMAMJAAAAAAAAAgUAAAAHYXNzZXRJZAUAAAARYWNjZXB0YWJsZUFzc2V0SWQJAAAAAAAAAggFAAAAAXAAAAAGYW1vdW50AAAAAAAAD0JABwkAAAIAAAABAgAAABNXcm9uZyBwYXltZW50IGFzc2V0AAAAAQAAAAFpAQAAAARmbGlwAAAAAQAAAAZjaG9pY2UDCQEAAAALaXNQYXltZW50T2sAAAABBQAAAAFpBAAAAAF4CQEAAAALdmFsdWVPckVsc2UAAAACBQAAAAZjaG9pY2UAAAAAAAAAAAADAwkAAAAAAAACBQAAAAF4AAAAAAAAAAABBgkAAAAAAAACBQAAAAF4AAAAAAAAAAAABAAAAAZ3YWxsZXQJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAABXwkAAaQAAAABBQAAAAZjaG9pY2UCAAAAAl9jCQAAAgAAAAEFAAAABndhbGxldAkAAAIAAAABAgAAABJ3cm9uZyBjaG9pY2Ugc2VyISEJAAACAAAAAQIAAAAZd3JvbmcgcGF5bWVudCBhc3NldCBzZXIhIQAAAABHis/r", "height": 2038395, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FDKG95TFLaVFESjjHgfTSQDSWpq4KZJYjUMVfv3aMFmd Next: 7sDT8wewW3KN6UhG9F1MCbDeTdYgHs8W35tS1mtqKBjK Diff:
OldNewDifferences
2525 @Callable(c)
2626 func flip (h) = if (b(c))
2727 then {
28- let i = (((toBase58String(c.caller.bytes) + "_") + toString(h)) + "_c")
29- throw(i)
28+ let i = valueOrElse(h, 0)
29+ if (if ((i == 1))
30+ then true
31+ else (i == 0))
32+ then {
33+ let j = (((toBase58String(c.caller.bytes) + "_") + toString(h)) + "_c")
34+ throw(j)
35+ }
36+ else throw("wrong choice ser!!")
3037 }
31- else throw("wrong payment asset")
38+ else throw("wrong payment asset ser!!")
3239
3340
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh'
55
66 func b (c) = {
77 let d = a
88 if ((size(c.payments) == 0))
99 then throw("Payment not attached")
1010 else {
1111 let e = c.payments[0]
1212 let f = e.assetId
1313 if ($isInstanceOf(f, "ByteVector"))
1414 then {
1515 let g = f
1616 if ((g == d))
1717 then (e.amount == 1000000)
1818 else false
1919 }
2020 else throw("Wrong payment asset")
2121 }
2222 }
2323
2424
2525 @Callable(c)
2626 func flip (h) = if (b(c))
2727 then {
28- let i = (((toBase58String(c.caller.bytes) + "_") + toString(h)) + "_c")
29- throw(i)
28+ let i = valueOrElse(h, 0)
29+ if (if ((i == 1))
30+ then true
31+ else (i == 0))
32+ then {
33+ let j = (((toBase58String(c.caller.bytes) + "_") + toString(h)) + "_c")
34+ throw(j)
35+ }
36+ else throw("wrong choice ser!!")
3037 }
31- else throw("wrong payment asset")
38+ else throw("wrong payment asset ser!!")
3239
3340

github/deemru/w8io/169f3d6 
19.16 ms