tx · 7W8E8JzrLkUesMfwsS9EVCkA74PU67vdh5TJ2kh9k7Nb 3N2tusqAtDctK8iSTXS6F9rimmftmSuwLUX: -0.05000000 Waves 2019.10.30 14:58 [742846] smart account 3N2tusqAtDctK8iSTXS6F9rimmftmSuwLUX > SELF 0.00000000 Waves
{ "type": 13, "id": "7W8E8JzrLkUesMfwsS9EVCkA74PU67vdh5TJ2kh9k7Nb", "fee": 5000000, "feeAssetId": null, "timestamp": 1572436703916, "version": 1, "sender": "3N2tusqAtDctK8iSTXS6F9rimmftmSuwLUX", "senderPublicKey": "ACfUG5PwG2GssMuyEwVEhkYAbbbP1geSHR8XoNxLyu6V", "proofs": [ "5EW5FsRdzuQBBXpinR1Zxcd91fjvdpZRbKnhkqDkTJxXV7V1Pkc3vAmBWuzqGhuWAYEFfN6vT9FY8THHCHJskEHQ" ], "script": "base64:AAIDAAAAAAAAAAkIARIAEgMKAQEAAAAEAAAAAA5SRVNFUlZBVElPTktFWQIAAAAVJFdCRVRfUkVTRVJWRURfQU1PVU5UAAAAAARXQkVUBQAAAAR1bml0AQAAABJFeHRyYWN0UmVzZXJ2ZWRBbXQAAAAABAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAADlJFU0VSVkFUSU9OS0VZAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAABAAAAEEV4dHJhY3RQbGF5ZXJBbXQAAAABAAAABndhbGxldAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAAZ3YWxsZXQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAAAAAIAAAABaQEAAAAHZGVwb3NpdAAAAAAEAAAAB3BheW1lbnQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAQAAAAGd2FsbGV0CQAEJQAAAAEI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W50cnkAAAACBQAAAA5SRVNFUlZBVElPTktFWQUAAAARbmV3UmVzZXJ2ZWRBbW91bnQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAABndhbGxldAUAAAAPbmV3UGxheWVyQW1vdW50BQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAZhbW91bnQFAAAABFdCRVQFAAAAA25pbAAAAABb08kp", "chainId": 84, "height": 742846, "spentComplexity": 0 } View: original | compacted Prev: FFdkm8c4aYMyHyycA8YtXpQ98QZeQtN2NppBq8bia24B Next: none Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "$WBET_RESERVED_AMOUNT" | |
5 | 5 | ||
6 | - | let b = | |
6 | + | let b = unit | |
7 | 7 | ||
8 | 8 | func c () = { | |
9 | 9 | let d = getInteger(this, a) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "$WBET_RESERVED_AMOUNT" | |
5 | 5 | ||
6 | - | let b = | |
6 | + | let b = unit | |
7 | 7 | ||
8 | 8 | func c () = { | |
9 | 9 | let d = getInteger(this, a) | |
10 | 10 | if ($isInstanceOf(d, "Int")) | |
11 | 11 | then { | |
12 | 12 | let e = d | |
13 | 13 | e | |
14 | 14 | } | |
15 | 15 | else 0 | |
16 | 16 | } | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func f (g) = { | |
20 | 20 | let d = getInteger(this, g) | |
21 | 21 | if ($isInstanceOf(d, "Int")) | |
22 | 22 | then { | |
23 | 23 | let e = d | |
24 | 24 | e | |
25 | 25 | } | |
26 | 26 | else 0 | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | @Callable(h) | |
31 | 31 | func deposit () = { | |
32 | 32 | let i = extract(h.payment) | |
33 | 33 | let g = toString(h.caller) | |
34 | 34 | let j = (f(g) + i.amount) | |
35 | 35 | let k = (c() + i.amount) | |
36 | 36 | ScriptResult(WriteSet([DataEntry(a, k), DataEntry(g, j)]), TransferSet(nil)) | |
37 | 37 | } | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | ||
41 | 41 | @Callable(h) | |
42 | 42 | func withdraw (l) = { | |
43 | 43 | let g = toString(h.caller) | |
44 | 44 | let m = f(g) | |
45 | 45 | if ((l > m)) | |
46 | 46 | then throw("There is not enough balance to withdraw the amount requested.") | |
47 | 47 | else { | |
48 | 48 | let j = (m - l) | |
49 | 49 | let k = (c() - l) | |
50 | 50 | ScriptResult(WriteSet([DataEntry(a, k), DataEntry(g, j)]), TransferSet([ScriptTransfer(h.caller, l, b)])) | |
51 | 51 | } | |
52 | 52 | } | |
53 | 53 | ||
54 | 54 |
github/deemru/w8io/169f3d6 34.66 ms ◑