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
77
88
99 func totalShareByUserREAD (owner) = valueOrElse(getInteger(this, totalShareByUserKEY(owner)), 0)
10+
11+
12+let totalIssuedWCDKEY = "total_issued_WCD"
13+
14+func totalIssuedWCD () = valueOrElse(getInteger(this, totalIssuedWCDKEY), 0)
15+
16+
17+let totalSharesKEY = "total_shares"
18+
19+func totalShares () = valueOrElse(getInteger(this, totalSharesKEY), 0)
1020
1121
1222 @Callable(i)
1929 else {
2030 let account = toString(i.caller)
2131 let totalShareByUser = totalShareByUserREAD(account)
22-[IntegerEntry(totalShareByUserKEY(account), (totalShareByUser + pmt.amount))]
32+ let totalSharesPrev = totalShares()
33+[IntegerEntry(totalShareByUserKEY(account), (totalShareByUser + pmt.amount)), IntegerEntry(totalSharesKEY, (totalSharesPrev + pmt.amount))]
2334 }
2435 }
2536
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let wcdId = "5WE6HBVsmAbapTmTKpmyWmUR67fc16ybFrNjxzmDBtPa"
55
66 func totalShareByUserKEY (owner) = makeString(["shares", owner], "_")
77
88
99 func totalShareByUserREAD (owner) = valueOrElse(getInteger(this, totalShareByUserKEY(owner)), 0)
10+
11+
12+let totalIssuedWCDKEY = "total_issued_WCD"
13+
14+func totalIssuedWCD () = valueOrElse(getInteger(this, totalIssuedWCDKEY), 0)
15+
16+
17+let totalSharesKEY = "total_shares"
18+
19+func totalShares () = valueOrElse(getInteger(this, totalSharesKEY), 0)
1020
1121
1222 @Callable(i)
1323 func deposit_share () = {
1424 let pmt = if ((size(i.payments) == 1))
1525 then i.payments[0]
1626 else throw("Attached payment is required")
1727 if (isDefined(pmt.assetId))
1828 then throw("Only WAVES is allowed.")
1929 else {
2030 let account = toString(i.caller)
2131 let totalShareByUser = totalShareByUserREAD(account)
22-[IntegerEntry(totalShareByUserKEY(account), (totalShareByUser + pmt.amount))]
32+ let totalSharesPrev = totalShares()
33+[IntegerEntry(totalShareByUserKEY(account), (totalShareByUser + pmt.amount)), IntegerEntry(totalSharesKEY, (totalSharesPrev + pmt.amount))]
2334 }
2435 }
2536
2637

github/deemru/w8io/026f985 
59.21 ms