tx · 26B55LK7guRV5gm2apmEAnEmnnihYWJUa88HNGsq9PoS

3N1XAEyg1TQGa5FCEerrRhLGi5KyVq26Xm8:  -0.00200000 Waves

2023.01.16 16:32 [2407565] smart account 3N1XAEyg1TQGa5FCEerrRhLGi5KyVq26Xm8 > SELF 0.00000000 Waves

{ "type": 13, "id": "26B55LK7guRV5gm2apmEAnEmnnihYWJUa88HNGsq9PoS", "fee": 200000, "feeAssetId": null, "timestamp": 1673875957439, "version": 2, "chainId": 84, "sender": "3N1XAEyg1TQGa5FCEerrRhLGi5KyVq26Xm8", "senderPublicKey": "ATuPi6fn8277fNiCoRgPTav9QG15CJoW95GEGcDmfYt8", "proofs": [ "3MVWbcJRpkXzkzPGd6V3h8iDfF3msUbbnJ4RJSfMYCnHCVjesAsV7bZ8xr9a3sqxYG7YUjyCfZQeXYzmjUE66ZGc" ], "script": "base64:BgIJCAISABIDCgEIDgAFd2NkSWQCLDVXRTZIQlZzbUFiYXBUbVRLcG15V21VUjY3ZmMxNnliRnJOanh6bURCdFBhAAt3Y2REZWNpbWFscwACARN0b3RhbFNoYXJlQnlVc2VyS0VZAQVvd25lcgkAuQkCCQDMCAICBnNoYXJlcwkAzAgCBQVvd25lcgUDbmlsAgFfARR0b3RhbFNoYXJlQnlVc2VyUkVBRAEFb3duZXIJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwkBE3RvdGFsU2hhcmVCeVVzZXJLRVkBBQVvd25lcgAAABJ0b3RhbElzc3VlZFdDRF9LRVkCEHRvdGFsX2lzc3VlZF9XQ0QBE3RvdGFsSXNzdWVkV0NEX1JFQUQACQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFEnRvdGFsSXNzdWVkV0NEX0tFWQAAAA50b3RhbFNoYXJlc0tFWQIMdG90YWxfc2hhcmVzAQ90b3RhbFNoYXJlc1JFQUQACQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFDnRvdGFsU2hhcmVzS0VZAAABEXVzZXJTaGFyZUZ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UJ5VXNlcktFWQEFB2FjY291bnQJAGQCBRB0b3RhbFNoYXJlQnlVc2VyCAUDcG10BmFtb3VudAkAzAgCCQEMSW50ZWdlckVudHJ5AgUOdG90YWxTaGFyZXNLRVkJAGQCBQt0b3RhbFNoYXJlcwgFA3BtdAZhbW91bnQFA25pbAFpAQR0ZXN0AQdhY2NvdW50CQACAQkArAICAghSZXN1bHQ6IAkApAMBCQERdXNlclNoYXJlRnJhY3Rpb24BBQdhY2NvdW50ACSiZ4w=", "height": 2407565, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9sp67RQCteudwaeVoYzRjuJteuCopmukCpojTHUg2yXb Next: JAkUNAc9ajxpH4av6EmcMe5nmjxv7VRLuD8KbrD8kNBa Diff:
OldNewDifferences
2121 func i () = valueOrElse(getInteger(this, h), 0)
2222
2323
24-let j = "A"
25-
26-func k () = valueOrElse(getInteger(this, "A"), 100)
27-
28-
29-func l (m,n) = (500000000 - (log(m, b, 10, 0, 6, HALFUP) * n))
30-
31-
32-func o (m,n) = {
33- let p = (500000000 - (log(m, b, 10, 0, 6, HALFUP) * n))
34- fraction(1, pow(10, 0, p, 8, 8, HALFUP), 100000000)
24+func j (d) = {
25+ let k = i()
26+ if ((k > 0))
27+ then {
28+ let l = e(d)
29+ fraction(100000000, l, k)
30+ }
31+ else 0
3532 }
3633
3734
38-func q (m,n) = if ((m > 10000000))
39- then (m * o(m, n))
35+let m = "A"
36+
37+func n () = valueOrElse(getInteger(this, "A"), 100)
38+
39+
40+func o (p,q) = (500000000 - (log(p, b, 10, 0, 6, HALFUP) * q))
41+
42+
43+func r (p,q) = if ((p > 10000000))
44+ then fraction(p, pow(10, 0, o(p, q), 8, 8, HALFUP), 100000000)
4045 else 10000000
4146
4247
43-func r () = q(g(), k())
48+func s () = r(g(), n())
4449
4550
46-@Callable(s)
51+@Callable(t)
4752 func deposit_share () = {
48- let t = if ((size(s.payments) == 1))
49- then s.payments[0]
53+ let u = if ((size(t.payments) == 1))
54+ then t.payments[0]
5055 else throw("Attached payment is required")
51- if (isDefined(t.assetId))
56+ if (isDefined(u.assetId))
5257 then throw("Only WAVES is allowed.")
5358 else {
54- let u = toString(s.caller)
55- let v = e(u)
56- let w = i()
57-[IntegerEntry(c(u), (v + t.amount)), IntegerEntry(h, (w + t.amount))]
59+ let v = toString(t.caller)
60+ let w = e(v)
61+ let k = i()
62+[IntegerEntry(c(v), (w + u.amount)), IntegerEntry(h, (k + u.amount))]
5863 }
5964 }
6065
6166
6267
63-@Callable(s)
64-func get_tmdi (m,n) = throw(("result: " + toString(q(m, n))))
68+@Callable(t)
69+func test (v) = throw(("Result: " + toString(j(v))))
6570
6671
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "5WE6HBVsmAbapTmTKpmyWmUR67fc16ybFrNjxzmDBtPa"
55
66 let b = 2
77
88 func c (d) = makeString(["shares", d], "_")
99
1010
1111 func e (d) = valueOrElse(getInteger(this, c(d)), 0)
1212
1313
1414 let f = "total_issued_WCD"
1515
1616 func g () = valueOrElse(getInteger(this, f), 0)
1717
1818
1919 let h = "total_shares"
2020
2121 func i () = valueOrElse(getInteger(this, h), 0)
2222
2323
24-let j = "A"
25-
26-func k () = valueOrElse(getInteger(this, "A"), 100)
27-
28-
29-func l (m,n) = (500000000 - (log(m, b, 10, 0, 6, HALFUP) * n))
30-
31-
32-func o (m,n) = {
33- let p = (500000000 - (log(m, b, 10, 0, 6, HALFUP) * n))
34- fraction(1, pow(10, 0, p, 8, 8, HALFUP), 100000000)
24+func j (d) = {
25+ let k = i()
26+ if ((k > 0))
27+ then {
28+ let l = e(d)
29+ fraction(100000000, l, k)
30+ }
31+ else 0
3532 }
3633
3734
38-func q (m,n) = if ((m > 10000000))
39- then (m * o(m, n))
35+let m = "A"
36+
37+func n () = valueOrElse(getInteger(this, "A"), 100)
38+
39+
40+func o (p,q) = (500000000 - (log(p, b, 10, 0, 6, HALFUP) * q))
41+
42+
43+func r (p,q) = if ((p > 10000000))
44+ then fraction(p, pow(10, 0, o(p, q), 8, 8, HALFUP), 100000000)
4045 else 10000000
4146
4247
43-func r () = q(g(), k())
48+func s () = r(g(), n())
4449
4550
46-@Callable(s)
51+@Callable(t)
4752 func deposit_share () = {
48- let t = if ((size(s.payments) == 1))
49- then s.payments[0]
53+ let u = if ((size(t.payments) == 1))
54+ then t.payments[0]
5055 else throw("Attached payment is required")
51- if (isDefined(t.assetId))
56+ if (isDefined(u.assetId))
5257 then throw("Only WAVES is allowed.")
5358 else {
54- let u = toString(s.caller)
55- let v = e(u)
56- let w = i()
57-[IntegerEntry(c(u), (v + t.amount)), IntegerEntry(h, (w + t.amount))]
59+ let v = toString(t.caller)
60+ let w = e(v)
61+ let k = i()
62+[IntegerEntry(c(v), (w + u.amount)), IntegerEntry(h, (k + u.amount))]
5863 }
5964 }
6065
6166
6267
63-@Callable(s)
64-func get_tmdi (m,n) = throw(("result: " + toString(q(m, n))))
68+@Callable(t)
69+func test (v) = throw(("Result: " + toString(j(v))))
6570
6671

github/deemru/w8io/169f3d6 
30.93 ms