tx · 3B3AJK74Ho7SrQVCeyfLCGa8NdtQCandCyUzWvU8t5hJ 3N6D2nVttodJL3Sos3t1ui6DhrF6e79GAUB: -0.01000000 Waves 2023.09.27 14:55 [2773781] smart account 3N6D2nVttodJL3Sos3t1ui6DhrF6e79GAUB > SELF 0.00000000 Waves
{ "type": 13, "id": "3B3AJK74Ho7SrQVCeyfLCGa8NdtQCandCyUzWvU8t5hJ", "fee": 1000000, "feeAssetId": null, "timestamp": 1695815732141, "version": 2, "chainId": 84, "sender": "3N6D2nVttodJL3Sos3t1ui6DhrF6e79GAUB", "senderPublicKey": "6xBTQKYXNv2nHWCVJnDxb8afEksqZW8U6Bg1hjxcTj2", "proofs": [ "61Wj6L1uzM1XzFk2xJCFGtUEY3AzQKrpFkTyWtQVAn59cvXDRpH38fLMfHdDbQtCvuWeYsL8s9YKbxttegC4CY3v" ], "script": "base64:BgINCAISAwoBCBIAEgASAAIAEHd4VGVzdEFzc2V0SWRLZXkCD3d4X3Rlc3RfYXNzZXRJZAAYY3VycmVudFJld2FyZEFtb3VudElkS2V5AhByZXdhcmRfYW1vdW50X2lkBAFpAQxzZXRXWEFzc2V0SWQBCXd4QXNzZXRJZAkAzAgCCQELU3RyaW5nRW50cnkCBRB3eFRlc3RBc3NldElkS2V5BQl3eEFzc2V0SWQJAMwIAgkBDEludGVnZXJFbnRyeQIFGGN1cnJlbnRSZXdhcmRBbW91bnRJZEtleQAABQNuaWwBaQEMc3Rha2VQb29sTHBzAAkAzAgCCQEMSW50ZWdlckVudHJ5AgIWc3Rha2VQb29sTHBzRnVuY0NhbGxlZAUGaGVpZ2h0BQNuaWwBaQEPd2l0aGRyYXdQb29sTHBzAAkAzAgCCQEMSW50ZWdlckVudHJ5AgIZd2l0aGRyYXdQb29sTHBzRnVuY0NhbGxlZAUGaGVpZ2h0BQNuaWwBaQEQY2xhaW1Qb29sUmV3YXJkcwAEFWN1cnJlbnRSZXdhcmRBbW91bnRJZAkBEUBleHRyTmF0aXZlKDEwNTUpAQUYY3VycmVudFJld2FyZEFtb3VudElkS2V5BA13eFRlc3RBc3NldElkCQERQGV4dHJOYXRpdmUoMTA1OCkBBRB3eFRlc3RBc3NldElkS2V5BAZhbW91bnQDCQAAAgUVY3VycmVudFJld2FyZEFtb3VudElkAAAAgNDbw/QCAwkAAAIFFWN1cnJlbnRSZXdhcmRBbW91bnRJZAABAICgt4fpBQMJAAACBRVjdXJyZW50UmV3YXJkQW1vdW50SWQAAgCA6O2hugEDCQAAAgUVY3VycmVudFJld2FyZEFtb3VudElkAAMAgNiA7ZcKAICwlsizBgQYbmV3Q3VycmVudFJld2FyZEFtb3VudElkAwkAAAIFFWN1cnJlbnRSZXdhcmRBbW91bnRJZAAEAAAJAGQCBRVjdXJyZW50UmV3YXJkQW1vdW50SWQAAQkAzAgCCQEMSW50ZWdlckVudHJ5AgUYY3VycmVudFJld2FyZEFtb3VudElkS2V5BRhuZXdDdXJyZW50UmV3YXJkQW1vdW50SWQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwgFAWkGY2FsbGVyBQZhbW91bnQJANkEAQUNd3hUZXN0QXNzZXRJZAUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQqMg9o=", "height": 2773781, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4kXDvNED49fjZ2AfNQAL1WGV8LQJqq3HgUEFvzyV49dD Next: 2aN89g1ajy6NpQxiTwpVGYmBeKQgmCc5vwhmBdGftBTV Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 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), IntegerEntry(currentRewardAmountIdKey, 0)] | |
10 | + | ||
4 | 11 | ||
5 | 12 | ||
6 | 13 | @Callable(i) | |
7 | - | func testFraction (number,numerator2,denominator2) = { | |
8 | - | let result_down = fraction(number, numerator2, denominator2, DOWN) | |
9 | - | let result_halfup = fraction(number, numerator2, denominator2, HALFUP) | |
10 | - | let result_halfEven = fraction(number, numerator2, denominator2, HALFEVEN) | |
11 | - | let result_ceiling = fraction(number, numerator2, denominator2, CEILING) | |
12 | - | let result_floor = fraction(number, numerator2, denominator2, FLOOR) | |
13 | - | [IntegerEntry("result_down", result_down), IntegerEntry("result_halfup", result_halfup), IntegerEntry("result_halfeven", result_halfEven), IntegerEntry("result_ceiling", result_ceiling), IntegerEntry("result_floor", result_floor)] | |
14 | + | func stakePoolLps () = [IntegerEntry("stakePoolLpsFuncCalled", height)] | |
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | @Callable(i) | |
19 | + | func withdrawPoolLps () = [IntegerEntry("withdrawPoolLpsFuncCalled", height)] | |
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | @Callable(i) | |
24 | + | func claimPoolRewards () = { | |
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))] | |
14 | 40 | } | |
15 | 41 | ||
16 | 42 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 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), IntegerEntry(currentRewardAmountIdKey, 0)] | |
10 | + | ||
4 | 11 | ||
5 | 12 | ||
6 | 13 | @Callable(i) | |
7 | - | func testFraction (number,numerator2,denominator2) = { | |
8 | - | let result_down = fraction(number, numerator2, denominator2, DOWN) | |
9 | - | let result_halfup = fraction(number, numerator2, denominator2, HALFUP) | |
10 | - | let result_halfEven = fraction(number, numerator2, denominator2, HALFEVEN) | |
11 | - | let result_ceiling = fraction(number, numerator2, denominator2, CEILING) | |
12 | - | let result_floor = fraction(number, numerator2, denominator2, FLOOR) | |
13 | - | [IntegerEntry("result_down", result_down), IntegerEntry("result_halfup", result_halfup), IntegerEntry("result_halfeven", result_halfEven), IntegerEntry("result_ceiling", result_ceiling), IntegerEntry("result_floor", result_floor)] | |
14 | + | func stakePoolLps () = [IntegerEntry("stakePoolLpsFuncCalled", height)] | |
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | @Callable(i) | |
19 | + | func withdrawPoolLps () = [IntegerEntry("withdrawPoolLpsFuncCalled", height)] | |
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | @Callable(i) | |
24 | + | func claimPoolRewards () = { | |
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))] | |
14 | 40 | } | |
15 | 41 | ||
16 | 42 | ||
17 | 43 | @Verifier(tx) | |
18 | 44 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
19 | 45 |
github/deemru/w8io/6500d08 29.68 ms ◑