tx · vtoCCpzNizbevCMUG4vzNwAraP8ruVgTfCGgGpHdGNa 3N81rtbVaBBCFJV79mTsSEy1GTn7pZiEMaG: -0.05000000 Waves 2022.04.10 11:10 [2002224] smart account 3N81rtbVaBBCFJV79mTsSEy1GTn7pZiEMaG > SELF 0.00000000 Waves
{ "type": 13, "id": "vtoCCpzNizbevCMUG4vzNwAraP8ruVgTfCGgGpHdGNa", "fee": 5000000, "feeAssetId": null, "timestamp": 1649578216499, "version": 2, "chainId": 84, "sender": "3N81rtbVaBBCFJV79mTsSEy1GTn7pZiEMaG", "senderPublicKey": "Gjvg3XWonvtwS11qYisF5ctyEfXSdfGFc89vdwQ15rgs", "proofs": [ "5rdddsPdUfFCodMuqnaB8WGbTUyzzdTsrbmidoWRenoi5twhh7DGsyEjvGFm5GPYvxXNCNUenCJ56ZADgWK2pJ4N" ], "script": "base64:AAIFAAAAAAAAANUIAhIAEgAaCAoBYRIDQVBQGgsKAWISBkRPTkFURRoSCgFjEg10cnlHZXRJbnRlZ2VyGggKAWQSA2tleRoICgFlEgN2YWwaDAoBZhIHJG1hdGNoMBoGCgFnEgFiGgYKAWgSAWkaCAoBaRIDcG10GgsKAWoSBmFtb3VudBoRCgFrEgxjdXJyZW50VmFsdWUaCwoBbBIGbmV3VmFsGhIKAW0SDWNhbGxlckFkZHJlc3MaDwoBbhIKYXBwQWRkcmVzcxoHCgFvEgJ0eBoLCgFwEgZ2ZXJpZnkAAAADAAAAAAFhAQAAABoBVMaKAQxN6ucN17nYrm3GRhXIB6PoszBfsQAAAAABYgEAAAAaAVQ5nlzIm5WiZ3Y4LveGIZcS/w2qhE5DsSABAAAAAWMAAAABAAAAAWQEAAAAAWUEAAAAAWYJAAQaAAAAAgUAAAAEdGhpcwUAAAABZAMJAAABAAAAAgUAAAABZgIAAAADSW50BAAAAAFnBQAAAAFmBQAAAAFnAAAAAAAAAAAABQAAAAFlAAAAAgAAAAFoAQAAAARzZW5kAAAAAAQAAAABaQkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaAAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAABaggFAAAAAWkAAAAGYW1vdW50BAAAAAFrCQEAAAABYwAAAAECAAAABXZhbHVlBAAAAAFsCQAAZAAAAAIFAAAAAWsFAAAAAWoJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAABXZhbHVlBQAAAAFrBQAAAANuaWwAAAABaAEAAAAGZG9uYXRlAAAAAAQAAAABbQkAAlgAAAABCAgFAAAAAWgAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAFuCQACWAAAAAEFAAAAAWEEAAAAAWsJAQAAAAFjAAAAAQIAAAAFdmFsdWUDCQAAAAAAAAIFAAAAAW0FAAAAAW4DCQAAZgAAAAIFAAAAAWsAAAAAAAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAB0FkZHJlc3MAAAABBQAAAAFiBQAAAAFrBQAAAAR1bml0CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAAV2YWx1ZQAAAAAAAAAAAAUAAAADbmlsCQAAAgAAAAECAAAAD05vdCBlbm91Z2ggZnVuZAkAAAIAAAABAgAAABhPbmx5IE93bmVyIGNhbiBjYWxsIHRoaXMAAAABAAAAAW8BAAAAAXAAAAAACQAB9AAAAAMIBQAAAAFvAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAABbwAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAFvAAAAD3NlbmRlclB1YmxpY0tleRgf/KQ=", "height": 2002224, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D5nLT9vp8ZBBHGFJvgYkPrwWYReSDDN8zizQfFYsXye Next: 6iFZyLLmhFGTNVNzbFtYjgjPJY2bk8j6xmfba1fWCwnK Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let APP = base58'3N81rtbVaBBCFJV79mTsSEy1GTn7pZiEMaG' | |
5 | 5 | ||
6 | 6 | let DONATE = base58'3MuAk151ARFqSSJVvmi9jnnB2CpHEAFJZvw' | |
7 | 7 | ||
8 | 8 | func tryGetInteger (key) = { | |
9 | 9 | let val = match getInteger(this, key) { | |
10 | 10 | case b: Int => | |
11 | 11 | b | |
12 | 12 | case _ => | |
13 | 13 | 0 | |
14 | 14 | } | |
15 | 15 | val | |
16 | 16 | } | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | @Callable(i) | |
20 | 20 | func send () = { | |
21 | 21 | let pmt = value(i.payments[0]) | |
22 | 22 | let amount = pmt.amount | |
23 | 23 | let currentValue = tryGetInteger("value") | |
24 | 24 | let newVal = (currentValue + amount) | |
25 | 25 | [IntegerEntry("value", currentValue)] | |
26 | 26 | } | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | ||
30 | 30 | @Callable(i) | |
31 | 31 | func donate () = { | |
32 | 32 | let callerAddress = toBase58String(i.caller.bytes) | |
33 | 33 | let appAddress = toBase58String(APP) | |
34 | 34 | let currentValue = tryGetInteger("value") | |
35 | 35 | if ((callerAddress == appAddress)) | |
36 | 36 | then if ((currentValue > 1)) | |
37 | 37 | then [ScriptTransfer(Address(DONATE), currentValue, unit), IntegerEntry("value", 0)] | |
38 | 38 | else throw("Not enough fund") | |
39 | 39 | else throw("Only Owner can call this") | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | @Verifier(tx) | |
44 | 44 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
45 | 45 |
github/deemru/w8io/026f985 24.11 ms ◑