tx · CeQPQaBQd7hjzM3KaMRDNbfVtX5KJfnhWRfUnJ6qzrSo

3MzdomR4UkWKtVXq6YGouPJsYXDunjCvSJ8:  -0.03200000 Waves

2022.07.01 19:34 [2120830] smart account 3MzdomR4UkWKtVXq6YGouPJsYXDunjCvSJ8 > SELF 0.00000000 Waves

{ "type": 13, "id": "CeQPQaBQd7hjzM3KaMRDNbfVtX5KJfnhWRfUnJ6qzrSo", "fee": 3200000, "feeAssetId": null, "timestamp": 1656693327696, "version": 2, "chainId": 84, "sender": "3MzdomR4UkWKtVXq6YGouPJsYXDunjCvSJ8", "senderPublicKey": "HjRpGGPsru1jMvZDVG83rQfzQRHCWNnrpMaqTpHogxyn", "proofs": [ "RAXakkmLddD6obeLtYaBnEFa7ss2h7txqezM3jQUx3hL3wWXEEq7AtyH9L7WV4zhbAgLWzcDDievzFPuMjCgomN" ], "script": "base64:AAIFAAAAAAAAACcIAhIDCgEIEgMKAQgSBAoCCAgSAwoBCBIECgIICBIDCgEIEgMKAQgAAAAQAAAAABNrX2luc3VyYW5jZV9hZGRyZXNzAgAAABNrX2luc3VyYW5jZV9hZGRyZXNzAAAAAA9rX2FkbWluX2FkZHJlc3MCAAAAD2tfYWRtaW5fYWRkcmVzcwAAAAASa19hZG1pbl9wdWJsaWNfa2V5AgAAABJrX2FkbWluX3B1YmxpY19rZXkAAAAADWtfcXVvdGVfYXNzZXQCAAAADWtfcXVvdGVfYXNzZXQAAAAAD2tfcXVvdGVfc3Rha2luZwIAAAAPa19xdW90ZV9zdGFraW5nAAAAABFrX3N0YWtpbmdfYWRkcmVzcwIAAAARa19zdGFraW5nX2FkZHJlc3MAAAAABWtfYW1tAgAAAAVrX2FtbQAAAAAKa19hbW1fZGF0YQIAAAAKa19hbW1fZGF0YQAAAAASa19nb3Zlcm5hbmNlX2Fzc2V0AgAAAAtrX2dvdl9hc3NldAEAAAAOdG9Db21wb3NpdGVLZXkAAAACAAAABF9rZXkAAAAIX2FkZHJlc3MJAAEsAAAAA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zZXRJZAkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkBAAAAB2lzQWRtaW4AAAABBQAAAAFpBAAAAAphc3NldEJ5dGVzCQACWQAAAAEFAAAACF9hc3NldElkBAAAAAckbWF0Y2gwCQAD7AAAAAEFAAAACmFzc2V0Qnl0ZXMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABUFzc2V0BAAAAAVhc3NldAUAAAAHJG1hdGNoMAMJAQAAAAIhPQAAAAIIBQAAAAVhc3NldAAAAAhkZWNpbWFscwAAAAAAAAAACAkAAAIAAAABAgAAACNJbnZhbGlkIGFzc2V0IGRlY2ltYWxzLCBzaG91bGQgYmUgOAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACBQAAABJrX2dvdmVybmFuY2VfYXNzZXQFAAAACF9hc3NldElkBQAAAANuaWwJAAACAAAAAQIAAAAQQ2FuJ3QgZmluZCBhc3NldAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACQACWQAAAAEJAQAAAA5hZG1pblB1YmxpY0tleQAAAACoMat9", "height": 2120830, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2vRwoQV5TVTjBsFg5pF9EckMGnEnvsxLqVDSvKAhZNdZ Next: DS2NAq89AD9G1GiwvHTHruxb8Ru4ymHHeZx2ioB6hPth Diff:
OldNewDifferences
100100 then {
101101 let F = E
102102 if ((F.decimals != 8))
103- then throw("Invalid asset decimals, shoul be 8")
103+ then throw("Invalid asset decimals, should be 8")
104104 else [StringEntry(i, x)]
105105 }
106106 else throw("Can't find asset")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
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
1616 let g = "k_amm"
1717
1818 let h = "k_amm_data"
1919
2020 let i = "k_gov_asset"
2121
2222 func j (k,l) = ((k + "_") + l)
2323
2424
2525 func m (n) = toString(valueOrErrorMessage(addressFromString(n), (("Can't parse \"" + n) + "\" as address")))
2626
2727
2828 func o () = getStringValue(this, c)
2929
3030
3131 func p () = (getString(this, b) == unit)
3232
3333
3434 func q () = addressFromStringValue(valueOrErrorMessage(getString(this, b), "Admin not defined"))
3535
3636
3737 func r (s) = if (if (p())
3838 then true
3939 else (s.caller == q()))
4040 then unit
4141 else throw("Only the Admin itself can invoke this function")
4242
4343
4444 func t (s) = if ((s.caller == q()))
4545 then unit
4646 else throw("Only the Admin itself can invoke this function")
4747
4848
4949 @Callable(s)
5050 func setAdmin (u) = valueOrElse(r(s), {
5151 let v = fromBase58String(u)
5252 let n = addressFromPublicKey(v)
5353 [StringEntry(b, toString(n)), StringEntry(c, u)]
5454 })
5555
5656
5757
5858 @Callable(s)
5959 func setInsuranceFund (w) = valueOrElse(t(s), {
6060 let n = m(w)
6161 [StringEntry(a, n)]
6262 })
6363
6464
6565
6666 @Callable(s)
6767 func setQuoteAsset (x,y) = valueOrElse(t(s), {
6868 let z = m(y)
6969 [StringEntry(d, x), StringEntry(e, y)]
7070 })
7171
7272
7373
7474 @Callable(s)
7575 func setStakingAddress (y) = valueOrElse(t(s), {
7676 let z = m(y)
7777 [StringEntry(f, y)]
7878 })
7979
8080
8181
8282 @Callable(s)
8383 func addAmm (A,B) = valueOrElse(t(s), {
8484 let C = m(A)
8585 [BooleanEntry(j(g, A), true), StringEntry(j(h, A), B)]
8686 })
8787
8888
8989
9090 @Callable(s)
9191 func removeAmm (A) = valueOrElse(t(s), [DeleteEntry(j(g, A))])
9292
9393
9494
9595 @Callable(s)
9696 func setGovernanceAsset (x) = valueOrElse(t(s), {
9797 let D = fromBase58String(x)
9898 let E = assetInfo(D)
9999 if ($isInstanceOf(E, "Asset"))
100100 then {
101101 let F = E
102102 if ((F.decimals != 8))
103- then throw("Invalid asset decimals, shoul be 8")
103+ then throw("Invalid asset decimals, should be 8")
104104 else [StringEntry(i, x)]
105105 }
106106 else throw("Can't find asset")
107107 })
108108
109109
110110 @Verifier(G)
111111 func H () = sigVerify(G.bodyBytes, G.proofs[0], fromBase58String(o()))
112112

github/deemru/w8io/169f3d6 
60.07 ms