tx · FgRKmwBWbK5duirG2QVx6o4Ceb8SJon7QfXeKuGfDLKG 3N5ZhGLzDmoMwHsWKAoTqkFvVYuditKPyvY: -0.01000000 Waves 2022.11.14 16:03 [2316836] smart account 3N5ZhGLzDmoMwHsWKAoTqkFvVYuditKPyvY > SELF 0.00000000 Waves
{ "type": 13, "id": "FgRKmwBWbK5duirG2QVx6o4Ceb8SJon7QfXeKuGfDLKG", "fee": 1000000, "feeAssetId": null, "timestamp": 1668431075293, "version": 2, "chainId": 84, "sender": "3N5ZhGLzDmoMwHsWKAoTqkFvVYuditKPyvY", "senderPublicKey": "7mgUaX6yf7mFk48Gus7kVGRUwCZXtr2CKWJW6KoukPiW", "proofs": [ "2gYaeCBeKbcNJTJCndnGhZSFMSSFokBQ6BZGK8Di7uE2TVtrRHpavyVbD33qXHuQ5u6aMzjgekhZ7R9zKqNpBdQT" ], "script": "base64:AAIFAAAAAAAAAA4IAhIAEgMKAQESAwoBAQAAAAEAAAAABnVzZG5JRAEAAAAgD/IcEqzkxDya7EYaqyWosOy6BytGzG2IcvC14pJJAbQAAAADAAAAAWkBAAAAB2RlcG9zaXQAAAAABAAAAANwbXQJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAABmNhbGxlcgkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIDCQEAAAACIT0AAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAABnVzZG5JRAkAAAIAAAABAgAAAA1JbnZhbGlkIGFzc2V0BAAAAAlkZXBvc2l0ZWQJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwUAAAAGY2FsbGVyAAAAAAAAAAAABAAAAAFzCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAAGY2FsbGVyCQAAZAAAAAIIBQAAAANwbXQAAAAGYW1vdW50BQAAAAlkZXBvc2l0ZWQEAAAAB29uU3Rha2UJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAA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Zm9yV2l0aGRyYXcJAAACAAAAAQIAAAATTm90IGVub3VnaCB0byBjbGFpbQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACBQAAAAZjYWxsZXICAAAACV93aXRoZHJhdwkAAGUAAAACBQAAAAtmb3JXaXRoZHJhdwUAAAAGYW1vdW50CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGYW1vdW50BQAAAAZ1c2RuSUQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5MC6gng==", "height": 2316836, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5K9e9dPw2NV47zr2VdqywautqEdcNbE78gJVyGQe8yCg Next: none Diff:
Old | New | Differences | |
---|---|---|---|
12 | 12 | else { | |
13 | 13 | let e = valueOrElse(getInteger(this, d), 0) | |
14 | 14 | let f = IntegerEntry(d, (c.amount + e)) | |
15 | - | let g = valueOrElse(getInteger(this, "_ | |
15 | + | let g = valueOrElse(getInteger(this, "_treasury"), 0) | |
16 | 16 | let h = IntegerEntry("_treasury", (c.amount + g)) | |
17 | 17 | [f, h] | |
18 | 18 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT' | |
5 | 5 | ||
6 | 6 | @Callable(b) | |
7 | 7 | func deposit () = { | |
8 | 8 | let c = b.payments[0] | |
9 | 9 | let d = toString(b.caller) | |
10 | 10 | if ((c.assetId != a)) | |
11 | 11 | then throw("Invalid asset") | |
12 | 12 | else { | |
13 | 13 | let e = valueOrElse(getInteger(this, d), 0) | |
14 | 14 | let f = IntegerEntry(d, (c.amount + e)) | |
15 | - | let g = valueOrElse(getInteger(this, "_ | |
15 | + | let g = valueOrElse(getInteger(this, "_treasury"), 0) | |
16 | 16 | let h = IntegerEntry("_treasury", (c.amount + g)) | |
17 | 17 | [f, h] | |
18 | 18 | } | |
19 | 19 | } | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | ||
23 | 23 | @Callable(b) | |
24 | 24 | func withdraw (i) = { | |
25 | 25 | let d = toString(b.caller) | |
26 | 26 | let c = b.payments[0] | |
27 | 27 | let j = valueOrElse(getInteger(this, d), 0) | |
28 | 28 | if ((j == 0)) | |
29 | 29 | then throw("Nothing to withdraw") | |
30 | 30 | else if ((0 >= i)) | |
31 | 31 | then throw("Invalid input") | |
32 | 32 | else [IntegerEntry(d, (j - c.amount)), ScriptTransfer(b.caller, c.amount, a)] | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | ||
37 | 37 | @Callable(b) | |
38 | 38 | func claim (i) = { | |
39 | 39 | let d = toString(b.caller) | |
40 | 40 | let k = getIntegerValue(this, d) | |
41 | 41 | if ((i > k)) | |
42 | 42 | then throw("Not enough to claim") | |
43 | 43 | else [IntegerEntry((d + "_withdraw"), (k - i)), ScriptTransfer(b.caller, i, a)] | |
44 | 44 | } | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | @Verifier(l) | |
48 | 48 | func m () = sigVerify(l.bodyBytes, l.proofs[0], l.senderPublicKey) | |
49 | 49 |
github/deemru/w8io/169f3d6 22.32 ms ◑