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