tx · GHUr75suPFacRdHFdTxxUrGdvcRBUCgi7Z7QfdfSAdCL

3NA2sejUzEcL7Gg8WfhrcqxP22fHk2SS9pK:  -0.00600000 Waves

2022.08.27 23:17 [2203352] smart account 3NA2sejUzEcL7Gg8WfhrcqxP22fHk2SS9pK > SELF 0.00000000 Waves

{ "type": 13, "id": "GHUr75suPFacRdHFdTxxUrGdvcRBUCgi7Z7QfdfSAdCL", "fee": 600000, "feeAssetId": null, "timestamp": 1661631461421, "version": 2, "chainId": 84, "sender": "3NA2sejUzEcL7Gg8WfhrcqxP22fHk2SS9pK", "senderPublicKey": "HMzDczZUThMMhE2Grm1ZmpN3QNZ9N7CUCYnsqh4utSDJ", "proofs": [ "2VLHepm3qFYNbwD4KPPPe3rY3B4k6EsCs6TDHA5ZVY2sHP83Pj3WbbRhXRP6xhU1uNEV9gNDjipSDbVKpm8iFxxp" ], "script": "base64:BgIYCAISABIAEgMKAQESAwoBARIAEgASABIABgAEdXNkbgEg11KRGPRfT6VehNuJvBkobHB7OMalzc+gLp7N2ofv42AABHVzZGMBIPQcuTcYg4l4Uh6IaJaLWyiuNgmUbeQfgPZEel3eCXgMAAxhZG1pbl93YWxsZXQCIzNOM0RDbmdqaWRpdmtKYlRKd0ZURXZiWVJUZmZDV1ZCTENMAA5hbGZhcmtfdGVzdG5ldAAFAAp2aXJlc19kYXBwARoBVHjn3floRCovnhXY1SHCQGibEg7rsYrFrAENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAgBaQEPYnV5X3VzZG5fdGlja2V0AAMJAQIhPQIICQCRAwIIBQFpCHBheW1lbnRzAAAHYXNzZXRJZAUEdXNkbgkAAgECH1BsZWFzZSBkZXBvc2l0IFVTRC1OIHRva2VuIG9ubHkEC3VzZXJfY3JlZGl0CQENdHJ5R2V0SW50ZWdlcgEJAKwCAgkArAICAgV1c2Ru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Prev: B61NsM2LhKBSU36wXvVVABFLrQRefJLUhC3ETXyGT2Bi Next: 5Ycjr7zDvSnC97yakyTgq9HZtnVpZWAF6tpM996uvy28 Diff:
OldNewDifferences
3232 let n = f("usdn_all_credit")
3333 let o = (n + l)
3434 let p = {
35- let h = transactionHeightById(j.transactionId)
35+ let h = lastBlock.height
3636 if ($isInstanceOf(h, "Int"))
3737 then {
3838 let q = h
3939 q
4040 }
41- else throw("Error block number")
41+ else throw("Error! with blochchain height")
4242 }
4343 let r = invoke(Address(e), "usdN_stake", nil, [AttachedPayment(a, l)])
4444 if ((r == r))
45- then {
46- let s = {
47- let h = r
48- if ($isInstanceOf(h, "List[Any]"))
49- then {
50- let t = h
51- t
52- }
53- else throw()
54- }
55- if ((s == s))
56- then [IntegerEntry((("usdn_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdn_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdn_all_credit", o), IntegerEntry("usdn_all_block", p)]
57- else throw("Strict value is not equal to itself.")
58- }
45+ then [IntegerEntry((("usdn_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdn_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdn_all_credit", o), IntegerEntry("usdn_all_block", p)]
5946 else throw("Strict value is not equal to itself.")
6047 }
6148
7158 let n = f("usdc_all_credit")
7259 let o = (n + l)
7360 let p = {
74- let h = transactionHeightById(j.transactionId)
61+ let h = lastBlock.height
7562 if ($isInstanceOf(h, "Int"))
7663 then {
7764 let q = h
8168 }
8269 let r = invoke(Address(e), "usdC_stake", nil, [AttachedPayment(b, l)])
8370 if ((r == r))
84- then {
85- let s = {
86- let h = r
87- if ($isInstanceOf(h, "List[Any]"))
88- then {
89- let t = h
90- t
91- }
92- else throw("Incorrect invoke result")
93- }
94- if ((s == s))
95- then [IntegerEntry((("usdc_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdc_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdc_all_credit", o), IntegerEntry("usdc_all_block", p)]
96- else throw("Strict value is not equal to itself.")
97- }
71+ then [IntegerEntry((("usdc_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdc_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdc_all_credit", o), IntegerEntry("usdc_all_block", p)]
9872 else throw("Strict value is not equal to itself.")
9973 }
10074
10175
10276
10377 @Callable(j)
104-func sell_usdn_ticket (u) = {
78+func sell_usdn_ticket (s) = {
10579 let k = f((("usdn_" + toString(j.originCaller)) + "_credit"))
106- if ((u > k))
80+ if ((s > k))
10781 then throw(("sorry you can't withdraw this amount, because u=you have only " + toString(k)))
10882 else {
109- let m = (k - u)
83+ let m = (k - s)
11084 let n = f("usdn_all_credit")
111- let o = (n - u)
85+ let o = (n - s)
11286 let p = {
113- let h = transactionHeightById(j.transactionId)
87+ let h = lastBlock.height
11488 if ($isInstanceOf(h, "Int"))
11589 then {
11690 let q = h
11892 }
11993 else throw("Error block number")
12094 }
121- let r = invoke(Address(e), "usdN_cancelStake", [u], nil)
95+ let r = invoke(Address(e), "usdN_cancelStake", [s], nil)
12296 if ((r == r))
123- then {
124- let s = {
125- let h = r
126- if ($isInstanceOf(h, "List[Any]"))
127- then {
128- let t = h
129- t
130- }
131- else throw("Incorrect invoke result")
132- }
133- if ((s == s))
134- then [IntegerEntry((("usdn_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdn_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdn_all_credit", o), IntegerEntry("usdn_all_block", p)]
135- else throw("Strict value is not equal to itself.")
136- }
97+ then [IntegerEntry((("usdn_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdn_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdn_all_credit", o), IntegerEntry("usdn_all_block", p)]
13798 else throw("Strict value is not equal to itself.")
13899 }
139100 }
141102
142103
143104 @Callable(j)
144-func sell_usdc_ticket (u) = {
105+func sell_usdc_ticket (s) = {
145106 let k = f((("usdc_" + toString(j.originCaller)) + "_credit"))
146- if ((u > k))
107+ if ((s > k))
147108 then throw(("sorry you can't withdraw this amount, because u=you have only " + toString(k)))
148109 else {
149- let m = (k - u)
110+ let m = (k - s)
150111 let n = f("usdc_all_credit")
151- let o = (n - u)
112+ let o = (n - s)
152113 let p = {
153- let h = transactionHeightById(j.transactionId)
114+ let h = lastBlock.height
154115 if ($isInstanceOf(h, "Int"))
155116 then {
156117 let q = h
158119 }
159120 else throw("Error block number")
160121 }
161- let r = invoke(Address(e), "usdC_cancelStake", [u], nil)
122+ let r = invoke(Address(e), "usdC_cancelStake", [s], nil)
162123 if ((r == r))
163- then {
164- let s = {
165- let h = r
166- if ($isInstanceOf(h, "List[Any]"))
167- then {
168- let t = h
169- t
170- }
171- else throw("Incorrect invoke result")
172- }
173- if ((s == s))
174- then [IntegerEntry((("usdc_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdc_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdc_all_credit", o), IntegerEntry("usdc_all_block", p)]
175- else throw("Strict value is not equal to itself.")
176- }
124+ then [IntegerEntry((("usdc_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdc_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdc_all_credit", o), IntegerEntry("usdc_all_block", p)]
177125 else throw("Strict value is not equal to itself.")
178126 }
179127 }
184132 func usdn_calc_profit_amount () = if ((toString(j.originCaller) != c))
185133 then throw("Sorry! you are not allowed to use this funaction")
186134 else {
187- let v = f("usdn_profit_last_block")
188- let w = f("usdn_profit_last_amount")
135+ let t = f("usdn_profit_last_block")
136+ let u = f("usdn_profit_last_amount")
189137 let p = {
190- let h = transactionHeightById(j.transactionId)
138+ let h = lastBlock.height
191139 if ($isInstanceOf(h, "Int"))
192140 then {
193141 let q = h
195143 }
196144 else throw("Error block number")
197145 }
198- let x = (p - v)
199- if ((d > x))
200- then throw((("Please try again after " + toString((d - x))) + " block"))
146+ let v = (p - t)
147+ if ((d > v))
148+ then throw((("Please try again after " + toString((d - v))) + " block"))
201149 else {
202- let y = assetBalance(this, a)
203-[IntegerEntry("usdn_profit_last_block", p), IntegerEntry("usdn_profit_last_amount", y)]
150+ let w = assetBalance(this, a)
151+[IntegerEntry("usdn_profit_last_block", p), IntegerEntry("usdn_profit_last_amount", w)]
204152 }
205153 }
206154
208156
209157 @Callable(j)
210158 func usdn_send_profit_amount () = {
211- let w = f("usdn_profit_last_amount")
212- if ((0 >= w))
213- then throw(("you dont have profit amount " + toString(w)))
159+ let u = f("usdn_profit_last_amount")
160+ if ((0 >= u))
161+ then throw(("you dont have profit amount " + toString(u)))
214162 else {
215- let z = ScriptTransfer(addressFromStringValue(c), w, a)
216-[z]
163+ let x = ScriptTransfer(addressFromStringValue(c), u, a)
164+[x]
217165 }
218166 }
219167
223171 func usdc_calc_profit_amount () = if ((toString(j.originCaller) != c))
224172 then throw("Sorry! you are not allowed to use this funaction")
225173 else {
226- let A = f("usdc_profit_last_block")
227- let B = f("usdc_profit_last_amount")
174+ let y = f("usdc_profit_last_block")
175+ let z = f("usdc_profit_last_amount")
228176 let p = {
229- let h = transactionHeightById(j.transactionId)
177+ let h = lastBlock.height
230178 if ($isInstanceOf(h, "Int"))
231179 then {
232180 let q = h
234182 }
235183 else throw("Error block number")
236184 }
237- let x = (p - A)
238- if ((d > x))
239- then throw((("Please try again after " + toString((d - x))) + " block"))
185+ let v = (p - y)
186+ if ((d > v))
187+ then throw((("Please try again after " + toString((d - v))) + " block"))
240188 else {
241- let C = assetBalance(this, b)
242-[IntegerEntry("usdc_profit_last_block", p), IntegerEntry("usdc_profit_last_amount", C)]
189+ let A = assetBalance(this, b)
190+[IntegerEntry("usdc_profit_last_block", p), IntegerEntry("usdc_profit_last_amount", A)]
243191 }
244192 }
245193
247195
248196 @Callable(j)
249197 func usdc_send_profit_amount () = {
250- let B = f("usdc_profit_last_amount")
251- if ((0 >= B))
252- then throw(("you dont have profit amount " + toString(B)))
198+ let z = f("usdc_profit_last_amount")
199+ if ((0 >= z))
200+ then throw(("you dont have profit amount " + toString(z)))
253201 else {
254- let z = ScriptTransfer(addressFromStringValue(c), B, b)
255-[z]
202+ let x = ScriptTransfer(addressFromStringValue(c), z, b)
203+[x]
256204 }
257205 }
258206
259207
260-@Verifier(D)
261-func E () = sigVerify(D.bodyBytes, D.proofs[0], D.senderPublicKey)
208+@Verifier(B)
209+func C () = sigVerify(B.bodyBytes, B.proofs[0], B.senderPublicKey)
262210
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'FVXgJ86erBw5GAMeAw1CnYXwQn48BFAEAhRyHPUjbMQB'
55
66 let b = base58'HRut8ESAGXxwvsKJky1V96qRtqyXQd4Apq4GY7TE5yGP'
77
88 let c = "3N3DCngjidivkJbTJwFTEvbYRTffCWVBLCL"
99
1010 let d = 5
1111
1212 let e = base58'3MzwNdM8LQZEPXq3d4uXvxeZGpBwVQXs9RD'
1313
1414 func f (g) = {
1515 let h = getInteger(this, g)
1616 if ($isInstanceOf(h, "Int"))
1717 then {
1818 let i = h
1919 i
2020 }
2121 else 0
2222 }
2323
2424
2525 @Callable(j)
2626 func buy_usdn_ticket () = if ((j.payments[0].assetId != a))
2727 then throw("Please deposit USD-N token only")
2828 else {
2929 let k = f((("usdn_" + toString(j.originCaller)) + "_credit"))
3030 let l = j.payments[0].amount
3131 let m = (k + l)
3232 let n = f("usdn_all_credit")
3333 let o = (n + l)
3434 let p = {
35- let h = transactionHeightById(j.transactionId)
35+ let h = lastBlock.height
3636 if ($isInstanceOf(h, "Int"))
3737 then {
3838 let q = h
3939 q
4040 }
41- else throw("Error block number")
41+ else throw("Error! with blochchain height")
4242 }
4343 let r = invoke(Address(e), "usdN_stake", nil, [AttachedPayment(a, l)])
4444 if ((r == r))
45- then {
46- let s = {
47- let h = r
48- if ($isInstanceOf(h, "List[Any]"))
49- then {
50- let t = h
51- t
52- }
53- else throw()
54- }
55- if ((s == s))
56- then [IntegerEntry((("usdn_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdn_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdn_all_credit", o), IntegerEntry("usdn_all_block", p)]
57- else throw("Strict value is not equal to itself.")
58- }
45+ then [IntegerEntry((("usdn_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdn_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdn_all_credit", o), IntegerEntry("usdn_all_block", p)]
5946 else throw("Strict value is not equal to itself.")
6047 }
6148
6249
6350
6451 @Callable(j)
6552 func buy_usdc_ticket () = if ((j.payments[0].assetId != b))
6653 then throw("Please deposit USD-N token only")
6754 else {
6855 let k = f((("usdc_" + toString(j.originCaller)) + "_credit"))
6956 let l = j.payments[0].amount
7057 let m = (k + l)
7158 let n = f("usdc_all_credit")
7259 let o = (n + l)
7360 let p = {
74- let h = transactionHeightById(j.transactionId)
61+ let h = lastBlock.height
7562 if ($isInstanceOf(h, "Int"))
7663 then {
7764 let q = h
7865 q
7966 }
8067 else throw("Error block number")
8168 }
8269 let r = invoke(Address(e), "usdC_stake", nil, [AttachedPayment(b, l)])
8370 if ((r == r))
84- then {
85- let s = {
86- let h = r
87- if ($isInstanceOf(h, "List[Any]"))
88- then {
89- let t = h
90- t
91- }
92- else throw("Incorrect invoke result")
93- }
94- if ((s == s))
95- then [IntegerEntry((("usdc_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdc_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdc_all_credit", o), IntegerEntry("usdc_all_block", p)]
96- else throw("Strict value is not equal to itself.")
97- }
71+ then [IntegerEntry((("usdc_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdc_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdc_all_credit", o), IntegerEntry("usdc_all_block", p)]
9872 else throw("Strict value is not equal to itself.")
9973 }
10074
10175
10276
10377 @Callable(j)
104-func sell_usdn_ticket (u) = {
78+func sell_usdn_ticket (s) = {
10579 let k = f((("usdn_" + toString(j.originCaller)) + "_credit"))
106- if ((u > k))
80+ if ((s > k))
10781 then throw(("sorry you can't withdraw this amount, because u=you have only " + toString(k)))
10882 else {
109- let m = (k - u)
83+ let m = (k - s)
11084 let n = f("usdn_all_credit")
111- let o = (n - u)
85+ let o = (n - s)
11286 let p = {
113- let h = transactionHeightById(j.transactionId)
87+ let h = lastBlock.height
11488 if ($isInstanceOf(h, "Int"))
11589 then {
11690 let q = h
11791 q
11892 }
11993 else throw("Error block number")
12094 }
121- let r = invoke(Address(e), "usdN_cancelStake", [u], nil)
95+ let r = invoke(Address(e), "usdN_cancelStake", [s], nil)
12296 if ((r == r))
123- then {
124- let s = {
125- let h = r
126- if ($isInstanceOf(h, "List[Any]"))
127- then {
128- let t = h
129- t
130- }
131- else throw("Incorrect invoke result")
132- }
133- if ((s == s))
134- then [IntegerEntry((("usdn_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdn_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdn_all_credit", o), IntegerEntry("usdn_all_block", p)]
135- else throw("Strict value is not equal to itself.")
136- }
97+ then [IntegerEntry((("usdn_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdn_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdn_all_credit", o), IntegerEntry("usdn_all_block", p)]
13798 else throw("Strict value is not equal to itself.")
13899 }
139100 }
140101
141102
142103
143104 @Callable(j)
144-func sell_usdc_ticket (u) = {
105+func sell_usdc_ticket (s) = {
145106 let k = f((("usdc_" + toString(j.originCaller)) + "_credit"))
146- if ((u > k))
107+ if ((s > k))
147108 then throw(("sorry you can't withdraw this amount, because u=you have only " + toString(k)))
148109 else {
149- let m = (k - u)
110+ let m = (k - s)
150111 let n = f("usdc_all_credit")
151- let o = (n - u)
112+ let o = (n - s)
152113 let p = {
153- let h = transactionHeightById(j.transactionId)
114+ let h = lastBlock.height
154115 if ($isInstanceOf(h, "Int"))
155116 then {
156117 let q = h
157118 q
158119 }
159120 else throw("Error block number")
160121 }
161- let r = invoke(Address(e), "usdC_cancelStake", [u], nil)
122+ let r = invoke(Address(e), "usdC_cancelStake", [s], nil)
162123 if ((r == r))
163- then {
164- let s = {
165- let h = r
166- if ($isInstanceOf(h, "List[Any]"))
167- then {
168- let t = h
169- t
170- }
171- else throw("Incorrect invoke result")
172- }
173- if ((s == s))
174- then [IntegerEntry((("usdc_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdc_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdc_all_credit", o), IntegerEntry("usdc_all_block", p)]
175- else throw("Strict value is not equal to itself.")
176- }
124+ then [IntegerEntry((("usdc_" + toString(j.originCaller)) + "_credit"), m), IntegerEntry((("usdc_" + toString(j.originCaller)) + "_block"), p), IntegerEntry("usdc_all_credit", o), IntegerEntry("usdc_all_block", p)]
177125 else throw("Strict value is not equal to itself.")
178126 }
179127 }
180128
181129
182130
183131 @Callable(j)
184132 func usdn_calc_profit_amount () = if ((toString(j.originCaller) != c))
185133 then throw("Sorry! you are not allowed to use this funaction")
186134 else {
187- let v = f("usdn_profit_last_block")
188- let w = f("usdn_profit_last_amount")
135+ let t = f("usdn_profit_last_block")
136+ let u = f("usdn_profit_last_amount")
189137 let p = {
190- let h = transactionHeightById(j.transactionId)
138+ let h = lastBlock.height
191139 if ($isInstanceOf(h, "Int"))
192140 then {
193141 let q = h
194142 q
195143 }
196144 else throw("Error block number")
197145 }
198- let x = (p - v)
199- if ((d > x))
200- then throw((("Please try again after " + toString((d - x))) + " block"))
146+ let v = (p - t)
147+ if ((d > v))
148+ then throw((("Please try again after " + toString((d - v))) + " block"))
201149 else {
202- let y = assetBalance(this, a)
203-[IntegerEntry("usdn_profit_last_block", p), IntegerEntry("usdn_profit_last_amount", y)]
150+ let w = assetBalance(this, a)
151+[IntegerEntry("usdn_profit_last_block", p), IntegerEntry("usdn_profit_last_amount", w)]
204152 }
205153 }
206154
207155
208156
209157 @Callable(j)
210158 func usdn_send_profit_amount () = {
211- let w = f("usdn_profit_last_amount")
212- if ((0 >= w))
213- then throw(("you dont have profit amount " + toString(w)))
159+ let u = f("usdn_profit_last_amount")
160+ if ((0 >= u))
161+ then throw(("you dont have profit amount " + toString(u)))
214162 else {
215- let z = ScriptTransfer(addressFromStringValue(c), w, a)
216-[z]
163+ let x = ScriptTransfer(addressFromStringValue(c), u, a)
164+[x]
217165 }
218166 }
219167
220168
221169
222170 @Callable(j)
223171 func usdc_calc_profit_amount () = if ((toString(j.originCaller) != c))
224172 then throw("Sorry! you are not allowed to use this funaction")
225173 else {
226- let A = f("usdc_profit_last_block")
227- let B = f("usdc_profit_last_amount")
174+ let y = f("usdc_profit_last_block")
175+ let z = f("usdc_profit_last_amount")
228176 let p = {
229- let h = transactionHeightById(j.transactionId)
177+ let h = lastBlock.height
230178 if ($isInstanceOf(h, "Int"))
231179 then {
232180 let q = h
233181 q
234182 }
235183 else throw("Error block number")
236184 }
237- let x = (p - A)
238- if ((d > x))
239- then throw((("Please try again after " + toString((d - x))) + " block"))
185+ let v = (p - y)
186+ if ((d > v))
187+ then throw((("Please try again after " + toString((d - v))) + " block"))
240188 else {
241- let C = assetBalance(this, b)
242-[IntegerEntry("usdc_profit_last_block", p), IntegerEntry("usdc_profit_last_amount", C)]
189+ let A = assetBalance(this, b)
190+[IntegerEntry("usdc_profit_last_block", p), IntegerEntry("usdc_profit_last_amount", A)]
243191 }
244192 }
245193
246194
247195
248196 @Callable(j)
249197 func usdc_send_profit_amount () = {
250- let B = f("usdc_profit_last_amount")
251- if ((0 >= B))
252- then throw(("you dont have profit amount " + toString(B)))
198+ let z = f("usdc_profit_last_amount")
199+ if ((0 >= z))
200+ then throw(("you dont have profit amount " + toString(z)))
253201 else {
254- let z = ScriptTransfer(addressFromStringValue(c), B, b)
255-[z]
202+ let x = ScriptTransfer(addressFromStringValue(c), z, b)
203+[x]
256204 }
257205 }
258206
259207
260-@Verifier(D)
261-func E () = sigVerify(D.bodyBytes, D.proofs[0], D.senderPublicKey)
208+@Verifier(B)
209+func C () = sigVerify(B.bodyBytes, B.proofs[0], B.senderPublicKey)
262210

github/deemru/w8io/169f3d6 
49.46 ms