tx · 5pSUd8hyQSPtS4rvF39Rjwhgkcg7mMBDX75tWRsDEicR 3Mw8tYHr6ZSwhW7Vb4upkz9BmtwAaesyABN: -0.01400002 Waves 2019.12.30 23:33 [832315] smart account 3Mw8tYHr6ZSwhW7Vb4upkz9BmtwAaesyABN > SELF 0.00000000 Waves
{ "type": 13, "id": "5pSUd8hyQSPtS4rvF39Rjwhgkcg7mMBDX75tWRsDEicR", "fee": 1400002, "feeAssetId": null, "timestamp": 1577738017368, "version": 1, "sender": "3Mw8tYHr6ZSwhW7Vb4upkz9BmtwAaesyABN", "senderPublicKey": "EG5aKFsRz85yVbUg6tzA8JuDdp1axUrvu4ibM4EUM55U", "proofs": [ "384TCTpY2MSHmPKzsNCboSDkGDQXUrbfu4RL7BSFHZvkVKddNZ25kU2FofDUWgFMfFnHa3EZwnodsQa3tQ1xiM8E" ], "script": "base64:AAIDAAAAAAAAAAkIARIAEgMKAQgAAAACAAAAABVyZXdhcmRQZXJjZW50UGVyTW9udGgAAAAAAAAAC7gAAAAAB2Fzc2V0SUQBAAAAIMpI8KN6Xy36SiPDnU1HZIxIR4QpBksrnPzvtITw8/jwAAAAAgAAAAFpAQAAAAlnZXRSZXdhcmQAAAAABAAAAA5zdGFraW5nQmFsYW5jZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyAgAAAA9fc3Rha2luZ0JhbGFuY2UDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAANc3Rha2luZ0hlaWdodAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyAgAAAA5fc3Rha2luZ0hlaWdodAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAF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AAAAAJAQAAAAxTY3JpcHRSZXN1bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyAgAAAA9fc3Rha2luZ0JhbGFuY2UJAABkAAAAAggFAAAAA3BtdAAAAAZhbW91bnQFAAAADnN0YWtpbmdCYWxhbmNlCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyAgAAAA5fc3Rha2luZ0hlaWdodAUAAAAGaGVpZ2h0BQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAA1yZWZlcmFsQWRyZXNzCQAAaAAAAAIJAABpAAAAAggFAAAAA3BtdAAAAAZhbW91bnQAAAAAAAAAAGQFAAAADnJlZmVyYWxQZXJjZW50BQAAAAdhc3NldElEBQAAAANuaWwAAAAAZ14yBw==", "chainId": 84, "height": 832315, "spentComplexity": 0 } View: original | compacted Prev: 77vfVgnMtQxXym3ivrSaZK64MownKy3ccfB2sGVuvi5Z Next: 3yoQbovVbRGp2h6LAj4vTwhrJpfzpuFH26JJbMJ7yuny Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 3000 | |
5 | 5 | ||
6 | 6 | let b = base58'Ecds5eCAmKgcqohZ4XFSZSBBHdiezu5oeUphpCcP48TR' | |
7 | 7 | ||
8 | 8 | @Callable(c) | |
9 | 9 | func getReward () = { | |
10 | 10 | let d = { | |
11 | 11 | let e = getInteger(this, (toString(c.caller) + "_stakingBalance")) | |
12 | 12 | if ($isInstanceOf(e, "Int")) | |
13 | 13 | then { | |
14 | 14 | let f = e | |
15 | 15 | f | |
16 | 16 | } | |
17 | 17 | else 0 | |
18 | 18 | } | |
19 | 19 | let g = { | |
20 | 20 | let e = getInteger(this, (toString(c.caller) + "_stakingHeight")) | |
21 | 21 | if ($isInstanceOf(e, "Int")) | |
22 | 22 | then { | |
23 | 23 | let f = e | |
24 | 24 | f | |
25 | 25 | } | |
26 | 26 | else 0 | |
27 | 27 | } | |
28 | 28 | let h = (((((((height - g) / 60) / 24) / 30) / a) / 100) * d) | |
29 | 29 | ScriptResult(WriteSet([DataEntry((toString(c.caller) + "_stakingHeight"), height)]), TransferSet([ScriptTransfer(c.caller, h, b)])) | |
30 | 30 | } | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | ||
34 | 34 | @Callable(c) | |
35 | 35 | func staking (i) = { | |
36 | 36 | let j = 5 | |
37 | 37 | let k = extract(c.payment) | |
38 | 38 | if ((k.assetId != b)) | |
39 | 39 | then throw("Стейковать можно только монеты") | |
40 | 40 | else { | |
41 | 41 | let d = { | |
42 | 42 | let e = getInteger(this, (toString(c.caller) + "_stakingBalance")) | |
43 | 43 | if ($isInstanceOf(e, "Int")) | |
44 | 44 | then { | |
45 | 45 | let f = e | |
46 | 46 | f | |
47 | 47 | } | |
48 | 48 | else 0 | |
49 | 49 | } | |
50 | 50 | ScriptResult(WriteSet([DataEntry((toString(c.caller) + "_stakingBalance"), (k.amount + d)), DataEntry((toString(c.caller) + "_stakingHeight"), height)]), TransferSet([ScriptTransfer(addressFromStringValue(i), ((k.amount / 100) * j), b)])) | |
51 | 51 | } | |
52 | 52 | } | |
53 | 53 | ||
54 | 54 |
github/deemru/w8io/169f3d6 31.13 ms ◑