tx · 6BvLea1kBzC95ctiydJ8pvjMd3xgEBk3LKcSJZTvmt9p
3Ms9YDMep25yKVDZmzP8PaG6vpZMyRN1kJp: -0.01000000 Waves
2022.05.15 18:31 [2052973] smart account 3Ms9YDMep25yKVDZmzP8PaG6vpZMyRN1kJp > SELF 0.00000000 Waves
{
"type": 13,
"id": "6BvLea1kBzC95ctiydJ8pvjMd3xgEBk3LKcSJZTvmt9p",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1652628694887,
"version": 2,
"chainId": 84,
"sender": "3Ms9YDMep25yKVDZmzP8PaG6vpZMyRN1kJp",
"senderPublicKey": "DBFsF67y4W1PHwv8PvsfD9mctboYQZBGGNm7EwHckCgh",
"proofs": [
"22t7DL6CqiLvq8jxZpCEVSwUd7aAz3Wx5GWTqfjsv2iMMvQcMCpTE5i5Bd4LDiiayyAiKn35552cAczUR7Vz3ZMc"
],
"script": "base64:AAIFAAAAAAAAABcIAhIDCgEIEgUKAwgICBIHCgUICAgICAAAAA4BAAAADWtleUNvbGxlY3Rpb24AAAACAAAABmNhbGxlcgAAAAxjb2xsZWN0aW9uSWQJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAC2NvbGxlY3Rpb25fBQAAAAxjb2xsZWN0aW9uSWQCAAAAAV8FAAAABmNhbGxlcgEAAAAaa2V5U3ViY29sbGVjdGlvbkNvbGxlY3Rpb24AAAADAAAABmNhbGxlcgAAAAxjb2xsZWN0aW9uSWQAAAAKY29sbGVjdGlvbgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAGXN1YmNvbGxlY3Rpb25fY29sbGVjdGlvbl8FAAAADGNvbGxlY3Rpb25JZAIAAAABXwUAAAAGY2FsbGVyAgAAAAFfBQAAAApjb2xsZWN0aW9uAQAAAAlrZXlPblNhbGUAAAACAAAABmNhbGxlcgAAAAxjb2xsZWN0aW9uSWQJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAC2FydF9vbnNhbGVf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29sbGVjdGlvbgUAAAANc3ViY29sbGVjdGlvbgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAAaa2V5U3ViY29sbGVjdGlvbkNvbGxlY3Rpb24AAAADBQAAAAZjYWxsZXIFAAAABWFydElkBQAAAApjb2xsZWN0aW9uBQAAAANuaWwFAAAAA25pbAQAAAAfdmFsaWRhdGVBbmRQcm9jZXNzUGF5bWVudEludm9rZQkAA/wAAAAECQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIFAAAACXN0YWtlRGFwcAIAAAAOdGhpcyBub3QgZm91bmQCAAAAGXZhbGlkYXRlQW5kUHJvY2Vzc1BheW1lbnQFAAAAA25pbAkABEwAAAACCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABQAAAANuaWwDCQAAAAAAAAIFAAAAH3ZhbGlkYXRlQW5kUHJvY2Vzc1BheW1lbnRJbnZva2UFAAAAH3ZhbGlkYXRlQW5kUHJvY2Vzc1BheW1lbnRJbnZva2UJAAROAAAAAgUAAAANZGVsZXRlRW50cmllcwkBAAAAC2NvbGxlY3Rpb25zAAAABQUAAAAFYXJ0SWQFAAAAAWkFAAAACmNvbGxlY3Rpb24FAAAADXN1YmNvbGxlY3Rpb24FAAAABmNhbGxlcgkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAAA+dmSdQ==",
"height": 2052973,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: GSKmWSumBcLoFBGSxVgrpk3Y8aW4Z7SnRXKCiSWwCUiA
Next: E3DysGMQruAnQ5CDE2TBjjxUoD4fys7Doy3zUQmewKA
Diff:
Old | New | | Differences |
---|
29 | 29 | | |
---|
30 | 30 | | let n = valueOrErrorMessage(addressFromString(m), "Collections dapp doesnt have oracle defined") |
---|
31 | 31 | | |
---|
32 | | - | let o = getStringValue(n, g) |
---|
| 32 | + | let o = addressFromString(valueOrErrorMessage(getString(n, "stakeDapp"), "sconexDapp not found")) |
---|
33 | 33 | | |
---|
34 | | - | func p (j) = valueOrElse(getBoolean(addressFromStringValue(o), j), false) |
---|
| 34 | + | let p = getStringValue(n, g) |
---|
| 35 | + | |
---|
| 36 | + | func q (j) = valueOrElse(getBoolean(addressFromStringValue(p), j), false) |
---|
35 | 37 | | |
---|
36 | 38 | | |
---|
37 | | - | func q (r) = if ((r == addressFromString(o))) |
---|
38 | | - | then true |
---|
39 | | - | else throw("Only the sconex dapp can invoke this") |
---|
| 39 | + | func r (s) = if ((s != addressFromString(p))) |
---|
| 40 | + | then throw("Only the sconex dapp can invoke this") |
---|
| 41 | + | else true |
---|
40 | 42 | | |
---|
41 | 43 | | |
---|
42 | | - | func s (t,j) = valueOrElse(getString(t, j), "") |
---|
| 44 | + | func t (u,j) = valueOrElse(getString(u, j), "") |
---|
43 | 45 | | |
---|
44 | 46 | | |
---|
45 | | - | func u (c,v,e,w,x) = if ((e == "")) |
---|
| 47 | + | func v (c,w,e,x,y) = if ((e == "")) |
---|
46 | 48 | | then throw("Collections can not be empty!") |
---|
47 | | - | else if ((w == "")) |
---|
48 | | - | then [StringEntry(a(x, c), e)] |
---|
49 | | - | else [StringEntry(a(x, c), e), StringEntry(d(x, c, e), w)] |
---|
| 49 | + | else if ((x == "")) |
---|
| 50 | + | then [StringEntry(a(y, c), e)] |
---|
| 51 | + | else [StringEntry(a(y, c), e), StringEntry(d(y, c, e), x)] |
---|
50 | 52 | | |
---|
51 | 53 | | |
---|
52 | | - | @Callable(v) |
---|
53 | | - | func initDapp (y) = if ((v.caller != this)) |
---|
| 54 | + | @Callable(w) |
---|
| 55 | + | func initDapp (z) = if ((w.caller != this)) |
---|
54 | 56 | | then throw("You cannot do this action") |
---|
55 | 57 | | else if ((m != "")) |
---|
56 | 58 | | then throw("oracle already set, you can't override!") |
---|
57 | | - | else [StringEntry(h, y)] |
---|
| 59 | + | else [StringEntry(h, z)] |
---|
58 | 60 | | |
---|
59 | 61 | | |
---|
60 | 62 | | |
---|
61 | | - | @Callable(v) |
---|
62 | | - | func collectionProcess (e,w,x) = if (if (q(v.caller)) |
---|
63 | | - | then true |
---|
64 | | - | else (v.caller == this)) |
---|
65 | | - | then $Tuple2(u(toBase58String(v.transactionId), v, e, w, x), toBase58String(v.transactionId)) |
---|
66 | | - | else throw("Wrong invoker") |
---|
| 63 | + | @Callable(w) |
---|
| 64 | + | func collectionProcess (e,x,y) = if (if (!(r(w.caller))) |
---|
| 65 | + | then (w.caller != this) |
---|
| 66 | + | else false) |
---|
| 67 | + | then throw("Wrong invoker") |
---|
| 68 | + | else $Tuple2(v(toBase58String(w.transactionId), w, e, x, y), toBase58String(w.transactionId)) |
---|
67 | 69 | | |
---|
68 | 70 | | |
---|
69 | 71 | | |
---|
70 | | - | @Callable(v) |
---|
71 | | - | func updateCollection (z,A,B,e,w) = { |
---|
72 | | - | let b = toBase58String(v.caller.bytes) |
---|
73 | | - | let C = f(B, b) |
---|
74 | | - | if (p(C)) |
---|
| 72 | + | @Callable(w) |
---|
| 73 | + | func updateCollection (A,B,C,e,x) = { |
---|
| 74 | + | let b = toBase58String(w.caller.bytes) |
---|
| 75 | + | let D = f(C, b) |
---|
| 76 | + | if (q(D)) |
---|
75 | 77 | | then throw("Can not update collection from artwork for sale") |
---|
76 | 78 | | else { |
---|
77 | | - | let D = if (if ((z != e)) |
---|
| 79 | + | let E = if (if ((A != e)) |
---|
78 | 80 | | then true |
---|
79 | | - | else (A != w)) |
---|
80 | | - | then [DeleteEntry(d(b, B, e))] |
---|
| 81 | + | else (B != x)) |
---|
| 82 | + | then [DeleteEntry(d(b, C, e))] |
---|
81 | 83 | | else nil |
---|
82 | | - | (D ++ u(B, v, e, w, b)) |
---|
| 84 | + | let F = invoke(valueOrErrorMessage(o, "this not found"), "validateAndProcessPayment", nil, [w.payments[0]]) |
---|
| 85 | + | if ((F == F)) |
---|
| 86 | + | then (E ++ v(C, w, e, x, b)) |
---|
| 87 | + | else throw("Strict value is not equal to itself.") |
---|
83 | 88 | | } |
---|
84 | 89 | | } |
---|
85 | 90 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | func a (b,c) = ((("collection_" + c) + "_") + b) |
---|
5 | 5 | | |
---|
6 | 6 | | |
---|
7 | 7 | | func d (b,c,e) = ((((("subcollection_collection_" + c) + "_") + b) + "_") + e) |
---|
8 | 8 | | |
---|
9 | 9 | | |
---|
10 | 10 | | func f (b,c) = ((("art_onsale_" + c) + "_") + b) |
---|
11 | 11 | | |
---|
12 | 12 | | |
---|
13 | 13 | | let g = "sconexDapp" |
---|
14 | 14 | | |
---|
15 | 15 | | let h = "oracleKey" |
---|
16 | 16 | | |
---|
17 | 17 | | func i (j) = { |
---|
18 | 18 | | let k = getString(this, j) |
---|
19 | 19 | | if ($isInstanceOf(k, "String")) |
---|
20 | 20 | | then { |
---|
21 | 21 | | let l = k |
---|
22 | 22 | | l |
---|
23 | 23 | | } |
---|
24 | 24 | | else "" |
---|
25 | 25 | | } |
---|
26 | 26 | | |
---|
27 | 27 | | |
---|
28 | 28 | | let m = i(h) |
---|
29 | 29 | | |
---|
30 | 30 | | let n = valueOrErrorMessage(addressFromString(m), "Collections dapp doesnt have oracle defined") |
---|
31 | 31 | | |
---|
32 | | - | let o = getStringValue(n, g) |
---|
| 32 | + | let o = addressFromString(valueOrErrorMessage(getString(n, "stakeDapp"), "sconexDapp not found")) |
---|
33 | 33 | | |
---|
34 | | - | func p (j) = valueOrElse(getBoolean(addressFromStringValue(o), j), false) |
---|
| 34 | + | let p = getStringValue(n, g) |
---|
| 35 | + | |
---|
| 36 | + | func q (j) = valueOrElse(getBoolean(addressFromStringValue(p), j), false) |
---|
35 | 37 | | |
---|
36 | 38 | | |
---|
37 | | - | func q (r) = if ((r == addressFromString(o))) |
---|
38 | | - | then true |
---|
39 | | - | else throw("Only the sconex dapp can invoke this") |
---|
| 39 | + | func r (s) = if ((s != addressFromString(p))) |
---|
| 40 | + | then throw("Only the sconex dapp can invoke this") |
---|
| 41 | + | else true |
---|
40 | 42 | | |
---|
41 | 43 | | |
---|
42 | | - | func s (t,j) = valueOrElse(getString(t, j), "") |
---|
| 44 | + | func t (u,j) = valueOrElse(getString(u, j), "") |
---|
43 | 45 | | |
---|
44 | 46 | | |
---|
45 | | - | func u (c,v,e,w,x) = if ((e == "")) |
---|
| 47 | + | func v (c,w,e,x,y) = if ((e == "")) |
---|
46 | 48 | | then throw("Collections can not be empty!") |
---|
47 | | - | else if ((w == "")) |
---|
48 | | - | then [StringEntry(a(x, c), e)] |
---|
49 | | - | else [StringEntry(a(x, c), e), StringEntry(d(x, c, e), w)] |
---|
| 49 | + | else if ((x == "")) |
---|
| 50 | + | then [StringEntry(a(y, c), e)] |
---|
| 51 | + | else [StringEntry(a(y, c), e), StringEntry(d(y, c, e), x)] |
---|
50 | 52 | | |
---|
51 | 53 | | |
---|
52 | | - | @Callable(v) |
---|
53 | | - | func initDapp (y) = if ((v.caller != this)) |
---|
| 54 | + | @Callable(w) |
---|
| 55 | + | func initDapp (z) = if ((w.caller != this)) |
---|
54 | 56 | | then throw("You cannot do this action") |
---|
55 | 57 | | else if ((m != "")) |
---|
56 | 58 | | then throw("oracle already set, you can't override!") |
---|
57 | | - | else [StringEntry(h, y)] |
---|
| 59 | + | else [StringEntry(h, z)] |
---|
58 | 60 | | |
---|
59 | 61 | | |
---|
60 | 62 | | |
---|
61 | | - | @Callable(v) |
---|
62 | | - | func collectionProcess (e,w,x) = if (if (q(v.caller)) |
---|
63 | | - | then true |
---|
64 | | - | else (v.caller == this)) |
---|
65 | | - | then $Tuple2(u(toBase58String(v.transactionId), v, e, w, x), toBase58String(v.transactionId)) |
---|
66 | | - | else throw("Wrong invoker") |
---|
| 63 | + | @Callable(w) |
---|
| 64 | + | func collectionProcess (e,x,y) = if (if (!(r(w.caller))) |
---|
| 65 | + | then (w.caller != this) |
---|
| 66 | + | else false) |
---|
| 67 | + | then throw("Wrong invoker") |
---|
| 68 | + | else $Tuple2(v(toBase58String(w.transactionId), w, e, x, y), toBase58String(w.transactionId)) |
---|
67 | 69 | | |
---|
68 | 70 | | |
---|
69 | 71 | | |
---|
70 | | - | @Callable(v) |
---|
71 | | - | func updateCollection (z,A,B,e,w) = { |
---|
72 | | - | let b = toBase58String(v.caller.bytes) |
---|
73 | | - | let C = f(B, b) |
---|
74 | | - | if (p(C)) |
---|
| 72 | + | @Callable(w) |
---|
| 73 | + | func updateCollection (A,B,C,e,x) = { |
---|
| 74 | + | let b = toBase58String(w.caller.bytes) |
---|
| 75 | + | let D = f(C, b) |
---|
| 76 | + | if (q(D)) |
---|
75 | 77 | | then throw("Can not update collection from artwork for sale") |
---|
76 | 78 | | else { |
---|
77 | | - | let D = if (if ((z != e)) |
---|
| 79 | + | let E = if (if ((A != e)) |
---|
78 | 80 | | then true |
---|
79 | | - | else (A != w)) |
---|
80 | | - | then [DeleteEntry(d(b, B, e))] |
---|
| 81 | + | else (B != x)) |
---|
| 82 | + | then [DeleteEntry(d(b, C, e))] |
---|
81 | 83 | | else nil |
---|
82 | | - | (D ++ u(B, v, e, w, b)) |
---|
| 84 | + | let F = invoke(valueOrErrorMessage(o, "this not found"), "validateAndProcessPayment", nil, [w.payments[0]]) |
---|
| 85 | + | if ((F == F)) |
---|
| 86 | + | then (E ++ v(C, w, e, x, b)) |
---|
| 87 | + | else throw("Strict value is not equal to itself.") |
---|
83 | 88 | | } |
---|
84 | 89 | | } |
---|
85 | 90 | | |
---|
86 | 91 | | |
---|