tx · C5SczaYbjt9juNqvbF88mXJUnrRESfvJRrJViVFVpqXw 3N2ditFQnNHhTYFSsujn65PL3HJLJSJXQVt: -0.01000000 Waves 2023.05.31 08:49 [2601748] smart account 3N2ditFQnNHhTYFSsujn65PL3HJLJSJXQVt > SELF 0.00000000 Waves
{ "type": 13, "id": "C5SczaYbjt9juNqvbF88mXJUnrRESfvJRrJViVFVpqXw", "fee": 1000000, "feeAssetId": null, "timestamp": 1685512361501, "version": 2, "chainId": 84, "sender": "3N2ditFQnNHhTYFSsujn65PL3HJLJSJXQVt", "senderPublicKey": "4x8mbkUqib3eR9VG3uyyJXHi8MkVsKh6yoLfkZDTNJNK", "proofs": [ "4GVEMzGsA9aF6unFd8LN8rQrhcYaNuKAhBHr8PBEBWeSufPjcdb8TRWRoL1rLCrK6WWkRcUucnX1sL6EYTbEBt6K" ], "script": "base64:BgINCAISBAoCAQESAwoBAQACAWkBC3dpdGhkcmF3T2xkAgtwbGF0Zm9ybUZlZQZhbW91bnQEBW93bmVyARoBVO1S0hRTUWuLQUhal/OYE2WiiA8ELSnB9AQFdGVhbXMBIIVjlaPziI6w3gwXjghOv5o/krsm2zrodo4W3BQiKkh+AwkAAAIICAUBaQZjYWxsZXIFYnl0ZXMFBW93bmVyCQACAQIZc29ycnkgIHlvdSBoYXZlIG5vIGFjY2VzcwMDCQBnAgULcGxhdGZvcm1GZWUAAAkAZwIFC3BsYXRmb3JtRmVlBQZhbW91bnQHCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgkAaAIFBmFtb3VudABkBQV0ZWFtcwUDbmlsBQNuaWwBaQEId2l0aGRyYXcBBmFtb3VudAQKY3VycmVudEtleQkA2AQBCAgFAWkGY2FsbGVyBWJ5dGVzBA1jdXJyZW50QW1vdW50BAckbWF0Y2gwCQCaCAIFBHRoaXMFCmN1cnJlbnRLZXkDCQABAgUHJG1hdGNoMAIDSW50BAFhBQckbWF0Y2gwBQFhAAAECW5ld0Ftb3VudAkAZQIFDWN1cnJlbnRBbW91bnQFBmFtb3VudAMJAGYCAAAFBmFtb3VudAkAAgECHkNhbid0IHdpdGhkcmF3IG5lZ2F0aXZlIGFtb3VudAMJAGYCAAAFCW5ld0Ftb3VudAkAAgECEk5vdCBlbm91Z2ggYmFsYW5jZQkAzAgCCQEMSW50ZWdlckVudHJ5AgUKY3VycmVudEtleQUJbmV3QW1vdW50CQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgUGYW1vdW50BQR1bml0BQNuaWwBAnR4AQZ2ZXJpZnkAB2BX8Gc=", "height": 2601748, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | ||
5 | + | ||
6 | + | @Callable(i) | |
7 | + | func withdrawOld (platformFee,amount) = { | |
8 | + | let owner = base58'3NBYw8rxLmTvyEdsvaYor8nHG6GJ4NjB2Aw' | |
9 | + | let teams = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq' | |
10 | + | if ((i.caller.bytes == owner)) | |
11 | + | then throw("sorry you have no access") | |
12 | + | else if (if ((platformFee >= 0)) | |
13 | + | then (platformFee >= amount) | |
14 | + | else false) | |
15 | + | then [ScriptTransfer(i.caller, (amount * 100), teams)] | |
16 | + | else nil | |
17 | + | } | |
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | @Callable(i) | |
22 | + | func withdraw (amount) = { | |
23 | + | let currentKey = toBase58String(i.caller.bytes) | |
24 | + | let currentAmount = match getInteger(this, currentKey) { | |
25 | + | case a: Int => | |
26 | + | a | |
27 | + | case _ => | |
28 | + | 0 | |
29 | + | } | |
30 | + | let newAmount = (currentAmount - amount) | |
31 | + | if ((0 > amount)) | |
32 | + | then throw("Can't withdraw negative amount") | |
33 | + | else if ((0 > newAmount)) | |
34 | + | then throw("Not enough balance") | |
35 | + | else [IntegerEntry(currentKey, newAmount), ScriptTransfer(i.caller, amount, unit)] | |
36 | + | } | |
37 | + | ||
38 | + | ||
39 | + | @Verifier(tx) | |
40 | + | func verify () = false | |
41 | + |
github/deemru/w8io/026f985 18.05 ms ◑