tx · CMZ2PNqU8cGTbKKFKTANNp4Ru7dYuUyq1UbEdKypr1WF

3Mw9vGsQa22LGez1YRCawKswfyZskobmWDj:  -0.01400000 Waves

2019.07.19 12:33 [592587] smart account 3Mw9vGsQa22LGez1YRCawKswfyZskobmWDj > SELF 0.00000000 Waves

{ "type": 13, "id": "CMZ2PNqU8cGTbKKFKTANNp4Ru7dYuUyq1UbEdKypr1WF", "fee": 1400000, "feeAssetId": null, "timestamp": 1563528795481, "version": 1, "sender": "3Mw9vGsQa22LGez1YRCawKswfyZskobmWDj", "senderPublicKey": "5hba43srXnNujYFwJGuRoWADQcCm76jVcS8ByDxEib57", "proofs": [ "4znwwB1CfghY2wsYtL8v7diZ2z612yG18avGAoagvNJ8Y3Sq2Wa9Kp4K1rLhCWbyMtPatV61at1Y5KEW34ykyGrg" ], "script": null, "chainId": 84, "height": 592587, "spentComplexity": 0 } View: original | compacted Prev: F4HZrydsZswiHCXcu9nZuzMT5FkZJUXv4FCNANcwoVaK Next: EA2KB8E7ihDaUJX6DWeNDh2MQAjNrqxrMf3Hm8ytKToD Full:
OldNewDifferences
1-{-# STDLIB_VERSION 3 #-}
2-{-# SCRIPT_TYPE ACCOUNT #-}
3-{-# CONTENT_TYPE DAPP #-}
4-
5-
6-@Callable(a)
7-func deposit () = {
8- let b = extract(a.payment)
9- if (isDefined(b.assetId))
10- then throw("can hodl waves only at the moment")
11- else {
12- let c = toBase58String(a.caller.bytes)
13- let d = {
14- let e = getInteger(this, c)
15- if ($isInstanceOf(e, "Int"))
16- then {
17- let f = e
18- f
19- }
20- else 0
21- }
22- let g = (d + b.amount)
23- WriteSet([DataEntry(c, g)])
24- }
25- }
26-
27-
28-
29-@Callable(a)
30-func withdraw (h) = {
31- let c = toBase58String(a.caller.bytes)
32- let d = {
33- let e = getInteger(this, c)
34- if ($isInstanceOf(e, "Int"))
35- then {
36- let f = e
37- f
38- }
39- else 0
40- }
41- let g = (d - h)
42- if ((0 > h))
43- then throw("Can't withdraw negative amount")
44- else if ((0 > g))
45- then throw("Not enough balance")
46- else ScriptResult(WriteSet([DataEntry(c, g)]), TransferSet([ScriptTransfer(a.caller, h, unit)]))
47- }
48-
49-
1+# no script

github/deemru/w8io/169f3d6 
38.84 ms