tx · 2kXRVwJK9EfiLZBfe1FHa1cxJjfNAmrtwExpSj4Ku6jY 3Myw1JbRFTwdqC6BdqAigJNfmdDZUpXrKds: -0.01400000 Waves 2020.10.04 16:09 [1205873] smart account 3Myw1JbRFTwdqC6BdqAigJNfmdDZUpXrKds > SELF 0.00000000 Waves
{ "type": 13, "id": "2kXRVwJK9EfiLZBfe1FHa1cxJjfNAmrtwExpSj4Ku6jY", "fee": 1400000, "feeAssetId": null, "timestamp": 1601817011099, "version": 2, "chainId": 84, "sender": "3Myw1JbRFTwdqC6BdqAigJNfmdDZUpXrKds", "senderPublicKey": "B7NXwtuecLNKUB2UfBQxK3imBCnM64HFuV1zLx66CMKk", "proofs": [ "rPH8jjmhirxuKxMPz89kAexqM7nkQFTEC78fPQMKBKD5aKz4gF49qYrFQnGwJFAnn6MB5L6qrBR8E5Ynxct7Xt1" ], "script": "base64:AAIDAAAAAAAAAAkIARIAEgMKAQEAAAAAAAAAAgAAAAFpAQAAAAdkZXBvc2l0AAAAAAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQDCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAAIWNhbiBob2RsIHdhdmVzIG9ubHkgYXQgdGhlIG1vbWVudAQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAA1jdXJyZW50QW1vdW50BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAACmN1cnJlbnRLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAAJbmV3QW1vdW50CQAAZAAAAAIFAAAADWN1cnJlbnRBbW91bnQJAABoAAAAAgkAAGkAAAACCAUAAAADcG10AAAABmFtb3VudAAAAAAAAAAAZAAAAAAAAAAAeAQAAAAB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ByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAAAQAAACCWNrPC1AlknxwnLr4Vwx1+NtYE1WanzBF/KO9/lK4gdwbYK9Il", "height": 1205873, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8BVcqP4wTHAAxhGSZajivP2F3yXqB9qzqV7veaX1dtqm Next: none Diff:
Old | New | Differences | |
---|---|---|---|
17 | 17 | 0 | |
18 | 18 | } | |
19 | 19 | let newAmount = (currentAmount + ((pmt.amount / 100) * 120)) | |
20 | - | let z = (toString(newAmount) + " | |
20 | + | let z = (toString(newAmount) + ",block") | |
21 | 21 | WriteSet([DataEntry(currentKey, z)]) | |
22 | 22 | } | |
23 | 23 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func deposit () = { | |
8 | 8 | let pmt = extract(i.payment) | |
9 | 9 | if (isDefined(pmt.assetId)) | |
10 | 10 | then throw("can hodl waves only at the moment") | |
11 | 11 | else { | |
12 | 12 | let currentKey = toBase58String(i.caller.bytes) | |
13 | 13 | let currentAmount = match getInteger(this, currentKey) { | |
14 | 14 | case a: Int => | |
15 | 15 | a | |
16 | 16 | case _ => | |
17 | 17 | 0 | |
18 | 18 | } | |
19 | 19 | let newAmount = (currentAmount + ((pmt.amount / 100) * 120)) | |
20 | - | let z = (toString(newAmount) + " | |
20 | + | let z = (toString(newAmount) + ",block") | |
21 | 21 | WriteSet([DataEntry(currentKey, z)]) | |
22 | 22 | } | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | ||
27 | 27 | @Callable(i) | |
28 | 28 | func withdraw (amount) = { | |
29 | 29 | let currentKey = toBase58String(i.caller.bytes) | |
30 | 30 | let currentAmount = match getInteger(this, currentKey) { | |
31 | 31 | case a: Int => | |
32 | 32 | a | |
33 | 33 | case _ => | |
34 | 34 | 0 | |
35 | 35 | } | |
36 | 36 | let newAmount = (currentAmount - amount) | |
37 | 37 | if ((0 > amount)) | |
38 | 38 | then throw("Can't withdraw negative amount") | |
39 | 39 | else if ((0 > newAmount)) | |
40 | 40 | then throw("Not enough balance") | |
41 | 41 | else ScriptResult(WriteSet([DataEntry(currentKey, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, unit)])) | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | @Verifier(tx) | |
46 | 46 | func verify () = match tx { | |
47 | 47 | case d: SetScriptTransaction => | |
48 | 48 | sigVerify(tx.bodyBytes, tx.proofs[0], base58'B7NXwtuecLNKUB2UfBQxK3imBCnM64HFuV1zLx66CMKk') | |
49 | 49 | case _ => | |
50 | 50 | true | |
51 | 51 | } | |
52 | 52 |
github/deemru/w8io/169f3d6 41.15 ms ◑