tx · ezK786AtEukUsTTp8RRB2VVYkxZQW63SUZqJZtboSYZ 3MwjJKGp7PLGJh7pzYrnrN9TnMXph6oL4nH: -0.05000000 Waves 2019.11.25 01:34 [779939] smart account 3MwjJKGp7PLGJh7pzYrnrN9TnMXph6oL4nH > SELF 0.00000000 Waves
{ "type": 13, "id": "ezK786AtEukUsTTp8RRB2VVYkxZQW63SUZqJZtboSYZ", "fee": 5000000, "feeAssetId": null, "timestamp": 1574634918242, "version": 1, "sender": "3MwjJKGp7PLGJh7pzYrnrN9TnMXph6oL4nH", "senderPublicKey": "9Pw6KBYMgEWmrg24tEc8SkHPhMUBwRmHaJoKjWgDkUAK", "proofs": [ "4C1jTTka6MdyZdBcvLTbo76TurhR28nrdUU2W6BWq4mhdGiek3TCHwDuPosex5AkVxToiduJQ7vXhHhU6B8ZF17X" ], "script": "base64:AAIDAAAAAAAAABAIARIFCgMICAgSBQoDCAEBAAAACAAAAAAETk9ORQIAAAAEbm9uZQAAAAAGb3JhY2xlCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAECAAAAIzNOQWNvZVdkVVRXbjhjc1hKUEc0N3YxRmp0amNmcXhiNXR1AAAAAAVhc2tJRAIAAAAFV0FWRVMAAAAABWJpZElEAgAAAAVVU0QtTgAAAAAGbWluUGlwAAAAAAAAD0JAAQAAAAhnZW5LZXlJRAAAAAEAAAAEYWRkcgkAAlgAAAABCQAB9wAAAAEJAAGbAAAAAQkAASwAAAACBQAAAARhZGRyCQAEJQAAAAEFAAAABHRoaXMBAAAAB2dlbkdyaWQAAAACAAAAAWEAAAABYgMJAAAAAAAAAgUAAAABYQIAAAAACQABpAAAAAEFAAAAAWIJAAEsAAAAAgkAASwAAAACBQAAAAFhAgAAAAF8CQABpAAAAAEFAAAAAWIBAAAAB2dlbkxpc3QAAAACAAAAAWEAAAABYgkABEwAAAACBQAAAAFhBQAAAAFhAAAAAgAAAAFpAQAAAA1jcmVhdGVTY2FscGVyAAAA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rU3qLW Next: Cypc9kVJFufe8gUmtjQiGZ4nyXVZWZ8dMeY46P85gCSG Diff:
Old | New | Differences | |
---|---|---|---|
14 | 14 | func f (g) = toBase58String(sha256(toBytes((g + toString(this))))) | |
15 | 15 | ||
16 | 16 | ||
17 | - | @Callable(h) | |
18 | - | func createScalper (i,j,g) = { | |
19 | - | let k = toBase58String(h.caller.bytes) | |
20 | - | let l = f(g) | |
21 | - | WriteSet([DataEntry((l + "_scalperID"), g), DataEntry((l + "_title"), i), DataEntry((l + "_type"), j), DataEntry((l + "_fundraised"), 0), DataEntry((l + "_priceOpen"), 0), DataEntry((l + "_priceClose"), 0), DataEntry((l + "_upOutGTD"), 0), DataEntry((l + "_downOutGTD"), 0), DataEntry((l + "_profit"), 0), DataEntry((l + "_profitFee"), 0), DataEntry((l + "_grid"), 0), DataEntry((l + "_steps"), 0), DataEntry((l + "_ordering"), "middle"), DataEntry((l + "_reOrderOut"), "middle"), DataEntry((l + "_gridAsk"), "undefined asks"), DataEntry((l + "_gridBid"), "undefined bids"), DataEntry((l + "_lifetime"), 0), DataEntry((l + "_blockStart"), 0), DataEntry((l + "_blockStop"), 0), DataEntry((l + "_status"), "created")]) | |
17 | + | func h (i,j) = if ((i == "")) | |
18 | + | then toString(j) | |
19 | + | else ((i + "|") + toString(j)) | |
20 | + | ||
21 | + | ||
22 | + | func k (i,j) = i :: i | |
23 | + | ||
24 | + | ||
25 | + | @Callable(l) | |
26 | + | func createScalper (m,n,g) = { | |
27 | + | let o = toBase58String(l.caller.bytes) | |
28 | + | let p = f(g) | |
29 | + | WriteSet([DataEntry((p + "_scalperID"), g), DataEntry((p + "_title"), m), DataEntry((p + "_type"), n), DataEntry((p + "_fundraised"), 0), DataEntry((p + "_priceOpen"), 0), DataEntry((p + "_priceClose"), 0), DataEntry((p + "_upOutGTD"), 0), DataEntry((p + "_downOutGTD"), 0), DataEntry((p + "_profit"), 0), DataEntry((p + "_profitFee"), 0), DataEntry((p + "_grid"), 0), DataEntry((p + "_steps"), 0), DataEntry((p + "_ordering"), "middle"), DataEntry((p + "_reOrderOut"), "middle"), DataEntry((p + "_gridAsk"), "undefined asks"), DataEntry((p + "_gridBid"), "undefined bids"), DataEntry((p + "_lifetime"), 0), DataEntry((p + "_blockStart"), 0), DataEntry((p + "_blockStop"), 0), DataEntry((p + "_status"), "created")]) | |
22 | 30 | } | |
23 | 31 | ||
24 | 32 | ||
25 | 33 | ||
26 | - | @Callable(h) | |
27 | - | func defineScalping (i) = { | |
28 | - | let k = toBase58String(h.caller.bytes) | |
29 | - | let m = extract(h.payment) | |
30 | - | let l = f(k) | |
31 | - | let n = getIntegerValue(b, "waves_usd_2") | |
32 | - | if ((m.amount >= 100000000)) | |
33 | - | then throw(("payment will higher than 1: " + toString(m.amount))) | |
34 | - | else throw(("Payment did botton 1: " + toString(m.amount))) | |
34 | + | @Callable(l) | |
35 | + | func defineScalping (m,q,r) = { | |
36 | + | let o = toBase58String(l.caller.bytes) | |
37 | + | let s = extract(l.payment) | |
38 | + | let p = f(o) | |
39 | + | let t = getIntegerValue(b, "waves_usd_2") | |
40 | + | if ((100000000 >= s.amount)) | |
41 | + | then throw(("Amount under of required: " + toString(s.amount))) | |
42 | + | else { | |
43 | + | let u = (s.amount / 2) | |
44 | + | let v = (u / (q / 2)) | |
45 | + | let w = [1, 2, 3, 4, 5] | |
46 | + | let x = [1] | |
47 | + | let y = { | |
48 | + | let z = w | |
49 | + | let A = size(z) | |
50 | + | let B = "" | |
51 | + | if ((A == 0)) | |
52 | + | then B | |
53 | + | else { | |
54 | + | let C = h(B, z[0]) | |
55 | + | if ((A == 1)) | |
56 | + | then C | |
57 | + | else { | |
58 | + | let D = h(C, z[1]) | |
59 | + | if ((A == 2)) | |
60 | + | then D | |
61 | + | else { | |
62 | + | let E = h(D, z[2]) | |
63 | + | if ((A == 3)) | |
64 | + | then E | |
65 | + | else { | |
66 | + | let F = h(E, z[3]) | |
67 | + | if ((A == 4)) | |
68 | + | then F | |
69 | + | else { | |
70 | + | let G = h(F, z[4]) | |
71 | + | if ((A == 5)) | |
72 | + | then G | |
73 | + | else { | |
74 | + | let H = h(G, z[5]) | |
75 | + | if ((A == 6)) | |
76 | + | then H | |
77 | + | else { | |
78 | + | let I = h(H, z[6]) | |
79 | + | if ((A == 7)) | |
80 | + | then I | |
81 | + | else { | |
82 | + | let J = h(I, z[7]) | |
83 | + | if ((A == 8)) | |
84 | + | then J | |
85 | + | else { | |
86 | + | let K = h(J, z[8]) | |
87 | + | if ((A == 9)) | |
88 | + | then K | |
89 | + | else { | |
90 | + | let L = h(K, z[9]) | |
91 | + | if ((A == 10)) | |
92 | + | then L | |
93 | + | else { | |
94 | + | let M = h(L, z[10]) | |
95 | + | throw("List size exceed 10") | |
96 | + | } | |
97 | + | } | |
98 | + | } | |
99 | + | } | |
100 | + | } | |
101 | + | } | |
102 | + | } | |
103 | + | } | |
104 | + | } | |
105 | + | } | |
106 | + | } | |
107 | + | } | |
108 | + | WriteSet([DataEntry((p + "_fundraised"), s.amount)]) | |
109 | + | } | |
35 | 110 | } | |
36 | 111 | ||
37 | 112 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "none" | |
5 | 5 | ||
6 | 6 | let b = addressFromStringValue("3NAcoeWdUTWn8csXJPG47v1Fjtjcfqxb5tu") | |
7 | 7 | ||
8 | 8 | let c = "WAVES" | |
9 | 9 | ||
10 | 10 | let d = "USD-N" | |
11 | 11 | ||
12 | 12 | let e = 1000000 | |
13 | 13 | ||
14 | 14 | func f (g) = toBase58String(sha256(toBytes((g + toString(this))))) | |
15 | 15 | ||
16 | 16 | ||
17 | - | @Callable(h) | |
18 | - | func createScalper (i,j,g) = { | |
19 | - | let k = toBase58String(h.caller.bytes) | |
20 | - | let l = f(g) | |
21 | - | WriteSet([DataEntry((l + "_scalperID"), g), DataEntry((l + "_title"), i), DataEntry((l + "_type"), j), DataEntry((l + "_fundraised"), 0), DataEntry((l + "_priceOpen"), 0), DataEntry((l + "_priceClose"), 0), DataEntry((l + "_upOutGTD"), 0), DataEntry((l + "_downOutGTD"), 0), DataEntry((l + "_profit"), 0), DataEntry((l + "_profitFee"), 0), DataEntry((l + "_grid"), 0), DataEntry((l + "_steps"), 0), DataEntry((l + "_ordering"), "middle"), DataEntry((l + "_reOrderOut"), "middle"), DataEntry((l + "_gridAsk"), "undefined asks"), DataEntry((l + "_gridBid"), "undefined bids"), DataEntry((l + "_lifetime"), 0), DataEntry((l + "_blockStart"), 0), DataEntry((l + "_blockStop"), 0), DataEntry((l + "_status"), "created")]) | |
17 | + | func h (i,j) = if ((i == "")) | |
18 | + | then toString(j) | |
19 | + | else ((i + "|") + toString(j)) | |
20 | + | ||
21 | + | ||
22 | + | func k (i,j) = i :: i | |
23 | + | ||
24 | + | ||
25 | + | @Callable(l) | |
26 | + | func createScalper (m,n,g) = { | |
27 | + | let o = toBase58String(l.caller.bytes) | |
28 | + | let p = f(g) | |
29 | + | WriteSet([DataEntry((p + "_scalperID"), g), DataEntry((p + "_title"), m), DataEntry((p + "_type"), n), DataEntry((p + "_fundraised"), 0), DataEntry((p + "_priceOpen"), 0), DataEntry((p + "_priceClose"), 0), DataEntry((p + "_upOutGTD"), 0), DataEntry((p + "_downOutGTD"), 0), DataEntry((p + "_profit"), 0), DataEntry((p + "_profitFee"), 0), DataEntry((p + "_grid"), 0), DataEntry((p + "_steps"), 0), DataEntry((p + "_ordering"), "middle"), DataEntry((p + "_reOrderOut"), "middle"), DataEntry((p + "_gridAsk"), "undefined asks"), DataEntry((p + "_gridBid"), "undefined bids"), DataEntry((p + "_lifetime"), 0), DataEntry((p + "_blockStart"), 0), DataEntry((p + "_blockStop"), 0), DataEntry((p + "_status"), "created")]) | |
22 | 30 | } | |
23 | 31 | ||
24 | 32 | ||
25 | 33 | ||
26 | - | @Callable(h) | |
27 | - | func defineScalping (i) = { | |
28 | - | let k = toBase58String(h.caller.bytes) | |
29 | - | let m = extract(h.payment) | |
30 | - | let l = f(k) | |
31 | - | let n = getIntegerValue(b, "waves_usd_2") | |
32 | - | if ((m.amount >= 100000000)) | |
33 | - | then throw(("payment will higher than 1: " + toString(m.amount))) | |
34 | - | else throw(("Payment did botton 1: " + toString(m.amount))) | |
34 | + | @Callable(l) | |
35 | + | func defineScalping (m,q,r) = { | |
36 | + | let o = toBase58String(l.caller.bytes) | |
37 | + | let s = extract(l.payment) | |
38 | + | let p = f(o) | |
39 | + | let t = getIntegerValue(b, "waves_usd_2") | |
40 | + | if ((100000000 >= s.amount)) | |
41 | + | then throw(("Amount under of required: " + toString(s.amount))) | |
42 | + | else { | |
43 | + | let u = (s.amount / 2) | |
44 | + | let v = (u / (q / 2)) | |
45 | + | let w = [1, 2, 3, 4, 5] | |
46 | + | let x = [1] | |
47 | + | let y = { | |
48 | + | let z = w | |
49 | + | let A = size(z) | |
50 | + | let B = "" | |
51 | + | if ((A == 0)) | |
52 | + | then B | |
53 | + | else { | |
54 | + | let C = h(B, z[0]) | |
55 | + | if ((A == 1)) | |
56 | + | then C | |
57 | + | else { | |
58 | + | let D = h(C, z[1]) | |
59 | + | if ((A == 2)) | |
60 | + | then D | |
61 | + | else { | |
62 | + | let E = h(D, z[2]) | |
63 | + | if ((A == 3)) | |
64 | + | then E | |
65 | + | else { | |
66 | + | let F = h(E, z[3]) | |
67 | + | if ((A == 4)) | |
68 | + | then F | |
69 | + | else { | |
70 | + | let G = h(F, z[4]) | |
71 | + | if ((A == 5)) | |
72 | + | then G | |
73 | + | else { | |
74 | + | let H = h(G, z[5]) | |
75 | + | if ((A == 6)) | |
76 | + | then H | |
77 | + | else { | |
78 | + | let I = h(H, z[6]) | |
79 | + | if ((A == 7)) | |
80 | + | then I | |
81 | + | else { | |
82 | + | let J = h(I, z[7]) | |
83 | + | if ((A == 8)) | |
84 | + | then J | |
85 | + | else { | |
86 | + | let K = h(J, z[8]) | |
87 | + | if ((A == 9)) | |
88 | + | then K | |
89 | + | else { | |
90 | + | let L = h(K, z[9]) | |
91 | + | if ((A == 10)) | |
92 | + | then L | |
93 | + | else { | |
94 | + | let M = h(L, z[10]) | |
95 | + | throw("List size exceed 10") | |
96 | + | } | |
97 | + | } | |
98 | + | } | |
99 | + | } | |
100 | + | } | |
101 | + | } | |
102 | + | } | |
103 | + | } | |
104 | + | } | |
105 | + | } | |
106 | + | } | |
107 | + | } | |
108 | + | WriteSet([DataEntry((p + "_fundraised"), s.amount)]) | |
109 | + | } | |
35 | 110 | } | |
36 | 111 | ||
37 | 112 |
github/deemru/w8io/026f985 25.17 ms ◑