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