tx · wzhbBrdP3PeXq6krnBbpALZhiEuwEzVqN7oc7TL5cM4

3Mrcd5V4by5mqq1rcZjBdMCYxwo37TpAtxP:  -0.01400000 Waves

2019.09.22 01:28 [686683] smart account 3Mrcd5V4by5mqq1rcZjBdMCYxwo37TpAtxP > SELF 0.00000000 Waves

{ "type": 13, "id": "wzhbBrdP3PeXq6krnBbpALZhiEuwEzVqN7oc7TL5cM4", "fee": 1400000, "feeAssetId": null, "timestamp": 1569104910037, "version": 1, "sender": "3Mrcd5V4by5mqq1rcZjBdMCYxwo37TpAtxP", "senderPublicKey": "AQfAEineEN1RXA9QHVe6dr6rrRzjqGJfvmJjeCnQ4bJu", "proofs": [ "51Fw2qCEFYKd2dUnCxTJtpe5jc7GeDRVBnrs2ZPj2W2H8896WwqnFRYXV6EGDa8hDusHY861HJB2vF9mzHkaPA54" ], "script": null, "chainId": 84, "height": 686683, "spentComplexity": 0 } View: original | compacted Prev: dX2UN3RNEztfkuGicESXU9hXDUGFjV91Qcg7cGjTNq2 Next: B5HtFZB2RN5TMT6JcKtDm1wmMJKXWygBSk4n3yLFEuEt Full:
OldNewDifferences
1-{-# STDLIB_VERSION 3 #-}
2-{-# SCRIPT_TYPE ACCOUNT #-}
3-{-# CONTENT_TYPE DAPP #-}
4-
5-
6-@Callable(i)
7-func deposit () = {
8- let pmt = extract(i.payment)
9- let assetId = base58'FGZTpAqL2wwfXwFRX32tAeD88Uaw8LSt3DPS312XodHZ'
10- if (isDefined(pmt.assetId))
11- then throw("can hodl AAico only at the moment")
12- else {
13- let currentKey = toBase58String(i.caller.bytes)
14- let currentAmount = match getInteger(this, currentKey) {
15- case a: Int =>
16- a
17- case _ =>
18- 0
19- }
20- let newAmount = (currentAmount + pmt.amount)
21- WriteSet([DataEntry(currentKey, newAmount)])
22- }
23- }
24-
25-
26-
27-@Callable(i)
28-func withdraw (amount) = {
29- let currentKey = toBase58String(i.caller.bytes)
30- let currentAmount = match getInteger(this, currentKey) {
31- case a: Int =>
32- a
33- case _ =>
34- 0
35- }
36- let newAmount = (currentAmount - amount)
37- if ((0 > amount))
38- then throw("Can't withdraw negative amount")
39- else if ((0 > newAmount))
40- then throw("Not enough balance")
41- else ScriptResult(WriteSet([DataEntry(currentKey, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, unit)]))
42- }
43-
44-
45-@Verifier(tx)
46-func verify () = true
47-
1+# no script

github/deemru/w8io/873ac7e 
38.63 ms