tx · FoAr7o9E8mwg2Kyhp89F8XfL9CEwYgdgaVkzbzWbxuCJ 3Mz3XPi4hQnfVK9ZaA27YwFfiPApPgFnCts: -0.01400000 Waves 2019.12.28 03:35 [828187] smart account 3Mz3XPi4hQnfVK9ZaA27YwFfiPApPgFnCts > SELF 0.00000000 Waves
{ "type": 13, "id": "FoAr7o9E8mwg2Kyhp89F8XfL9CEwYgdgaVkzbzWbxuCJ", "fee": 1400000, "feeAssetId": null, "timestamp": 1577493376275, "version": 1, "sender": "3Mz3XPi4hQnfVK9ZaA27YwFfiPApPgFnCts", "senderPublicKey": "PuRPu7vRxThZUjyn7EuGuZyy6f77Sj87fnAzQC9Af4V", "proofs": [ "2WWNWhNfzrwMiJPccDNKMGpoBRqfFvbSVAUNHt7F7dDFnREbFvV34b5GifS848GpDUxFCE3yRPJbPTA4ykF4KpQs" ], "script": "base64:AAIDAAAAAAAAAAkIARIFCgMCAQIAAAALAAAAABV0b2tlblBvcnRJbk90aGVyQ2hhaW4EAAAAByRtYXRjaDAJAAQcAAAAAgUAAAAEdGhpcwIAAAAVdG9rZW5Qb3J0SW5PdGhlckNoYWluAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiCQAAAgAAAAECAAAAJHRva2VuUG9ydEluT3RoZXJDaGFpbiBpcyBub3QgZGVmaW5lZAAAAAAOY2hhaW5Db2xsZWN0b3IEAAAAByRtYXRjaDAJAAQcAAAAAgUAAAAEdGhpcwIAAAAOY2hhaW5Db2xsZWN0b3IDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAWIFAAAAByRtYXRjaDAJAQAAAAdBZGRyZXNzAAAAAQUAAAABYgkAAAIAAAABAgAAAB1jaGFpbkNvbGxlY3RvciBpcyBub3QgZGVmaW5lZAEAAAALYmxvY2tJbmZvQXQAAAABAAAABmhlaWdodAQAAAAHJG1hdGNoMAkABBwAAA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, "height": 828187, "spentComplexity": 0 } View: original | compacted Prev: 3vcmp7cw9smfSPT23fJn96ZDbNQxTrcg1DV9uhy7PLRR Next: HjSMerw3Ddp13ZwmYMaxNXBeJqeRAqeYhs1LWy8w4r4i Diff:
Old | New | Differences | |
---|---|---|---|
49 | 49 | ||
50 | 50 | ||
51 | 51 | func k (l) = { | |
52 | - | let m = | |
53 | - | if ((m == | |
52 | + | let m = takeRightBytes(take(l, (((1 + 1) + 32) + 1)), 1) | |
53 | + | if ((m == base58'1')) | |
54 | 54 | then unit | |
55 | 55 | else takeRightBytes(take(l, ((((1 + 1) + 32) + 1) + 32)), 32) | |
56 | 56 | } | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func o (l) = { | |
63 | - | let m = | |
64 | - | let p = if ((m == | |
63 | + | let m = takeRightBytes(take(l, (((1 + 1) + 32) + 1)), 1) | |
64 | + | let p = if ((m == base58'1')) | |
65 | 65 | then 0 | |
66 | 66 | else 32 | |
67 | - | let q = | |
68 | - | let r = if ((q == | |
67 | + | let q = takeRightBytes(take(l, (((((1 + 1) + 32) + 1) + p) + 1)), 1) | |
68 | + | let r = if ((q == base58'1')) | |
69 | 69 | then 0 | |
70 | 70 | else 32 | |
71 | 71 | takeRightBytes(take(l, ((((((((((1 + 1) + 32) + 1) + p) + 1) + r) + 8) + 8) + 8) + 32)), 32) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func s (l) = { | |
76 | - | let m = | |
77 | - | let p = if ((m == | |
76 | + | let m = takeRightBytes(take(l, (((1 + 1) + 32) + 1)), 1) | |
77 | + | let p = if ((m == base58'1')) | |
78 | 78 | then 0 | |
79 | 79 | else 32 | |
80 | - | let q = | |
81 | - | let r = if ((q == | |
80 | + | let q = takeRightBytes(take(l, (((((1 + 1) + 32) + 1) + p) + 1)), 1) | |
81 | + | let r = if ((q == base58'1')) | |
82 | 82 | then 0 | |
83 | 83 | else 32 | |
84 | 84 | toInt(takeRightBytes(take(l, ((((((((1 + 1) + 32) + 1) + p) + 1) + r) + 8) + 8)), 8)) | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func t (l) = { | |
89 | - | let m = | |
90 | - | let p = if ((m == | |
89 | + | let m = takeRightBytes(take(l, (((1 + 1) + 32) + 1)), 1) | |
90 | + | let p = if ((m == base58'1')) | |
91 | 91 | then 0 | |
92 | 92 | else 32 | |
93 | - | let q = | |
94 | - | let r = if ((q == | |
93 | + | let q = takeRightBytes(take(l, (((((1 + 1) + 32) + 1) + p) + 1)), 1) | |
94 | + | let r = if ((q == base58'1')) | |
95 | 95 | then 0 | |
96 | 96 | else 32 | |
97 | 97 | let u = toInt(takeRightBytes(take(l, (((((((((((1 + 1) + 32) + 1) + p) + 1) + r) + 8) + 8) + 8) + 32) + 2)), 2)) | |
99 | 99 | } | |
100 | 100 | ||
101 | 101 | ||
102 | - | func v (l) = | |
102 | + | func v (l) = take(l, 1) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | @Callable(w) | |
106 | 106 | func withdraw (x,y,z) = { | |
107 | - | let A = e(y) | |
108 | - | let B = n(x) | |
109 | - | let C = o(x) | |
110 | - | let D = t(x) | |
111 | - | let E = s(x) | |
112 | - | let F = k(x) | |
113 | - | let G = v(x) | |
114 | - | let H = (toBase58String(B) + "_tx") | |
115 | - | let I = (g(F) + "_asset") | |
116 | - | let J = { | |
117 | - | let b = getString(this, I) | |
118 | - | if ($isInstanceOf(b, "String")) | |
119 | - | then { | |
120 | - | let K = b | |
121 | - | i(K) | |
122 | - | } | |
123 | - | else throw("incorrect asset") | |
124 | - | } | |
125 | - | let L = w.caller | |
126 | - | ScriptResult(WriteSet([DataEntry(H, true)]), TransferSet([ScriptTransfer(L, E, J)])) | |
107 | + | let A = n(x) | |
108 | + | let B = 1 | |
109 | + | let C = (toBase58String(A) + "_tx") | |
110 | + | let D = unit | |
111 | + | let E = w.caller | |
112 | + | ScriptResult(WriteSet([DataEntry(C, true)]), TransferSet([ScriptTransfer(E, B, D)])) | |
127 | 113 | } | |
128 | 114 | ||
129 | 115 | ||
130 | - | @Verifier( | |
131 | - | func | |
116 | + | @Verifier(F) | |
117 | + | func G () = sigVerify(F.bodyBytes, F.proofs[0], F.senderPublicKey) | |
132 | 118 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = { | |
5 | 5 | let b = getBinary(this, "tokenPortInOtherChain") | |
6 | 6 | if ($isInstanceOf(b, "ByteVector")) | |
7 | 7 | then { | |
8 | 8 | let c = b | |
9 | 9 | c | |
10 | 10 | } | |
11 | 11 | else throw("tokenPortInOtherChain is not defined") | |
12 | 12 | } | |
13 | 13 | ||
14 | 14 | let d = { | |
15 | 15 | let b = getBinary(this, "chainCollector") | |
16 | 16 | if ($isInstanceOf(b, "ByteVector")) | |
17 | 17 | then { | |
18 | 18 | let c = b | |
19 | 19 | Address(c) | |
20 | 20 | } | |
21 | 21 | else throw("chainCollector is not defined") | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | func e (f) = { | |
25 | 25 | let b = getBinary(d, toString(f)) | |
26 | 26 | if ($isInstanceOf(b, "ByteVector")) | |
27 | 27 | then { | |
28 | 28 | let c = b | |
29 | 29 | c | |
30 | 30 | } | |
31 | 31 | else throw("Block info not found") | |
32 | 32 | } | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func g (h) = { | |
36 | 36 | let b = h | |
37 | 37 | if ($isInstanceOf(b, "ByteVector")) | |
38 | 38 | then { | |
39 | 39 | let h = b | |
40 | 40 | toBase58String(h) | |
41 | 41 | } | |
42 | 42 | else "WAVES" | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func i (j) = if ((j == "WAVES")) | |
47 | 47 | then unit | |
48 | 48 | else fromBase58String(j) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func k (l) = { | |
52 | - | let m = | |
53 | - | if ((m == | |
52 | + | let m = takeRightBytes(take(l, (((1 + 1) + 32) + 1)), 1) | |
53 | + | if ((m == base58'1')) | |
54 | 54 | then unit | |
55 | 55 | else takeRightBytes(take(l, ((((1 + 1) + 32) + 1) + 32)), 32) | |
56 | 56 | } | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func n (l) = blake2b256(l) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func o (l) = { | |
63 | - | let m = | |
64 | - | let p = if ((m == | |
63 | + | let m = takeRightBytes(take(l, (((1 + 1) + 32) + 1)), 1) | |
64 | + | let p = if ((m == base58'1')) | |
65 | 65 | then 0 | |
66 | 66 | else 32 | |
67 | - | let q = | |
68 | - | let r = if ((q == | |
67 | + | let q = takeRightBytes(take(l, (((((1 + 1) + 32) + 1) + p) + 1)), 1) | |
68 | + | let r = if ((q == base58'1')) | |
69 | 69 | then 0 | |
70 | 70 | else 32 | |
71 | 71 | takeRightBytes(take(l, ((((((((((1 + 1) + 32) + 1) + p) + 1) + r) + 8) + 8) + 8) + 32)), 32) | |
72 | 72 | } | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func s (l) = { | |
76 | - | let m = | |
77 | - | let p = if ((m == | |
76 | + | let m = takeRightBytes(take(l, (((1 + 1) + 32) + 1)), 1) | |
77 | + | let p = if ((m == base58'1')) | |
78 | 78 | then 0 | |
79 | 79 | else 32 | |
80 | - | let q = | |
81 | - | let r = if ((q == | |
80 | + | let q = takeRightBytes(take(l, (((((1 + 1) + 32) + 1) + p) + 1)), 1) | |
81 | + | let r = if ((q == base58'1')) | |
82 | 82 | then 0 | |
83 | 83 | else 32 | |
84 | 84 | toInt(takeRightBytes(take(l, ((((((((1 + 1) + 32) + 1) + p) + 1) + r) + 8) + 8)), 8)) | |
85 | 85 | } | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func t (l) = { | |
89 | - | let m = | |
90 | - | let p = if ((m == | |
89 | + | let m = takeRightBytes(take(l, (((1 + 1) + 32) + 1)), 1) | |
90 | + | let p = if ((m == base58'1')) | |
91 | 91 | then 0 | |
92 | 92 | else 32 | |
93 | - | let q = | |
94 | - | let r = if ((q == | |
93 | + | let q = takeRightBytes(take(l, (((((1 + 1) + 32) + 1) + p) + 1)), 1) | |
94 | + | let r = if ((q == base58'1')) | |
95 | 95 | then 0 | |
96 | 96 | else 32 | |
97 | 97 | let u = toInt(takeRightBytes(take(l, (((((((((((1 + 1) + 32) + 1) + p) + 1) + r) + 8) + 8) + 8) + 32) + 2)), 2)) | |
98 | 98 | takeRightBytes(take(l, ((((((((((((1 + 1) + 32) + 1) + p) + 1) + r) + 8) + 8) + 8) + 32) + 2) + u)), u) | |
99 | 99 | } | |
100 | 100 | ||
101 | 101 | ||
102 | - | func v (l) = | |
102 | + | func v (l) = take(l, 1) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | @Callable(w) | |
106 | 106 | func withdraw (x,y,z) = { | |
107 | - | let A = e(y) | |
108 | - | let B = n(x) | |
109 | - | let C = o(x) | |
110 | - | let D = t(x) | |
111 | - | let E = s(x) | |
112 | - | let F = k(x) | |
113 | - | let G = v(x) | |
114 | - | let H = (toBase58String(B) + "_tx") | |
115 | - | let I = (g(F) + "_asset") | |
116 | - | let J = { | |
117 | - | let b = getString(this, I) | |
118 | - | if ($isInstanceOf(b, "String")) | |
119 | - | then { | |
120 | - | let K = b | |
121 | - | i(K) | |
122 | - | } | |
123 | - | else throw("incorrect asset") | |
124 | - | } | |
125 | - | let L = w.caller | |
126 | - | ScriptResult(WriteSet([DataEntry(H, true)]), TransferSet([ScriptTransfer(L, E, J)])) | |
107 | + | let A = n(x) | |
108 | + | let B = 1 | |
109 | + | let C = (toBase58String(A) + "_tx") | |
110 | + | let D = unit | |
111 | + | let E = w.caller | |
112 | + | ScriptResult(WriteSet([DataEntry(C, true)]), TransferSet([ScriptTransfer(E, B, D)])) | |
127 | 113 | } | |
128 | 114 | ||
129 | 115 | ||
130 | - | @Verifier( | |
131 | - | func | |
116 | + | @Verifier(F) | |
117 | + | func G () = sigVerify(F.bodyBytes, F.proofs[0], F.senderPublicKey) | |
132 | 118 |
github/deemru/w8io/169f3d6 66.83 ms ◑