tx · FW1hAhA72JevgFRHxXdzMkeq7uXPPRU66o9yikbh6ZRQ

3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ:  -0.03400000 Waves

2022.09.13 18:39 [2227519] smart account 3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ > SELF 0.00000000 Waves

{ "type": 13, "id": "FW1hAhA72JevgFRHxXdzMkeq7uXPPRU66o9yikbh6ZRQ", "fee": 3400000, "feeAssetId": null, "timestamp": 1663083632429, "version": 2, "chainId": 84, "sender": "3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ", "senderPublicKey": "Dhf95pPhxwKtWsqgf6tyeDW2xpQA7TvM8nTwbwgqKjkd", "proofs": [ "47RyRFqzkrsrp8eW9kj2nYD5g7nvJ5eoRNaKDbGJmt9JCYgUuVeffk8ymiYUCxe9VtPxNidPyDz9mAu3RZm7iAcK" ], "script": "base64:BgI7CAISAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSBAoCCAgSAwoBCBIECgIICBIDCgEIEgMKAQgUABNrX2luc3VyYW5jZV9hZGRyZXNzAhNrX2luc3VyYW5jZV9hZGRyZXNzAA9rX2FkbWluX2FkZHJlc3MCD2tfYWRtaW5fYWRkcmVzcwASa19hZG1pbl9wdWJsaWNfa2V5AhJrX2FkbWluX3B1YmxpY19rZXkADWtfcXVvdGVfYXNzZXQCDWtfcXVvdGVfYXNzZXQAD2tfcXVvdGVfc3Rha2luZwIPa19xdW90ZV9zdGFraW5nABFrX3N0YWtpbmdfYWRkcmVzcwIRa19zdGFraW5nX2FkZHJlc3MAEWtfZmFybWluZ19hZGRyZXNzAhFrX2Zhcm1pbmdfYWRkcmVzcwAFa19hbW0CBWtfYW1tAAprX2FtbV9kYXRhAgprX2FtbV9kYXRhABJrX2dvdmVybmFuY2VfYXNzZXQCC2tfZ292X2Fzc2V0AA9rX21pbmVyX2FkZHJlc3MCD2tfbWluZXJfYWRkcmVzcwAQa19vcmRlcnNfYWRkcmVzcwIQa19v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aW4BBQFpCQDMCAIJAQtEZWxldGVFbnRyeQEJAQ50b0NvbXBvc2l0ZUtleQIFBWtfYW1tBQtfYW1tQWRkcmVzcwUDbmlsAWkBEnNldEdvdmVybmFuY2VBc3NldAEIX2Fzc2V0SWQJAQt2YWx1ZU9yRWxzZQIJAQdpc0FkbWluAQUBaQQKYXNzZXRCeXRlcwkA2QQBBQhfYXNzZXRJZAQHJG1hdGNoMAkA7AcBBQphc3NldEJ5dGVzAwkAAQIFByRtYXRjaDACBUFzc2V0BAVhc3NldAUHJG1hdGNoMAMJAQIhPQIIBQVhc3NldAhkZWNpbWFscwAICQACAQIjSW52YWxpZCBhc3NldCBkZWNpbWFscywgc2hvdWxkIGJlIDgJAMwIAgkBC1N0cmluZ0VudHJ5AgUSa19nb3Zlcm5hbmNlX2Fzc2V0BQhfYXNzZXRJZAUDbmlsCQACAQIQQ2FuJ3QgZmluZCBhc3NldAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAJANkEAQkBDmFkbWluUHVibGljS2V5ADCKvbY=", "height": 2227519, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6GpdSm4MjnP3ZZpHi4qfvhJL1wsY45JggTu8BNBYS4W1 Next: 6YuFmiUSFBEmNfQHQxzAuCAY3uLhJwncssxx8qm7YS4S Diff:
OldNewDifferences
1313
1414 let f = "k_staking_address"
1515
16-let g = "k_amm"
16+let g = "k_farming_address"
1717
18-let h = "k_amm_data"
18+let h = "k_amm"
1919
20-let i = "k_gov_asset"
20+let i = "k_amm_data"
2121
22-let j = "k_miner_address"
22+let j = "k_gov_asset"
2323
24-let k = "k_orders_address"
24+let k = "k_miner_address"
2525
26-func l (m,n) = ((m + "_") + n)
26+let l = "k_orders_address"
27+
28+let m = "k_referral_address"
29+
30+func n (o,p) = ((o + "_") + p)
2731
2832
29-func o (p) = toString(valueOrErrorMessage(addressFromString(p), (("Can't parse \"" + p) + "\" as address")))
33+func q (r) = toString(valueOrErrorMessage(addressFromString(r), (("Can't parse \"" + r) + "\" as address")))
3034
3135
32-func q () = getStringValue(this, c)
36+func s () = getStringValue(this, c)
3337
3438
35-func r () = (getString(this, b) == unit)
39+func t () = (getString(this, b) == unit)
3640
3741
38-func s () = addressFromStringValue(valueOrErrorMessage(getString(this, b), "Admin not defined"))
42+func u () = addressFromStringValue(valueOrErrorMessage(getString(this, b), "Admin not defined"))
3943
4044
41-func t (u) = if (if (r())
45+func v (w) = if (if (t())
4246 then true
43- else (u.caller == s()))
47+ else (w.caller == u()))
4448 then unit
4549 else throw("Only the Admin itself can invoke this function")
4650
4751
48-func v (u) = if ((u.caller == s()))
52+func x (w) = if ((w.caller == u()))
4953 then unit
5054 else throw("Only the Admin itself can invoke this function")
5155
5256
53-@Callable(u)
54-func setAdmin (w) = valueOrElse(t(u), {
55- let x = fromBase58String(w)
56- let p = addressFromPublicKey(x)
57-[StringEntry(b, toString(p)), StringEntry(c, w)]
57+@Callable(w)
58+func setAdmin (y) = valueOrElse(v(w), {
59+ let z = fromBase58String(y)
60+ let r = addressFromPublicKey(z)
61+[StringEntry(b, toString(r)), StringEntry(c, y)]
5862 })
5963
6064
6165
62-@Callable(u)
63-func setInsuranceFund (y) = valueOrElse(v(u), {
64- let p = o(y)
65-[StringEntry(a, p)]
66+@Callable(w)
67+func setInsuranceFund (A) = valueOrElse(x(w), {
68+ let r = q(A)
69+[StringEntry(a, r)]
6670 })
6771
6872
6973
70-@Callable(u)
71-func setLiquidityMiner (z) = valueOrElse(v(u), {
72- let p = o(z)
73-[StringEntry(j, p)]
74+@Callable(w)
75+func setLiquidityMiner (B) = valueOrElse(x(w), {
76+ let r = q(B)
77+[StringEntry(k, r)]
7478 })
7579
7680
7781
78-@Callable(u)
79-func setOrders (A) = valueOrElse(v(u), {
80- let p = o(A)
81-[StringEntry(k, p)]
82+@Callable(w)
83+func setOrders (C) = valueOrElse(x(w), {
84+ let r = q(C)
85+[StringEntry(l, r)]
8286 })
8387
8488
8589
86-@Callable(u)
87-func setQuoteAsset (B,C) = valueOrElse(v(u), {
88- let D = o(C)
89-[StringEntry(d, B), StringEntry(e, C)]
90+@Callable(w)
91+func setReferral (D) = valueOrElse(x(w), {
92+ let r = q(D)
93+[StringEntry(m, r)]
9094 })
9195
9296
9397
94-@Callable(u)
95-func setStakingAddress (C) = valueOrElse(v(u), {
96- let D = o(C)
97-[StringEntry(f, C)]
98+@Callable(w)
99+func setFarming (E) = valueOrElse(x(w), {
100+ let r = q(E)
101+[StringEntry(g, r)]
98102 })
99103
100104
101105
102-@Callable(u)
103-func addAmm (E,F) = valueOrElse(v(u), {
104- let G = o(E)
105-[BooleanEntry(l(g, E), true), StringEntry(l(h, E), F)]
106+@Callable(w)
107+func setQuoteAsset (F,G) = valueOrElse(x(w), {
108+ let H = q(G)
109+[StringEntry(d, F), StringEntry(e, G)]
106110 })
107111
108112
109113
110-@Callable(u)
111-func removeAmm (E) = valueOrElse(v(u), [DeleteEntry(l(g, E))])
114+@Callable(w)
115+func setStakingAddress (G) = valueOrElse(x(w), {
116+ let H = q(G)
117+[StringEntry(f, G)]
118+ })
112119
113120
114121
115-@Callable(u)
116-func setGovernanceAsset (B) = valueOrElse(v(u), {
117- let H = fromBase58String(B)
118- let I = assetInfo(H)
119- if ($isInstanceOf(I, "Asset"))
122+@Callable(w)
123+func addAmm (I,J) = valueOrElse(x(w), {
124+ let K = q(I)
125+[BooleanEntry(n(h, I), true), StringEntry(n(i, I), J)]
126+ })
127+
128+
129+
130+@Callable(w)
131+func removeAmm (I) = valueOrElse(x(w), [DeleteEntry(n(h, I))])
132+
133+
134+
135+@Callable(w)
136+func setGovernanceAsset (F) = valueOrElse(x(w), {
137+ let L = fromBase58String(F)
138+ let M = assetInfo(L)
139+ if ($isInstanceOf(M, "Asset"))
120140 then {
121- let J = I
122- if ((J.decimals != 8))
141+ let N = M
142+ if ((N.decimals != 8))
123143 then throw("Invalid asset decimals, should be 8")
124- else [StringEntry(i, B)]
144+ else [StringEntry(j, F)]
125145 }
126146 else throw("Can't find asset")
127147 })
128148
129149
130-@Verifier(K)
131-func L () = sigVerify(K.bodyBytes, K.proofs[0], fromBase58String(q()))
150+@Verifier(O)
151+func P () = sigVerify(O.bodyBytes, O.proofs[0], fromBase58String(s()))
132152
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "k_insurance_address"
55
66 let b = "k_admin_address"
77
88 let c = "k_admin_public_key"
99
1010 let d = "k_quote_asset"
1111
1212 let e = "k_quote_staking"
1313
1414 let f = "k_staking_address"
1515
16-let g = "k_amm"
16+let g = "k_farming_address"
1717
18-let h = "k_amm_data"
18+let h = "k_amm"
1919
20-let i = "k_gov_asset"
20+let i = "k_amm_data"
2121
22-let j = "k_miner_address"
22+let j = "k_gov_asset"
2323
24-let k = "k_orders_address"
24+let k = "k_miner_address"
2525
26-func l (m,n) = ((m + "_") + n)
26+let l = "k_orders_address"
27+
28+let m = "k_referral_address"
29+
30+func n (o,p) = ((o + "_") + p)
2731
2832
29-func o (p) = toString(valueOrErrorMessage(addressFromString(p), (("Can't parse \"" + p) + "\" as address")))
33+func q (r) = toString(valueOrErrorMessage(addressFromString(r), (("Can't parse \"" + r) + "\" as address")))
3034
3135
32-func q () = getStringValue(this, c)
36+func s () = getStringValue(this, c)
3337
3438
35-func r () = (getString(this, b) == unit)
39+func t () = (getString(this, b) == unit)
3640
3741
38-func s () = addressFromStringValue(valueOrErrorMessage(getString(this, b), "Admin not defined"))
42+func u () = addressFromStringValue(valueOrErrorMessage(getString(this, b), "Admin not defined"))
3943
4044
41-func t (u) = if (if (r())
45+func v (w) = if (if (t())
4246 then true
43- else (u.caller == s()))
47+ else (w.caller == u()))
4448 then unit
4549 else throw("Only the Admin itself can invoke this function")
4650
4751
48-func v (u) = if ((u.caller == s()))
52+func x (w) = if ((w.caller == u()))
4953 then unit
5054 else throw("Only the Admin itself can invoke this function")
5155
5256
53-@Callable(u)
54-func setAdmin (w) = valueOrElse(t(u), {
55- let x = fromBase58String(w)
56- let p = addressFromPublicKey(x)
57-[StringEntry(b, toString(p)), StringEntry(c, w)]
57+@Callable(w)
58+func setAdmin (y) = valueOrElse(v(w), {
59+ let z = fromBase58String(y)
60+ let r = addressFromPublicKey(z)
61+[StringEntry(b, toString(r)), StringEntry(c, y)]
5862 })
5963
6064
6165
62-@Callable(u)
63-func setInsuranceFund (y) = valueOrElse(v(u), {
64- let p = o(y)
65-[StringEntry(a, p)]
66+@Callable(w)
67+func setInsuranceFund (A) = valueOrElse(x(w), {
68+ let r = q(A)
69+[StringEntry(a, r)]
6670 })
6771
6872
6973
70-@Callable(u)
71-func setLiquidityMiner (z) = valueOrElse(v(u), {
72- let p = o(z)
73-[StringEntry(j, p)]
74+@Callable(w)
75+func setLiquidityMiner (B) = valueOrElse(x(w), {
76+ let r = q(B)
77+[StringEntry(k, r)]
7478 })
7579
7680
7781
78-@Callable(u)
79-func setOrders (A) = valueOrElse(v(u), {
80- let p = o(A)
81-[StringEntry(k, p)]
82+@Callable(w)
83+func setOrders (C) = valueOrElse(x(w), {
84+ let r = q(C)
85+[StringEntry(l, r)]
8286 })
8387
8488
8589
86-@Callable(u)
87-func setQuoteAsset (B,C) = valueOrElse(v(u), {
88- let D = o(C)
89-[StringEntry(d, B), StringEntry(e, C)]
90+@Callable(w)
91+func setReferral (D) = valueOrElse(x(w), {
92+ let r = q(D)
93+[StringEntry(m, r)]
9094 })
9195
9296
9397
94-@Callable(u)
95-func setStakingAddress (C) = valueOrElse(v(u), {
96- let D = o(C)
97-[StringEntry(f, C)]
98+@Callable(w)
99+func setFarming (E) = valueOrElse(x(w), {
100+ let r = q(E)
101+[StringEntry(g, r)]
98102 })
99103
100104
101105
102-@Callable(u)
103-func addAmm (E,F) = valueOrElse(v(u), {
104- let G = o(E)
105-[BooleanEntry(l(g, E), true), StringEntry(l(h, E), F)]
106+@Callable(w)
107+func setQuoteAsset (F,G) = valueOrElse(x(w), {
108+ let H = q(G)
109+[StringEntry(d, F), StringEntry(e, G)]
106110 })
107111
108112
109113
110-@Callable(u)
111-func removeAmm (E) = valueOrElse(v(u), [DeleteEntry(l(g, E))])
114+@Callable(w)
115+func setStakingAddress (G) = valueOrElse(x(w), {
116+ let H = q(G)
117+[StringEntry(f, G)]
118+ })
112119
113120
114121
115-@Callable(u)
116-func setGovernanceAsset (B) = valueOrElse(v(u), {
117- let H = fromBase58String(B)
118- let I = assetInfo(H)
119- if ($isInstanceOf(I, "Asset"))
122+@Callable(w)
123+func addAmm (I,J) = valueOrElse(x(w), {
124+ let K = q(I)
125+[BooleanEntry(n(h, I), true), StringEntry(n(i, I), J)]
126+ })
127+
128+
129+
130+@Callable(w)
131+func removeAmm (I) = valueOrElse(x(w), [DeleteEntry(n(h, I))])
132+
133+
134+
135+@Callable(w)
136+func setGovernanceAsset (F) = valueOrElse(x(w), {
137+ let L = fromBase58String(F)
138+ let M = assetInfo(L)
139+ if ($isInstanceOf(M, "Asset"))
120140 then {
121- let J = I
122- if ((J.decimals != 8))
141+ let N = M
142+ if ((N.decimals != 8))
123143 then throw("Invalid asset decimals, should be 8")
124- else [StringEntry(i, B)]
144+ else [StringEntry(j, F)]
125145 }
126146 else throw("Can't find asset")
127147 })
128148
129149
130-@Verifier(K)
131-func L () = sigVerify(K.bodyBytes, K.proofs[0], fromBase58String(q()))
150+@Verifier(O)
151+func P () = sigVerify(O.bodyBytes, O.proofs[0], fromBase58String(s()))
132152

github/deemru/w8io/169f3d6 
61.19 ms