tx · 9dUTsnp7UvCNFL2nsPgBCKiMJXFCtqUtvmm7y1oZboen

3N1XAEyg1TQGa5FCEerrRhLGi5KyVq26Xm8:  -0.00200000 Waves

2023.01.16 15:40 [2407516] smart account 3N1XAEyg1TQGa5FCEerrRhLGi5KyVq26Xm8 > SELF 0.00000000 Waves

{ "type": 13, "id": "9dUTsnp7UvCNFL2nsPgBCKiMJXFCtqUtvmm7y1oZboen", "fee": 200000, "feeAssetId": null, "timestamp": 1673872881075, "version": 2, "chainId": 84, "sender": "3N1XAEyg1TQGa5FCEerrRhLGi5KyVq26Xm8", "senderPublicKey": "ATuPi6fn8277fNiCoRgPTav9QG15CJoW95GEGcDmfYt8", "proofs": [ "41no82MZXtzCaJUiXc8VCyqF5vfEJ92WEky9GpCMM4jLZFagmWvUVQPovLuEmgSLPKXzn3aabiWVyurcsaZCXguY" ], "script": "base64:BgIGCAISABIADQAFd2NkSWQCLDVXRTZIQlZzbUFiYXBUbVRLcG15V21VUjY3ZmMxNnliRnJOanh6bURCdFBhAAt3Y2REZWNpbWFscwACARN0b3RhbFNoYXJlQnlVc2VyS0VZAQVvd25lcgkAuQkCCQDMCAICBnNoYXJlcwkAzAgCBQVvd25lcgUDbmlsAgFfARR0b3RhbFNoYXJlQnlVc2VyUkVBRAEFb3duZXIJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwkBE3RvdGFsU2hhcmVCeVVzZXJLRVkBBQVvd25lcgAAABJ0b3RhbElzc3VlZFdDRF9LRVkCEHRvdGFsX2lzc3VlZF9XQ0QBE3RvdGFsSXNzdWVkV0NEX1JFQUQACQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFEnRvdGFsSXNzdWVkV0NEX0tFWQAAAA50b3RhbFNoYXJlc0tFWQIMdG90YWxfc2hhcmVzAQ90b3RhbFNoYXJlc1JFQUQACQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFDnRvdGFsU2hhcmVzS0VZAAAACnBhcmFtQV9LRVkCAUEBC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URJAADbhJMi", "height": 2407516, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 45jeNkN6qhRsSvvqNeuBRxP4F8dm8hvgUmzoFG8doft1 Next: 5rWF8nn87njr19w2C8RQx62hPHAvCdELSTT2J34yPz9T Diff:
OldNewDifferences
3434 else 10000000
3535
3636
37-@Callable(p)
37+func p () = o(g(), k())
38+
39+
40+@Callable(q)
3841 func deposit_share () = {
39- let q = if ((size(p.payments) == 1))
40- then p.payments[0]
42+ let r = if ((size(q.payments) == 1))
43+ then q.payments[0]
4144 else throw("Attached payment is required")
42- if (isDefined(q.assetId))
45+ if (isDefined(r.assetId))
4346 then throw("Only WAVES is allowed.")
4447 else {
45- let r = toString(p.caller)
46- let s = e(r)
47- let t = i()
48-[IntegerEntry(c(r), (s + q.amount)), IntegerEntry(h, (t + q.amount))]
48+ let s = toString(q.caller)
49+ let t = e(s)
50+ let u = i()
51+[IntegerEntry(c(s), (t + r.amount)), IntegerEntry(h, (u + r.amount))]
4952 }
5053 }
5154
5255
5356
54-@Callable(p)
55-func get_tmdi (m,n) = throw(("result: " + toString(o(m, n))))
57+@Callable(q)
58+func get_tmdi () = throw(("result: " + toString(p())))
5659
5760
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 let j = "A"
2525
2626 func k () = valueOrElse(getInteger(this, "A"), 100)
2727
2828
2929 func l (m,n) = (500000000 - (log(m, b, 10, 0, 6, HALFUP) * n))
3030
3131
3232 func o (m,n) = if ((m > 10000000))
3333 then fraction(m, pow(10, 0, l(m, n), 8, 8, HALFUP), 100000000)
3434 else 10000000
3535
3636
37-@Callable(p)
37+func p () = o(g(), k())
38+
39+
40+@Callable(q)
3841 func deposit_share () = {
39- let q = if ((size(p.payments) == 1))
40- then p.payments[0]
42+ let r = if ((size(q.payments) == 1))
43+ then q.payments[0]
4144 else throw("Attached payment is required")
42- if (isDefined(q.assetId))
45+ if (isDefined(r.assetId))
4346 then throw("Only WAVES is allowed.")
4447 else {
45- let r = toString(p.caller)
46- let s = e(r)
47- let t = i()
48-[IntegerEntry(c(r), (s + q.amount)), IntegerEntry(h, (t + q.amount))]
48+ let s = toString(q.caller)
49+ let t = e(s)
50+ let u = i()
51+[IntegerEntry(c(s), (t + r.amount)), IntegerEntry(h, (u + r.amount))]
4952 }
5053 }
5154
5255
5356
54-@Callable(p)
55-func get_tmdi (m,n) = throw(("result: " + toString(o(m, n))))
57+@Callable(q)
58+func get_tmdi () = throw(("result: " + toString(p())))
5659
5760

github/deemru/w8io/169f3d6 
43.10 ms