tx · 3Qh4YrUJUCnyPAQKRcffoCLWzHqQuXWKKi7U7bPR4fJt

3MrD29Em3UVB6KUouximkPkYJPUAtL8jqpn:  -0.01000000 Waves

2021.04.15 00:32 [1482664] smart account 3MrD29Em3UVB6KUouximkPkYJPUAtL8jqpn > SELF 0.00000000 Waves

{ "type": 13, "id": "3Qh4YrUJUCnyPAQKRcffoCLWzHqQuXWKKi7U7bPR4fJt", "fee": 1000000, "feeAssetId": null, "timestamp": 1618436000011, "version": 2, "chainId": 84, "sender": "3MrD29Em3UVB6KUouximkPkYJPUAtL8jqpn", "senderPublicKey": "56eNaKVmDQUA4CeqQiK9bWnhNsm9iFLFtrdtGNCQfkTu", "proofs": [ "SqXwCbuc1RY8MLX7Ev4F2JLetD95LQ9S1MphvwxfaPzLybEDyuZMJ75SuJrPPggTS4D5LiN1m83cDPJR9viPaQD" ], "script": "base64:AAIDAAAAAAAAAAkIARIAEgMKAQEAAAABAAAAAAlueWFuVG9rZW4BAAAAINgeyDqxoZnAcinTWYzwct5yBD/FJHpCDlhQbg3+OF41AAAAAgAAAAFpAQAAAAdkZXBvc2l0AAAAAAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQDCQEAAAACIT0AAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAACW55YW5Ub2tlbgkAAAIAAAABAgAAABxOWUFOLTEzIHRva2VucyBvbmx5IHN1cHBvcnRzBAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAADWN1cnJlbnRBbW91bnQEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAAKY3VycmVudEtleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABAAAAAluZXdBbW91bnQJAABkAAAAAgUAAAANY3VycmVudEFtb3VudAgFAAAAA3BtdAAAAA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1482664, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: GQ8BF9HRgumTUQposQo6vjVxNYUTokgvaneefvNRY3A1 Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let nyanToken = base58'FYeHd8VsE6SWQBzMFYDPbV7xjFdBMJt5gnCZCSiYyoHE'
5+
6+@Callable(i)
7+func deposit () = {
8+ let pmt = extract(i.payment)
9+ if ((pmt.assetId != nyanToken))
10+ then throw("NYAN-13 tokens only supports")
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("can't withdraw negative amount")
38+ else if ((0 > newAmount))
39+ then throw("not enoung balance")
40+ else ScriptResult(WriteSet([DataEntry(currentKey, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, nyanToken)]))
41+ }
42+
43+
44+@Verifier(tx)
45+func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
46+

github/deemru/w8io/169f3d6 
18.57 ms