tx · EWbeXgD8f2qSY2DmAB625k474EynqFttCYxeGiPz9u8g 3MzQgAKPKdcA9vfpNVMWSwXPbfHFYHm1xAD: -0.01000000 Waves 2023.09.22 11:56 [2766375] smart account 3MzQgAKPKdcA9vfpNVMWSwXPbfHFYHm1xAD > SELF 0.00000000 Waves
{ "type": 13, "id": "EWbeXgD8f2qSY2DmAB625k474EynqFttCYxeGiPz9u8g", "fee": 1000000, "feeAssetId": null, "timestamp": 1695372966578, "version": 2, "chainId": 84, "sender": "3MzQgAKPKdcA9vfpNVMWSwXPbfHFYHm1xAD", "senderPublicKey": "85LePDMi8NEtsypXWh2zKSwgXowid97VKsdUCKrwtapX", "proofs": [ "5BzwzZDyCC59BfQ71AR3vtrhUBtxjrLHPJwD9F4Y3QpTef2HSymVSSCxcZSVnvErZsYwKwvxjkchQZTNhDh4PMEf" ], "script": "base64:BgIWCAISAwoBCBIDCgEBEgMKAQESAwoBAQIAEHd4VGVzdEFzc2V0SWRLZXkCD3d4X3Rlc3RfYXNzZXRJZAAYY3VycmVudFJld2FyZEFtb3VudElkS2V5AhByZXdhcmRfYW1vdW50X2lkBAFpAQxzZXRXWEFzc2V0SWQBCXd4QXNzZXRJZAkAzAgCCQELU3RyaW5nRW50cnkCBRB3eFRlc3RBc3NldElkS2V5BQl3eEFzc2V0SWQFA25pbAFpAQxzdGFrZVBvb2xMcHMBBnBvb2xJZAkAzAgCCQEMSW50ZWdlckVudHJ5AgIWc3Rha2VQb29sTHBzRnVuY0NhbGxlZAUGaGVpZ2h0BQNuaWwBaQEPd2l0aGRyYXdQb29sTHBzAQZwb29sSWQJAMwIAgkBDEludGVnZXJFbnRyeQICGXdpdGhkcmF3UG9vbExwc0Z1bmNDYWxsZWQFBmhlaWdodAUDbmlsAWkBEGNsYWltUG9vbFJld2FyZHMBBnBvb2xJZAQVY3VycmVudFJld2FyZEFtb3VudElkCQERQGV4dHJOYXRpdmUoMTA1NSkBBRhjdXJyZW50UmV3YXJkQW1vdW50SWRLZXkEDXd4VGVzdEFzc2V0SWQJARFAZXh0ck5hdGl2ZSgxMDU4KQEFEHd4VGVzdEFzc2V0SWRLZXkEBmFtb3VudAMJAAACBRVjdXJyZW50UmV3YXJkQW1vdW50SWQAAACA0NvD9AIDCQAAAgUVY3VycmVudFJld2FyZEFtb3VudElkAAEAgKC3h+kFAwkAAAIFFWN1cnJlbnRSZXdhcmRBbW91bnRJZAACAIDo7aG6AQMJAAACBRVjdXJyZW50UmV3YXJkQW1vdW50SWQAAwCA2IDtlwoAgLCWyLMGBBhuZXdDdXJyZW50UmV3YXJkQW1vdW50SWQDCQAAAgUVY3VycmVudFJld2FyZEFtb3VudElkAAQAAAkAZAIFFWN1cnJlbnRSZXdhcmRBbW91bnRJZAABCQDMCAIJAQxJbnRlZ2VyRW50cnkCBRhjdXJyZW50UmV3YXJkQW1vdW50SWRLZXkFGG5ld0N1cnJlbnRSZXdhcmRBbW91bnRJZAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIFBmFtb3VudAkA2QQBBQ13eFRlc3RBc3NldElkBQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5iLi6IQ==", "height": 2766375, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let wxTestAssetIdKey = "wx_test_assetId" | |
5 | + | ||
6 | + | let currentRewardAmountIdKey = "reward_amount_id" | |
7 | + | ||
8 | + | @Callable(i) | |
9 | + | func setWXAssetId (wxAssetId) = [StringEntry(wxTestAssetIdKey, wxAssetId)] | |
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | @Callable(i) | |
14 | + | func stakePoolLps (poolId) = [IntegerEntry("stakePoolLpsFuncCalled", height)] | |
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | @Callable(i) | |
19 | + | func withdrawPoolLps (poolId) = [IntegerEntry("withdrawPoolLpsFuncCalled", height)] | |
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | @Callable(i) | |
24 | + | func claimPoolRewards (poolId) = { | |
25 | + | let currentRewardAmountId = getIntegerValue(currentRewardAmountIdKey) | |
26 | + | let wxTestAssetId = getStringValue(wxTestAssetIdKey) | |
27 | + | let amount = if ((currentRewardAmountId == 0)) | |
28 | + | then 100000000000 | |
29 | + | else if ((currentRewardAmountId == 1)) | |
30 | + | then 200000000000 | |
31 | + | else if ((currentRewardAmountId == 2)) | |
32 | + | then 50000000000 | |
33 | + | else if ((currentRewardAmountId == 3)) | |
34 | + | then 350000000000 | |
35 | + | else 220000000000 | |
36 | + | let newCurrentRewardAmountId = if ((currentRewardAmountId == 4)) | |
37 | + | then 0 | |
38 | + | else (currentRewardAmountId + 1) | |
39 | + | [IntegerEntry(currentRewardAmountIdKey, newCurrentRewardAmountId), ScriptTransfer(i.caller, amount, fromBase58String(wxTestAssetId))] | |
40 | + | } | |
41 | + | ||
42 | + | ||
43 | + | @Verifier(tx) | |
44 | + | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
45 | + |
github/deemru/w8io/026f985 17.10 ms ◑