tx · C7XMpyex3FdL3tmBKZA7RtsDzkM9WZg5JbfY1xwr4iGo 3N6LXAerq2VVAPds14fKmB72f1Whmem7pxY: -0.01000000 Waves 2022.06.16 01:39 [2098098] smart account 3N6LXAerq2VVAPds14fKmB72f1Whmem7pxY > SELF 0.00000000 Waves
{ "type": 13, "id": "C7XMpyex3FdL3tmBKZA7RtsDzkM9WZg5JbfY1xwr4iGo", "fee": 1000000, "feeAssetId": null, "timestamp": 1655332770154, "version": 2, "chainId": 84, "sender": "3N6LXAerq2VVAPds14fKmB72f1Whmem7pxY", "senderPublicKey": "fFTt4dRQEMWmxs9cA5He1tph3gmQLAM4cnpj6eqkWPR", "proofs": [ "3Jj5ov5fajiMb4uzWFGvzYq37eKpDsLGw3nEBUChWXkh3kZP5kFaCqSXfE9rBAnNG4AFEojasdZoCybfQwsPEiCa" ], "script": "base64:AAIFAAAAAAAAACsIAhIKCggICAgICAQBARIDCgEEEgUKAwQEBBIDCgEBEgMKAQQSABIDCgEBAAAAHwAAAAAEbWFpbgIAAAAKbWFpbl9hc3NldAAAAAABbAIAAAAJbHBfYXNzZXRfAAAAAAJhMQIAAAAMc3dhcF9hc3NldDFfAAAAAAJzdAIAAAAPYWRkcmVzc19zdGFrZXJfAAAAAANzc3QCAAAADWFkZHJlc3NfcG9vbF8AAAAAA3N3cAIAAAANYWRkcmVzc19zd2FwXwAAAAACYTICAAAADHN3YXBfYXNzZXQyXwAAAAADYWExAgAAAAdwb29sXzFfAAAAAANhYTICAAAAB3Bvb2xfMl8AAAAAA3N0MQIAAAAOc3Rha2VyX2FkZHJlc3MAAAAABHR5cGUCAAAABXR5cGVfAAAAAAJzYQIAAAAPU1RBS0lOR19BTU9VTlRfAAAAAAJsYQIAAAANTEVBU0VfQU1PVU5UXwAAAAACaXgCAAAAA0lEXwAAAAAHcmF0ZUZlZQIAAAATcGVyY2VudGFnZV9yYXRlX2ZlZQAAAAACRDgAAAAAAAX14QAAAAAAAkQ2AAAAAAAAD0JAAAAAAA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EludGVnZXJFbnRyeQAAAAIFAAAACmN1cnJlbnRLZXkFAAAACW5ld0Ftb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAUVG90YWxfVG9rZW5zX0xvY2tlZDoFAAAACnRvdGFsdG9rZW4JAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAZhbW91bnQFAAAACU1haW5Bc3NldAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIJAABoAAAAAgkAAGkAAAACCQAAaAAAAAIFAAAABGRpZmYFAAAAA2JjZAUAAAATcHJldmlvdXNsb2NrYmFsYW5jZQUAAAANY3VycmVudEFtb3VudAUAAAAJTWFpbkFzc2V0BQAAAANuaWwJAAACAAAAAQIAAAApbGlxdWlkaXR5IGlzIGN1cnJlbnRseSB1bmRlciBtYWludGVuYW5jZS4JAAACAAAAAQIAAAAkZEFwcCBpcyBjdXJyZW50bHkgdW5kZXIgbWFpbnRlbmFuY2UuAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5D5g6yQ==", "height": 2098098, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GmqNS7rVJTWHTzkk35inrkpwshXLTXEezfwWS9ytEKRD Next: 41exwtqWT7YAmEyhUFR2wK39mmxoZ1dgWHEAe1U4Bwe5 Diff:
Old | New | Differences | |
---|---|---|---|
53 | 53 | ||
54 | 54 | let A = "activate_liquidity" | |
55 | 55 | ||
56 | - | let B = " | |
56 | + | let B = "block_distribuition" | |
57 | 57 | ||
58 | - | let C = " | |
58 | + | let C = "usdn_asset" | |
59 | 59 | ||
60 | - | let D = " | |
60 | + | let D = "usdt_asset" | |
61 | 61 | ||
62 | - | let E = " | |
62 | + | let E = "usdc_asset" | |
63 | 63 | ||
64 | - | let F = " | |
64 | + | let F = "ngnn_asset" | |
65 | 65 | ||
66 | - | @Callable(G) | |
67 | - | func constructor (H,I,J,K,L,M,N) = if ((G.caller == this)) | |
68 | - | then [StringEntry(a, H), StringEntry(B, I), StringEntry(D, K), StringEntry(C, J), StringEntry(E, L), BooleanEntry(F, M), IntegerEntry(o, N), BooleanEntry(x, true), BooleanEntry(z, false), BooleanEntry(y, false), BooleanEntry(A, false)] | |
66 | + | let G = "accept_waves" | |
67 | + | ||
68 | + | @Callable(H) | |
69 | + | func constructor (I,J,K,L,M,N,O,P) = if ((H.caller == this)) | |
70 | + | then [StringEntry(a, I), StringEntry(C, J), StringEntry(E, L), StringEntry(D, K), StringEntry(F, M), BooleanEntry(G, N), IntegerEntry(o, O), BooleanEntry(x, true), BooleanEntry(z, false), BooleanEntry(y, false), BooleanEntry(A, false), IntegerEntry(B, P)] | |
69 | 71 | else throw("Only the Admin itself can invoke this function") | |
70 | 72 | ||
71 | 73 | ||
72 | 74 | ||
73 | - | @Callable( | |
74 | - | func activate ( | |
75 | - | then [BooleanEntry(x, | |
75 | + | @Callable(H) | |
76 | + | func activate (Q) = if ((H.caller == this)) | |
77 | + | then [BooleanEntry(x, Q)] | |
76 | 78 | else throw("Only the Admin itself can invoke this function") | |
77 | 79 | ||
78 | 80 | ||
79 | 81 | ||
80 | - | @Callable( | |
81 | - | func maintenance ( | |
82 | - | then [BooleanEntry(y, | |
82 | + | @Callable(H) | |
83 | + | func maintenance (R,S,T) = if ((H.caller == this)) | |
84 | + | then [BooleanEntry(y, R), BooleanEntry(z, S), BooleanEntry(A, T)] | |
83 | 85 | else throw("Only the Admin itself can invoke this function") | |
84 | 86 | ||
85 | 87 | ||
86 | 88 | ||
87 | - | @Callable( | |
88 | - | func percentualRateFeeEdit ( | |
89 | - | then [IntegerEntry(o, | |
89 | + | @Callable(H) | |
90 | + | func percentualRateFeeEdit (U) = if ((H.caller == this)) | |
91 | + | then [IntegerEntry(o, U)] | |
90 | 92 | else throw("Only the Admin itself can invoke this function") | |
91 | 93 | ||
92 | 94 | ||
93 | 95 | ||
94 | - | @Callable( | |
95 | - | func acceptWaves ( | |
96 | - | then [BooleanEntry( | |
96 | + | @Callable(H) | |
97 | + | func acceptWaves (V) = if ((H.caller == this)) | |
98 | + | then [BooleanEntry(G, V)] | |
97 | 99 | else throw("Only the Admin itself can invoke this function") | |
98 | 100 | ||
99 | 101 | ||
100 | 102 | ||
101 | - | @Callable( | |
103 | + | @Callable(H) | |
102 | 104 | func deposit () = { | |
103 | - | let | |
104 | - | let | |
105 | - | let | |
106 | - | let | |
107 | - | let | |
108 | - | if ( | |
109 | - | then if (!( | |
110 | - | then if (( | |
111 | - | then throw(("Invalid Asset! Kindly Deposit Only " + toBase58String( | |
105 | + | let W = getBooleanValue(this, x) | |
106 | + | let X = getBooleanValue(this, A) | |
107 | + | let Y = getBooleanValue(this, G) | |
108 | + | let Z = H.payments[0] | |
109 | + | let aa = fromBase58String(getStringValue(this, a)) | |
110 | + | if (W) | |
111 | + | then if (!(X)) | |
112 | + | then if ((Z.assetId != aa)) | |
113 | + | then throw(("Invalid Asset! Kindly Deposit Only " + toBase58String(aa))) | |
112 | 114 | else { | |
113 | - | let | |
114 | - | let | |
115 | - | let | |
116 | - | if ($isInstanceOf( | |
115 | + | let ab = toBase58String(H.caller.bytes) | |
116 | + | let ac = { | |
117 | + | let ad = getInteger(this, ab) | |
118 | + | if ($isInstanceOf(ad, "Int")) | |
117 | 119 | then { | |
118 | - | let | |
119 | - | | |
120 | + | let ae = ad | |
121 | + | ae | |
120 | 122 | } | |
121 | 123 | else 0 | |
122 | 124 | } | |
123 | - | let | |
124 | - | let | |
125 | - | let | |
126 | - | let | |
127 | - | let | |
128 | - | if ($isInstanceOf( | |
125 | + | let af = (ac + Z.amount) | |
126 | + | let ag = IntegerEntry(ab, af) | |
127 | + | let ah = IntegerEntry(("Deposit_Height_Of_" + ab), height) | |
128 | + | let ai = { | |
129 | + | let ad = getInteger(this, "Total_Tokens_Locked:") | |
130 | + | if ($isInstanceOf(ad, "Int")) | |
129 | 131 | then { | |
130 | - | let | |
131 | - | | |
132 | + | let ae = ad | |
133 | + | ae | |
132 | 134 | } | |
133 | 135 | else 0 | |
134 | 136 | } | |
135 | - | let | |
136 | - | let | |
137 | - | [ | |
137 | + | let aj = (ai + Z.amount) | |
138 | + | let ak = IntegerEntry("Total_Tokens_Locked:", aj) | |
139 | + | [ag, ah, ak] | |
138 | 140 | } | |
139 | 141 | else throw("liquidity is currently under maintenance.") | |
140 | 142 | else throw("dApp is currently under maintenance.") | |
142 | 144 | ||
143 | 145 | ||
144 | 146 | ||
145 | - | @Callable( | |
146 | - | func remove ( | |
147 | - | let | |
148 | - | let | |
149 | - | let | |
150 | - | let | |
151 | - | let | |
152 | - | if ( | |
153 | - | then if (!( | |
147 | + | @Callable(H) | |
148 | + | func remove (al) = { | |
149 | + | let W = getBooleanValue(this, x) | |
150 | + | let X = getBooleanValue(this, A) | |
151 | + | let Y = getBooleanValue(this, G) | |
152 | + | let Z = H.payments[0] | |
153 | + | let aa = fromBase58String(getStringValue(this, a)) | |
154 | + | if (W) | |
155 | + | then if (!(X)) | |
154 | 156 | then { | |
155 | - | let Z = toBase58String(G.caller.bytes) | |
156 | - | let aa = valueOrElse(getInteger(this, Z), 0) | |
157 | - | let ak = ("Deposit_Height_Of_" + Z) | |
158 | - | let ag = getIntegerValue(this, "Total_Tokens_Locked:") | |
159 | - | let ah = (ag - aj) | |
160 | - | let al = (height - getIntegerValue(this, ak)) | |
161 | - | if ((0 > aj)) | |
157 | + | let ab = toBase58String(H.caller.bytes) | |
158 | + | let ac = valueOrElse(getInteger(this, ab), 0) | |
159 | + | let am = ("Deposit_Height_Of_" + ab) | |
160 | + | let ai = getIntegerValue(this, "Total_Tokens_Locked:") | |
161 | + | let aj = (ai - al) | |
162 | + | let an = (height - getIntegerValue(this, am)) | |
163 | + | let ao = getIntegerValue(this, B) | |
164 | + | if ((0 > al)) | |
162 | 165 | then throw("Can't withdraw negative AxAi amount") | |
163 | 166 | else { | |
164 | - | let | |
165 | - | if ((0 > | |
167 | + | let af = (ac - al) | |
168 | + | if ((0 > af)) | |
166 | 169 | then throw("Not enough AxAi balance") | |
167 | - | else [IntegerEntry( | |
170 | + | else [IntegerEntry(ab, af), IntegerEntry("Total_Tokens_Locked:", aj), ScriptTransfer(H.caller, al, aa), ScriptTransfer(H.caller, (((an * ao) / ai) * ac), aa)] | |
168 | 171 | } | |
169 | 172 | } | |
170 | 173 | else throw("liquidity is currently under maintenance.") | |
172 | 175 | } | |
173 | 176 | ||
174 | 177 | ||
175 | - | @Verifier( | |
176 | - | func | |
177 | - | let | |
178 | - | sigVerify( | |
178 | + | @Verifier(ap) | |
179 | + | func aq () = { | |
180 | + | let ad = ap | |
181 | + | sigVerify(ap.bodyBytes, ap.proofs[0], ap.senderPublicKey) | |
179 | 182 | } | |
180 | 183 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "main_asset" | |
5 | 5 | ||
6 | 6 | let b = "lp_asset_" | |
7 | 7 | ||
8 | 8 | let c = "swap_asset1_" | |
9 | 9 | ||
10 | 10 | let d = "address_staker_" | |
11 | 11 | ||
12 | 12 | let e = "address_pool_" | |
13 | 13 | ||
14 | 14 | let f = "address_swap_" | |
15 | 15 | ||
16 | 16 | let g = "swap_asset2_" | |
17 | 17 | ||
18 | 18 | let h = "pool_1_" | |
19 | 19 | ||
20 | 20 | let i = "pool_2_" | |
21 | 21 | ||
22 | 22 | let j = "staker_address" | |
23 | 23 | ||
24 | 24 | let k = "type_" | |
25 | 25 | ||
26 | 26 | let l = "STAKING_AMOUNT_" | |
27 | 27 | ||
28 | 28 | let m = "LEASE_AMOUNT_" | |
29 | 29 | ||
30 | 30 | let n = "ID_" | |
31 | 31 | ||
32 | 32 | let o = "percentage_rate_fee" | |
33 | 33 | ||
34 | 34 | let p = 100000000 | |
35 | 35 | ||
36 | 36 | let q = 1000000 | |
37 | 37 | ||
38 | 38 | let r = Address(this.bytes) | |
39 | 39 | ||
40 | 40 | let s = 5 | |
41 | 41 | ||
42 | 42 | func t (u) = toString(valueOrErrorMessage(addressFromString(u), (("Can't parse " + u) + " as address"))) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func v (w) = toBase58String(valueOrErrorMessage(value(assetInfo(fromBase58String(w))).id, (("Asset Id: " + w) + " is invalid."))) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | let x = "activate" | |
49 | 49 | ||
50 | 50 | let y = "activate_pools" | |
51 | 51 | ||
52 | 52 | let z = "activate_swap" | |
53 | 53 | ||
54 | 54 | let A = "activate_liquidity" | |
55 | 55 | ||
56 | - | let B = " | |
56 | + | let B = "block_distribuition" | |
57 | 57 | ||
58 | - | let C = " | |
58 | + | let C = "usdn_asset" | |
59 | 59 | ||
60 | - | let D = " | |
60 | + | let D = "usdt_asset" | |
61 | 61 | ||
62 | - | let E = " | |
62 | + | let E = "usdc_asset" | |
63 | 63 | ||
64 | - | let F = " | |
64 | + | let F = "ngnn_asset" | |
65 | 65 | ||
66 | - | @Callable(G) | |
67 | - | func constructor (H,I,J,K,L,M,N) = if ((G.caller == this)) | |
68 | - | then [StringEntry(a, H), StringEntry(B, I), StringEntry(D, K), StringEntry(C, J), StringEntry(E, L), BooleanEntry(F, M), IntegerEntry(o, N), BooleanEntry(x, true), BooleanEntry(z, false), BooleanEntry(y, false), BooleanEntry(A, false)] | |
66 | + | let G = "accept_waves" | |
67 | + | ||
68 | + | @Callable(H) | |
69 | + | func constructor (I,J,K,L,M,N,O,P) = if ((H.caller == this)) | |
70 | + | then [StringEntry(a, I), StringEntry(C, J), StringEntry(E, L), StringEntry(D, K), StringEntry(F, M), BooleanEntry(G, N), IntegerEntry(o, O), BooleanEntry(x, true), BooleanEntry(z, false), BooleanEntry(y, false), BooleanEntry(A, false), IntegerEntry(B, P)] | |
69 | 71 | else throw("Only the Admin itself can invoke this function") | |
70 | 72 | ||
71 | 73 | ||
72 | 74 | ||
73 | - | @Callable( | |
74 | - | func activate ( | |
75 | - | then [BooleanEntry(x, | |
75 | + | @Callable(H) | |
76 | + | func activate (Q) = if ((H.caller == this)) | |
77 | + | then [BooleanEntry(x, Q)] | |
76 | 78 | else throw("Only the Admin itself can invoke this function") | |
77 | 79 | ||
78 | 80 | ||
79 | 81 | ||
80 | - | @Callable( | |
81 | - | func maintenance ( | |
82 | - | then [BooleanEntry(y, | |
82 | + | @Callable(H) | |
83 | + | func maintenance (R,S,T) = if ((H.caller == this)) | |
84 | + | then [BooleanEntry(y, R), BooleanEntry(z, S), BooleanEntry(A, T)] | |
83 | 85 | else throw("Only the Admin itself can invoke this function") | |
84 | 86 | ||
85 | 87 | ||
86 | 88 | ||
87 | - | @Callable( | |
88 | - | func percentualRateFeeEdit ( | |
89 | - | then [IntegerEntry(o, | |
89 | + | @Callable(H) | |
90 | + | func percentualRateFeeEdit (U) = if ((H.caller == this)) | |
91 | + | then [IntegerEntry(o, U)] | |
90 | 92 | else throw("Only the Admin itself can invoke this function") | |
91 | 93 | ||
92 | 94 | ||
93 | 95 | ||
94 | - | @Callable( | |
95 | - | func acceptWaves ( | |
96 | - | then [BooleanEntry( | |
96 | + | @Callable(H) | |
97 | + | func acceptWaves (V) = if ((H.caller == this)) | |
98 | + | then [BooleanEntry(G, V)] | |
97 | 99 | else throw("Only the Admin itself can invoke this function") | |
98 | 100 | ||
99 | 101 | ||
100 | 102 | ||
101 | - | @Callable( | |
103 | + | @Callable(H) | |
102 | 104 | func deposit () = { | |
103 | - | let | |
104 | - | let | |
105 | - | let | |
106 | - | let | |
107 | - | let | |
108 | - | if ( | |
109 | - | then if (!( | |
110 | - | then if (( | |
111 | - | then throw(("Invalid Asset! Kindly Deposit Only " + toBase58String( | |
105 | + | let W = getBooleanValue(this, x) | |
106 | + | let X = getBooleanValue(this, A) | |
107 | + | let Y = getBooleanValue(this, G) | |
108 | + | let Z = H.payments[0] | |
109 | + | let aa = fromBase58String(getStringValue(this, a)) | |
110 | + | if (W) | |
111 | + | then if (!(X)) | |
112 | + | then if ((Z.assetId != aa)) | |
113 | + | then throw(("Invalid Asset! Kindly Deposit Only " + toBase58String(aa))) | |
112 | 114 | else { | |
113 | - | let | |
114 | - | let | |
115 | - | let | |
116 | - | if ($isInstanceOf( | |
115 | + | let ab = toBase58String(H.caller.bytes) | |
116 | + | let ac = { | |
117 | + | let ad = getInteger(this, ab) | |
118 | + | if ($isInstanceOf(ad, "Int")) | |
117 | 119 | then { | |
118 | - | let | |
119 | - | | |
120 | + | let ae = ad | |
121 | + | ae | |
120 | 122 | } | |
121 | 123 | else 0 | |
122 | 124 | } | |
123 | - | let | |
124 | - | let | |
125 | - | let | |
126 | - | let | |
127 | - | let | |
128 | - | if ($isInstanceOf( | |
125 | + | let af = (ac + Z.amount) | |
126 | + | let ag = IntegerEntry(ab, af) | |
127 | + | let ah = IntegerEntry(("Deposit_Height_Of_" + ab), height) | |
128 | + | let ai = { | |
129 | + | let ad = getInteger(this, "Total_Tokens_Locked:") | |
130 | + | if ($isInstanceOf(ad, "Int")) | |
129 | 131 | then { | |
130 | - | let | |
131 | - | | |
132 | + | let ae = ad | |
133 | + | ae | |
132 | 134 | } | |
133 | 135 | else 0 | |
134 | 136 | } | |
135 | - | let | |
136 | - | let | |
137 | - | [ | |
137 | + | let aj = (ai + Z.amount) | |
138 | + | let ak = IntegerEntry("Total_Tokens_Locked:", aj) | |
139 | + | [ag, ah, ak] | |
138 | 140 | } | |
139 | 141 | else throw("liquidity is currently under maintenance.") | |
140 | 142 | else throw("dApp is currently under maintenance.") | |
141 | 143 | } | |
142 | 144 | ||
143 | 145 | ||
144 | 146 | ||
145 | - | @Callable( | |
146 | - | func remove ( | |
147 | - | let | |
148 | - | let | |
149 | - | let | |
150 | - | let | |
151 | - | let | |
152 | - | if ( | |
153 | - | then if (!( | |
147 | + | @Callable(H) | |
148 | + | func remove (al) = { | |
149 | + | let W = getBooleanValue(this, x) | |
150 | + | let X = getBooleanValue(this, A) | |
151 | + | let Y = getBooleanValue(this, G) | |
152 | + | let Z = H.payments[0] | |
153 | + | let aa = fromBase58String(getStringValue(this, a)) | |
154 | + | if (W) | |
155 | + | then if (!(X)) | |
154 | 156 | then { | |
155 | - | let Z = toBase58String(G.caller.bytes) | |
156 | - | let aa = valueOrElse(getInteger(this, Z), 0) | |
157 | - | let ak = ("Deposit_Height_Of_" + Z) | |
158 | - | let ag = getIntegerValue(this, "Total_Tokens_Locked:") | |
159 | - | let ah = (ag - aj) | |
160 | - | let al = (height - getIntegerValue(this, ak)) | |
161 | - | if ((0 > aj)) | |
157 | + | let ab = toBase58String(H.caller.bytes) | |
158 | + | let ac = valueOrElse(getInteger(this, ab), 0) | |
159 | + | let am = ("Deposit_Height_Of_" + ab) | |
160 | + | let ai = getIntegerValue(this, "Total_Tokens_Locked:") | |
161 | + | let aj = (ai - al) | |
162 | + | let an = (height - getIntegerValue(this, am)) | |
163 | + | let ao = getIntegerValue(this, B) | |
164 | + | if ((0 > al)) | |
162 | 165 | then throw("Can't withdraw negative AxAi amount") | |
163 | 166 | else { | |
164 | - | let | |
165 | - | if ((0 > | |
167 | + | let af = (ac - al) | |
168 | + | if ((0 > af)) | |
166 | 169 | then throw("Not enough AxAi balance") | |
167 | - | else [IntegerEntry( | |
170 | + | else [IntegerEntry(ab, af), IntegerEntry("Total_Tokens_Locked:", aj), ScriptTransfer(H.caller, al, aa), ScriptTransfer(H.caller, (((an * ao) / ai) * ac), aa)] | |
168 | 171 | } | |
169 | 172 | } | |
170 | 173 | else throw("liquidity is currently under maintenance.") | |
171 | 174 | else throw("dApp is currently under maintenance.") | |
172 | 175 | } | |
173 | 176 | ||
174 | 177 | ||
175 | - | @Verifier( | |
176 | - | func | |
177 | - | let | |
178 | - | sigVerify( | |
178 | + | @Verifier(ap) | |
179 | + | func aq () = { | |
180 | + | let ad = ap | |
181 | + | sigVerify(ap.bodyBytes, ap.proofs[0], ap.senderPublicKey) | |
179 | 182 | } | |
180 | 183 |
github/deemru/w8io/026f985 55.04 ms ◑