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:
Old | New | | Differences |
---|
25 | 25 | | @Callable(c) |
---|
26 | 26 | | func flip (h) = if (b(c)) |
---|
27 | 27 | | 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!!") |
---|
30 | 37 | | } |
---|
31 | | - | else throw("wrong payment asset") |
---|
| 38 | + | else throw("wrong payment asset ser!!") |
---|
32 | 39 | | |
---|
33 | 40 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh' |
---|
5 | 5 | | |
---|
6 | 6 | | func b (c) = { |
---|
7 | 7 | | let d = a |
---|
8 | 8 | | if ((size(c.payments) == 0)) |
---|
9 | 9 | | then throw("Payment not attached") |
---|
10 | 10 | | else { |
---|
11 | 11 | | let e = c.payments[0] |
---|
12 | 12 | | let f = e.assetId |
---|
13 | 13 | | if ($isInstanceOf(f, "ByteVector")) |
---|
14 | 14 | | then { |
---|
15 | 15 | | let g = f |
---|
16 | 16 | | if ((g == d)) |
---|
17 | 17 | | then (e.amount == 1000000) |
---|
18 | 18 | | else false |
---|
19 | 19 | | } |
---|
20 | 20 | | else throw("Wrong payment asset") |
---|
21 | 21 | | } |
---|
22 | 22 | | } |
---|
23 | 23 | | |
---|
24 | 24 | | |
---|
25 | 25 | | @Callable(c) |
---|
26 | 26 | | func flip (h) = if (b(c)) |
---|
27 | 27 | | 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!!") |
---|
30 | 37 | | } |
---|
31 | | - | else throw("wrong payment asset") |
---|
| 38 | + | else throw("wrong payment asset ser!!") |
---|
32 | 39 | | |
---|
33 | 40 | | |
---|