tx · 7DUUirjHm6y5bvouFExGM4e8MgZcDpa2nL5id5qRQoua 3NCukxG6cc7pqKoEwTZsr1CRrHMHfvGM7ok: -0.01000000 Waves 2023.11.10 15:49 [2837268] smart account 3NCukxG6cc7pqKoEwTZsr1CRrHMHfvGM7ok > SELF 0.00000000 Waves
{ "type": 13, "id": "7DUUirjHm6y5bvouFExGM4e8MgZcDpa2nL5id5qRQoua", "fee": 1000000, "feeAssetId": null, "timestamp": 1699620537526, "version": 2, "chainId": 84, "sender": "3NCukxG6cc7pqKoEwTZsr1CRrHMHfvGM7ok", "senderPublicKey": "Ba1WX1ZypN1wFcFgVrXgam9NFbnD3XA1P62kc37wpxzA", "proofs": [ "4peczkk7veHr2itkndxNkS6KfRoCFCDDRRCr3MjAigbgc9xdhf91opkZU479KCZx6LWbv5pv1MiCydC6uLdwAU4C" ], "script": "base64:BgIGCAISABIAAwAUd3hfc3Rha2VkX2Ftb3VudF9rZXkCEHd4X3N0YWtlZF9hbW91bnQAEHd4X21vY2tfYXNzZXRfaWQBIHptAsMqQB03rB/7u2vDLbTRVkUM0N3b1oUokuAcHZrjAQlhc1BheW1lbnQBAXYEByRtYXRjaDAFAXYDCQABAgUHJG1hdGNoMAIPQXR0YWNoZWRQYXltZW50BAFwBQckbWF0Y2gwBQFwCQACAQIhZmFpbCB0byBjYXN0IGludG8gQXR0YWNoZWRQYXltZW50AgFpARd1c2VyTWF4RHVyYXRpb25SRUFET05MWQAJAJQKAgUDbmlsCQCUCgICB3N0YWtlV1gA+AoBaQEHc3Rha2VXWAAEB3BheW1lbnQJAQlhc1BheW1lbnQBCQCRAwIIBQFpCHBheW1lbnRzAAAEBmFtb3VudAgFB3BheW1lbnQGYW1vdW50BA1jdXJyZW50QW1vdW50CQELdmFsdWVPckVsc2UCCQCfCAEFFHd4X3N0YWtlZF9hbW91bnRfa2V5AAAJAMwIAgkBDEludGVnZXJFbnRyeQIFFHd4X3N0YWtlZF9hbW91bnRfa2V5CQBkAgUNY3VycmVudEFtb3VudAUGYW1vdW50BQNuaWwA9GMIrg==", "height": 2837268, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: BupNJR9wGy9gjweQhiTh1EY1dGDNxSCs9gKg3gSEQXSC Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let wx_staked_amount_key = "wx_staked_amount" | |
5 | + | ||
6 | + | let wx_mock_asset_id = base58'9Eu9de5GPPgLzY16bevCaxF4rFr4jA9wqyTfqcjksU82' | |
7 | + | ||
8 | + | func asPayment (v) = match v { | |
9 | + | case p: AttachedPayment => | |
10 | + | p | |
11 | + | case _ => | |
12 | + | throw("fail to cast into AttachedPayment") | |
13 | + | } | |
14 | + | ||
15 | + | ||
16 | + | @Callable(i) | |
17 | + | func userMaxDurationREADONLY () = $Tuple2(nil, $Tuple2("stakeWX", 1400)) | |
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | @Callable(i) | |
22 | + | func stakeWX () = { | |
23 | + | let payment = asPayment(i.payments[0]) | |
24 | + | let amount = payment.amount | |
25 | + | let currentAmount = valueOrElse(getInteger(wx_staked_amount_key), 0) | |
26 | + | [IntegerEntry(wx_staked_amount_key, (currentAmount + amount))] | |
27 | + | } | |
28 | + | ||
29 | + |
github/deemru/w8io/169f3d6 15.77 ms ◑