tx · 2zAQ8KC6EfssexDAVmAaDwE1Ujixmtzy9LVm8Fq8msyL

3NCv9hyL5NUbMMkTXYnN9hL9AMQd6f2eVww:  -0.01400000 Waves

2020.10.04 22:52 [1206274] smart account 3NCv9hyL5NUbMMkTXYnN9hL9AMQd6f2eVww > SELF 0.00000000 Waves

{ "type": 13, "id": "2zAQ8KC6EfssexDAVmAaDwE1Ujixmtzy9LVm8Fq8msyL", "fee": 1400000, "feeAssetId": null, "timestamp": 1601841149475, "version": 2, "chainId": 84, "sender": "3NCv9hyL5NUbMMkTXYnN9hL9AMQd6f2eVww", "senderPublicKey": "CNQtsB6HAGUVvb5L3NshmGW2pD94ysV6dzV6Zcf6BFCq", "proofs": [ "NvNTqirbCkU3CuGzF4R1aBHdyG2N4GJg767vqaVvpP8GfoSGSth1FLdsL4dk4v4FAFJ7bhRoVaeAW4xGWLEvCWy" ], "script": "base64:AAIDAAAAAAAAAAkIARIAEgMKAQEAAAAAAAAAAgAAAAFpAQAAAAdkZXBvc2l0AAAAAAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQEAAAABHR0eHgIBQAAAAlsYXN0QmxvY2sAAAAGaGVpZ2h0AwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACFjYW4gaG9kbCB3YXZlcyBvbmx5IGF0IHRoZSBtb21lbnQEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAApjdXJyZW50S2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAACW5ld0Ftb3VudAkAAGQAAAACBQAAAA1jdXJyZW50QW1vdW50CAUAAAADcG10AAAABmFtb3Vud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AAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAABmFtb3VudAUAAAAEdW5pdAUAAAADbmlsAAAAAFHdj6w=", "height": 1206274, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: H8bp1c5cPx5EBbswp63kfDuhuqm34wnNjeYTThuBAyL8 Next: GYSsdn3X8Tv85cvGck9nh3xti2qbaYvpDbXFwpYLpvBd Diff:
OldNewDifferences
1818 0
1919 }
2020 let newAmount = (currentAmount + pmt.amount)
21- WriteSet([DataEntry(currentKey, (((((toString(newAmount) + ",") + toString(((newAmount / 100) * 120))) + ",") + toString((((newAmount / 100) * 120) / 18))) + ",0"))])
21+ WriteSet([DataEntry(currentKey, (((((((toString(newAmount) + ",") + toString(((newAmount / 100) * 120))) + ",") + toString((((newAmount / 100) * 120) / 18))) + ",0,") + toString(ttxx)) + ",10"))])
2222 }
2323 }
2424
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func deposit () = {
88 let pmt = extract(i.payment)
99 let ttxx = lastBlock.height
1010 if (isDefined(pmt.assetId))
1111 then throw("can hodl waves only at the moment")
1212 else {
1313 let currentKey = toBase58String(i.caller.bytes)
1414 let currentAmount = match getInteger(this, currentKey) {
1515 case a: Int =>
1616 a
1717 case _ =>
1818 0
1919 }
2020 let newAmount = (currentAmount + pmt.amount)
21- WriteSet([DataEntry(currentKey, (((((toString(newAmount) + ",") + toString(((newAmount / 100) * 120))) + ",") + toString((((newAmount / 100) * 120) / 18))) + ",0"))])
21+ WriteSet([DataEntry(currentKey, (((((((toString(newAmount) + ",") + toString(((newAmount / 100) * 120))) + ",") + toString((((newAmount / 100) * 120) / 18))) + ",0,") + toString(ttxx)) + ",10"))])
2222 }
2323 }
2424
2525
2626
2727 @Callable(i)
2828 func withdraw (amount) = {
2929 let currentKey = toBase58String(i.caller.bytes)
3030 let currentAmount = match getInteger(this, currentKey) {
3131 case a: Int =>
3232 a
3333 case _ =>
3434 0
3535 }
3636 let newAmount = (currentAmount - amount)
3737 if ((0 > amount))
3838 then throw("Can't withdraw negative amount")
3939 else if ((0 > newAmount))
4040 then throw("Not enough balance")
4141 else ScriptResult(WriteSet([DataEntry(currentKey, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, unit)]))
4242 }
4343
4444

github/deemru/w8io/169f3d6 
25.11 ms