tx · GYSsdn3X8Tv85cvGck9nh3xti2qbaYvpDbXFwpYLpvBd

3NCv9hyL5NUbMMkTXYnN9hL9AMQd6f2eVww:  -0.01400000 Waves

2020.10.04 23:02 [1206284] smart account 3NCv9hyL5NUbMMkTXYnN9hL9AMQd6f2eVww > SELF 0.00000000 Waves

{ "type": 13, "id": "GYSsdn3X8Tv85cvGck9nh3xti2qbaYvpDbXFwpYLpvBd", "fee": 1400000, "feeAssetId": null, "timestamp": 1601841819170, "version": 2, "chainId": 84, "sender": "3NCv9hyL5NUbMMkTXYnN9hL9AMQd6f2eVww", "senderPublicKey": "CNQtsB6HAGUVvb5L3NshmGW2pD94ysV6dzV6Zcf6BFCq", "proofs": [ "GvWqdcbjvgn6FdKLAfMdKnLMAaZZxQDiRh6969gg3bpMP8fw6ryvLzTaCaPj1Y75GnDb56WmLYWCgTA5jZ2PMvy" ], "script": "base64:AAIDAAAAAAAAAAkIARIAEgMKAQEAAAAAAAAAAgAAAAFpAQAAAAdkZXBvc2l0AAAAAAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQEAAAABHR0eHgIBQAAAAlsYXN0QmxvY2sAAAAGaGVpZ2h0AwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACFjYW4gaG9kbCB3YXZlcyBvbmx5IGF0IHRoZSBtb21lbnQEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAApjdXJyZW50S2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAACW5ld0Ftb3VudAkAAGQAAAACBQAAAA1jdXJyZW50QW1vdW50CAUAAAADcG10AAAABmFtb3VudAM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AAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAApjdXJyZW50S2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAACW5ld0Ftb3VudAkAAGUAAAACBQAAAA1jdXJyZW50QW1vdW50BQAAAAZhbW91bnQDCQAAZgAAAAIAAAAAAAAAAAAFAAAABmFtb3VudAkAAAIAAAABAgAAAB5DYW4ndCB3aXRoZHJhdyBuZWdhdGl2ZSBhbW91bnQDCQAAZgAAAAIAAAAAAAAAAAAFAAAACW5ld0Ftb3VudAkAAAIAAAABAgAAABJOb3QgZW5vdWdoIGJhbGFuY2UJAQAAAAxTY3JpcHRSZXN1bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAApjdXJyZW50S2V5BQAAAAluZXdBbW91bnQFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAABmFtb3VudAUAAAAEdW5pdAUAAAADbmlsAAAAANUDtwo=", "height": 1206284, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2zAQ8KC6EfssexDAVmAaDwE1Ujixmtzy9LVm8Fq8msyL Next: 6TVz36gsY7NjWnmApEvePvHv5pYsc3dRBqRZTRW6xENq Diff:
OldNewDifferences
2121 else 0
2222 }
2323 let h = (e + b.amount)
24- WriteSet([DataEntry(d, (((((((toString(h) + ",") + toString(((h / 100) * 120))) + ",") + toString((((h / 100) * 120) / 18))) + ",0,") + toString(c)) + ",10"))])
24+ if ((e != 0))
25+ then WriteSet([DataEntry(d, (((((((toString((h + b.amount)) + ",") + toString((((h + b.amount) / 100) * 120))) + ",") + toString(((((h + b.amount) / 100) * 120) / 18))) + ",0,") + toString(c)) + ",10"))])
26+ else WriteSet([DataEntry(d, (((((((toString(h) + ",") + toString(((h / 100) * 120))) + ",") + toString((((h / 100) * 120) / 18))) + ",0,") + toString(c)) + ",10"))])
2527 }
2628 }
2729
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(a)
77 func deposit () = {
88 let b = extract(a.payment)
99 let c = lastBlock.height
1010 if (isDefined(b.assetId))
1111 then throw("can hodl waves only at the moment")
1212 else {
1313 let d = toBase58String(a.caller.bytes)
1414 let e = {
1515 let f = getInteger(this, d)
1616 if ($isInstanceOf(f, "Int"))
1717 then {
1818 let g = f
1919 g
2020 }
2121 else 0
2222 }
2323 let h = (e + b.amount)
24- WriteSet([DataEntry(d, (((((((toString(h) + ",") + toString(((h / 100) * 120))) + ",") + toString((((h / 100) * 120) / 18))) + ",0,") + toString(c)) + ",10"))])
24+ if ((e != 0))
25+ then WriteSet([DataEntry(d, (((((((toString((h + b.amount)) + ",") + toString((((h + b.amount) / 100) * 120))) + ",") + toString(((((h + b.amount) / 100) * 120) / 18))) + ",0,") + toString(c)) + ",10"))])
26+ else WriteSet([DataEntry(d, (((((((toString(h) + ",") + toString(((h / 100) * 120))) + ",") + toString((((h / 100) * 120) / 18))) + ",0,") + toString(c)) + ",10"))])
2527 }
2628 }
2729
2830
2931
3032 @Callable(a)
3133 func withdraw (i) = {
3234 let d = toBase58String(a.caller.bytes)
3335 let e = {
3436 let f = getInteger(this, d)
3537 if ($isInstanceOf(f, "Int"))
3638 then {
3739 let g = f
3840 g
3941 }
4042 else 0
4143 }
4244 let h = (e - i)
4345 if ((0 > i))
4446 then throw("Can't withdraw negative amount")
4547 else if ((0 > h))
4648 then throw("Not enough balance")
4749 else ScriptResult(WriteSet([DataEntry(d, h)]), TransferSet([ScriptTransfer(a.caller, i, unit)]))
4850 }
4951
5052

github/deemru/w8io/169f3d6 
24.50 ms