tx · GicYCky62vVn2d5DVWPsS7Vpv9RY5kWDWFBXojgcbKYW 3MpRDrT92zK6yWJh47UdA8mRDH7f2F3CSzH: -0.01400000 Waves 2021.05.25 18:18 [1541348] smart account 3MpRDrT92zK6yWJh47UdA8mRDH7f2F3CSzH > SELF 0.00000000 Waves
{ "type": 13, "id": "GicYCky62vVn2d5DVWPsS7Vpv9RY5kWDWFBXojgcbKYW", "fee": 1400000, "feeAssetId": null, "timestamp": 1621955943387, "version": 2, "chainId": 84, "sender": "3MpRDrT92zK6yWJh47UdA8mRDH7f2F3CSzH", "senderPublicKey": "6it1s6XyHkFTbzgCJPXSeHjyLYixDHy6hJgzzfbntDGB", "proofs": [ "5kWYfsejELvZMVYgahijjk3TLAU84SLyf5fPqyaNPs5MMXYpzYWsTH48CXKGscbpzuLboKwpNu5NAyaoXUsW8wxP" ], "script": "base64:AAIEAAAAAAAAAAcIAhIDCgEIAAAABAAAAAAGbWlkaUlkAQAAACAGLtZERQwp0mc9GkII6TL8MrO9FCVbUZ4Q1IdRUGKaigAAAAAFZGF0dW0IBQAAAAlsYXN0QmxvY2sAAAAJdGltZXN0YW1wAAAAAAZhbU1pZGkAAAAAAAAAAAABAAAAC2lzUGF5bWVudE9rAAAAAQAAAAFpAwkAAAAAAAACCQABkAAAAAEIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAFFBheW1lbnQgbm90IGF0dGFjaGVkBAAAAAFwCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAAckbWF0Y2gwCAUAAAABcAAAAAdhc3NldElkCQAAZwAAAAIAAAAbSOtX4AAIBQAAAAFwAAAABmFtb3VudAAAAAEAAAABaQEAAAAHYnV5bWlkaQAAAAEAAAAJdGhlU3RyaW5nBAAAAARjb2VmAwkAAGYAAAACAAAAAXm6kfwABQAAAAVkYXR1bQAAAAAAAADqYAMJAABmAAAAAgAAAAF5ygUQAAUAAAAFZGF0dW0AAAAAAA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c2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAIZWxBbW91bnQFAAAABm1pZGlJZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAlva0FkZHJlc3MFAAAACXJlZkFtb3VudAUAAAAGbWlkaUlkBQAAAANuaWwJAAACAAAAAQIAAAAdV3JvbmcgcGF5bWVudCBhbW91bnQgb3IgYXNzZXQAAAAA6ny+Cw==", "height": 1541348, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: J31SvotDRjyYKZbrwRogRAJzoTGm35uh7eSR3r2R8NNo Next: HJMobteXoavaiDrKa51SKzLWsQsvEPWRC4FFnf7jKEkB Diff:
Old | New | Differences | |
---|---|---|---|
18 | 18 | ||
19 | 19 | @Callable(e) | |
20 | 20 | func buymidi (h) = { | |
21 | - | let i = if (( | |
21 | + | let i = if ((1622332800000 > b)) | |
22 | 22 | then 60000 | |
23 | - | else if ((1622073600000 > b)) | |
24 | - | then 30000 | |
25 | - | else if ((1622332800000 > b)) | |
26 | - | then 27000 | |
27 | - | else if ((1622592000000 > b)) | |
28 | - | then 24000 | |
29 | - | else if ((1622851200000 > b)) | |
30 | - | then 21000 | |
31 | - | else if ((1623110400000 > b)) | |
32 | - | then 18000 | |
33 | - | else if ((1623369600000 > b)) | |
34 | - | then 15000 | |
35 | - | else if ((1623628800000 > b)) | |
36 | - | then 12000 | |
37 | - | else if ((1624147200000 > b)) | |
38 | - | then 9000 | |
39 | - | else if ((1624406400000 > b)) | |
40 | - | then 6000 | |
41 | - | else throw("Sorry ICO ended") | |
23 | + | else if ((1622592000000 > b)) | |
24 | + | then 24000 | |
25 | + | else if ((1622851200000 > b)) | |
26 | + | then 21000 | |
27 | + | else if ((1623110400000 > b)) | |
28 | + | then 18000 | |
29 | + | else if ((1623369600000 > b)) | |
30 | + | then 15000 | |
31 | + | else if ((1623628800000 > b)) | |
32 | + | then 12000 | |
33 | + | else if ((1623888000000 > b)) | |
34 | + | then 9000 | |
35 | + | else if ((1624147200000 > b)) | |
36 | + | then 6000 | |
37 | + | else if ((1624406400000 > b)) | |
38 | + | then 3000 | |
39 | + | else throw("Sorry ICO ended") | |
42 | 40 | if (d(e)) | |
43 | 41 | then { | |
44 | 42 | let j = e.payments[0] | |
45 | 43 | let k = j.amount | |
46 | 44 | let l = ((k / 100000000) * (i * 10000)) | |
47 | - | [ScriptTransfer(e.caller, l, a)] | |
45 | + | let m = addressFromStringValue(h) | |
46 | + | let n = toString(e.caller) | |
47 | + | let o = if ((h == "any")) | |
48 | + | then 0 | |
49 | + | else if ((h == n)) | |
50 | + | then 0 | |
51 | + | else (l / 10) | |
52 | + | if ((h == "any")) | |
53 | + | then [ScriptTransfer(e.caller, l, a)] | |
54 | + | else [ScriptTransfer(e.caller, l, a), ScriptTransfer(m, o, a)] | |
48 | 55 | } | |
49 | 56 | else throw("Wrong payment amount or asset") | |
50 | 57 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'R8sQUmwwAENBL6B5ejGztDh3RzJ3MbKRqK7GtspFxKT' | |
5 | 5 | ||
6 | 6 | let b = lastBlock.timestamp | |
7 | 7 | ||
8 | 8 | let c = 0 | |
9 | 9 | ||
10 | 10 | func d (e) = if ((size(e.payments) == 0)) | |
11 | 11 | then throw("Payment not attached") | |
12 | 12 | else { | |
13 | 13 | let f = e.payments[0] | |
14 | 14 | let g = f.assetId | |
15 | 15 | (30000000000000 >= f.amount) | |
16 | 16 | } | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | @Callable(e) | |
20 | 20 | func buymidi (h) = { | |
21 | - | let i = if (( | |
21 | + | let i = if ((1622332800000 > b)) | |
22 | 22 | then 60000 | |
23 | - | else if ((1622073600000 > b)) | |
24 | - | then 30000 | |
25 | - | else if ((1622332800000 > b)) | |
26 | - | then 27000 | |
27 | - | else if ((1622592000000 > b)) | |
28 | - | then 24000 | |
29 | - | else if ((1622851200000 > b)) | |
30 | - | then 21000 | |
31 | - | else if ((1623110400000 > b)) | |
32 | - | then 18000 | |
33 | - | else if ((1623369600000 > b)) | |
34 | - | then 15000 | |
35 | - | else if ((1623628800000 > b)) | |
36 | - | then 12000 | |
37 | - | else if ((1624147200000 > b)) | |
38 | - | then 9000 | |
39 | - | else if ((1624406400000 > b)) | |
40 | - | then 6000 | |
41 | - | else throw("Sorry ICO ended") | |
23 | + | else if ((1622592000000 > b)) | |
24 | + | then 24000 | |
25 | + | else if ((1622851200000 > b)) | |
26 | + | then 21000 | |
27 | + | else if ((1623110400000 > b)) | |
28 | + | then 18000 | |
29 | + | else if ((1623369600000 > b)) | |
30 | + | then 15000 | |
31 | + | else if ((1623628800000 > b)) | |
32 | + | then 12000 | |
33 | + | else if ((1623888000000 > b)) | |
34 | + | then 9000 | |
35 | + | else if ((1624147200000 > b)) | |
36 | + | then 6000 | |
37 | + | else if ((1624406400000 > b)) | |
38 | + | then 3000 | |
39 | + | else throw("Sorry ICO ended") | |
42 | 40 | if (d(e)) | |
43 | 41 | then { | |
44 | 42 | let j = e.payments[0] | |
45 | 43 | let k = j.amount | |
46 | 44 | let l = ((k / 100000000) * (i * 10000)) | |
47 | - | [ScriptTransfer(e.caller, l, a)] | |
45 | + | let m = addressFromStringValue(h) | |
46 | + | let n = toString(e.caller) | |
47 | + | let o = if ((h == "any")) | |
48 | + | then 0 | |
49 | + | else if ((h == n)) | |
50 | + | then 0 | |
51 | + | else (l / 10) | |
52 | + | if ((h == "any")) | |
53 | + | then [ScriptTransfer(e.caller, l, a)] | |
54 | + | else [ScriptTransfer(e.caller, l, a), ScriptTransfer(m, o, a)] | |
48 | 55 | } | |
49 | 56 | else throw("Wrong payment amount or asset") | |
50 | 57 | } | |
51 | 58 | ||
52 | 59 |
github/deemru/w8io/026f985 36.44 ms ◑