tx · 6LXguuSvnAfubUNFFWoxAc55QXzaPM8S6S1YPo4krp86

3NCv9hyL5NUbMMkTXYnN9hL9AMQd6f2eVww:  -0.01400000 Waves

2020.10.06 15:39 [1208712] smart account 3NCv9hyL5NUbMMkTXYnN9hL9AMQd6f2eVww > SELF 0.00000000 Waves

{ "type": 13, "id": "6LXguuSvnAfubUNFFWoxAc55QXzaPM8S6S1YPo4krp86", "fee": 1400000, "feeAssetId": null, "timestamp": 1601988011857, "version": 2, "chainId": 84, "sender": "3NCv9hyL5NUbMMkTXYnN9hL9AMQd6f2eVww", "senderPublicKey": "CNQtsB6HAGUVvb5L3NshmGW2pD94ysV6dzV6Zcf6BFCq", "proofs": [ "2xihndPNQ4UmMYp562tEabUqLF2ZniQsyGqNUvYc2uNzpwiNbDQUyqiN8CChWKhH43uM2c6eT9i4RKhX4AjXNcz3" ], "script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAAAAAAEAAAABaQEAAAAHZGVwb3NpdAAAAAAEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50BAAAAANsYmgIBQAAAAlsYXN0QmxvY2sAAAAGaGVpZ2h0AwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACFjYW4gaG9kbCB3YXZlcyBvbmx5IGF0IHRoZSBtb21lbnQEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAApjdXJyZW50S2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAACmN1cnJlbnRLZXkJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAGkAAAAAQUAAAANY3VycmVudEFtb3VudAIAAAABLAkAAaQAAAABCAUAAAADcG10AAAABmFtb3VudAIAAAABLAkAAaQAAAABCQAAaAAAAAIJAABpAAAAAggFAAAAA3BtdAAAAAZhbW91bnQAAAAAAAAAAGQAAAAAAAAAAHgCAAAAASwJAAGkAAAAAQkAAGkAAAACCQAAaAAAAAIJAABpAAAAAggFAAAAA3BtdAAAAAZhbW91bnQAAAAAAAAAAGQAAAAAAAAAAHgAAAAAAAAAABICAAAAAywwLAkAAaQAAAABBQAAAANsYmgCAAAAAywxMAUAAAADbmlsAAAAAJzsSQs=", "height": 1208712, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HNWDWgwWaVDkgwDphahtMawG5TdBaC7wYdbVJf5TBh4B Next: 431NQGi4fRG5G7GQEsSAuRnkvADkg8Eae6PZRseSVr3K Diff:
OldNewDifferences
2020 }
2121 else 0
2222 }
23- let h = (e + b.amount)
24- if ((h == b.amount))
25- then {
26- let i = split(toString(e), ",")
27- WriteSet([DataEntry(d, (((((((i[0] + ",") + toString(((h / 100) * 120))) + ",") + toString((((h / 100) * 120) / 18))) + ",0,") + toString(c)) + ",11"))])
28- }
29- else WriteSet([DataEntry(d, (((((((toString(b.amount) + ",") + toString(((b.amount / 100) * 120))) + ",") + toString((((b.amount / 100) * 120) / 18))) + ",0,") + toString(c)) + ",10"))])
23+ WriteSet([DataEntry(d, (((((((((toString(e) + ",") + toString(b.amount)) + ",") + toString(((b.amount / 100) * 120))) + ",") + toString((((b.amount / 100) * 120) / 18))) + ",0,") + toString(c)) + ",10"))])
3024 }
31- }
32-
33-
34-
35-@Callable(a)
36-func withdraw (j) = {
37- let d = toBase58String(a.caller.bytes)
38- let e = {
39- let f = getInteger(this, d)
40- if ($isInstanceOf(f, "Int"))
41- then {
42- let g = f
43- g
44- }
45- else 0
46- }
47- let h = (e - j)
48- if ((0 > j))
49- then throw("Can't withdraw negative amount")
50- else if ((0 > h))
51- then throw("Not enough balance")
52- else ScriptResult(WriteSet([DataEntry(d, h)]), TransferSet([ScriptTransfer(a.caller, j, unit)]))
5325 }
5426
5527
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 }
23- let h = (e + b.amount)
24- if ((h == b.amount))
25- then {
26- let i = split(toString(e), ",")
27- WriteSet([DataEntry(d, (((((((i[0] + ",") + toString(((h / 100) * 120))) + ",") + toString((((h / 100) * 120) / 18))) + ",0,") + toString(c)) + ",11"))])
28- }
29- else WriteSet([DataEntry(d, (((((((toString(b.amount) + ",") + toString(((b.amount / 100) * 120))) + ",") + toString((((b.amount / 100) * 120) / 18))) + ",0,") + toString(c)) + ",10"))])
23+ WriteSet([DataEntry(d, (((((((((toString(e) + ",") + toString(b.amount)) + ",") + toString(((b.amount / 100) * 120))) + ",") + toString((((b.amount / 100) * 120) / 18))) + ",0,") + toString(c)) + ",10"))])
3024 }
31- }
32-
33-
34-
35-@Callable(a)
36-func withdraw (j) = {
37- let d = toBase58String(a.caller.bytes)
38- let e = {
39- let f = getInteger(this, d)
40- if ($isInstanceOf(f, "Int"))
41- then {
42- let g = f
43- g
44- }
45- else 0
46- }
47- let h = (e - j)
48- if ((0 > j))
49- then throw("Can't withdraw negative amount")
50- else if ((0 > h))
51- then throw("Not enough balance")
52- else ScriptResult(WriteSet([DataEntry(d, h)]), TransferSet([ScriptTransfer(a.caller, j, unit)]))
5325 }
5426
5527

github/deemru/w8io/169f3d6 
46.71 ms