tx · 23Yk34scXNGTNxRVE6BtvuSfcAcNHVZV4uA6YSA1ZGTt

3NCukxG6cc7pqKoEwTZsr1CRrHMHfvGM7ok:  -0.01000000 Waves

2023.11.10 16:16 [2837293] smart account 3NCukxG6cc7pqKoEwTZsr1CRrHMHfvGM7ok > SELF 0.00000000 Waves

{ "type": 13, "id": "23Yk34scXNGTNxRVE6BtvuSfcAcNHVZV4uA6YSA1ZGTt", "fee": 1000000, "feeAssetId": null, "timestamp": 1699622257311, "version": 2, "chainId": 84, "sender": "3NCukxG6cc7pqKoEwTZsr1CRrHMHfvGM7ok", "senderPublicKey": "Ba1WX1ZypN1wFcFgVrXgam9NFbnD3XA1P62kc37wpxzA", "proofs": [ "3TAwSs6zKCRRVyv9kQqCtweqpgJ9F21i5my4W7beranVy3rkPe62STqUmJAGzEGdrDm7ZWHZyVdy6brT8kqoWJeK" ], "script": "base64:BgIKCAISABIAEgASAAMAFHd4X3N0YWtlZF9hbW91bnRfa2V5AhB3eF9zdGFrZWRfYW1vdW50ABB3eF9tb2NrX2Fzc2V0X2lkASB6bQLDKkAdN6wf+7trwy200VZFDNDd29aFKJLgHB2a4wEJYXNQYXltZW50AQF2BAckbWF0Y2gwBQF2AwkAAQIFByRtYXRjaDACD0F0dGFjaGVkUGF5bWVudAQBcAUHJG1hdGNoMAUBcAkAAgECIWZhaWwgdG8gY2FzdCBpbnRvIEF0dGFjaGVkUGF5bWVudAQBaQEXdXNlck1heER1cmF0aW9uUkVBRE9OTFkACQCUCgIFA25pbAkAlAoCAgdzdGFrZVdYAPgKAWkBB3N0YWtlV1gABAdwYXltZW50CQEJYXNQYXltZW50AQkAkQMCCAUBaQhwYXltZW50cwAABAZhbW91bnQIBQdwYXltZW50BmFtb3VudAQNY3VycmVudEFtb3VudAkBC3ZhbHVlT3JFbHNlAgkAnwgBBRR3eF9zdGFrZWRfYW1vdW50X2tleQAACQDMCAIJAQxJbnRlZ2VyRW50cnkCBRR3eF9zdGFrZWRfYW1vdW50X2tleQkAZAIFDWN1cnJlbnRBbW91bnQFBmFtb3VudAUDbmlsAWkBB2NsYWltV1gABBNjdXJyZW50U3Rha2VkQW1vdW50CQERQGV4dHJOYXRpdmUoMTA1NSkBBRR3eF9zdGFrZWRfYW1vdW50X2tleQQMcmV3YXJkQW1vdW50CQBrAwUTY3VycmVudFN0YWtlZEFtb3VudADoBwCQTgkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIFDHJld2FyZEFtb3VudAUQd3hfbW9ja19hc3NldF9pZAUDbmlsAWkBC2NsYWltUmV3YXJkAAQTY3VycmVudFN0YWtlZEFtb3VudAkBEUBleHRyTmF0aXZlKDEwNTUpAQUUd3hfc3Rha2VkX2Ftb3VudF9rZXkEDHJld2FyZEFtb3VudAkAawMFE2N1cnJlbnRTdGFrZWRBbW91bnQA6AcAkE4JAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwgFAWkGY2FsbGVyBQxyZXdhcmRBbW91bnQFEHd4X21vY2tfYXNzZXRfaWQFA25pbAADZLD1", "height": 2837293, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GUXQs7Se7u6moXNVAcV8rdvzUtVzFrDZWTQMPsUmGkVr Next: DWWMJsxPvjPfdfStxYfz9gutBH1domRV5ndKJzCYa6Ab Diff:
OldNewDifferences
2929
3030
3131 @Callable(i)
32+func claimWX () = {
33+ let currentStakedAmount = getIntegerValue(wx_staked_amount_key)
34+ let rewardAmount = fraction(currentStakedAmount, 1000, 10000)
35+[ScriptTransfer(i.caller, rewardAmount, wx_mock_asset_id)]
36+ }
37+
38+
39+
40+@Callable(i)
3241 func claimReward () = {
3342 let currentStakedAmount = getIntegerValue(wx_staked_amount_key)
3443 let rewardAmount = fraction(currentStakedAmount, 1000, 10000)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let wx_staked_amount_key = "wx_staked_amount"
55
66 let wx_mock_asset_id = base58'9Eu9de5GPPgLzY16bevCaxF4rFr4jA9wqyTfqcjksU82'
77
88 func asPayment (v) = match v {
99 case p: AttachedPayment =>
1010 p
1111 case _ =>
1212 throw("fail to cast into AttachedPayment")
1313 }
1414
1515
1616 @Callable(i)
1717 func userMaxDurationREADONLY () = $Tuple2(nil, $Tuple2("stakeWX", 1400))
1818
1919
2020
2121 @Callable(i)
2222 func stakeWX () = {
2323 let payment = asPayment(i.payments[0])
2424 let amount = payment.amount
2525 let currentAmount = valueOrElse(getInteger(wx_staked_amount_key), 0)
2626 [IntegerEntry(wx_staked_amount_key, (currentAmount + amount))]
2727 }
2828
2929
3030
3131 @Callable(i)
32+func claimWX () = {
33+ let currentStakedAmount = getIntegerValue(wx_staked_amount_key)
34+ let rewardAmount = fraction(currentStakedAmount, 1000, 10000)
35+[ScriptTransfer(i.caller, rewardAmount, wx_mock_asset_id)]
36+ }
37+
38+
39+
40+@Callable(i)
3241 func claimReward () = {
3342 let currentStakedAmount = getIntegerValue(wx_staked_amount_key)
3443 let rewardAmount = fraction(currentStakedAmount, 1000, 10000)
3544 [ScriptTransfer(i.caller, rewardAmount, wx_mock_asset_id)]
3645 }
3746
3847

github/deemru/w8io/026f985 
29.39 ms