tx · HzoB3EnsgEsGgFj4vSP5e3hUC3gDznvVHQCjkLrJhGMY 3N3g1WYmFt7TkNtYqv13ZXuUdiHHXVE6ZM2: -0.01400000 Waves 2019.10.27 18:37 [738720] smart account 3N3g1WYmFt7TkNtYqv13ZXuUdiHHXVE6ZM2 > SELF 0.00000000 Waves
{ "type": 13, "id": "HzoB3EnsgEsGgFj4vSP5e3hUC3gDznvVHQCjkLrJhGMY", "fee": 1400000, "feeAssetId": null, "timestamp": 1572190712613, "version": 1, "sender": "3N3g1WYmFt7TkNtYqv13ZXuUdiHHXVE6ZM2", "senderPublicKey": "Aky5vMQd8jGjewgAAF9RPrZBVbviKSac31og8C5MuyLU", "proofs": [ "3epp3bV5fkGKt4TDR91AQT4r7VE5VqNWCMSSVMBHS7Q8mWVDwbY2E6B8NAkEU265G6eYzPcpWjGQiWxkUoumsLN" ], "script": "base64:AAIDAAAAAAAAABgIARIDCgEIEgMKAQgSAwoBARIFCgMIAQgAAAAAAAAABAAAAAFpAQAAAARpbml0AAAAAQAAAAV0aXRyZQQAAAABUwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAFBAgAAACMzTjNnMVdZbUZ0N1RrTnRZcXYxM1pYdVVkaUhIWFZFNlpNMgMJAAAAAAAAAgUAAAABUwUAAAABQQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAACSUQAAAAAAAAAAAAJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAAAU0AAAAAAACYloAFAAAAA25pbAkAAAIAAAABAgAAAA1Ob3QgcGVybWl0dGVkAAAAAWkBAAAAA2JhbgAAAAEAAAAEYWRkcgQAAAABUwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAFBAgAAACMzTjNnMVdZbUZ0N1RrTnRZcXYxM1pYdVVkaUhIWFZFNlpNMgMJAAAAAAAAAgUAAAABUwUAAAABQ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ABkAAAAAgUAAAAFcDF2YXIAAAAAAAAAAAEEAAAABnZhcklEMQkAASwAAAACCQABpAAAAAEFAAAABUlEaW5jAgAAAAIuMQQAAAAGdmFySUQyCQABLAAAAAIJAAGkAAAAAQUAAAAFSURpbmMCAAAAAi4yBAAAAAZ2YXJJRDMJAAEsAAAAAgkAAaQAAAABBQAAAAVJRGluYwIAAAACLjMEAAAABUlEdHh0CQABpAAAAAEFAAAABUlEaW5jAwMJAAAAAAAAAgUAAAAFcDN2YXICAAAABFNUT1AGCQAAZgAAAAIFAAAABUlEaW5jBQAAAAVwMnZhcgkAAAIAAAABAgAAABJTeXN0ZW0gaXMgb24gcGF1c2UDCQAAAAAAAAIFAAAABXA0dmFyAgAAAAROT05FCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAFSUR0eHQFAAAABXRpdHJlCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAAZ2YXJJRDEFAAAAA2NhdAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAGdmFySUQyBQAAAARsaW5rCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAAZ2YXJJRDMAAAAAAAAAAAAJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAAAklEBQAAAAVJRGluYwUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAABZgAAAAAABfXhAAUAAAAEdW5pdAUAAAADbmlsCQAAAgAAAAECAAAADU5vdCBwZXJtaXR0ZWQAAAAA0xl/Gg==", "chainId": 84, "height": 738720, "spentComplexity": 0 } View: original | compacted Prev: rSqizWdbh3Q8D83yUWBsPVkVs6rzsNm5Tvbt1jDsioP Next: 6vB2r8pmTk9HJNTGjfHSkKxW8GwpKEagxHoZGyhVVbbL Diff:
Old | New | Differences | |
---|---|---|---|
60 | 60 | let P1 = "ID" | |
61 | 61 | let P2 = "M" | |
62 | 62 | let P3 = "S" | |
63 | - | let p1var = match getInteger(ParamAddress, P1) { | |
64 | - | case a: Int => | |
65 | - | a | |
66 | - | case _ => | |
67 | - | throw("System not ready") | |
68 | - | } | |
69 | - | let p2var = match getInteger(ParamAddress, P2) { | |
70 | - | case a: Int => | |
71 | - | a | |
72 | - | case _ => | |
73 | - | throw("System not ready") | |
74 | - | } | |
75 | - | let p3var = match getString(ParamAddress, P3) { | |
76 | - | case a: String => | |
77 | - | a | |
78 | - | case _ => | |
79 | - | "N" | |
80 | - | } | |
81 | - | let p4var = match getString(ParamAddress, SenderAddress) { | |
82 | - | case a: String => | |
83 | - | a | |
84 | - | case _ => | |
85 | - | "NONE" | |
86 | - | } | |
87 | - | let IDinc = (p1var + 1) | |
88 | - | let varID1 = (toString(IDinc) + ".1") | |
89 | - | let varID2 = (toString(IDinc) + ".2") | |
90 | - | let varID3 = (toString(IDinc) + ".3") | |
91 | - | let IDtxt = toString(IDinc) | |
92 | - | if (if ((p3var == "STOP")) | |
93 | - | then true | |
94 | - | else (IDinc > p2var)) | |
95 | - | then throw("System is on pause") | |
96 | - | else if ((p4var == "NONE")) | |
97 | - | then ScriptResult(WriteSet([DataEntry(IDtxt, titre), DataEntry(varID1, cat), DataEntry(varID2, link), DataEntry(varID3, 0), DataEntry("ID", IDinc)]), TransferSet([ScriptTransfer(addressFromStringValue(f), 100000000, unit)])) | |
98 | - | else throw("Not permitted") | |
63 | + | let payment = extract(i.payment) | |
64 | + | let amount = extract(payment.amount) | |
65 | + | if ((100000000 > amount)) | |
66 | + | then throw("Not enough fees") | |
67 | + | else { | |
68 | + | let p1var = match getInteger(ParamAddress, P1) { | |
69 | + | case a: Int => | |
70 | + | a | |
71 | + | case _ => | |
72 | + | throw("System not ready") | |
73 | + | } | |
74 | + | let p2var = match getInteger(ParamAddress, P2) { | |
75 | + | case a: Int => | |
76 | + | a | |
77 | + | case _ => | |
78 | + | throw("System not ready") | |
79 | + | } | |
80 | + | let p3var = match getString(ParamAddress, P3) { | |
81 | + | case a: String => | |
82 | + | a | |
83 | + | case _ => | |
84 | + | "N" | |
85 | + | } | |
86 | + | let p4var = match getString(ParamAddress, SenderAddress) { | |
87 | + | case a: String => | |
88 | + | a | |
89 | + | case _ => | |
90 | + | "NONE" | |
91 | + | } | |
92 | + | let IDinc = (p1var + 1) | |
93 | + | let varID1 = (toString(IDinc) + ".1") | |
94 | + | let varID2 = (toString(IDinc) + ".2") | |
95 | + | let varID3 = (toString(IDinc) + ".3") | |
96 | + | let IDtxt = toString(IDinc) | |
97 | + | if (if ((p3var == "STOP")) | |
98 | + | then true | |
99 | + | else (IDinc > p2var)) | |
100 | + | then throw("System is on pause") | |
101 | + | else if ((p4var == "NONE")) | |
102 | + | then ScriptResult(WriteSet([DataEntry(IDtxt, titre), DataEntry(varID1, cat), DataEntry(varID2, link), DataEntry(varID3, 0), DataEntry("ID", IDinc)]), TransferSet([ScriptTransfer(addressFromStringValue(f), 100000000, unit)])) | |
103 | + | else throw("Not permitted") | |
104 | + | } | |
99 | 105 | } | |
100 | 106 | ||
101 | 107 |
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 | 60 | let P1 = "ID" | |
61 | 61 | let P2 = "M" | |
62 | 62 | let P3 = "S" | |
63 | - | let p1var = match getInteger(ParamAddress, P1) { | |
64 | - | case a: Int => | |
65 | - | a | |
66 | - | case _ => | |
67 | - | throw("System not ready") | |
68 | - | } | |
69 | - | let p2var = match getInteger(ParamAddress, P2) { | |
70 | - | case a: Int => | |
71 | - | a | |
72 | - | case _ => | |
73 | - | throw("System not ready") | |
74 | - | } | |
75 | - | let p3var = match getString(ParamAddress, P3) { | |
76 | - | case a: String => | |
77 | - | a | |
78 | - | case _ => | |
79 | - | "N" | |
80 | - | } | |
81 | - | let p4var = match getString(ParamAddress, SenderAddress) { | |
82 | - | case a: String => | |
83 | - | a | |
84 | - | case _ => | |
85 | - | "NONE" | |
86 | - | } | |
87 | - | let IDinc = (p1var + 1) | |
88 | - | let varID1 = (toString(IDinc) + ".1") | |
89 | - | let varID2 = (toString(IDinc) + ".2") | |
90 | - | let varID3 = (toString(IDinc) + ".3") | |
91 | - | let IDtxt = toString(IDinc) | |
92 | - | if (if ((p3var == "STOP")) | |
93 | - | then true | |
94 | - | else (IDinc > p2var)) | |
95 | - | then throw("System is on pause") | |
96 | - | else if ((p4var == "NONE")) | |
97 | - | then ScriptResult(WriteSet([DataEntry(IDtxt, titre), DataEntry(varID1, cat), DataEntry(varID2, link), DataEntry(varID3, 0), DataEntry("ID", IDinc)]), TransferSet([ScriptTransfer(addressFromStringValue(f), 100000000, unit)])) | |
98 | - | else throw("Not permitted") | |
63 | + | let payment = extract(i.payment) | |
64 | + | let amount = extract(payment.amount) | |
65 | + | if ((100000000 > amount)) | |
66 | + | then throw("Not enough fees") | |
67 | + | else { | |
68 | + | let p1var = match getInteger(ParamAddress, P1) { | |
69 | + | case a: Int => | |
70 | + | a | |
71 | + | case _ => | |
72 | + | throw("System not ready") | |
73 | + | } | |
74 | + | let p2var = match getInteger(ParamAddress, P2) { | |
75 | + | case a: Int => | |
76 | + | a | |
77 | + | case _ => | |
78 | + | throw("System not ready") | |
79 | + | } | |
80 | + | let p3var = match getString(ParamAddress, P3) { | |
81 | + | case a: String => | |
82 | + | a | |
83 | + | case _ => | |
84 | + | "N" | |
85 | + | } | |
86 | + | let p4var = match getString(ParamAddress, SenderAddress) { | |
87 | + | case a: String => | |
88 | + | a | |
89 | + | case _ => | |
90 | + | "NONE" | |
91 | + | } | |
92 | + | let IDinc = (p1var + 1) | |
93 | + | let varID1 = (toString(IDinc) + ".1") | |
94 | + | let varID2 = (toString(IDinc) + ".2") | |
95 | + | let varID3 = (toString(IDinc) + ".3") | |
96 | + | let IDtxt = toString(IDinc) | |
97 | + | if (if ((p3var == "STOP")) | |
98 | + | then true | |
99 | + | else (IDinc > p2var)) | |
100 | + | then throw("System is on pause") | |
101 | + | else if ((p4var == "NONE")) | |
102 | + | then ScriptResult(WriteSet([DataEntry(IDtxt, titre), DataEntry(varID1, cat), DataEntry(varID2, link), DataEntry(varID3, 0), DataEntry("ID", IDinc)]), TransferSet([ScriptTransfer(addressFromStringValue(f), 100000000, unit)])) | |
103 | + | else throw("Not permitted") | |
104 | + | } | |
99 | 105 | } | |
100 | 106 | ||
101 | 107 |
github/deemru/w8io/169f3d6 53.82 ms ◑