tx · GAuj3wQqJDdNbEsveQGrkKD991QtnLZfLM1cWsiK8cnB

3N4AnvtUqHktgpELTuS85fjNMmN4zy7ReRX:  -0.01400000 Waves

2019.08.10 00:29 [623995] smart account 3N4AnvtUqHktgpELTuS85fjNMmN4zy7ReRX > SELF 0.00000000 Waves

{ "type": 13, "id": "GAuj3wQqJDdNbEsveQGrkKD991QtnLZfLM1cWsiK8cnB", "fee": 1400000, "feeAssetId": null, "timestamp": 1565386297477, "version": 1, "sender": "3N4AnvtUqHktgpELTuS85fjNMmN4zy7ReRX", "senderPublicKey": "DmwAeHQrgttND4TuJ2QFY1U5KgdyYkrcVMvid7iG1dyy", "proofs": [ "5TyBEb3GJm6UPNCQi11rX89ddHeWAaoWiNovVJwvSCkMoiQqXdbY3st7qit4ZhaNWqXrKSsAzoZeeL5qL982YyDm" ], "script": "base64:AwQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE0V4Y2hhbmdlVHJhbnNhY3Rpb24EAAAAAWUFAAAAByRtYXRjaDAGB9UUkD4=", "chainId": 84, "height": 623995, "spentComplexity": 0 } View: original | compacted Prev: HKsbRvVVKWGkjzMFoGT2RP3eJsfKHcu1pjRJEbruWHvu Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
2-{-# SCRIPT_TYPE ACCOUNT #-}
3-{-# CONTENT_TYPE DAPP #-}
4-let pleuro = base58'AvWxAqn7JmtjknyRhhTyZRjviN2st9G5GGemU6sxNqf7'
5-
6-@Callable(i)
7-func deposit () = {
8- let pmt = extract(i.payment)
9- if ((pmt.assetId != pleuro))
10- then throw("PLEURO only")
11- else {
12- let currentKey = toBase58String(i.caller.bytes)
13- let currentAmount = match getInteger(this, currentKey) {
14- case a: Int =>
15- a
16- case _ =>
17- 0
18- }
19- let newAmount = (currentAmount + pmt.amount)
20- WriteSet([DataEntry(currentKey, newAmount)])
21- }
22- }
23-
24-
25-
26-@Callable(i)
27-func withdraw (amount) = {
28- let currentKey = toBase58String(i.caller.bytes)
29- let currentAmount = match getInteger(this, currentKey) {
30- case a: Int =>
31- a
32- case _ =>
33- 0
34- }
35- let newAmount = (currentAmount - amount)
36- if ((0 > amount))
37- then throw("cant withdraw negative")
38- else if ((0 > newAmount))
39- then throw("not enough balance")
40- else ScriptResult(WriteSet([DataEntry(currentKey, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, pleuro)]))
41- }
42-
43-
2+{-# CONTENT_TYPE EXPRESSION #-}
3+match tx {
4+ case e: ExchangeTransaction =>
5+ true
6+ case _ =>
7+ false
8+}

github/deemru/w8io/169f3d6 
37.27 ms