tx · 57m8vJRwg4WqwYheS5VgPfd3BrGoNdtJSySky7ek7gcS 3N1XAEyg1TQGa5FCEerrRhLGi5KyVq26Xm8: -0.00100000 Waves 2023.01.12 18:19 [2401907] smart account 3N1XAEyg1TQGa5FCEerrRhLGi5KyVq26Xm8 > SELF 0.00000000 Waves
{ "type": 13, "id": "57m8vJRwg4WqwYheS5VgPfd3BrGoNdtJSySky7ek7gcS", "fee": 100000, "feeAssetId": null, "timestamp": 1673536878324, "version": 2, "chainId": 84, "sender": "3N1XAEyg1TQGa5FCEerrRhLGi5KyVq26Xm8", "senderPublicKey": "ATuPi6fn8277fNiCoRgPTav9QG15CJoW95GEGcDmfYt8", "proofs": [ "cXN3iteZ5DoYUg32ReBwicRwBn9JdQNcUrYJ28UysJKjPCFkavf5toEPM32Jck674uqR81DtLPHA1YT3QmM4Hpp" ], "script": "base64:BgIECAISAAMABXdjZElkAiw1V0U2SEJWc21BYmFwVG1US3BteVdtVVI2N2ZjMTZ5YkZyTmp4em1EQnRQYQETdG90YWxTaGFyZUJ5VXNlcktFWQEFb3duZXIJALkJAgkAzAgCAgZzaGFyZXMJAMwIAgUFb3duZXIFA25pbAIBXwEUdG90YWxTaGFyZUJ5VXNlclJFQUQBBW93bmVyCQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMJARN0b3RhbFNoYXJlQnlVc2VyS0VZAQUFb3duZXIAAAEBaQENZGVwb3NpdF9zaGFyZQAEA3BtdAMJAAACCQCQAwEIBQFpCHBheW1lbnRzAAEJAJEDAggFAWkIcGF5bWVudHMAAAkAAgECHEF0dGFjaGVkIHBheW1lbnQgaXMgcmVxdWlyZWQDCQEJaXNEZWZpbmVkAQgFA3BtdAdhc3NldElkCQACAQIWT25seSBXQVZFUyBpcyBhbGxvd2VkLgQHYWNjb3VudAkApQgBCAUBaQZjYWxsZXIEEHRvdGFsU2hhcmVCeVVzZXIJARR0b3RhbFNoYXJlQnlVc2VyUkVBRAEFB2FjY291bnQJAMwIAgkBDEludGVnZXJFbnRyeQIJARN0b3RhbFNoYXJlQnlVc2VyS0VZAQUHYWNjb3VudAkAZAIFEHRvdGFsU2hhcmVCeVVzZXIIBQNwbXQGYW1vdW50BQNuaWwAjbkrLg==", "height": 2401907, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 6AjVp3zBookgTckkr4aoSFzPA6jAQdaYVZjahmHgtoY4 Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let wcdId = "5WE6HBVsmAbapTmTKpmyWmUR67fc16ybFrNjxzmDBtPa" | |
5 | + | ||
6 | + | func totalShareByUserKEY (owner) = makeString(["shares", owner], "_") | |
7 | + | ||
8 | + | ||
9 | + | func totalShareByUserREAD (owner) = valueOrElse(getInteger(this, totalShareByUserKEY(owner)), 0) | |
10 | + | ||
11 | + | ||
12 | + | @Callable(i) | |
13 | + | func deposit_share () = { | |
14 | + | let pmt = if ((size(i.payments) == 1)) | |
15 | + | then i.payments[0] | |
16 | + | else throw("Attached payment is required") | |
17 | + | if (isDefined(pmt.assetId)) | |
18 | + | then throw("Only WAVES is allowed.") | |
19 | + | else { | |
20 | + | let account = toString(i.caller) | |
21 | + | let totalShareByUser = totalShareByUserREAD(account) | |
22 | + | [IntegerEntry(totalShareByUserKEY(account), (totalShareByUser + pmt.amount))] | |
23 | + | } | |
24 | + | } | |
25 | + | ||
26 | + |
github/deemru/w8io/026f985 15.39 ms ◑