tx · 3uxAmk5vp8rhG1xiHKMKN5gkv5rWbcSWdV48kF544dgj 3NCukxG6cc7pqKoEwTZsr1CRrHMHfvGM7ok: -0.01000000 Waves 2023.11.16 09:21 [2845554] smart account 3NCukxG6cc7pqKoEwTZsr1CRrHMHfvGM7ok > SELF 0.00000000 Waves
{ "type": 13, "id": "3uxAmk5vp8rhG1xiHKMKN5gkv5rWbcSWdV48kF544dgj", "fee": 1000000, "feeAssetId": null, "timestamp": 1700115691821, "version": 2, "chainId": 84, "sender": "3NCukxG6cc7pqKoEwTZsr1CRrHMHfvGM7ok", "senderPublicKey": "Ba1WX1ZypN1wFcFgVrXgam9NFbnD3XA1P62kc37wpxzA", "proofs": [ "3QoEWFKRkmmY9SZmbF1UBRdMJ6hGUwKrVTUx8Nh1qjWrfPfmq73WQWmHyNQFREYqaGLmDtpw7K1uViaafnobo16V" ], "script": "base64:BgI1CAISABIDCgEIEgQKAggBEgQKAggEEgMKAQgSAwoBARIDCgEEEgMKAQgSAwoBARIDCgEIEgADABR3eF9zdGFrZWRfYW1vdW50X2tleQIQd3hfc3Rha2VkX2Ftb3VudAAQd3hfbW9ja19hc3NldF9pZAEgem0CwypAHTesH/u7a8MttNFWRQzQ3dvWhSiS4BwdmuMBCWFzUGF5bWVudAEBdgQHJG1hdGNoMAUBdgMJAAECBQckbWF0Y2gwAg9BdHRhY2hlZFBheW1lbnQEAXAFByRtYXRjaDAFAXAJAAIBAiFmYWlsIHRvIGNhc3QgaW50byBBdHRhY2hlZFBheW1lbnQLAWkBF3VzZXJNYXhEdXJhdGlvblJFQURPTkxZAAkAlAoCBQNuaWwJAJQKAgIHc3Rha2VXWAD4CgFpARh1c2VyTWF4RHVyYXRpb25SRUFET05MWTIBB2FkZHJlc3MJAJQKAgUDbmlsAJADAWkBGHVzZXJNYXhEdXJhdGlvblJFQURPTkxZMwIHYWRkcmVzcwV2YWx1ZQkAlAoCBQNuaWwCBUhlbGxvAWkBGHVzZXJNYXhEdXJhdGlvblJFQURP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udFN0YWtlZEFtb3VudADoBwCQTgkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIFDHJld2FyZEFtb3VudAUQd3hfbW9ja19hc3NldF9pZAUDbmlsANuRKwY=", "height": 2845554, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6BP8qpMGzBx7zCKEZJfG2dRiRzXGZk7o7FnqwQP3SsNw Next: 74u5SEjkX9Js4mJDYUJjLoG3pjJYJyaBLQM6CqH4jbSS Diff:
Old | New | Differences | |
---|---|---|---|
44 | 44 | ||
45 | 45 | ||
46 | 46 | @Callable(i) | |
47 | + | func userMaxDurationREADONLY7 (address) = $Tuple2(nil, address) | |
48 | + | ||
49 | + | ||
50 | + | ||
51 | + | @Callable(i) | |
52 | + | func userMaxDurationREADONLY8 (address) = $Tuple2(nil, address) | |
53 | + | ||
54 | + | ||
55 | + | ||
56 | + | @Callable(i) | |
47 | 57 | func stakeWX (duraction) = { | |
48 | 58 | let payment = asPayment(i.payments[0]) | |
49 | 59 | let amount = payment.amount |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let wx_staked_amount_key = "wx_staked_amount" | |
5 | 5 | ||
6 | 6 | let wx_mock_asset_id = base58'9Eu9de5GPPgLzY16bevCaxF4rFr4jA9wqyTfqcjksU82' | |
7 | 7 | ||
8 | 8 | func asPayment (v) = match v { | |
9 | 9 | case p: AttachedPayment => | |
10 | 10 | p | |
11 | 11 | case _ => | |
12 | 12 | throw("fail to cast into AttachedPayment") | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | @Callable(i) | |
17 | 17 | func userMaxDurationREADONLY () = $Tuple2(nil, $Tuple2("stakeWX", 1400)) | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | ||
21 | 21 | @Callable(i) | |
22 | 22 | func userMaxDurationREADONLY2 (address) = $Tuple2(nil, 400) | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | ||
26 | 26 | @Callable(i) | |
27 | 27 | func userMaxDurationREADONLY3 (address,value) = $Tuple2(nil, "Hello") | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | ||
31 | 31 | @Callable(i) | |
32 | 32 | func userMaxDurationREADONLY4 (address,value) = $Tuple2(nil, true) | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | ||
36 | 36 | @Callable(i) | |
37 | 37 | func userMaxDurationREADONLY5 (address) = $Tuple2(nil, [1, 2, "asd"]) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | ||
41 | 41 | @Callable(i) | |
42 | 42 | func userMaxDurationREADONLY6 (address) = $Tuple2(nil, address) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | ||
46 | 46 | @Callable(i) | |
47 | + | func userMaxDurationREADONLY7 (address) = $Tuple2(nil, address) | |
48 | + | ||
49 | + | ||
50 | + | ||
51 | + | @Callable(i) | |
52 | + | func userMaxDurationREADONLY8 (address) = $Tuple2(nil, address) | |
53 | + | ||
54 | + | ||
55 | + | ||
56 | + | @Callable(i) | |
47 | 57 | func stakeWX (duraction) = { | |
48 | 58 | let payment = asPayment(i.payments[0]) | |
49 | 59 | let amount = payment.amount | |
50 | 60 | let currentAmount = valueOrElse(getInteger(wx_staked_amount_key), 0) | |
51 | 61 | [IntegerEntry(wx_staked_amount_key, (currentAmount + amount))] | |
52 | 62 | } | |
53 | 63 | ||
54 | 64 | ||
55 | 65 | ||
56 | 66 | @Callable(i) | |
57 | 67 | func claimWX (token) = { | |
58 | 68 | let currentStakedAmount = getIntegerValue(wx_staked_amount_key) | |
59 | 69 | let rewardAmount = fraction(currentStakedAmount, 1000, 10000) | |
60 | 70 | [ScriptTransfer(i.caller, rewardAmount, wx_mock_asset_id)] | |
61 | 71 | } | |
62 | 72 | ||
63 | 73 | ||
64 | 74 | ||
65 | 75 | @Callable(i) | |
66 | 76 | func claimReward () = { | |
67 | 77 | let currentStakedAmount = getIntegerValue(wx_staked_amount_key) | |
68 | 78 | let rewardAmount = fraction(currentStakedAmount, 1000, 10000) | |
69 | 79 | [ScriptTransfer(i.caller, rewardAmount, wx_mock_asset_id)] | |
70 | 80 | } | |
71 | 81 | ||
72 | 82 |
github/deemru/w8io/169f3d6 25.80 ms ◑