tx · 3VNVN7q3zh99nqxRKFjzTcWkwknn6FhpddeWRRAVV8ja 3NBKWHZ4raaY3NoS89CHWM5kiG8HghkuzwD: -0.03200000 Waves 2022.05.29 21:41 [2073321] smart account 3NBKWHZ4raaY3NoS89CHWM5kiG8HghkuzwD > SELF 0.00000000 Waves
{ "type": 13, "id": "3VNVN7q3zh99nqxRKFjzTcWkwknn6FhpddeWRRAVV8ja", "fee": 3200000, "feeAssetId": null, "timestamp": 1653849729316, "version": 2, "chainId": 84, "sender": "3NBKWHZ4raaY3NoS89CHWM5kiG8HghkuzwD", "senderPublicKey": "HfmJszLfTwcVHM51rEtKwb6itDQuSvnMooWf3RKiAf3f", "proofs": [ "4zxWrf86dRg4yyr5e5xQ4LGm8BL7Nek7kDSuGREP3cv2vc64yASfnsadsSCQdUT3zpVoxkLRTtPhU1FcD9Y18px3" ], "script": "base64:AAIFAAAAAAAAABMIAhIDCgEIEgMKAQgSAwoBARIAAAAACgAAAAALa19pbnN1cmFuY2UCAAAAC2tfaW5zdXJhbmNlAAAAAAxrX3doaXRlbGlzdHQCAAAAC2tfd2hpdGVsaXN0AAAAAA1BRE1JTl9BRERSRVNTCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUlqDTcbrhVEByGvFC2ktA8AHheog9Il2cAAAAABBBRE1JTl9QVUJMSUNfS0VZAQAAACBDm5fdZ2WCfwT3YDPHv8X3eTFmK0YiiVT9JO9joShkGQAAAAAEVVNETgEAAAAg93bq9/eDymXbbhPuAjvPWCmVqcHRjfJL2mzYHWKAyN4AAAAADFVTRE5fU1RBS0lORwkBAAAAB0FkZHJlc3MAAAABAQAAABoBVNUUiPoS2q6RwzbnHdK7erN5p99Do42YpgEAAAAOdG9Db21wb3NpdGVLZXkAAAACAAAABF9rZXkAAAAIX2FkZHJlc3MJAAEsAAAAAgkAASwAAAACBQAAAARfa2V5AgAAAAFfBQAAAAhfYWRkcmVzcwEAAAAJaW5zdXJhbmNlAAAAAAkBAAAAC3ZhbHVlT3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AAAAEVVNETgUAAAAHX2Ftb3VudAUAAAADbmlsAwkAAAAAAAACBQAAAAVzdGFrZQUAAAAFc3Rha2UJAQAAAA91cGRhdGVJbnN1cmFuY2UAAAABCQAAZAAAAAIJAQAAAAlpbnN1cmFuY2UAAAAABQAAAAdfYW1vdW50CQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAABBBRE1JTl9QVUJMSUNfS0VZQb7tpA==", "height": 2073321, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = "k_insurance" | |
5 | + | ||
6 | + | let b = "k_whitelist" | |
7 | + | ||
8 | + | let c = Address(base58'3N3eXo5VeX4cUa6HT52jHQvyBQWveSfXkvX') | |
9 | + | ||
10 | + | let d = base58'5YuvYbMWaR1njnLTqfG5e7f54ajaHKwBnRmAxnBTyFHa' | |
11 | + | ||
12 | + | let e = base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ' | |
13 | + | ||
14 | + | let f = Address(base58'3N9LkJahTMx41wGhSxLS42prCZtRCp4dhTs') | |
15 | + | ||
16 | + | func g (h,i) = ((h + "_") + i) | |
17 | + | ||
18 | + | ||
19 | + | func j () = valueOrElse(getInteger(this, a), 0) | |
20 | + | ||
21 | + | ||
22 | + | func k (i) = valueOrElse(getBoolean(this, g(b, i)), false) | |
23 | + | ||
24 | + | ||
25 | + | func l (m) = [IntegerEntry(a, m)] | |
26 | + | ||
27 | + | ||
28 | + | @Callable(m) | |
29 | + | func addWhitelist (n) = if ((m.caller != c)) | |
30 | + | then throw("Invalid addWhitelist params") | |
31 | + | else [BooleanEntry(g(b, n), true)] | |
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | @Callable(m) | |
36 | + | func removeWhitelist (n) = if ((m.caller != c)) | |
37 | + | then throw("Invalid addWhitelist params") | |
38 | + | else [BooleanEntry(g(b, n), false)] | |
39 | + | ||
40 | + | ||
41 | + | ||
42 | + | @Callable(m) | |
43 | + | func withdraw (o) = if (if (!(k(toString(m.caller)))) | |
44 | + | then true | |
45 | + | else (o > j())) | |
46 | + | then throw("Invalid withdraw params") | |
47 | + | else { | |
48 | + | let p = invoke(f, "unlockNeutrino", [o, toBase58String(e)], nil) | |
49 | + | if ((p == p)) | |
50 | + | then (l((j() - o)) ++ [ScriptTransfer(m.caller, o, e)]) | |
51 | + | else throw("Strict value is not equal to itself.") | |
52 | + | } | |
53 | + | ||
54 | + | ||
55 | + | ||
56 | + | @Callable(m) | |
57 | + | func deposit () = { | |
58 | + | let o = m.payments[0].amount | |
59 | + | if (if ((m.payments[0].assetId != e)) | |
60 | + | then true | |
61 | + | else if (!(k(toString(m.caller)))) | |
62 | + | then (m.caller != c) | |
63 | + | else false) | |
64 | + | then throw("Invalid deposit params") | |
65 | + | else { | |
66 | + | let q = invoke(f, "lockNeutrino", nil, [AttachedPayment(e, o)]) | |
67 | + | if ((q == q)) | |
68 | + | then l((j() + o)) | |
69 | + | else throw("Strict value is not equal to itself.") | |
70 | + | } | |
71 | + | } | |
72 | + | ||
73 | + | ||
74 | + | @Verifier(r) | |
75 | + | func s () = sigVerify(r.bodyBytes, r.proofs[0], d) | |
76 | + |
github/deemru/w8io/026f985 26.09 ms ◑