tx · 6AjVp3zBookgTckkr4aoSFzPA6jAQdaYVZjahmHgtoY4

3N1XAEyg1TQGa5FCEerrRhLGi5KyVq26Xm8:  -0.00100000 Waves

2023.01.13 18:26 [2403351] smart account 3N1XAEyg1TQGa5FCEerrRhLGi5KyVq26Xm8 > SELF 0.00000000 Waves

{ "type": 13, "id": "6AjVp3zBookgTckkr4aoSFzPA6jAQdaYVZjahmHgtoY4", "fee": 100000, "feeAssetId": null, "timestamp": 1673623638816, "version": 2, "chainId": 84, "sender": "3N1XAEyg1TQGa5FCEerrRhLGi5KyVq26Xm8", "senderPublicKey": "ATuPi6fn8277fNiCoRgPTav9QG15CJoW95GEGcDmfYt8", "proofs": [ "5KDzmLKkDGr9UHbch29xoMV7SJTPxnzyhufYYdTCBP99iWh9TbBFq7n1WLws5kvGiBYedNaJEy6cUgoCpS9dYEZU" ], "script": "base64:BgIECAISAAcABXdjZElkAiw1V0U2SEJWc21BYmFwVG1US3BteVdtVVI2N2ZjMTZ5YkZyTmp4em1EQnRQYQETdG90YWxTaGFyZUJ5VXNlcktFWQEFb3duZXIJALkJAgkAzAgCAgZzaGFyZXMJAMwIAgUFb3duZXIFA25pbAIBXwEUdG90YWxTaGFyZUJ5VXNlclJFQUQBBW93bmVyCQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMJARN0b3RhbFNoYXJlQnlVc2VyS0VZAQUFb3duZXIAAAARdG90YWxJc3N1ZWRXQ0RLRVkCEHRvdGFsX2lzc3VlZF9XQ0QBDnRvdGFsSXNzdWVkV0NEAAkBC3ZhbHVlT3JFbHNlAgkAmggCBQR0aGlzBRF0b3RhbElzc3VlZFdDREtFWQAAAA50b3RhbFNoYXJlc0tFWQIMdG90YWxfc2hhcmVzAQt0b3RhbFNoYXJlcwAJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwUOdG90YWxTaGFyZXNLRVkAAAEBaQENZGVwb3NpdF9zaGFyZQAEA3BtdAMJAAACCQCQAwEIBQFpCHBheW1lbnRzAAEJAJEDAggFAWkIcGF5bWVudHMAAAkAAgECHEF0dGFjaGVkIHBheW1lbnQgaXMgcmVxdWlyZWQDCQEJaXNEZWZpbmVkAQgFA3BtdAdhc3NldElkCQACAQIWT25seSBXQVZFUyBpcyBhbGxvd2VkLgQHYWNjb3VudAkApQgBCAUBaQZjYWxsZXIEEHRvdGFsU2hhcmVCeVVzZXIJARR0b3RhbFNoYXJlQnlVc2VyUkVBRAEFB2FjY291bnQED3RvdGFsU2hhcmVzUHJldgkBC3RvdGFsU2hhcmVzAAkAzAgCCQEMSW50ZWdlckVudHJ5AgkBE3RvdGFsU2hhcmVCeVVzZXJLRVkBBQdhY2NvdW50CQBkAgUQdG90YWxTaGFyZUJ5VXNlcggFA3BtdAZhbW91bnQJAMwIAgkBDEludGVnZXJFbnRyeQIFDnRvdGFsU2hhcmVzS0VZCQBkAgUPdG90YWxTaGFyZXNQcmV2CAUDcG10BmFtb3VudAUDbmlsAASJNDI=", "height": 2403351, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 57m8vJRwg4WqwYheS5VgPfd3BrGoNdtJSySky7ek7gcS Next: BEWKpjcYDdoy5XrQZNazuT3i9J4YFb5AqebabARtUAvq Diff:
OldNewDifferences
99 func d (c) = valueOrElse(getInteger(this, b(c)), 0)
1010
1111
12-@Callable(e)
12+let e = "total_issued_WCD"
13+
14+func f () = valueOrElse(getInteger(this, e), 0)
15+
16+
17+let g = "total_shares"
18+
19+func h () = valueOrElse(getInteger(this, g), 0)
20+
21+
22+@Callable(i)
1323 func deposit_share () = {
14- let f = if ((size(e.payments) == 1))
15- then e.payments[0]
24+ let j = if ((size(i.payments) == 1))
25+ then i.payments[0]
1626 else throw("Attached payment is required")
17- if (isDefined(f.assetId))
27+ if (isDefined(j.assetId))
1828 then throw("Only WAVES is allowed.")
1929 else {
20- let g = toString(e.caller)
21- let h = d(g)
22-[IntegerEntry(b(g), (h + f.amount))]
30+ let k = toString(i.caller)
31+ let l = d(k)
32+ let m = h()
33+[IntegerEntry(b(k), (l + j.amount)), IntegerEntry(g, (m + j.amount))]
2334 }
2435 }
2536
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "5WE6HBVsmAbapTmTKpmyWmUR67fc16ybFrNjxzmDBtPa"
55
66 func b (c) = makeString(["shares", c], "_")
77
88
99 func d (c) = valueOrElse(getInteger(this, b(c)), 0)
1010
1111
12-@Callable(e)
12+let e = "total_issued_WCD"
13+
14+func f () = valueOrElse(getInteger(this, e), 0)
15+
16+
17+let g = "total_shares"
18+
19+func h () = valueOrElse(getInteger(this, g), 0)
20+
21+
22+@Callable(i)
1323 func deposit_share () = {
14- let f = if ((size(e.payments) == 1))
15- then e.payments[0]
24+ let j = if ((size(i.payments) == 1))
25+ then i.payments[0]
1626 else throw("Attached payment is required")
17- if (isDefined(f.assetId))
27+ if (isDefined(j.assetId))
1828 then throw("Only WAVES is allowed.")
1929 else {
20- let g = toString(e.caller)
21- let h = d(g)
22-[IntegerEntry(b(g), (h + f.amount))]
30+ let k = toString(i.caller)
31+ let l = d(k)
32+ let m = h()
33+[IntegerEntry(b(k), (l + j.amount)), IntegerEntry(g, (m + j.amount))]
2334 }
2435 }
2536
2637

github/deemru/w8io/169f3d6 
38.63 ms