tx · 7zxS6h2oBwUvdwZ9Gsa2eKoER5E1k8zcach6EouAY3F9

3MqVGFoQ1KKSfET9Dx8Z7qD65ZvdVvNAeg3:  -0.03400000 Waves

2022.08.16 11:49 [2186798] smart account 3MqVGFoQ1KKSfET9Dx8Z7qD65ZvdVvNAeg3 > SELF 0.00000000 Waves

{ "type": 13, "id": "7zxS6h2oBwUvdwZ9Gsa2eKoER5E1k8zcach6EouAY3F9", "fee": 3400000, "feeAssetId": null, "timestamp": 1660639766484, "version": 2, "chainId": 84, "sender": "3MqVGFoQ1KKSfET9Dx8Z7qD65ZvdVvNAeg3", "senderPublicKey": "FKJ9fXdHJJpeg4zpCbtygtWFnLt9s6rSiFyY1QnFWrXi", "proofs": [ "36U1VWDrDT7wJZFAiaD639fitAXzW6GmHg5KNjoyQwvti4WPUPEKXPE38qb5ZdnAqD9idNDjNR4TbxDPCFpPBWjg" ], "script": "base64:BgIsCAISAwoBCBIDCgEIEgMKAQgSBAoCCAgSAwoBCBIECgIICBIDCgEIEgMKAQgRABNrX2luc3VyYW5jZV9hZGRyZXNzAhNrX2luc3VyYW5jZV9hZGRyZXNzAA9rX2FkbWluX2FkZHJlc3MCD2tfYWRtaW5fYWRkcmVzcwASa19hZG1pbl9wdWJsaWNfa2V5AhJrX2FkbWluX3B1YmxpY19rZXkADWtfcXVvdGVfYXNzZXQCDWtfcXVvdGVfYXNzZXQAD2tfcXVvdGVfc3Rha2luZwIPa19xdW90ZV9zdGFraW5nABFrX3N0YWtpbmdfYWRkcmVzcwIRa19zdGFraW5nX2FkZHJlc3MABWtfYW1tAgVrX2FtbQAKa19hbW1fZGF0YQIKa19hbW1fZGF0YQASa19nb3Zlcm5hbmNlX2Fzc2V0AgtrX2dvdl9hc3NldAAPa19taW5lcl9hZGRyZXNzAg9rX21pbmVyX2FkZHJlc3MBDnRvQ29tcG9zaXRlS2V5AgRfa2V5CF9hZGRyZXNzCQCsAgIJAKwCAgUEX2tleQIBXwUIX2FkZHJlc3MBEWdldE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W1tQWRkcmVzcwkBEWdldEFkZHJlc3NJZlZhbGlkAQULX2FtbUFkZHJlc3MJAMwIAgkBDEJvb2xlYW5FbnRyeQIJAQ50b0NvbXBvc2l0ZUtleQIFBWtfYW1tBQtfYW1tQWRkcmVzcwYJAMwIAgkBC1N0cmluZ0VudHJ5AgkBDnRvQ29tcG9zaXRlS2V5AgUKa19hbW1fZGF0YQULX2FtbUFkZHJlc3MFBV9kYXRhBQNuaWwBaQEJcmVtb3ZlQW1tAQtfYW1tQWRkcmVzcwkBC3ZhbHVlT3JFbHNlAgkBB2lzQWRtaW4BBQFpCQDMCAIJAQtEZWxldGVFbnRyeQEJAQ50b0NvbXBvc2l0ZUtleQIFBWtfYW1tBQtfYW1tQWRkcmVzcwUDbmlsAWkBEnNldEdvdmVybmFuY2VBc3NldAEIX2Fzc2V0SWQJAQt2YWx1ZU9yRWxzZQIJAQdpc0FkbWluAQUBaQQKYXNzZXRCeXRlcwkA2QQBBQhfYXNzZXRJZAQHJG1hdGNoMAkA7AcBBQphc3NldEJ5dGVzAwkAAQIFByRtYXRjaDACBUFzc2V0BAVhc3NldAUHJG1hdGNoMAMJAQIhPQIIBQVhc3NldAhkZWNpbWFscwAICQACAQIjSW52YWxpZCBhc3NldCBkZWNpbWFscywgc2hvdWxkIGJlIDgJAMwIAgkBC1N0cmluZ0VudHJ5AgUSa19nb3Zlcm5hbmNlX2Fzc2V0BQhfYXNzZXRJZAUDbmlsCQACAQIQQ2FuJ3QgZmluZCBhc3NldAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAJANkEAQkBDmFkbWluUHVibGljS2V5AKa3jdo=", "height": 2186798, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = "k_insurance_address"
5+
6+let b = "k_admin_address"
7+
8+let c = "k_admin_public_key"
9+
10+let d = "k_quote_asset"
11+
12+let e = "k_quote_staking"
13+
14+let f = "k_staking_address"
15+
16+let g = "k_amm"
17+
18+let h = "k_amm_data"
19+
20+let i = "k_gov_asset"
21+
22+let j = "k_miner_address"
23+
24+func k (l,m) = ((l + "_") + m)
25+
26+
27+func n (o) = toString(valueOrErrorMessage(addressFromString(o), (("Can't parse \"" + o) + "\" as address")))
28+
29+
30+func p () = getStringValue(this, c)
31+
32+
33+func q () = (getString(this, b) == unit)
34+
35+
36+func r () = addressFromStringValue(valueOrErrorMessage(getString(this, b), "Admin not defined"))
37+
38+
39+func s (t) = if (if (q())
40+ then true
41+ else (t.caller == r()))
42+ then unit
43+ else throw("Only the Admin itself can invoke this function")
44+
45+
46+func u (t) = if ((t.caller == r()))
47+ then unit
48+ else throw("Only the Admin itself can invoke this function")
49+
50+
51+@Callable(t)
52+func setAdmin (v) = valueOrElse(s(t), {
53+ let w = fromBase58String(v)
54+ let o = addressFromPublicKey(w)
55+[StringEntry(b, toString(o)), StringEntry(c, v)]
56+ })
57+
58+
59+
60+@Callable(t)
61+func setInsuranceFund (x) = valueOrElse(u(t), {
62+ let o = n(x)
63+[StringEntry(a, o)]
64+ })
65+
66+
67+
68+@Callable(t)
69+func setLiquidityMiner (y) = valueOrElse(u(t), {
70+ let o = n(y)
71+[StringEntry(j, o)]
72+ })
73+
74+
75+
76+@Callable(t)
77+func setQuoteAsset (z,A) = valueOrElse(u(t), {
78+ let B = n(A)
79+[StringEntry(d, z), StringEntry(e, A)]
80+ })
81+
82+
83+
84+@Callable(t)
85+func setStakingAddress (A) = valueOrElse(u(t), {
86+ let B = n(A)
87+[StringEntry(f, A)]
88+ })
89+
90+
91+
92+@Callable(t)
93+func addAmm (C,D) = valueOrElse(u(t), {
94+ let E = n(C)
95+[BooleanEntry(k(g, C), true), StringEntry(k(h, C), D)]
96+ })
97+
98+
99+
100+@Callable(t)
101+func removeAmm (C) = valueOrElse(u(t), [DeleteEntry(k(g, C))])
102+
103+
104+
105+@Callable(t)
106+func setGovernanceAsset (z) = valueOrElse(u(t), {
107+ let F = fromBase58String(z)
108+ let G = assetInfo(F)
109+ if ($isInstanceOf(G, "Asset"))
110+ then {
111+ let H = G
112+ if ((H.decimals != 8))
113+ then throw("Invalid asset decimals, should be 8")
114+ else [StringEntry(i, z)]
115+ }
116+ else throw("Can't find asset")
117+ })
118+
119+
120+@Verifier(I)
121+func J () = sigVerify(I.bodyBytes, I.proofs[0], fromBase58String(p()))
122+

github/deemru/w8io/169f3d6 
13.57 ms