tx · GJRLJd4UutvWYF3rUGAfgWTrEippMAbCwz6i5eP5Cjp 3N3g1WYmFt7TkNtYqv13ZXuUdiHHXVE6ZM2: -0.01400000 Waves 2020.03.29 14:29 [930676] smart account 3N3g1WYmFt7TkNtYqv13ZXuUdiHHXVE6ZM2 > SELF 0.00000000 Waves
{ "type": 13, "id": "GJRLJd4UutvWYF3rUGAfgWTrEippMAbCwz6i5eP5Cjp", "fee": 1400000, "feeAssetId": null, "timestamp": 1585481393137, "version": 1, "sender": "3N3g1WYmFt7TkNtYqv13ZXuUdiHHXVE6ZM2", "senderPublicKey": "Aky5vMQd8jGjewgAAF9RPrZBVbviKSac31og8C5MuyLU", "proofs": [ "3uvAc2ZsSFteauYgMdq1swgYBC9bNtdomNrecTCDpipzVPNTBXRuF3DXodtuRgMgQ1YXj3KDRterENY8iHrMjaur" ], "script": "base64:AAIDAAAAAAAAABgIARIDCgEIEgMKAQgSAwoBARIFCgMIAQgAAAAAAAAABAAAAAFpAQAAAARpbml0AAAAAQAAAAV0aXRyZQQAAAABUwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAFBAgAAACMzTjNnMVdZbUZ0N1RrTnRZcXYxM1pYdVVkaUhIWFZFNlpNMgMJAAAAAAAAAgUAAAABUwUAAAABQQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAACSUQAAAAAAAAAAAAJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAAAU0AAAAAAACYloAFAAAAA25pbAkAAAIAAAABAgAAAA1Ob3QgcGVybWl0dGVkAAAAAWkBAAAAA2JhbgAAAAEAAAAEYWRkcgQAAAABUwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAFBAgAAACMzTjNnMVdZbUZ0N1RrTnRZcXYxM1pYdVVkaUhIWFZFNlpNMgMJAAAAAAAAAgUAAAABUwUAAAABQQkBAAAACF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UAAAADdmkzAAAAAAAAAAAACQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAJJRAUAAAABbAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAABZgUAAAACZmYFAAAABHVuaXQFAAAAA25pbAkAAAIAAAABAgAAAA1Ob3QgcGVybWl0dGVkCQAAAgAAAAECAAAAF0NhdGVnb3J5IG5vdCBhdXRob3JpemVkCQAAAgAAAAECAAAAC0VtcHR5IHBhcmFtAAAAAAMJ/+A=", "chainId": 84, "height": 930676, "spentComplexity": 0 } View: original | compacted Prev: BWv7dsQ2kchZ7WN3Qx5QpdgUCGejKxpMHuQf9PVLQrrR Next: none Diff:
Old | New | Differences | |
---|---|---|---|
57 | 57 | let SenderAddress = toBase58String(i.caller.bytes) | |
58 | 58 | let ParamAddress = addressFromStringValue("3N3g1WYmFt7TkNtYqv13ZXuUdiHHXVE6ZM2") | |
59 | 59 | let f = "3MpW7tZSLLLmZnKyw4yFHb9g2a8xNGwppKX" | |
60 | - | let ff = 10000000 | |
61 | 60 | let P1 = "ID" | |
62 | 61 | let P2 = "M" | |
63 | 62 | let P3 = "S" | |
64 | 63 | let pp = extract(i.payment) | |
65 | 64 | let aa = extract(pp.amount) | |
65 | + | let z = addressFromStringValue("3Mpi584bYLg8tG4svXPnRvg9pSdP2GnKDec") | |
66 | + | let ff = match getInteger(z, "f") { | |
67 | + | case r: Int => | |
68 | + | r | |
69 | + | case _ => | |
70 | + | throw("System not ready f") | |
71 | + | } | |
66 | 72 | if ((ff > aa)) | |
67 | 73 | then throw(((("Not enough fees, : " + toString(aa)) + " recieved. Needed :") + toString(ff))) | |
68 | - | else { | |
69 | - | let g = match getInteger(ParamAddress, P1) { | |
70 | - | case a: Int => | |
71 | - | a | |
72 | - | case _ => | |
73 | - | throw("System not ready") | |
74 | - | } | |
75 | - | let h = match getInteger(ParamAddress, P2) { | |
76 | - | case a: Int => | |
77 | - | a | |
78 | - | case _ => | |
79 | - | throw("System not ready") | |
80 | - | } | |
81 | - | let j = match getString(ParamAddress, P3) { | |
82 | - | case a: String => | |
83 | - | a | |
84 | - | case _ => | |
85 | - | "N" | |
86 | - | } | |
87 | - | let k = match getString(ParamAddress, SenderAddress) { | |
88 | - | case a: String => | |
89 | - | a | |
90 | - | case _ => | |
91 | - | "NONE" | |
92 | - | } | |
93 | - | let l = (g + 1) | |
94 | - | if (if ((j == "STOP")) | |
95 | - | then true | |
96 | - | else (l > h)) | |
97 | - | then throw("System is on pause") | |
98 | - | else if ((k == "NONE")) | |
99 | - | then { | |
100 | - | let vi1 = (toString(l) + ".1") | |
101 | - | let vi2 = (toString(l) + ".2") | |
102 | - | let vi3 = (toString(l) + ".3") | |
103 | - | let ix = toString(l) | |
104 | - | ScriptResult(WriteSet([DataEntry(ix, titre), DataEntry(vi1, cat), DataEntry(vi2, link), DataEntry(vi3, 0), DataEntry("ID", l)]), TransferSet([ScriptTransfer(addressFromStringValue(f), ff, unit)])) | |
105 | - | } | |
106 | - | else throw("Not permitted") | |
107 | - | } | |
74 | + | else if (if ((titre != "")) | |
75 | + | then (link != "") | |
76 | + | else false) | |
77 | + | then if (if ((cat > 0)) | |
78 | + | then (99 >= cat) | |
79 | + | else false) | |
80 | + | then { | |
81 | + | let g = match getInteger(ParamAddress, P1) { | |
82 | + | case a: Int => | |
83 | + | a | |
84 | + | case _ => | |
85 | + | throw("System not ready") | |
86 | + | } | |
87 | + | let h = match getInteger(ParamAddress, P2) { | |
88 | + | case a: Int => | |
89 | + | a | |
90 | + | case _ => | |
91 | + | throw("System not ready") | |
92 | + | } | |
93 | + | let j = match getString(ParamAddress, P3) { | |
94 | + | case a: String => | |
95 | + | a | |
96 | + | case _ => | |
97 | + | "N" | |
98 | + | } | |
99 | + | let k = match getString(ParamAddress, SenderAddress) { | |
100 | + | case a: String => | |
101 | + | a | |
102 | + | case _ => | |
103 | + | "NONE" | |
104 | + | } | |
105 | + | let l = (g + 1) | |
106 | + | if (if ((j == "STOP")) | |
107 | + | then true | |
108 | + | else (l > h)) | |
109 | + | then throw("System is on pause") | |
110 | + | else if ((k == "NONE")) | |
111 | + | then { | |
112 | + | let vi1 = (toString(l) + ".1") | |
113 | + | let vi2 = (toString(l) + ".2") | |
114 | + | let vi3 = (toString(l) + ".3") | |
115 | + | let ix = toString(l) | |
116 | + | ScriptResult(WriteSet([DataEntry(ix, titre), DataEntry(vi1, cat), DataEntry(vi2, link), DataEntry(vi3, 0), DataEntry("ID", l)]), TransferSet([ScriptTransfer(addressFromStringValue(f), ff, unit)])) | |
117 | + | } | |
118 | + | else throw("Not permitted") | |
119 | + | } | |
120 | + | else throw("Category not authorized") | |
121 | + | else throw("Empty param") | |
108 | 122 | } | |
109 | 123 | ||
110 | 124 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func init (titre) = { | |
8 | 8 | let S = toBase58String(i.caller.bytes) | |
9 | 9 | let A = "3N3g1WYmFt7TkNtYqv13ZXuUdiHHXVE6ZM2" | |
10 | 10 | if ((S == A)) | |
11 | 11 | then WriteSet([DataEntry("ID", 0), DataEntry("M", 10000000)]) | |
12 | 12 | else throw("Not permitted") | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | ||
17 | 17 | @Callable(i) | |
18 | 18 | func ban (addr) = { | |
19 | 19 | let S = toBase58String(i.caller.bytes) | |
20 | 20 | let A = "3N3g1WYmFt7TkNtYqv13ZXuUdiHHXVE6ZM2" | |
21 | 21 | if ((S == A)) | |
22 | 22 | then WriteSet([DataEntry(addr, 1)]) | |
23 | 23 | else throw("Not permitted") | |
24 | 24 | } | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | ||
28 | 28 | @Callable(i) | |
29 | 29 | func rep (id) = { | |
30 | 30 | let S = toBase58String(i.caller.bytes) | |
31 | 31 | let PA = addressFromStringValue("3N3g1WYmFt7TkNtYqv13ZXuUdiHHXVE6ZM2") | |
32 | 32 | let v = (toString(id) + ".3") | |
33 | 33 | let ib = match getString(PA, S) { | |
34 | 34 | case a: String => | |
35 | 35 | a | |
36 | 36 | case _ => | |
37 | 37 | "NONE" | |
38 | 38 | } | |
39 | 39 | let vv = match getInteger(PA, v) { | |
40 | 40 | case a: Int => | |
41 | 41 | a | |
42 | 42 | case _ => | |
43 | 43 | throw("Entry not found") | |
44 | 44 | } | |
45 | 45 | if ((ib == "NONE")) | |
46 | 46 | then { | |
47 | 47 | let vvv = (vv + 1) | |
48 | 48 | WriteSet([DataEntry(v, vvv)]) | |
49 | 49 | } | |
50 | 50 | else throw("Not permitted") | |
51 | 51 | } | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | ||
55 | 55 | @Callable(i) | |
56 | 56 | func WD (titre,cat,link) = { | |
57 | 57 | let SenderAddress = toBase58String(i.caller.bytes) | |
58 | 58 | let ParamAddress = addressFromStringValue("3N3g1WYmFt7TkNtYqv13ZXuUdiHHXVE6ZM2") | |
59 | 59 | let f = "3MpW7tZSLLLmZnKyw4yFHb9g2a8xNGwppKX" | |
60 | - | let ff = 10000000 | |
61 | 60 | let P1 = "ID" | |
62 | 61 | let P2 = "M" | |
63 | 62 | let P3 = "S" | |
64 | 63 | let pp = extract(i.payment) | |
65 | 64 | let aa = extract(pp.amount) | |
65 | + | let z = addressFromStringValue("3Mpi584bYLg8tG4svXPnRvg9pSdP2GnKDec") | |
66 | + | let ff = match getInteger(z, "f") { | |
67 | + | case r: Int => | |
68 | + | r | |
69 | + | case _ => | |
70 | + | throw("System not ready f") | |
71 | + | } | |
66 | 72 | if ((ff > aa)) | |
67 | 73 | then throw(((("Not enough fees, : " + toString(aa)) + " recieved. Needed :") + toString(ff))) | |
68 | - | else { | |
69 | - | let g = match getInteger(ParamAddress, P1) { | |
70 | - | case a: Int => | |
71 | - | a | |
72 | - | case _ => | |
73 | - | throw("System not ready") | |
74 | - | } | |
75 | - | let h = match getInteger(ParamAddress, P2) { | |
76 | - | case a: Int => | |
77 | - | a | |
78 | - | case _ => | |
79 | - | throw("System not ready") | |
80 | - | } | |
81 | - | let j = match getString(ParamAddress, P3) { | |
82 | - | case a: String => | |
83 | - | a | |
84 | - | case _ => | |
85 | - | "N" | |
86 | - | } | |
87 | - | let k = match getString(ParamAddress, SenderAddress) { | |
88 | - | case a: String => | |
89 | - | a | |
90 | - | case _ => | |
91 | - | "NONE" | |
92 | - | } | |
93 | - | let l = (g + 1) | |
94 | - | if (if ((j == "STOP")) | |
95 | - | then true | |
96 | - | else (l > h)) | |
97 | - | then throw("System is on pause") | |
98 | - | else if ((k == "NONE")) | |
99 | - | then { | |
100 | - | let vi1 = (toString(l) + ".1") | |
101 | - | let vi2 = (toString(l) + ".2") | |
102 | - | let vi3 = (toString(l) + ".3") | |
103 | - | let ix = toString(l) | |
104 | - | ScriptResult(WriteSet([DataEntry(ix, titre), DataEntry(vi1, cat), DataEntry(vi2, link), DataEntry(vi3, 0), DataEntry("ID", l)]), TransferSet([ScriptTransfer(addressFromStringValue(f), ff, unit)])) | |
105 | - | } | |
106 | - | else throw("Not permitted") | |
107 | - | } | |
74 | + | else if (if ((titre != "")) | |
75 | + | then (link != "") | |
76 | + | else false) | |
77 | + | then if (if ((cat > 0)) | |
78 | + | then (99 >= cat) | |
79 | + | else false) | |
80 | + | then { | |
81 | + | let g = match getInteger(ParamAddress, P1) { | |
82 | + | case a: Int => | |
83 | + | a | |
84 | + | case _ => | |
85 | + | throw("System not ready") | |
86 | + | } | |
87 | + | let h = match getInteger(ParamAddress, P2) { | |
88 | + | case a: Int => | |
89 | + | a | |
90 | + | case _ => | |
91 | + | throw("System not ready") | |
92 | + | } | |
93 | + | let j = match getString(ParamAddress, P3) { | |
94 | + | case a: String => | |
95 | + | a | |
96 | + | case _ => | |
97 | + | "N" | |
98 | + | } | |
99 | + | let k = match getString(ParamAddress, SenderAddress) { | |
100 | + | case a: String => | |
101 | + | a | |
102 | + | case _ => | |
103 | + | "NONE" | |
104 | + | } | |
105 | + | let l = (g + 1) | |
106 | + | if (if ((j == "STOP")) | |
107 | + | then true | |
108 | + | else (l > h)) | |
109 | + | then throw("System is on pause") | |
110 | + | else if ((k == "NONE")) | |
111 | + | then { | |
112 | + | let vi1 = (toString(l) + ".1") | |
113 | + | let vi2 = (toString(l) + ".2") | |
114 | + | let vi3 = (toString(l) + ".3") | |
115 | + | let ix = toString(l) | |
116 | + | ScriptResult(WriteSet([DataEntry(ix, titre), DataEntry(vi1, cat), DataEntry(vi2, link), DataEntry(vi3, 0), DataEntry("ID", l)]), TransferSet([ScriptTransfer(addressFromStringValue(f), ff, unit)])) | |
117 | + | } | |
118 | + | else throw("Not permitted") | |
119 | + | } | |
120 | + | else throw("Category not authorized") | |
121 | + | else throw("Empty param") | |
108 | 122 | } | |
109 | 123 | ||
110 | 124 |
github/deemru/w8io/169f3d6 35.69 ms ◑