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