tx · dX2UN3RNEztfkuGicESXU9hXDUGFjV91Qcg7cGjTNq2

3Mrcd5V4by5mqq1rcZjBdMCYxwo37TpAtxP:  -0.01000000 Waves

2019.09.22 01:23 [686679] smart account 3Mrcd5V4by5mqq1rcZjBdMCYxwo37TpAtxP > SELF 0.00000000 Waves

{ "type": 13, "id": "dX2UN3RNEztfkuGicESXU9hXDUGFjV91Qcg7cGjTNq2", "fee": 1000000, "feeAssetId": null, "timestamp": 1569104621967, "version": 1, "sender": "3Mrcd5V4by5mqq1rcZjBdMCYxwo37TpAtxP", "senderPublicKey": "AQfAEineEN1RXA9QHVe6dr6rrRzjqGJfvmJjeCnQ4bJu", "proofs": [ "3HQpfA9g3EEV8eQyu8JFfY8XY9DdRShLJABuUFWYHDyUF2Dqam6tgi9vPpAohBYf8ruhLJXqvEhP5fyoP685t3Nk" ], "script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAgAAAAFpAQAAAAdkZXBvc2l0AAAAAAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQEAAAAB2Fzc2V0SWQBAAAAINQACMqlB9ytuJVvN0N4wlLd392Q18ZJ9k630z9kPueAAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACFjYW4gaG9kbCBBQWljbyBvbmx5IGF0IHRoZSBtb21lbnQEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAApjdXJyZW50S2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAACW5ld0Ftb3VudAkAAGQAAAACBQAAAA1jdXJyZW50QW1vdW50CAUAAAADcG10AAAABmFtb3VudAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAKY3VycmVudEtleQUAAAAJbmV3QW1vdW50BQAAAANuaWwAAAABaQEAAAAId2l0aGRyYXcAAAABAAAABmFtb3VudAQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAA1jdXJyZW50QW1vdW50BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAACmN1cnJlbnRLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAAJbmV3QW1vdW50CQAAZQAAAAIFAAAADWN1cnJlbnRBbW91bnQFAAAABmFtb3VudAMJAABmAAAAAgAAAAAAAAAAAAUAAAAGYW1vdW50CQAAAgAAAAECAAAAHkNhbid0IHdpdGhkcmF3IG5lZ2F0aXZlIGFtb3VudAMJAABmAAAAAgAAAAAAAAAAAAUAAAAJbmV3QW1vdW50CQAAAgAAAAECAAAAEk5vdCBlbm91Z2ggYmFsYW5jZQkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAACmN1cnJlbnRLZXkFAAAACW5ld0Ftb3VudAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGYW1vdW50BQAAAAR1bml0BQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABj4M+88=", "chainId": 84, "height": 686679, "spentComplexity": 0 } View: original | compacted Prev: 48SQ2wFQhZQWEBRnpvsW1B1n3tXyi35TZuXn6BGjuemq Next: wzhbBrdP3PeXq6krnBbpALZhiEuwEzVqN7oc7TL5cM4 Full:
OldNewDifferences
1-# no script
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+

github/deemru/w8io/026f985 
38.64 ms