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 rewardPercentPerMonth = 3000
55
66 let assetID = base58'Ecds5eCAmKgcqohZ4XFSZSBBHdiezu5oeUphpCcP48TR'
77
88 @Callable(i)
99 func getReward () = {
1010 let stakingBalance = match getInteger(this, (toString(i.caller) + "_stakingBalance")) {
1111 case a: Int =>
1212 a
1313 case _ =>
1414 0
1515 }
1616 let stakingHeight = match getInteger(this, (toString(i.caller) + "_stakingHeight")) {
1717 case a: Int =>
1818 a
1919 case _ =>
2020 0
2121 }
2222 let reward = (((((((height - stakingHeight) / 60) / 24) / 30) / rewardPercentPerMonth) / 100) * stakingBalance)
2323 ScriptResult(WriteSet([DataEntry((toString(i.caller) + "_stakingHeight"), height)]), TransferSet([ScriptTransfer(i.caller, reward, assetID)]))
2424 }
2525
2626
2727
2828 @Callable(i)
2929 func staking (referalAdress) = {
3030 let referalPercent = 5
3131 let pmt = extract(i.payment)
3232 if ((pmt.assetId != assetID))
3333 then throw("Стейковать можно только монеты")
3434 else {
3535 let stakingBalance = match getInteger(this, (toString(i.caller) + "_stakingBalance")) {
3636 case a: Int =>
3737 a
3838 case _ =>
3939 0
4040 }
4141 ScriptResult(WriteSet([DataEntry((toString(i.caller) + "_stakingBalance"), (pmt.amount + stakingBalance)), DataEntry((toString(i.caller) + "_stakingHeight"), height)]), TransferSet([ScriptTransfer(addressFromStringValue(referalAdress), ((pmt.amount / 100) * referalPercent), assetID)]))
4242 }
4343 }
4444
4545

github/deemru/w8io/026f985 
24.42 ms