tx · JAkUNAc9ajxpH4av6EmcMe5nmjxv7VRLuD8KbrD8kNBa

3N1XAEyg1TQGa5FCEerrRhLGi5KyVq26Xm8:  -0.00200000 Waves

2023.01.16 16:37 [2407570] smart account 3N1XAEyg1TQGa5FCEerrRhLGi5KyVq26Xm8 > SELF 0.00000000 Waves

{ "type": 13, "id": "JAkUNAc9ajxpH4av6EmcMe5nmjxv7VRLuD8KbrD8kNBa", "fee": 200000, "feeAssetId": null, "timestamp": 1673876344316, "version": 2, "chainId": 84, "sender": "3N1XAEyg1TQGa5FCEerrRhLGi5KyVq26Xm8", "senderPublicKey": "ATuPi6fn8277fNiCoRgPTav9QG15CJoW95GEGcDmfYt8", "proofs": [ "4P41PfHi9bn45HjSbNQS3XwugYhvmCJ89U3kbVFxq52X4qfgz6ScXoGXT7SSDygKH4L1KCGWbY6Te7QBmK1nJmT3" ], "script": "base64:BgIJCAISABIDCgEIDwAFd2NkSWQCLDVXRTZIQlZzbUFiYXBUbVRLcG15V21VUjY3ZmMxNnliRnJOanh6bURCdFBhAAt3Y2REZWNpbWFscwACARN0b3RhbFNoYXJlQnlVc2VyS0VZAQVvd25lcgkAuQkCCQDMCAICBnNoYXJlcwkAzAgCBQVvd25lcgUDbmlsAgFfARR0b3RhbFNoYXJlQnlVc2VyUkVBRAEFb3duZXIJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwkBE3RvdGFsU2hhcmVCeVVzZXJLRVkBBQVvd25lcgAAABJ0b3RhbElzc3VlZFdDRF9LRVkCEHRvdGFsX2lzc3VlZF9XQ0QBE3RvdGFsSXNzdWVkV0NEX1JFQUQACQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFEnRvdGFsSXNzdWVkV0NEX0tFWQAAAA50b3RhbFNoYXJlc0tFWQIMdG90YWxfc2hhcmVzAQ90b3RhbFNoYXJlc1JFQUQACQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFDnRvdGFsU2hhcmVzS0VZAAABEXVzZXJTaGF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hY2NvdW50BAt0b3RhbFNoYXJlcwkBD3RvdGFsU2hhcmVzUkVBRAAJAMwIAgkBDEludGVnZXJFbnRyeQIJARN0b3RhbFNoYXJlQnlVc2VyS0VZAQUHYWNjb3VudAkAZAIFEHRvdGFsU2hhcmVCeVVzZXIIBQNwbXQGYW1vdW50CQDMCAIJAQxJbnRlZ2VyRW50cnkCBQ50b3RhbFNoYXJlc0tFWQkAZAIFC3RvdGFsU2hhcmVzCAUDcG10BmFtb3VudAUDbmlsAWkBBHRlc3QBB2FjY291bnQJAAIBCQCsAgICCFJlc3VsdDogCQCkAwEJAQtnZXRVc2VyVE1ESQEFB2FjY291bnQA24VvZw==", "height": 2407570, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 26B55LK7guRV5gm2apmEAnEmnnihYWJUa88HNGsq9PoS Next: FBVd4PENSumhkVFNBJeFef4YhihRZbYyfiERu7Qc9cSg Diff:
OldNewDifferences
4848 func s () = r(g(), n())
4949
5050
51-@Callable(t)
51+func t (d) = fraction(s(), j(d), 100000000)
52+
53+
54+@Callable(u)
5255 func deposit_share () = {
53- let u = if ((size(t.payments) == 1))
54- then t.payments[0]
56+ let v = if ((size(u.payments) == 1))
57+ then u.payments[0]
5558 else throw("Attached payment is required")
56- if (isDefined(u.assetId))
59+ if (isDefined(v.assetId))
5760 then throw("Only WAVES is allowed.")
5861 else {
59- let v = toString(t.caller)
60- let w = e(v)
62+ let w = toString(u.caller)
63+ let x = e(w)
6164 let k = i()
62-[IntegerEntry(c(v), (w + u.amount)), IntegerEntry(h, (k + u.amount))]
65+[IntegerEntry(c(w), (x + v.amount)), IntegerEntry(h, (k + v.amount))]
6366 }
6467 }
6568
6669
6770
68-@Callable(t)
69-func test (v) = throw(("Result: " + toString(j(v))))
71+@Callable(u)
72+func test (w) = throw(("Result: " + toString(t(w))))
7073
7174
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
2424 func j (d) = {
2525 let k = i()
2626 if ((k > 0))
2727 then {
2828 let l = e(d)
2929 fraction(100000000, l, k)
3030 }
3131 else 0
3232 }
3333
3434
3535 let m = "A"
3636
3737 func n () = valueOrElse(getInteger(this, "A"), 100)
3838
3939
4040 func o (p,q) = (500000000 - (log(p, b, 10, 0, 6, HALFUP) * q))
4141
4242
4343 func r (p,q) = if ((p > 10000000))
4444 then fraction(p, pow(10, 0, o(p, q), 8, 8, HALFUP), 100000000)
4545 else 10000000
4646
4747
4848 func s () = r(g(), n())
4949
5050
51-@Callable(t)
51+func t (d) = fraction(s(), j(d), 100000000)
52+
53+
54+@Callable(u)
5255 func deposit_share () = {
53- let u = if ((size(t.payments) == 1))
54- then t.payments[0]
56+ let v = if ((size(u.payments) == 1))
57+ then u.payments[0]
5558 else throw("Attached payment is required")
56- if (isDefined(u.assetId))
59+ if (isDefined(v.assetId))
5760 then throw("Only WAVES is allowed.")
5861 else {
59- let v = toString(t.caller)
60- let w = e(v)
62+ let w = toString(u.caller)
63+ let x = e(w)
6164 let k = i()
62-[IntegerEntry(c(v), (w + u.amount)), IntegerEntry(h, (k + u.amount))]
65+[IntegerEntry(c(w), (x + v.amount)), IntegerEntry(h, (k + v.amount))]
6366 }
6467 }
6568
6669
6770
68-@Callable(t)
69-func test (v) = throw(("Result: " + toString(j(v))))
71+@Callable(u)
72+func test (w) = throw(("Result: " + toString(t(w))))
7073
7174

github/deemru/w8io/026f985 
61.98 ms