tx · EDFiBLw4NCyX6fcHXDm8UDzY8uRgssotsPecv8GRuH6L

3MsU936briqQ2XZMpkhWdrV8EsNwm5iCuRY:  -0.01300000 Waves

2022.07.06 20:26 [2128125] smart account 3MsU936briqQ2XZMpkhWdrV8EsNwm5iCuRY > SELF 0.00000000 Waves

{ "type": 13, "id": "EDFiBLw4NCyX6fcHXDm8UDzY8uRgssotsPecv8GRuH6L", "fee": 1300000, "feeAssetId": null, "timestamp": 1657128385614, "version": 2, "chainId": 84, "sender": "3MsU936briqQ2XZMpkhWdrV8EsNwm5iCuRY", "senderPublicKey": "F471QhzucRgQCSkZK5opBNc55AoNgiibCabvTp6GZ9nq", "proofs": [ "fLWmwmsyQfWtdBwXunN9PoLGEJwpu5AkPLB54N4s7zMXLMsFAEXjvAvcR7mbHLPubHZ1MVt9XfrzZRkv8iuHJqf" ], "script": "base64:AAIFAAAAAAAAABwIAhIHCgUBCAgBARIAEgMKAQgSAwoBCBIDCgEIAAAAGgAAAAADU0VQAgAAAAJfXwAAAAAFTVVMVDYAAAAAAAAPQkAAAAAABU1VTFQ4AAAAAAAF9eEAAAAAAApXQVZFU0lEU1RSAgAAAAVXQVZFUwAAAAAHV0FWRVNJRAkAAlkAAAABBQAAAApXQVZFU0lEU1RSAQAAAAxnZXRJbnRPckZhaWwAAAABAAAAA2tleQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQkAASwAAAACCQABLAAAAAICAAAAD01hbmRhdG9yeSB0aGlzLgUAAAADa2V5AgAAAA8gaXMgbm90IGRlZmluZWQBAAAADGdldFN0ck9yRWxzZQAAAAIAAAADa2V5AAAACmRlZmF1bHRWYWwJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5BQAAAApkZWZhdWx0VmFsAQAAAA9nZXRTdHJpbmdPckZhaWwAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAATd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aXNzaW9ucyBkZW5pZWQEAAAAD25vZGVSZWdpc3RyeUtFWQkBAAAAD2tleU5vZGVSZWdpc3RyeQAAAAEFAAAAC25vZGVBZGRyZXNzBAAAAAtub2RlRGF0YU9wdAkABB0AAAACBQAAAAR0aGlzBQAAAA9ub2RlUmVnaXN0cnlLRVkDCQEAAAABIQAAAAEJAQAAAAlpc0RlZmluZWQAAAABBQAAAAtub2RlRGF0YU9wdAkAAAIAAAABCQABLAAAAAICAAAAKUFkZHJlc3MgaXMgbm90IGFwcGxpZWQgYXMgbmV1dHJpbm8gbm9kZTogBQAAAAtub2RlQWRkcmVzcwQAAAAIbm9kZURhdGEJAAS1AAAAAgkBAAAABXZhbHVlAAAAAQUAAAALbm9kZURhdGFPcHQFAAAAA1NFUAQAAAAGc3RhdHVzAwkAAGcAAAACCQABkAAAAAEFAAAACG5vZGVEYXRhAAAAAAAAAAAJCQABkQAAAAIFAAAACG5vZGVEYXRhAAAAAAAAAAAGAgAAAAdQRU5ESU5HAwkBAAAAAiE9AAAAAgUAAAAGc3RhdHVzAgAAAAdQRU5ESU5HCQAAAgAAAAECAAAAIkFwcGxpY2F0aW9uIHN0YXR1cyBpcyBub3QgUEVORElORyEEAAAACmRlcG9BbW91bnQJAQAAAA1wYXJzZUludFZhbHVlAAAAAQkAAZEAAAACBQAAAAhub2RlRGF0YQAAAAAAAAAABAkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAA9ub2RlUmVnaXN0cnlLRVkJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQUAAAALbm9kZUFkZHJlc3MFAAAACmRlcG9BbW91bnQFAAAABHVuaXQFAAAAA25pbAAAAABcEaDD", "height": 2128125, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5u33sBQit41a3J4AdmDWbaQYVMXhKfwcna7HXMPt8Amr Next: 8MkKkEZPDDHDnTT4Vv7xkc66vTQAqGeAiuTZtT36FpSb Diff:
OldNewDifferences
1717 func h (g,i) = valueOrElse(getString(this, g), i)
1818
1919
20-func j (g) = valueOrErrorMessage(getString(this, g), (("Mandatory this." + g) + " is not defined"))
20+func j (k,g) = valueOrErrorMessage(getString(k, g), (("Mandatory this." + g) + " is not defined"))
2121
2222
23-func k (g) = valueOrErrorMessage(addressFromString(j(g)), (("Fail to convert this." + g) + " value into Address"))
23+func l (g) = valueOrErrorMessage(addressFromString(j(this, g)), (("Fail to convert this." + g) + " value into Address"))
2424
2525
26-func l (m) = {
27- let n = valueOrErrorMessage(addressFromString(m), ("fail to convert into address " + m))
28- if ((0 > wavesBalance(n).available))
26+func m (n) = {
27+ let k = valueOrErrorMessage(addressFromString(n), ("fail to convert into address " + n))
28+ if ((0 > wavesBalance(k).available))
2929 then throw()
30- else m
30+ else n
3131 }
3232
3333
34-func o (n) = ("%s__" + n)
34+func o (k) = ("%s__" + k)
3535
3636
37-func p (n) = ("%s%s__totals__" + n)
37+func p (k) = ("%s%s__totals__" + k)
3838
3939
4040 func q () = "%s%s__cfg__depositAmount"
5252 func u () = "%s%s__cfg__benificaryPartX6"
5353
5454
55-func v (w,x,y) = makeString(["%s%d%d%d%d", w, toString(lastBlock.height), toString(lastBlock.timestamp), toString(x), toString(y)], a)
55+func v () = "%s__lastUpdatedHeight"
5656
5757
58-func z (A,B) = makeString(["%s%s%s", "history", toString(A), toBase58String(B)], a)
58+func w () = "%s__scriptUpdateHash"
5959
6060
61-func C (D,E,F,G,H) = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(D), toString(E), toString(F), toString(G), toString(H)], a)
61+func x (y,z,A,B) = makeString(["%s%d%d%d%d%s%d%d", y, toString(lastBlock.height), toString(lastBlock.timestamp), toString(z), toString(A), B, "0", "0"], a)
6262
6363
64-func I (A,B,J,E,F,K,L) = StringEntry(z(A, B), C(J, E, F, K, L))
65-
66-
67-func M (J,E,F,G,H) = makeString(["%d%d%d%d%d", toString(J), toString(E), toString(F), toString(G), toString(H)], a)
68-
69-
70-func N (O,J,E,F,G,H) = {
71- let P = p(toString(O))
72- let Q = split(h(P, M(0, 0, 0, 0, 0)), a)
73- let R = (parseIntValue(Q[1]) + J)
74- let S = (parseIntValue(Q[2]) + E)
75- let T = (parseIntValue(Q[3]) + F)
76- let U = (parseIntValue(Q[4]) + G)
77- let V = (parseIntValue(Q[5]) + H)
78- StringEntry(P, M(R, S, T, U, V))
64+func C (D,E) = {
65+ let F = split(D, a)
66+ makeString(["%s%d%d%d%d%s%d%d", F[1], F[2], F[3], F[4], F[5], E, toString(lastBlock.height), toString(lastBlock.timestamp)], a)
7967 }
8068
8169
82-@Callable(W)
83-func constructor (x,X,Y,Z,aa) = if ((W.caller != this))
70+func G (H,I) = makeString(["%s%s%s", "history", toString(H), toBase58String(I)], a)
71+
72+
73+func J (K,L,M,N,O) = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(K), toString(L), toString(M), toString(N), toString(O)], a)
74+
75+
76+func P (H,I,Q,L,M,R,S) = StringEntry(G(H, I), J(Q, L, M, R, S))
77+
78+
79+func T (Q,L,M,N,O) = makeString(["%d%d%d%d%d", toString(Q), toString(L), toString(M), toString(N), toString(O)], a)
80+
81+
82+func U (V,Q,L,M,N,O) = {
83+ let W = p(toString(V))
84+ let X = split(h(W, T(0, 0, 0, 0, 0)), a)
85+ let Y = (parseIntValue(X[1]) + Q)
86+ let Z = (parseIntValue(X[2]) + L)
87+ let aa = (parseIntValue(X[3]) + M)
88+ let ab = (parseIntValue(X[4]) + N)
89+ let ac = (parseIntValue(X[5]) + O)
90+ StringEntry(W, T(Y, Z, aa, ab, ac))
91+ }
92+
93+
94+@Callable(ad)
95+func constructor (z,ae,af,ag,ah) = if ((ad.caller != this))
8496 then throw("permissions denied")
85- else if ((0 > x))
97+ else if ((0 > z))
8698 then throw("depositAmount less then zero")
87- else if ((0 > Z))
99+ else if ((0 > ag))
88100 then throw("protocolPartX6 less then zero")
89- else if ((0 > aa))
101+ else if ((0 > ah))
90102 then throw("benificaryPartX6 less then zero")
91- else if (((Z + aa) != b))
103+ else if (((ag + ah) != b))
92104 then throw("parts sum must be 1")
93- else [IntegerEntry(q(), x), StringEntry(r(), l(X)), StringEntry(s(), l(Y)), IntegerEntry(t(), Z), IntegerEntry(u(), aa)]
105+ else [IntegerEntry(q(), z), StringEntry(r(), m(ae)), StringEntry(s(), m(af)), IntegerEntry(t(), ag), IntegerEntry(u(), ah)]
94106
95107
96108
97-@Callable(W)
98-func sumbitNewMiner () = if ((size(W.payments) != 1))
109+@Callable(ad)
110+func sumbitApplication () = if ((size(ad.payments) != 1))
99111 then throw("exact 1 payment must be attached")
100- else if ((W.caller != W.originCaller))
112+ else if ((ad.caller != ad.originCaller))
101113 then throw("dapp to dapp calls are not allowed")
102114 else {
103- let ab = W.payments[0]
104- let ac = ab.amount
105- let ad = valueOrElse(ab.assetId, e)
106- let ae = f(q())
107- let B = toBase58String(W.transactionId)
108- let A = toString(W.caller)
109- let af = o(A)
110- if ((ad != e))
115+ let ai = ad.payments[0]
116+ let aj = ai.amount
117+ let ak = valueOrElse(ai.assetId, e)
118+ let al = f(q())
119+ let I = toBase58String(ad.transactionId)
120+ let H = toString(ad.caller)
121+ let am = o(H)
122+ if ((ak != e))
111123 then throw("only Waves can be used for deposit")
112- else if ((ac != ae))
113- then throw((("exactly " + toString(ae)) + " Wavelets are expected"))
114- else if ((h(af, "") != ""))
124+ else if ((aj != al))
125+ then throw((("exactly " + toString(al)) + " Wavelets are expected"))
126+ else if ((h(am, "") != ""))
115127 then throw("your node already registered")
116- else [StringEntry(af, v(B, ac, ac))]
128+ else [StringEntry(am, x(I, aj, aj, "PENDING"))]
117129 }
118130
119131
120132
121-@Callable(W)
122-func distibuteMinerReward (ag) = if ((size(W.payments) != 1))
133+@Callable(ad)
134+func distibuteMinerReward (an) = if ((size(ad.payments) != 1))
123135 then throw("exact 1 payment must be attached")
124- else if ((W.caller != W.originCaller))
136+ else if ((ad.caller != ad.originCaller))
125137 then throw("dapp to dapp calls are not allowed")
126138 else {
127- let ab = W.payments[0]
128- let J = ab.amount
129- let ad = valueOrElse(ab.assetId, e)
130- let ah = W.fee
131- let ai = valueOrElse(W.feeAssetId, e)
132- if ((ad != e))
139+ let ai = ad.payments[0]
140+ let ak = valueOrElse(ai.assetId, e)
141+ let ao = ad.fee
142+ let ap = valueOrElse(ad.feeAssetId, e)
143+ let aq = (ao * 2)
144+ let Q = (ai.amount - aq)
145+ if ((ak != e))
133146 then throw("only Waves can be used in payment")
134- else if ((ai != e))
147+ else if ((ap != e))
135148 then throw("only Waves can be used in fees")
136- else if ((ah != ((5 * c) / 1000)))
149+ else if ((ao != ((5 * c) / 1000)))
137150 then throw("fee amount couldn't exceed 0.005")
138151 else {
139- let aj = k(r())
140- let ak = k(s())
141- let al = W.caller
142- let am = addressFromStringValue(ag)
143- let an = f(t())
144- let ao = f(u())
145- let ap = (wavesBalance(al).available - ah)
146- if ((ap != 0))
147- then throw((("all " + toString(ap)) + " Wavelets from the Node balance must be attached into the payment"))
152+ let ar = l(r())
153+ let as = l(s())
154+ let at = ad.caller
155+ let au = scriptHash(at)
156+ let av = addressFromStringValue(an)
157+ let aw = addressFromStringValue(j(at, v()))
158+ let ax = if ((au == unit))
159+ then $Tuple2(av, av)
160+ else $Tuple2(aw, av)
161+ let ay = ax._1
162+ let az = ax._2
163+ let aA = f(t())
164+ let aB = f(u())
165+ let aC = (wavesBalance(at).available - ao)
166+ if ((aC != 0))
167+ then throw((("all " + toString(aC)) + " Wavelets from the Node balance must be attached into the payment"))
148168 else {
149- let aq = fraction(J, ao, b)
150- let F = (J - aq)
151- let K = (F / 2)
152- let L = (F - K)
153-[ScriptTransfer(am, aq, unit), ScriptTransfer(aj, K, unit), ScriptTransfer(ak, L, unit), I(al, W.transactionId, J, aq, F, K, L), N(al, J, aq, F, K, L)]
169+ let aD = fraction(Q, aB, b)
170+ let M = (Q - aD)
171+ let R = (M / 2)
172+ let S = (M - R)
173+[ScriptTransfer(ay, aD, unit), ScriptTransfer(ar, R, unit), ScriptTransfer(as, S, unit), ScriptTransfer(az, aq, unit), P(at, ad.transactionId, Q, aD, M, R, S), U(at, Q, aD, M, R, S)]
154174 }
155175 }
156176 }
177+
178+
179+
180+@Callable(ad)
181+func validateAndApproveLeasings (aE) = {
182+ let aF = [0, 1, 2, 3, 4, 5, 6, 7]
183+ let aG = split(aE, a)
184+ let aH = size(aF)
185+ let ar = l(r())
186+ if ((ad.caller != ar))
187+ then throw("validateAndApproveLeasings not authorized")
188+ else if (((size(aG) % 2) != 0))
189+ then throw("Only even number of nodes is allowed")
190+ else if ((size(aG) != aH))
191+ then throw((("Only " + toString(aH)) + " node's address cab be passed"))
192+ else {
193+ func aI (aJ,ad) = {
194+ let aK = aG[ad]
195+ let am = o(aK)
196+ let aL = getString(this, am)
197+ if (!(isDefined(aL)))
198+ then throw(("invalid Node in list " + aK))
199+ else {
200+ let aM = split(value(aL), a)
201+ let aN = aM[6]
202+ if (if ((size(aM) >= 9))
203+ then (aN != "PENDING")
204+ else false)
205+ then throw(((("node " + aK) + " already has a final status ") + aN))
206+ else (aJ :+ StringEntry(am, C(value(aL), "APPROVED")))
207+ }
208+ }
209+
210+ let aO = {
211+ let aP = aF
212+ let aQ = size(aP)
213+ let aR = nil
214+ func aS (aT,aU) = if ((aU >= aQ))
215+ then aT
216+ else aI(aT, aP[aU])
217+
218+ func aV (aT,aU) = if ((aU >= aQ))
219+ then aT
220+ else throw("List size exceeds 8")
221+
222+ aV(aS(aS(aS(aS(aS(aS(aS(aS(aR, 0), 1), 2), 3), 4), 5), 6), 7), 8)
223+ }
224+ $Tuple2(aO, nil)
225+ }
226+ }
227+
228+
229+
230+@Callable(ad)
231+func returnDeposit (H) = if ((size(ad.payments) != 0))
232+ then throw("No payments allowed")
233+ else {
234+ let aW = ad.caller
235+ if (if ((aW != this))
236+ then (H != toString(aW))
237+ else false)
238+ then throw("returnDeposit permissions denied")
239+ else {
240+ let am = o(H)
241+ let aL = getString(this, am)
242+ if (!(isDefined(aL)))
243+ then throw(("Address is not applied as neutrino node: " + H))
244+ else {
245+ let aM = split(value(aL), a)
246+ let B = if ((size(aM) >= 9))
247+ then aM[6]
248+ else "PENDING"
249+ if ((B != "PENDING"))
250+ then throw("Application status is not PENDING!")
251+ else {
252+ let aX = parseIntValue(aM[4])
253+[DeleteEntry(am), ScriptTransfer(addressFromStringValue(H), aX, unit)]
254+ }
255+ }
256+ }
257+ }
157258
158259
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "__"
55
66 let b = 1000000
77
88 let c = 100000000
99
1010 let d = "WAVES"
1111
1212 let e = fromBase58String(d)
1313
1414 func f (g) = valueOrErrorMessage(getInteger(this, g), (("Mandatory this." + g) + " is not defined"))
1515
1616
1717 func h (g,i) = valueOrElse(getString(this, g), i)
1818
1919
20-func j (g) = valueOrErrorMessage(getString(this, g), (("Mandatory this." + g) + " is not defined"))
20+func j (k,g) = valueOrErrorMessage(getString(k, g), (("Mandatory this." + g) + " is not defined"))
2121
2222
23-func k (g) = valueOrErrorMessage(addressFromString(j(g)), (("Fail to convert this." + g) + " value into Address"))
23+func l (g) = valueOrErrorMessage(addressFromString(j(this, g)), (("Fail to convert this." + g) + " value into Address"))
2424
2525
26-func l (m) = {
27- let n = valueOrErrorMessage(addressFromString(m), ("fail to convert into address " + m))
28- if ((0 > wavesBalance(n).available))
26+func m (n) = {
27+ let k = valueOrErrorMessage(addressFromString(n), ("fail to convert into address " + n))
28+ if ((0 > wavesBalance(k).available))
2929 then throw()
30- else m
30+ else n
3131 }
3232
3333
34-func o (n) = ("%s__" + n)
34+func o (k) = ("%s__" + k)
3535
3636
37-func p (n) = ("%s%s__totals__" + n)
37+func p (k) = ("%s%s__totals__" + k)
3838
3939
4040 func q () = "%s%s__cfg__depositAmount"
4141
4242
4343 func r () = "%s%s__cfg__neutrinoAddress"
4444
4545
4646 func s () = "%s%s__cfg__mainNeutrinoNodeAddress"
4747
4848
4949 func t () = "%s%s__cfg__protocolPartX6"
5050
5151
5252 func u () = "%s%s__cfg__benificaryPartX6"
5353
5454
55-func v (w,x,y) = makeString(["%s%d%d%d%d", w, toString(lastBlock.height), toString(lastBlock.timestamp), toString(x), toString(y)], a)
55+func v () = "%s__lastUpdatedHeight"
5656
5757
58-func z (A,B) = makeString(["%s%s%s", "history", toString(A), toBase58String(B)], a)
58+func w () = "%s__scriptUpdateHash"
5959
6060
61-func C (D,E,F,G,H) = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(D), toString(E), toString(F), toString(G), toString(H)], a)
61+func x (y,z,A,B) = makeString(["%s%d%d%d%d%s%d%d", y, toString(lastBlock.height), toString(lastBlock.timestamp), toString(z), toString(A), B, "0", "0"], a)
6262
6363
64-func I (A,B,J,E,F,K,L) = StringEntry(z(A, B), C(J, E, F, K, L))
65-
66-
67-func M (J,E,F,G,H) = makeString(["%d%d%d%d%d", toString(J), toString(E), toString(F), toString(G), toString(H)], a)
68-
69-
70-func N (O,J,E,F,G,H) = {
71- let P = p(toString(O))
72- let Q = split(h(P, M(0, 0, 0, 0, 0)), a)
73- let R = (parseIntValue(Q[1]) + J)
74- let S = (parseIntValue(Q[2]) + E)
75- let T = (parseIntValue(Q[3]) + F)
76- let U = (parseIntValue(Q[4]) + G)
77- let V = (parseIntValue(Q[5]) + H)
78- StringEntry(P, M(R, S, T, U, V))
64+func C (D,E) = {
65+ let F = split(D, a)
66+ makeString(["%s%d%d%d%d%s%d%d", F[1], F[2], F[3], F[4], F[5], E, toString(lastBlock.height), toString(lastBlock.timestamp)], a)
7967 }
8068
8169
82-@Callable(W)
83-func constructor (x,X,Y,Z,aa) = if ((W.caller != this))
70+func G (H,I) = makeString(["%s%s%s", "history", toString(H), toBase58String(I)], a)
71+
72+
73+func J (K,L,M,N,O) = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(K), toString(L), toString(M), toString(N), toString(O)], a)
74+
75+
76+func P (H,I,Q,L,M,R,S) = StringEntry(G(H, I), J(Q, L, M, R, S))
77+
78+
79+func T (Q,L,M,N,O) = makeString(["%d%d%d%d%d", toString(Q), toString(L), toString(M), toString(N), toString(O)], a)
80+
81+
82+func U (V,Q,L,M,N,O) = {
83+ let W = p(toString(V))
84+ let X = split(h(W, T(0, 0, 0, 0, 0)), a)
85+ let Y = (parseIntValue(X[1]) + Q)
86+ let Z = (parseIntValue(X[2]) + L)
87+ let aa = (parseIntValue(X[3]) + M)
88+ let ab = (parseIntValue(X[4]) + N)
89+ let ac = (parseIntValue(X[5]) + O)
90+ StringEntry(W, T(Y, Z, aa, ab, ac))
91+ }
92+
93+
94+@Callable(ad)
95+func constructor (z,ae,af,ag,ah) = if ((ad.caller != this))
8496 then throw("permissions denied")
85- else if ((0 > x))
97+ else if ((0 > z))
8698 then throw("depositAmount less then zero")
87- else if ((0 > Z))
99+ else if ((0 > ag))
88100 then throw("protocolPartX6 less then zero")
89- else if ((0 > aa))
101+ else if ((0 > ah))
90102 then throw("benificaryPartX6 less then zero")
91- else if (((Z + aa) != b))
103+ else if (((ag + ah) != b))
92104 then throw("parts sum must be 1")
93- else [IntegerEntry(q(), x), StringEntry(r(), l(X)), StringEntry(s(), l(Y)), IntegerEntry(t(), Z), IntegerEntry(u(), aa)]
105+ else [IntegerEntry(q(), z), StringEntry(r(), m(ae)), StringEntry(s(), m(af)), IntegerEntry(t(), ag), IntegerEntry(u(), ah)]
94106
95107
96108
97-@Callable(W)
98-func sumbitNewMiner () = if ((size(W.payments) != 1))
109+@Callable(ad)
110+func sumbitApplication () = if ((size(ad.payments) != 1))
99111 then throw("exact 1 payment must be attached")
100- else if ((W.caller != W.originCaller))
112+ else if ((ad.caller != ad.originCaller))
101113 then throw("dapp to dapp calls are not allowed")
102114 else {
103- let ab = W.payments[0]
104- let ac = ab.amount
105- let ad = valueOrElse(ab.assetId, e)
106- let ae = f(q())
107- let B = toBase58String(W.transactionId)
108- let A = toString(W.caller)
109- let af = o(A)
110- if ((ad != e))
115+ let ai = ad.payments[0]
116+ let aj = ai.amount
117+ let ak = valueOrElse(ai.assetId, e)
118+ let al = f(q())
119+ let I = toBase58String(ad.transactionId)
120+ let H = toString(ad.caller)
121+ let am = o(H)
122+ if ((ak != e))
111123 then throw("only Waves can be used for deposit")
112- else if ((ac != ae))
113- then throw((("exactly " + toString(ae)) + " Wavelets are expected"))
114- else if ((h(af, "") != ""))
124+ else if ((aj != al))
125+ then throw((("exactly " + toString(al)) + " Wavelets are expected"))
126+ else if ((h(am, "") != ""))
115127 then throw("your node already registered")
116- else [StringEntry(af, v(B, ac, ac))]
128+ else [StringEntry(am, x(I, aj, aj, "PENDING"))]
117129 }
118130
119131
120132
121-@Callable(W)
122-func distibuteMinerReward (ag) = if ((size(W.payments) != 1))
133+@Callable(ad)
134+func distibuteMinerReward (an) = if ((size(ad.payments) != 1))
123135 then throw("exact 1 payment must be attached")
124- else if ((W.caller != W.originCaller))
136+ else if ((ad.caller != ad.originCaller))
125137 then throw("dapp to dapp calls are not allowed")
126138 else {
127- let ab = W.payments[0]
128- let J = ab.amount
129- let ad = valueOrElse(ab.assetId, e)
130- let ah = W.fee
131- let ai = valueOrElse(W.feeAssetId, e)
132- if ((ad != e))
139+ let ai = ad.payments[0]
140+ let ak = valueOrElse(ai.assetId, e)
141+ let ao = ad.fee
142+ let ap = valueOrElse(ad.feeAssetId, e)
143+ let aq = (ao * 2)
144+ let Q = (ai.amount - aq)
145+ if ((ak != e))
133146 then throw("only Waves can be used in payment")
134- else if ((ai != e))
147+ else if ((ap != e))
135148 then throw("only Waves can be used in fees")
136- else if ((ah != ((5 * c) / 1000)))
149+ else if ((ao != ((5 * c) / 1000)))
137150 then throw("fee amount couldn't exceed 0.005")
138151 else {
139- let aj = k(r())
140- let ak = k(s())
141- let al = W.caller
142- let am = addressFromStringValue(ag)
143- let an = f(t())
144- let ao = f(u())
145- let ap = (wavesBalance(al).available - ah)
146- if ((ap != 0))
147- then throw((("all " + toString(ap)) + " Wavelets from the Node balance must be attached into the payment"))
152+ let ar = l(r())
153+ let as = l(s())
154+ let at = ad.caller
155+ let au = scriptHash(at)
156+ let av = addressFromStringValue(an)
157+ let aw = addressFromStringValue(j(at, v()))
158+ let ax = if ((au == unit))
159+ then $Tuple2(av, av)
160+ else $Tuple2(aw, av)
161+ let ay = ax._1
162+ let az = ax._2
163+ let aA = f(t())
164+ let aB = f(u())
165+ let aC = (wavesBalance(at).available - ao)
166+ if ((aC != 0))
167+ then throw((("all " + toString(aC)) + " Wavelets from the Node balance must be attached into the payment"))
148168 else {
149- let aq = fraction(J, ao, b)
150- let F = (J - aq)
151- let K = (F / 2)
152- let L = (F - K)
153-[ScriptTransfer(am, aq, unit), ScriptTransfer(aj, K, unit), ScriptTransfer(ak, L, unit), I(al, W.transactionId, J, aq, F, K, L), N(al, J, aq, F, K, L)]
169+ let aD = fraction(Q, aB, b)
170+ let M = (Q - aD)
171+ let R = (M / 2)
172+ let S = (M - R)
173+[ScriptTransfer(ay, aD, unit), ScriptTransfer(ar, R, unit), ScriptTransfer(as, S, unit), ScriptTransfer(az, aq, unit), P(at, ad.transactionId, Q, aD, M, R, S), U(at, Q, aD, M, R, S)]
154174 }
155175 }
156176 }
177+
178+
179+
180+@Callable(ad)
181+func validateAndApproveLeasings (aE) = {
182+ let aF = [0, 1, 2, 3, 4, 5, 6, 7]
183+ let aG = split(aE, a)
184+ let aH = size(aF)
185+ let ar = l(r())
186+ if ((ad.caller != ar))
187+ then throw("validateAndApproveLeasings not authorized")
188+ else if (((size(aG) % 2) != 0))
189+ then throw("Only even number of nodes is allowed")
190+ else if ((size(aG) != aH))
191+ then throw((("Only " + toString(aH)) + " node's address cab be passed"))
192+ else {
193+ func aI (aJ,ad) = {
194+ let aK = aG[ad]
195+ let am = o(aK)
196+ let aL = getString(this, am)
197+ if (!(isDefined(aL)))
198+ then throw(("invalid Node in list " + aK))
199+ else {
200+ let aM = split(value(aL), a)
201+ let aN = aM[6]
202+ if (if ((size(aM) >= 9))
203+ then (aN != "PENDING")
204+ else false)
205+ then throw(((("node " + aK) + " already has a final status ") + aN))
206+ else (aJ :+ StringEntry(am, C(value(aL), "APPROVED")))
207+ }
208+ }
209+
210+ let aO = {
211+ let aP = aF
212+ let aQ = size(aP)
213+ let aR = nil
214+ func aS (aT,aU) = if ((aU >= aQ))
215+ then aT
216+ else aI(aT, aP[aU])
217+
218+ func aV (aT,aU) = if ((aU >= aQ))
219+ then aT
220+ else throw("List size exceeds 8")
221+
222+ aV(aS(aS(aS(aS(aS(aS(aS(aS(aR, 0), 1), 2), 3), 4), 5), 6), 7), 8)
223+ }
224+ $Tuple2(aO, nil)
225+ }
226+ }
227+
228+
229+
230+@Callable(ad)
231+func returnDeposit (H) = if ((size(ad.payments) != 0))
232+ then throw("No payments allowed")
233+ else {
234+ let aW = ad.caller
235+ if (if ((aW != this))
236+ then (H != toString(aW))
237+ else false)
238+ then throw("returnDeposit permissions denied")
239+ else {
240+ let am = o(H)
241+ let aL = getString(this, am)
242+ if (!(isDefined(aL)))
243+ then throw(("Address is not applied as neutrino node: " + H))
244+ else {
245+ let aM = split(value(aL), a)
246+ let B = if ((size(aM) >= 9))
247+ then aM[6]
248+ else "PENDING"
249+ if ((B != "PENDING"))
250+ then throw("Application status is not PENDING!")
251+ else {
252+ let aX = parseIntValue(aM[4])
253+[DeleteEntry(am), ScriptTransfer(addressFromStringValue(H), aX, unit)]
254+ }
255+ }
256+ }
257+ }
157258
158259

github/deemru/w8io/169f3d6 
65.23 ms