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/jwAAAAAgAAAAFpAQAAAAlnZXRSZXdhcmQAAAAABAAAAA5zdGFraW5nQmFsYW5jZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyAgAAAA9fc3Rha2luZ0JhbGFuY2UDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAANc3Rha2luZ0hlaWdodAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyAgAAAA5fc3Rha2luZ0hlaWdodAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAA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AAAAAAJAQAAAAxTY3JpcHRSZXN1bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyAgAAAA9fc3Rha2luZ0JhbGFuY2UJAABkAAAAAggFAAAAA3BtdAAAAAZhbW91bnQFAAAADnN0YWtpbmdCYWxhbmNlCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyAgAAAA5fc3Rha2luZ0hlaWdodAUAAAAGaGVpZ2h0BQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAA1yZWZlcmFsQWRyZXNzCQAAaAAAAAIJAABpAAAAAggFAAAAA3BtdAAAAAZhbW91bnQAAAAAAAAAAGQFAAAADnJlZmVyYWxQZXJjZW50BQAAAAdhc3NldElEBQAAAANuaWwAAAAAZ14yBw==", "chainId": 84, "height": 832315, "spentComplexity": 0 } View: original | compacted Prev: 77vfVgnMtQxXym3ivrSaZK64MownKy3ccfB2sGVuvi5Z Next: 3yoQbovVbRGp2h6LAj4vTwhrJpfzpuFH26JJbMJ7yuny Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 3000
55
66 let b = base58'Ecds5eCAmKgcqohZ4XFSZSBBHdiezu5oeUphpCcP48TR'
77
88 @Callable(c)
99 func getReward () = {
1010 let d = {
1111 let e = getInteger(this, (toString(c.caller) + "_stakingBalance"))
1212 if ($isInstanceOf(e, "Int"))
1313 then {
1414 let f = e
1515 f
1616 }
1717 else 0
1818 }
1919 let g = {
2020 let e = getInteger(this, (toString(c.caller) + "_stakingHeight"))
2121 if ($isInstanceOf(e, "Int"))
2222 then {
2323 let f = e
2424 f
2525 }
2626 else 0
2727 }
2828 let h = (((((((height - g) / 60) / 24) / 30) / a) / 100) * d)
2929 ScriptResult(WriteSet([DataEntry((toString(c.caller) + "_stakingHeight"), height)]), TransferSet([ScriptTransfer(c.caller, h, b)]))
3030 }
3131
3232
3333
3434 @Callable(c)
3535 func staking (i) = {
3636 let j = 5
3737 let k = extract(c.payment)
3838 if ((k.assetId != b))
3939 then throw("Стейковать можно только монеты")
4040 else {
4141 let d = {
4242 let e = getInteger(this, (toString(c.caller) + "_stakingBalance"))
4343 if ($isInstanceOf(e, "Int"))
4444 then {
4545 let f = e
4646 f
4747 }
4848 else 0
4949 }
5050 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)]))
5151 }
5252 }
5353
5454

github/deemru/w8io/169f3d6 
31.13 ms