tx · HwkvVKESTGvBf9KgrmBv1zMnRLmPJsJz8xuL868XZYJt 3N5CayN8CtoM2QuWDDDQFCPdiviGSt9GTpt: -0.01300000 Waves 2023.05.10 13:16 [2571656] smart account 3N5CayN8CtoM2QuWDDDQFCPdiviGSt9GTpt > SELF 0.00000000 Waves
{ "type": 13, "id": "HwkvVKESTGvBf9KgrmBv1zMnRLmPJsJz8xuL868XZYJt", "fee": 1300000, "feeAssetId": null, "timestamp": 1683713796949, "version": 2, "chainId": 84, "sender": "3N5CayN8CtoM2QuWDDDQFCPdiviGSt9GTpt", "senderPublicKey": "8z79nXR33yhmSzh8WGovFPyrSqSq4gYftBwUQBsc577Y", "proofs": [ "3MQKzYDWSjuu13tkgF4wbterGYeJ4NP9qbBjnKAjeFpVUfAWpyXmv4Xex2oHJok4Dp5YTnz9XEK1QUJxUoGtyHGF" ], "script": "base64:BgIICAISABIAEgAPAAxjb250cmFjdEZpbGUCD3Byb3h5X3BlcGUucmlkZQARa2V5c1dhdmVzQ29udHJhY3QCEiVzX19zV2F2ZXNDb250cmFjdAAQa2V5c1dhdmVzQXNzZXRJZAIRJXNfX3NXYXZlc0Fzc2V0SWQBD2dldFN0cmluZ09yRmFpbAEDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJ0IAgUEdGhpcwUDa2V5CQCsAgICFU5vIGRhdGEgZm9yIHRoaXMua2V5PQUDa2V5ARNwZXBlQ29udHJhY3RBZGRyZXNzAAkBD2dldFN0cmluZ09yRmFpbAEFEWtleXNXYXZlc0NvbnRyYWN0AQ5zV2F2ZXNJZFN0cmluZwAJAQ9nZXRTdHJpbmdPckZhaWwBBRBrZXlzV2F2ZXNBc3NldElkAAxwZXBlQ29udHJhY3QJARFAZXh0ck5hdGl2ZSgxMDYyKQEJARNwZXBlQ29udHJhY3RBZGRyZXNzAAAGc1dhdmVzCQDZBAEJAQ5zV2F2ZXNJZFN0cmluZwABE2tleU1hbmFnZXJQdWJsaWNLZXkAAhQlc19fbWFuY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Y3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABA90YXJnZXRQdWJsaWNLZXkEByRtYXRjaDAJARZtYW5hZ2VyUHVibGljS2V5T3JVbml0AAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAJwawUHJG1hdGNoMAUCcGsDCQABAgUHJG1hdGNoMAIEVW5pdAgFAnR4D3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQ90YXJnZXRQdWJsaWNLZXmL8IHr", "height": 2571656, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8KKaYQJyBhmR4Szt7XySQqXoPrzmEwNtyYRicDZPNp8x Next: none Diff:
Old | New | Differences | |
---|---|---|---|
26 | 26 | func k () = "%s__managerVaultAddress" | |
27 | 27 | ||
28 | 28 | ||
29 | - | func l () = addressFromStringValue(getStringValue(k())) | |
29 | + | func l () = { | |
30 | + | let m = getString(k()) | |
31 | + | if ($isInstanceOf(m, "String")) | |
32 | + | then { | |
33 | + | let n = m | |
34 | + | addressFromStringValue(n) | |
35 | + | } | |
36 | + | else this | |
37 | + | } | |
30 | 38 | ||
31 | 39 | ||
32 | - | func | |
40 | + | func o (p) = throw(((a + ": ") + p)) | |
33 | 41 | ||
34 | 42 | ||
35 | - | func | |
36 | - | let | |
37 | - | let | |
38 | - | if ($isInstanceOf( | |
43 | + | func q () = { | |
44 | + | let r = l() | |
45 | + | let m = getString(r, j()) | |
46 | + | if ($isInstanceOf(m, "String")) | |
39 | 47 | then { | |
40 | - | let | |
41 | - | fromBase58String( | |
48 | + | let n = m | |
49 | + | fromBase58String(n) | |
42 | 50 | } | |
43 | - | else if ($isInstanceOf( | |
51 | + | else if ($isInstanceOf(m, "Unit")) | |
44 | 52 | then unit | |
45 | 53 | else throw("Match error") | |
46 | 54 | } | |
47 | 55 | ||
48 | 56 | ||
49 | 57 | func s (t) = { | |
50 | - | let | |
51 | - | if ($isInstanceOf( | |
58 | + | let m = q() | |
59 | + | if ($isInstanceOf(m, "ByteVector")) | |
52 | 60 | then { | |
53 | - | let u = | |
61 | + | let u = m | |
54 | 62 | (t.callerPublicKey == u) | |
55 | 63 | } | |
56 | - | else if ($isInstanceOf( | |
64 | + | else if ($isInstanceOf(m, "Unit")) | |
57 | 65 | then (t.caller == this) | |
58 | 66 | else throw("Match error") | |
59 | 67 | } | |
67 | 75 | @Callable(t) | |
68 | 76 | func getRate () = { | |
69 | 77 | let w = invoke(h, "getRate", nil, nil) | |
70 | - | let | |
71 | - | if ($isInstanceOf( | |
78 | + | let m = w | |
79 | + | if ($isInstanceOf(m, "String")) | |
72 | 80 | then { | |
73 | - | let x = | |
81 | + | let x = m | |
74 | 82 | $Tuple2(nil, parseIntValue(x)) | |
75 | 83 | } | |
76 | - | else | |
84 | + | else o("getRate(): unexpected return") | |
77 | 85 | } | |
78 | 86 | ||
79 | 87 | ||
118 | 126 | @Verifier(B) | |
119 | 127 | func C () = { | |
120 | 128 | let D = { | |
121 | - | let | |
122 | - | if ($isInstanceOf( | |
129 | + | let m = q() | |
130 | + | if ($isInstanceOf(m, "ByteVector")) | |
123 | 131 | then { | |
124 | - | let u = | |
132 | + | let u = m | |
125 | 133 | u | |
126 | 134 | } | |
127 | - | else if ($isInstanceOf( | |
135 | + | else if ($isInstanceOf(m, "Unit")) | |
128 | 136 | then B.senderPublicKey | |
129 | 137 | else throw("Match error") | |
130 | 138 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "proxy_pepe.ride" | |
5 | 5 | ||
6 | 6 | let b = "%s__sWavesContract" | |
7 | 7 | ||
8 | 8 | let c = "%s__sWavesAssetId" | |
9 | 9 | ||
10 | 10 | func d (e) = valueOrErrorMessage(getString(this, e), ("No data for this.key=" + e)) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func f () = d(b) | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func g () = d(c) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | let h = addressFromStringValue(f()) | |
20 | 20 | ||
21 | 21 | let i = fromBase58String(g()) | |
22 | 22 | ||
23 | 23 | func j () = "%s__managerPublicKey" | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func k () = "%s__managerVaultAddress" | |
27 | 27 | ||
28 | 28 | ||
29 | - | func l () = addressFromStringValue(getStringValue(k())) | |
29 | + | func l () = { | |
30 | + | let m = getString(k()) | |
31 | + | if ($isInstanceOf(m, "String")) | |
32 | + | then { | |
33 | + | let n = m | |
34 | + | addressFromStringValue(n) | |
35 | + | } | |
36 | + | else this | |
37 | + | } | |
30 | 38 | ||
31 | 39 | ||
32 | - | func | |
40 | + | func o (p) = throw(((a + ": ") + p)) | |
33 | 41 | ||
34 | 42 | ||
35 | - | func | |
36 | - | let | |
37 | - | let | |
38 | - | if ($isInstanceOf( | |
43 | + | func q () = { | |
44 | + | let r = l() | |
45 | + | let m = getString(r, j()) | |
46 | + | if ($isInstanceOf(m, "String")) | |
39 | 47 | then { | |
40 | - | let | |
41 | - | fromBase58String( | |
48 | + | let n = m | |
49 | + | fromBase58String(n) | |
42 | 50 | } | |
43 | - | else if ($isInstanceOf( | |
51 | + | else if ($isInstanceOf(m, "Unit")) | |
44 | 52 | then unit | |
45 | 53 | else throw("Match error") | |
46 | 54 | } | |
47 | 55 | ||
48 | 56 | ||
49 | 57 | func s (t) = { | |
50 | - | let | |
51 | - | if ($isInstanceOf( | |
58 | + | let m = q() | |
59 | + | if ($isInstanceOf(m, "ByteVector")) | |
52 | 60 | then { | |
53 | - | let u = | |
61 | + | let u = m | |
54 | 62 | (t.callerPublicKey == u) | |
55 | 63 | } | |
56 | - | else if ($isInstanceOf( | |
64 | + | else if ($isInstanceOf(m, "Unit")) | |
57 | 65 | then (t.caller == this) | |
58 | 66 | else throw("Match error") | |
59 | 67 | } | |
60 | 68 | ||
61 | 69 | ||
62 | 70 | func v (t) = if (s(t)) | |
63 | 71 | then true | |
64 | 72 | else throw("permission denied") | |
65 | 73 | ||
66 | 74 | ||
67 | 75 | @Callable(t) | |
68 | 76 | func getRate () = { | |
69 | 77 | let w = invoke(h, "getRate", nil, nil) | |
70 | - | let | |
71 | - | if ($isInstanceOf( | |
78 | + | let m = w | |
79 | + | if ($isInstanceOf(m, "String")) | |
72 | 80 | then { | |
73 | - | let x = | |
81 | + | let x = m | |
74 | 82 | $Tuple2(nil, parseIntValue(x)) | |
75 | 83 | } | |
76 | - | else | |
84 | + | else o("getRate(): unexpected return") | |
77 | 85 | } | |
78 | 86 | ||
79 | 87 | ||
80 | 88 | ||
81 | 89 | @Callable(t) | |
82 | 90 | func deposit () = { | |
83 | 91 | let y = assetBalance(this, i) | |
84 | 92 | if ((y == y)) | |
85 | 93 | then { | |
86 | 94 | let w = invoke(h, "deposit", nil, t.payments) | |
87 | 95 | if ((w == w)) | |
88 | 96 | then { | |
89 | 97 | let z = assetBalance(this, i) | |
90 | 98 | let A = (z - y) | |
91 | 99 | $Tuple2([ScriptTransfer(t.caller, A, i)], A) | |
92 | 100 | } | |
93 | 101 | else throw("Strict value is not equal to itself.") | |
94 | 102 | } | |
95 | 103 | else throw("Strict value is not equal to itself.") | |
96 | 104 | } | |
97 | 105 | ||
98 | 106 | ||
99 | 107 | ||
100 | 108 | @Callable(t) | |
101 | 109 | func withdraw () = { | |
102 | 110 | let y = wavesBalance(this).available | |
103 | 111 | if ((y == y)) | |
104 | 112 | then { | |
105 | 113 | let w = invoke(h, "withdraw", nil, t.payments) | |
106 | 114 | if ((w == w)) | |
107 | 115 | then { | |
108 | 116 | let z = wavesBalance(this).available | |
109 | 117 | let A = (z - y) | |
110 | 118 | $Tuple2([ScriptTransfer(t.caller, A, unit)], A) | |
111 | 119 | } | |
112 | 120 | else throw("Strict value is not equal to itself.") | |
113 | 121 | } | |
114 | 122 | else throw("Strict value is not equal to itself.") | |
115 | 123 | } | |
116 | 124 | ||
117 | 125 | ||
118 | 126 | @Verifier(B) | |
119 | 127 | func C () = { | |
120 | 128 | let D = { | |
121 | - | let | |
122 | - | if ($isInstanceOf( | |
129 | + | let m = q() | |
130 | + | if ($isInstanceOf(m, "ByteVector")) | |
123 | 131 | then { | |
124 | - | let u = | |
132 | + | let u = m | |
125 | 133 | u | |
126 | 134 | } | |
127 | - | else if ($isInstanceOf( | |
135 | + | else if ($isInstanceOf(m, "Unit")) | |
128 | 136 | then B.senderPublicKey | |
129 | 137 | else throw("Match error") | |
130 | 138 | } | |
131 | 139 | sigVerify(B.bodyBytes, B.proofs[0], D) | |
132 | 140 | } | |
133 | 141 |
github/deemru/w8io/026f985 29.43 ms ◑