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:AAIDAAAAAAAAABAIARIFCgMICAgSBQoDCAEBAAAACAAAAAAETk9ORQIAAAAEbm9uZQAAAAAGb3JhY2xlCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAECAAAAIzNOQWNvZVdkVVRXbjhjc1hKUEc0N3YxRmp0amNmcXhiNXR1AAAAAAVhc2tJRAIAAAAFV0FWRVMAAAAABWJpZElEAgAAAAVVU0QtTgAAAAAGbWluUGlwAAAAAAAAD0JAAQAAAAhnZW5LZXlJRAAAAAEAAAAEYWRkcgkAAlgAAAABCQAB9wAAAAEJAAGbAAAAAQkAASwAAAACBQAAAARhZGRyCQAEJQAAAAEFAAAABHRoaXMBAAAAB2dlbkdyaWQAAAACAAAAAWEAAAABYgMJAAAAAAAAAgUAAAABYQIAAAAACQABpAAAAAEFAAAAAWIJAAEsAAAAAgkAASwAAAACBQAAAAFhAgAAAAF8CQABpAAAAAEFAAAAAWIBAAAAB2dlbkxpc3QAAAACAAAAAWEAAAABYgkABEwAAAACBQAAAAFhBQAAAAFhAAAAAgAAAAFpAQAAAA1jcmVhdGVTY2FscGVyAAA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QrU3qLW Next: Cypc9kVJFufe8gUmtjQiGZ4nyXVZWZ8dMeY46P85gCSG Diff:
OldNewDifferences
1414 func genKeyID (addr) = toBase58String(sha256(toBytes((addr + toString(this)))))
1515
1616
17+func genGrid (a,b) = if ((a == ""))
18+ then toString(b)
19+ else ((a + "|") + toString(b))
20+
21+
22+func genList (a,b) = a :: a
23+
24+
1725 @Callable(i)
1826 func createScalper (title,type,addr) = {
1927 let sender = toBase58String(i.caller.bytes)
2432
2533
2634 @Callable(i)
27-func defineScalping (title) = {
35+func defineScalping (title,grids,step) = {
2836 let sender = toBase58String(i.caller.bytes)
29- let pay = extract(i.payment)
37+ let deposited = extract(i.payment)
3038 let keyID = genKeyID(sender)
3139 let usdV = getIntegerValue(oracle, "waves_usd_2")
32- if ((pay.amount >= 100000000))
33- then throw(("payment will higher than 1: " + toString(pay.amount)))
34- else throw(("Payment did botton 1: " + toString(pay.amount)))
40+ if ((100000000 >= deposited.amount))
41+ then throw(("Amount under of required: " + toString(deposited.amount)))
42+ else {
43+ let foundAsk = (deposited.amount / 2)
44+ let orderAsk = (foundAsk / (grids / 2))
45+ let arr = [1, 2, 3, 4, 5]
46+ let arrr = [1]
47+ let ver = {
48+ let $list21992223 = arr
49+ let $size21992223 = size($list21992223)
50+ let $acc021992223 = ""
51+ if (($size21992223 == 0))
52+ then $acc021992223
53+ else {
54+ let $acc121992223 = genGrid($acc021992223, $list21992223[0])
55+ if (($size21992223 == 1))
56+ then $acc121992223
57+ else {
58+ let $acc221992223 = genGrid($acc121992223, $list21992223[1])
59+ if (($size21992223 == 2))
60+ then $acc221992223
61+ else {
62+ let $acc321992223 = genGrid($acc221992223, $list21992223[2])
63+ if (($size21992223 == 3))
64+ then $acc321992223
65+ else {
66+ let $acc421992223 = genGrid($acc321992223, $list21992223[3])
67+ if (($size21992223 == 4))
68+ then $acc421992223
69+ else {
70+ let $acc521992223 = genGrid($acc421992223, $list21992223[4])
71+ if (($size21992223 == 5))
72+ then $acc521992223
73+ else {
74+ let $acc621992223 = genGrid($acc521992223, $list21992223[5])
75+ if (($size21992223 == 6))
76+ then $acc621992223
77+ else {
78+ let $acc721992223 = genGrid($acc621992223, $list21992223[6])
79+ if (($size21992223 == 7))
80+ then $acc721992223
81+ else {
82+ let $acc821992223 = genGrid($acc721992223, $list21992223[7])
83+ if (($size21992223 == 8))
84+ then $acc821992223
85+ else {
86+ let $acc921992223 = genGrid($acc821992223, $list21992223[8])
87+ if (($size21992223 == 9))
88+ then $acc921992223
89+ else {
90+ let $acc1021992223 = genGrid($acc921992223, $list21992223[9])
91+ if (($size21992223 == 10))
92+ then $acc1021992223
93+ else {
94+ let $acc1121992223 = genGrid($acc1021992223, $list21992223[10])
95+ throw("List size exceed 10")
96+ }
97+ }
98+ }
99+ }
100+ }
101+ }
102+ }
103+ }
104+ }
105+ }
106+ }
107+ }
108+ WriteSet([DataEntry((keyID + "_fundraised"), deposited.amount)])
109+ }
35110 }
36111
37112
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let NONE = "none"
55
66 let oracle = addressFromStringValue("3NAcoeWdUTWn8csXJPG47v1Fjtjcfqxb5tu")
77
88 let askID = "WAVES"
99
1010 let bidID = "USD-N"
1111
1212 let minPip = 1000000
1313
1414 func genKeyID (addr) = toBase58String(sha256(toBytes((addr + toString(this)))))
1515
1616
17+func genGrid (a,b) = if ((a == ""))
18+ then toString(b)
19+ else ((a + "|") + toString(b))
20+
21+
22+func genList (a,b) = a :: a
23+
24+
1725 @Callable(i)
1826 func createScalper (title,type,addr) = {
1927 let sender = toBase58String(i.caller.bytes)
2028 let keyID = genKeyID(addr)
2129 WriteSet([DataEntry((keyID + "_scalperID"), addr), DataEntry((keyID + "_title"), title), DataEntry((keyID + "_type"), type), DataEntry((keyID + "_fundraised"), 0), DataEntry((keyID + "_priceOpen"), 0), DataEntry((keyID + "_priceClose"), 0), DataEntry((keyID + "_upOutGTD"), 0), DataEntry((keyID + "_downOutGTD"), 0), DataEntry((keyID + "_profit"), 0), DataEntry((keyID + "_profitFee"), 0), DataEntry((keyID + "_grid"), 0), DataEntry((keyID + "_steps"), 0), DataEntry((keyID + "_ordering"), "middle"), DataEntry((keyID + "_reOrderOut"), "middle"), DataEntry((keyID + "_gridAsk"), "undefined asks"), DataEntry((keyID + "_gridBid"), "undefined bids"), DataEntry((keyID + "_lifetime"), 0), DataEntry((keyID + "_blockStart"), 0), DataEntry((keyID + "_blockStop"), 0), DataEntry((keyID + "_status"), "created")])
2230 }
2331
2432
2533
2634 @Callable(i)
27-func defineScalping (title) = {
35+func defineScalping (title,grids,step) = {
2836 let sender = toBase58String(i.caller.bytes)
29- let pay = extract(i.payment)
37+ let deposited = extract(i.payment)
3038 let keyID = genKeyID(sender)
3139 let usdV = getIntegerValue(oracle, "waves_usd_2")
32- if ((pay.amount >= 100000000))
33- then throw(("payment will higher than 1: " + toString(pay.amount)))
34- else throw(("Payment did botton 1: " + toString(pay.amount)))
40+ if ((100000000 >= deposited.amount))
41+ then throw(("Amount under of required: " + toString(deposited.amount)))
42+ else {
43+ let foundAsk = (deposited.amount / 2)
44+ let orderAsk = (foundAsk / (grids / 2))
45+ let arr = [1, 2, 3, 4, 5]
46+ let arrr = [1]
47+ let ver = {
48+ let $list21992223 = arr
49+ let $size21992223 = size($list21992223)
50+ let $acc021992223 = ""
51+ if (($size21992223 == 0))
52+ then $acc021992223
53+ else {
54+ let $acc121992223 = genGrid($acc021992223, $list21992223[0])
55+ if (($size21992223 == 1))
56+ then $acc121992223
57+ else {
58+ let $acc221992223 = genGrid($acc121992223, $list21992223[1])
59+ if (($size21992223 == 2))
60+ then $acc221992223
61+ else {
62+ let $acc321992223 = genGrid($acc221992223, $list21992223[2])
63+ if (($size21992223 == 3))
64+ then $acc321992223
65+ else {
66+ let $acc421992223 = genGrid($acc321992223, $list21992223[3])
67+ if (($size21992223 == 4))
68+ then $acc421992223
69+ else {
70+ let $acc521992223 = genGrid($acc421992223, $list21992223[4])
71+ if (($size21992223 == 5))
72+ then $acc521992223
73+ else {
74+ let $acc621992223 = genGrid($acc521992223, $list21992223[5])
75+ if (($size21992223 == 6))
76+ then $acc621992223
77+ else {
78+ let $acc721992223 = genGrid($acc621992223, $list21992223[6])
79+ if (($size21992223 == 7))
80+ then $acc721992223
81+ else {
82+ let $acc821992223 = genGrid($acc721992223, $list21992223[7])
83+ if (($size21992223 == 8))
84+ then $acc821992223
85+ else {
86+ let $acc921992223 = genGrid($acc821992223, $list21992223[8])
87+ if (($size21992223 == 9))
88+ then $acc921992223
89+ else {
90+ let $acc1021992223 = genGrid($acc921992223, $list21992223[9])
91+ if (($size21992223 == 10))
92+ then $acc1021992223
93+ else {
94+ let $acc1121992223 = genGrid($acc1021992223, $list21992223[10])
95+ throw("List size exceed 10")
96+ }
97+ }
98+ }
99+ }
100+ }
101+ }
102+ }
103+ }
104+ }
105+ }
106+ }
107+ }
108+ WriteSet([DataEntry((keyID + "_fundraised"), deposited.amount)])
109+ }
35110 }
36111
37112

github/deemru/w8io/026f985 
25.06 ms