tx · FFrLygYMTPpHGDKLyvVRcFVYPTNi1b1GS7w3uj96HTcU 3MyV9Fm9cwW9W68VCGfPvejLujx7xVpJiKW: -0.01400000 Waves 2020.01.12 13:50 [850720] smart account 3MyV9Fm9cwW9W68VCGfPvejLujx7xVpJiKW > SELF 0.00000000 Waves
{ "type": 13, "id": "FFrLygYMTPpHGDKLyvVRcFVYPTNi1b1GS7w3uj96HTcU", "fee": 1400000, "feeAssetId": null, "timestamp": 1578826246547, "version": 1, "sender": "3MyV9Fm9cwW9W68VCGfPvejLujx7xVpJiKW", "senderPublicKey": "8zVjiVAuhkkAyQsSHHvjkNNoN8WDKJAEBV5nSpiyyYWr", "proofs": [ "26fGgUU7eZuMoocyZUFwR6i95f98Xb5WrryjpYekmFnaocpesesEGKL4J8fYBazzWGe7k7eP7HyhyhuYV6WMNwEV" ], "script": "base64:AAIDAAAAAAAAABAIARIFCgMBCAESBQoDAQgBAAAABQAAAAAQZGFwcEFjb3VudFB1YktleQEAAAAgXEhEUm3PDwRAY2AliL4WiobL9+1WmvxN966h/S9Tg1gAAAAABnBhcjdJZAEAAAAgzlhA/ZjitMWTd+McxVJoK0GcLLGrEdV8aco355LpR4wAAAAABnVzZG5JZAEAAAAgImQ/Hr5gRukRahMT3KYz/hZ+B/l36bPyFfyZSSowCjcAAAAABWJ0Y0lkAQAAACC55z+qjxAm26PduiiTGHV+rQKiANia4ToJ1sVRNwsbjQAAAAAGZXVyb0lkAQAAACCSw5qKFqMqhCqerwy3G5JWNH0QK6GLgoZ1q6bNcyUwmwAAAAIAAAABaQEAAAAHZGVwb3NpdAAAAAMAAAAKY29tcGVTdGFydAAAAAJpZAAAAAVjb21wZQQAAAAIY29tcGVOdW0JAAGkAAAAAQUAAAAFY29tcGUEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50BAAAAAlwYXltZW50SWQIBQAAAANwbXQAAAAHYXNzZXRJZAQAAAAKY3VycmVudEtleQkAAlgAAAABCA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SGiyiNsMW4efqcomnGqJs3UGu Next: 4G5RnDBDo4p2q2AqiKVEMBtbYviqKb51zAjakS9hHrPc Diff:
Old | New | Differences | |
---|---|---|---|
55 | 55 | else 0 | |
56 | 56 | } | |
57 | 57 | let q = (n - r) | |
58 | - | if ((lastBlock.timestamp > g)) | |
59 | - | then throw("Can't withdraw compe start") | |
60 | - | else if ((0 > r)) | |
61 | - | then throw("Can't withdraw negative amount") | |
62 | - | else if ((0 > q)) | |
63 | - | then throw("Not enough balance") | |
64 | - | else if ((h == "EtV3CXQ4wqm28WPB1KaBv5B9ke2bpXRZMutYNEJUQcXm")) | |
65 | - | then ScriptResult(WriteSet([DataEntry(((((h + "_") + j) + "_") + m), q)]), TransferSet([ScriptTransfer(f.caller, r, b)])) | |
66 | - | else if ((h == "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC")) | |
67 | - | then ScriptResult(WriteSet([DataEntry(((((h + "_") + j) + "_") + m), q)]), TransferSet([ScriptTransfer(f.caller, r, c)])) | |
68 | - | else if ((h == "DWgwcZTMhSvnyYCoWLRUXXSH1RSkzThXLJhww9gwkqdn")) | |
69 | - | then ScriptResult(WriteSet([DataEntry(((((h + "_") + j) + "_") + m), q)]), TransferSet([ScriptTransfer(f.caller, r, d)])) | |
70 | - | else if ((h == "AsuWyM9MUUsMmWkK7jS48L3ky6gA1pxx7QtEYPbfLjAJ")) | |
71 | - | then ScriptResult(WriteSet([DataEntry(((((h + "_") + j) + "_") + m), q)]), TransferSet([ScriptTransfer(f.caller, r, e)])) | |
72 | - | else if ((h == "WAVES")) | |
73 | - | then ScriptResult(WriteSet([DataEntry(((((h + "_") + j) + "_") + m), q)]), TransferSet([ScriptTransfer(f.caller, r, unit)])) | |
74 | - | else throw("Can't withdraw") | |
58 | + | if ((0 > r)) | |
59 | + | then throw("Can't withdraw negative amount") | |
60 | + | else if ((0 > q)) | |
61 | + | then throw("Not enough balance") | |
62 | + | else if ((h == "EtV3CXQ4wqm28WPB1KaBv5B9ke2bpXRZMutYNEJUQcXm")) | |
63 | + | then ScriptResult(WriteSet([DataEntry(((((j + "_") + h) + "_") + m), q)]), TransferSet([ScriptTransfer(f.caller, r, b)])) | |
64 | + | else if ((h == "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC")) | |
65 | + | then ScriptResult(WriteSet([DataEntry(((((j + "_") + h) + "_") + m), q)]), TransferSet([ScriptTransfer(f.caller, r, c)])) | |
66 | + | else if ((h == "DWgwcZTMhSvnyYCoWLRUXXSH1RSkzThXLJhww9gwkqdn")) | |
67 | + | then ScriptResult(WriteSet([DataEntry(((((j + "_") + h) + "_") + m), q)]), TransferSet([ScriptTransfer(f.caller, r, d)])) | |
68 | + | else if ((h == "AsuWyM9MUUsMmWkK7jS48L3ky6gA1pxx7QtEYPbfLjAJ")) | |
69 | + | then ScriptResult(WriteSet([DataEntry(((((j + "_") + h) + "_") + m), q)]), TransferSet([ScriptTransfer(f.caller, r, e)])) | |
70 | + | else if ((h == "WAVES")) | |
71 | + | then ScriptResult(WriteSet([DataEntry(((((j + "_") + h) + "_") + m), q)]), TransferSet([ScriptTransfer(f.caller, r, unit)])) | |
72 | + | else throw("Can't withdraw") | |
75 | 73 | } | |
76 | 74 | ||
77 | 75 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'7DERSZYEoBTSwaTrN1ktwnx1Y5D46mSpMSayUNs8CmcK' | |
5 | 5 | ||
6 | 6 | let b = base58'EtV3CXQ4wqm28WPB1KaBv5B9ke2bpXRZMutYNEJUQcXm' | |
7 | 7 | ||
8 | 8 | let c = base58'3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC' | |
9 | 9 | ||
10 | 10 | let d = base58'DWgwcZTMhSvnyYCoWLRUXXSH1RSkzThXLJhww9gwkqdn' | |
11 | 11 | ||
12 | 12 | let e = base58'AsuWyM9MUUsMmWkK7jS48L3ky6gA1pxx7QtEYPbfLjAJ' | |
13 | 13 | ||
14 | 14 | @Callable(f) | |
15 | 15 | func deposit (g,h,i) = { | |
16 | 16 | let j = toString(i) | |
17 | 17 | let k = extract(f.payment) | |
18 | 18 | let l = k.assetId | |
19 | 19 | let m = toBase58String(f.caller.bytes) | |
20 | 20 | let n = { | |
21 | 21 | let o = getInteger(this, m) | |
22 | 22 | if ($isInstanceOf(o, "Int")) | |
23 | 23 | then { | |
24 | 24 | let p = o | |
25 | 25 | p | |
26 | 26 | } | |
27 | 27 | else 0 | |
28 | 28 | } | |
29 | 29 | let q = (n + k.amount) | |
30 | 30 | WriteSet([DataEntry(((((j + "_") + h) + "_") + m), q), DataEntry(((((j + "_") + h) + "_compeStart_") + m), g)]) | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | ||
35 | 35 | @Callable(f) | |
36 | 36 | func withdraw (r,h,i) = { | |
37 | 37 | let j = toString(i) | |
38 | 38 | let m = toBase58String(f.caller.bytes) | |
39 | 39 | let g = { | |
40 | 40 | let o = getInteger(this, ((((j + "_") + h) + "_compeStart_") + m)) | |
41 | 41 | if ($isInstanceOf(o, "Int")) | |
42 | 42 | then { | |
43 | 43 | let p = o | |
44 | 44 | p | |
45 | 45 | } | |
46 | 46 | else 0 | |
47 | 47 | } | |
48 | 48 | let n = { | |
49 | 49 | let o = getInteger(this, ((((j + "_") + h) + "_") + m)) | |
50 | 50 | if ($isInstanceOf(o, "Int")) | |
51 | 51 | then { | |
52 | 52 | let p = o | |
53 | 53 | p | |
54 | 54 | } | |
55 | 55 | else 0 | |
56 | 56 | } | |
57 | 57 | let q = (n - r) | |
58 | - | if ((lastBlock.timestamp > g)) | |
59 | - | then throw("Can't withdraw compe start") | |
60 | - | else if ((0 > r)) | |
61 | - | then throw("Can't withdraw negative amount") | |
62 | - | else if ((0 > q)) | |
63 | - | then throw("Not enough balance") | |
64 | - | else if ((h == "EtV3CXQ4wqm28WPB1KaBv5B9ke2bpXRZMutYNEJUQcXm")) | |
65 | - | then ScriptResult(WriteSet([DataEntry(((((h + "_") + j) + "_") + m), q)]), TransferSet([ScriptTransfer(f.caller, r, b)])) | |
66 | - | else if ((h == "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC")) | |
67 | - | then ScriptResult(WriteSet([DataEntry(((((h + "_") + j) + "_") + m), q)]), TransferSet([ScriptTransfer(f.caller, r, c)])) | |
68 | - | else if ((h == "DWgwcZTMhSvnyYCoWLRUXXSH1RSkzThXLJhww9gwkqdn")) | |
69 | - | then ScriptResult(WriteSet([DataEntry(((((h + "_") + j) + "_") + m), q)]), TransferSet([ScriptTransfer(f.caller, r, d)])) | |
70 | - | else if ((h == "AsuWyM9MUUsMmWkK7jS48L3ky6gA1pxx7QtEYPbfLjAJ")) | |
71 | - | then ScriptResult(WriteSet([DataEntry(((((h + "_") + j) + "_") + m), q)]), TransferSet([ScriptTransfer(f.caller, r, e)])) | |
72 | - | else if ((h == "WAVES")) | |
73 | - | then ScriptResult(WriteSet([DataEntry(((((h + "_") + j) + "_") + m), q)]), TransferSet([ScriptTransfer(f.caller, r, unit)])) | |
74 | - | else throw("Can't withdraw") | |
58 | + | if ((0 > r)) | |
59 | + | then throw("Can't withdraw negative amount") | |
60 | + | else if ((0 > q)) | |
61 | + | then throw("Not enough balance") | |
62 | + | else if ((h == "EtV3CXQ4wqm28WPB1KaBv5B9ke2bpXRZMutYNEJUQcXm")) | |
63 | + | then ScriptResult(WriteSet([DataEntry(((((j + "_") + h) + "_") + m), q)]), TransferSet([ScriptTransfer(f.caller, r, b)])) | |
64 | + | else if ((h == "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC")) | |
65 | + | then ScriptResult(WriteSet([DataEntry(((((j + "_") + h) + "_") + m), q)]), TransferSet([ScriptTransfer(f.caller, r, c)])) | |
66 | + | else if ((h == "DWgwcZTMhSvnyYCoWLRUXXSH1RSkzThXLJhww9gwkqdn")) | |
67 | + | then ScriptResult(WriteSet([DataEntry(((((j + "_") + h) + "_") + m), q)]), TransferSet([ScriptTransfer(f.caller, r, d)])) | |
68 | + | else if ((h == "AsuWyM9MUUsMmWkK7jS48L3ky6gA1pxx7QtEYPbfLjAJ")) | |
69 | + | then ScriptResult(WriteSet([DataEntry(((((j + "_") + h) + "_") + m), q)]), TransferSet([ScriptTransfer(f.caller, r, e)])) | |
70 | + | else if ((h == "WAVES")) | |
71 | + | then ScriptResult(WriteSet([DataEntry(((((j + "_") + h) + "_") + m), q)]), TransferSet([ScriptTransfer(f.caller, r, unit)])) | |
72 | + | else throw("Can't withdraw") | |
75 | 73 | } | |
76 | 74 | ||
77 | 75 | ||
78 | 76 | @Verifier(s) | |
79 | 77 | func t () = { | |
80 | 78 | let o = s | |
81 | 79 | if ($isInstanceOf(o, "TransferTransaction")) | |
82 | 80 | then { | |
83 | 81 | let u = o | |
84 | 82 | sigVerify(u.bodyBytes, u.proofs[0], u.senderPublicKey) | |
85 | 83 | } | |
86 | 84 | else if ($isInstanceOf(o, "SetScriptTransaction")) | |
87 | 85 | then { | |
88 | 86 | let v = o | |
89 | 87 | sigVerify(v.bodyBytes, v.proofs[0], v.senderPublicKey) | |
90 | 88 | } | |
91 | 89 | else true | |
92 | 90 | } | |
93 | 91 |
github/deemru/w8io/169f3d6 50.24 ms ◑