tx · FvJG7TBYA4268yPjgm76YEVfUV44LX18ywVbbVjQmJj9

3N5MDZSz9RsNfTEevPgj1BV7e3YQCZ38KgC:  -0.03400000 Waves

2022.07.05 15:48 [2126397] smart account 3N5MDZSz9RsNfTEevPgj1BV7e3YQCZ38KgC > SELF 0.00000000 Waves

{ "type": 13, "id": "FvJG7TBYA4268yPjgm76YEVfUV44LX18ywVbbVjQmJj9", "fee": 3400000, "feeAssetId": null, "timestamp": 1657025354259, "version": 2, "chainId": 84, "sender": "3N5MDZSz9RsNfTEevPgj1BV7e3YQCZ38KgC", "senderPublicKey": "zzUTcRufBzvKzQq8QkhTVTXywza4PokmTzS6q5iRHan", "proofs": [ "5ynmEQ5RWWP5V7NXLMUHXgAfYyTXaDZELmmYsPKekbVmmj3VvhyhJBCui1qNwhEcWyXnqkJwdhaWmujsqMVNkoVi" ], "script": "base64:AAIFAAAAAAAAAA4IAhIDCgEIEgMKAQESAAAAABQAAAAAC2tfaW5zdXJhbmNlAgAAAAtrX2luc3VyYW5jZQAAAAAUa19jb29yZGluYXRvckFkZHJlc3MCAAAAFGtfY29vcmRpbmF0b3JBZGRyZXNzAAAAAAVrX2FtbQIAAAAFa19hbW0AAAAAD2tfYWRtaW5fYWRkcmVzcwIAAAAPa19hZG1pbl9hZGRyZXNzAAAAABJrX2FkbWluX3B1YmxpY19rZXkCAAAAEmtfYWRtaW5fcHVibGljX2tleQAAAAANa19xdW90ZV9hc3NldAIAAAANa19xdW90ZV9hc3NldAAAAAAPa19xdW90ZV9zdGFraW5nAgAAAA9rX3F1b3RlX3N0YWtpbmcAAAAAEWtfc3Rha2luZ19hZGRyZXNzAgAAABFrX3N0YWtpbmdfYWRkcmVzcwAAAAANa19pbml0aWFsaXplZAIAAAANa19pbml0aWFsaXplZAEAAAAOdG9Db21wb3NpdGVLZXkAAAACAAAABF9rZXkAAAAIX2FkZHJlc3MJAAEsAAAAAgkAASwAAAACBQAAAARfa2V5AgAAAAFfBQAAAAhfYWRkcmVzcwE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A25pbAkABEwAAAACCQEAAAAPQXR0YWNoZWRQYXltZW50AAAAAgkBAAAACnF1b3RlQXNzZXQAAAAABQAAAAdfYW1vdW50BQAAAANuaWwDCQAAAAAAAAIFAAAABXN0YWtlBQAAAAVzdGFrZQkBAAAAD3VwZGF0ZUluc3VyYW5jZQAAAAEJAABkAAAAAgkBAAAACWluc3VyYW5jZQAAAAAFAAAAB19hbW91bnQJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAJAQAAAA5hZG1pblB1YmxpY0tleQAAAABs+eQR", "height": 2126397, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
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_coordinatorAddress"
7+
8+let c = "k_amm"
9+
10+let d = "k_admin_address"
11+
12+let e = "k_admin_public_key"
13+
14+let f = "k_quote_asset"
15+
16+let g = "k_quote_staking"
17+
18+let h = "k_staking_address"
19+
20+let i = "k_initialized"
21+
22+func j (k,l) = ((k + "_") + l)
23+
24+
25+func m () = valueOrElse(getInteger(this, a), 0)
26+
27+
28+func n () = valueOrErrorMessage(addressFromString(getStringValue(this, b)), "Coordinator not set")
29+
30+
31+func o (l) = valueOrElse(getBoolean(n(), j(c, l)), false)
32+
33+
34+func p () = valueOrElse(getBoolean(this, i), false)
35+
36+
37+func q () = addressFromString(getStringValue(n(), d))
38+
39+
40+func r () = fromBase58String(getStringValue(n(), e))
41+
42+
43+func s () = fromBase58String(getStringValue(n(), f))
44+
45+
46+func t () = valueOrErrorMessage(addressFromString(getStringValue(n(), g)), "Quote asset staking not set")
47+
48+
49+func u () = valueOrErrorMessage(addressFromString(getStringValue(n(), h)), "Insurance not set")
50+
51+
52+func v (w) = [IntegerEntry(a, w)]
53+
54+
55+@Callable(w)
56+func initialize (x) = if (p())
57+ then throw("Already initialized")
58+ else [StringEntry(b, x), BooleanEntry(i, true)]
59+
60+
61+
62+@Callable(w)
63+func withdraw (y) = if (if (if (!(o(toString(w.caller))))
64+ then true
65+ else !(p()))
66+ then true
67+ else (y > m()))
68+ then throw(((("Invalid withdraw params " + toString(y)) + " > ") + toString(m())))
69+ else {
70+ let z = invoke(t(), "unlockNeutrino", [y, toBase58String(s())], nil)
71+ if ((z == z))
72+ then (v((m() - y)) ++ [ScriptTransfer(w.caller, y, s())])
73+ else throw("Strict value is not equal to itself.")
74+ }
75+
76+
77+
78+@Callable(w)
79+func deposit () = {
80+ let y = w.payments[0].amount
81+ if (if (if ((w.payments[0].assetId != s()))
82+ then true
83+ else !(p()))
84+ then true
85+ else if (!(o(toString(w.caller))))
86+ then (w.caller != q())
87+ else false)
88+ then throw("Invalid deposit params")
89+ else {
90+ let A = invoke(t(), "lockNeutrino", nil, [AttachedPayment(s(), y)])
91+ if ((A == A))
92+ then v((m() + y))
93+ else throw("Strict value is not equal to itself.")
94+ }
95+ }
96+
97+
98+@Verifier(B)
99+func C () = sigVerify(B.bodyBytes, B.proofs[0], r())
100+

github/deemru/w8io/026f985 
14.58 ms