tx · E2RtV7cpPyFqqAF1FtMYk1dDKcVBCVwDtqgCUSk8Qsmi
3MsU428UzSefm85q7jvBsRV66Du7E72xEkL: -0.01000000 Waves
2022.06.09 15:59 [2088871] smart account 3MsU428UzSefm85q7jvBsRV66Du7E72xEkL > SELF 0.00000000 Waves
{
"type": 13,
"id": "E2RtV7cpPyFqqAF1FtMYk1dDKcVBCVwDtqgCUSk8Qsmi",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1654779593267,
"version": 2,
"chainId": 84,
"sender": "3MsU428UzSefm85q7jvBsRV66Du7E72xEkL",
"senderPublicKey": "58FFoU7LCj1DKboVntQXuE3KQDpf92NouXncN5b4vY8U",
"proofs": [
"5rr2yUNF6HSzFmRnXov9cQjU3UsFc6SzB86vuhnPCdvwbLo957JGs4TP1MDwRqyATVJmpNma2oLu6gZdytAmdzSY"
],
"script": "base64:AAIFAAAAAAAAAAsIAhIDCgEBEgASAAAAAAMAAAAABUFTU0VUAQAAACAtNxOB0yQ3XZ/hb3bT0Q+T7yws9N2JrVxKVuh8yQFyGwAAAAALU1RBS0VfQVNTRVQBAAAAIK2dSBaFkXln78NKeoaZ0d1Q6QVJPOT+QERHjOGDxML0AAAAAA1SRVdBUkRfQU1PVU5UAAAAABdIdugAAAAAAwAAAAFpAQAAAAVzdGFrZQAAAAEAAAAGYW1vdW50BAAAAAkkdDAzMDkzODQJAAUUAAAAAggJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAAAAAGYW1vdW50CAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAAAAAdhc3NldElkBAAAAAlwbXRBbW91bnQIBQAAAAkkdDAzMDkzODQAAAACXzEEAAAACnBtdEFzc2V0SWQIBQAAAAkkdDAzMDkzODQAAAACXzIDAwMJAAAAAAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAkBAAAAAiE9AAAAAgUAAAAKcG10QXNzZXRJZAUAAAALU1RBS0VfQVNTRVQHCQAAZwAAAAIAAAAAAAAAAAAFAAAACXBtdEFtb3VudAcJAAACAAAAAQIAAAAUc2VuZCBwaXhlbHMgdG8gc3Rha2UEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAPZ2V0U3Rha2VkQW1vdW50CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAABHRoaXMJAAEsAAAAAgUAAAAKY3VycmVudEtleQIAAAAHX3N0YWtlZAAAAAAAAAAAAAQAAAALdG90YWxTdGFrZWQJAABkAAAAAgUAAAAPZ2V0U3Rha2VkQW1vdW50BQAAAAlwbXRBbW91bnQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAACmN1cnJlbnRLZXkCAAAAAV8JAAGkAAAAAQUAAAAGaGVpZ2h0AgAAAAdfc3Rha2VkBQAAAAt0b3RhbFN0YWtlZAUAAAADbmlsAAAAAWkBAAAACHdpdGhkcmF3AAAAAAkAAAIAAAABAgAAAAR0ZXN0AAAAAWkBAAAAC2NsYWltUmV3YXJkAAAAAAkAAAIAAAABAgAAAAR0ZXN0AAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXmGN9XJ",
"height": 2088871,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: EQKzPHKVshzZLt6L95799BVQRzXW5yvewxrqr4pkA6Cr
Next: 6ajUMi9MeyaAiPFdEgFvuYTz6Qw1ezwgG2JHKdgbjSvE
Diff:
Old | New | | Differences |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let ASSET = base58'43W4FcqA1rEpSmUGHoGiXvpSLfhadws9LS5j3SJsKxxS' |
---|
5 | 5 | | |
---|
| 6 | + | let STAKE_ASSET = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh' |
---|
| 7 | + | |
---|
6 | 8 | | let REWARD_AMOUNT = 100000000000 |
---|
7 | 9 | | |
---|
8 | 10 | | @Callable(i) |
---|
9 | 11 | | func stake (amount) = { |
---|
10 | | - | let $t0232307 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) |
---|
11 | | - | let pmtAmount = $t0232307._1 |
---|
12 | | - | let pmtAssetId = $t0232307._2 |
---|
| 12 | + | let $t0309384 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) |
---|
| 13 | + | let pmtAmount = $t0309384._1 |
---|
| 14 | + | let pmtAssetId = $t0309384._2 |
---|
13 | 15 | | if (if (if ((size(i.payments) == 0)) |
---|
14 | | - | then (pmtAssetId != ASSET) |
---|
| 16 | + | then (pmtAssetId != STAKE_ASSET) |
---|
15 | 17 | | else false) |
---|
16 | 18 | | then (0 >= pmtAmount) |
---|
17 | 19 | | else false) |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let ASSET = base58'43W4FcqA1rEpSmUGHoGiXvpSLfhadws9LS5j3SJsKxxS' |
---|
5 | 5 | | |
---|
| 6 | + | let STAKE_ASSET = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh' |
---|
| 7 | + | |
---|
6 | 8 | | let REWARD_AMOUNT = 100000000000 |
---|
7 | 9 | | |
---|
8 | 10 | | @Callable(i) |
---|
9 | 11 | | func stake (amount) = { |
---|
10 | | - | let $t0232307 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) |
---|
11 | | - | let pmtAmount = $t0232307._1 |
---|
12 | | - | let pmtAssetId = $t0232307._2 |
---|
| 12 | + | let $t0309384 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) |
---|
| 13 | + | let pmtAmount = $t0309384._1 |
---|
| 14 | + | let pmtAssetId = $t0309384._2 |
---|
13 | 15 | | if (if (if ((size(i.payments) == 0)) |
---|
14 | | - | then (pmtAssetId != ASSET) |
---|
| 16 | + | then (pmtAssetId != STAKE_ASSET) |
---|
15 | 17 | | else false) |
---|
16 | 18 | | then (0 >= pmtAmount) |
---|
17 | 19 | | else false) |
---|
18 | 20 | | then throw("send pixels to stake") |
---|
19 | 21 | | else { |
---|
20 | 22 | | let currentKey = toBase58String(i.caller.bytes) |
---|
21 | 23 | | let getStakedAmount = valueOrElse(getInteger(this, (currentKey + "_staked")), 0) |
---|
22 | 24 | | let totalStaked = (getStakedAmount + pmtAmount) |
---|
23 | 25 | | [IntegerEntry((((currentKey + "_") + toString(height)) + "_staked"), totalStaked)] |
---|
24 | 26 | | } |
---|
25 | 27 | | } |
---|
26 | 28 | | |
---|
27 | 29 | | |
---|
28 | 30 | | |
---|
29 | 31 | | @Callable(i) |
---|
30 | 32 | | func withdraw () = throw("test") |
---|
31 | 33 | | |
---|
32 | 34 | | |
---|
33 | 35 | | |
---|
34 | 36 | | @Callable(i) |
---|
35 | 37 | | func claimReward () = throw("test") |
---|
36 | 38 | | |
---|
37 | 39 | | |
---|
38 | 40 | | @Verifier(tx) |
---|
39 | 41 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
40 | 42 | | |
---|