tx · 85iKRZVSPmoyb4Z1JMrvgD8HC6xeHk3Bf1gkbiaiimtf

3N19jxhEYkphA6vga9hXTPsU5YfRMR27YoE:  -0.04000000 Waves

2022.05.04 22:28 [2037366] smart account 3N19jxhEYkphA6vga9hXTPsU5YfRMR27YoE > SELF 0.00000000 Waves

{ "type": 13, "id": "85iKRZVSPmoyb4Z1JMrvgD8HC6xeHk3Bf1gkbiaiimtf", "fee": 4000000, "feeAssetId": null, "timestamp": 1651692601627, "version": 2, "chainId": 84, "sender": "3N19jxhEYkphA6vga9hXTPsU5YfRMR27YoE", "senderPublicKey": "B3JNxLE1zmVDjs6MqSA1d3N7V6dS5Rq2wvxZqqVHo1fK", "proofs": [ "4FmfkXcMMs1AXSjFQsc5zxWjtJaTMwkusTvDp9S1T8gX3APTuzBSb6gBWySYf5s4mnFh7f2AJB9YNmWu4QjbugUf" ], "script": "base64:AAIFAAAAAAAAACQIAhIDCgEIEggKBggICAgICBIDCgEEEgcKBQgICAgIEgMKAQgAAAASAAAAAARtYWluAgAAAAptYWluX2Fzc2V0AAAAAAFsAgAAAAlscF9hc3NldF8AAAAAAmExAgAAAAxzd2FwX2Fzc2V0MV8AAAAAAnN0AgAAAA9hZGRyZXNzX3N0YWtlcl8AAAAAA3NzdAIAAAANYWRkcmVzc19wb29sXwAAAAADc3dwAgAAAA1hZGRyZXNzX3N3YXBfAAAAAAJhMgIAAAAMc3dhcF9hc3NldDJfAAAAAANhYTECAAAAB3Bvb2xfMV8AAAAAA2FhMgIAAAAHcG9vbF8yXwAAAAADc3QxAgAAAA5zdGFrZXJfYWRkcmVzcwAAAAAEdHlwZQIAAAAFdHlwZV8AAAAACWxlYXNlUG9vbAkBAAAAB0FkZHJlc3MAAAABCAUAAAAEdGhpcwAAAAVieXRlcwAAAAACc2ECAAAAD1NUQUtJTkdfQU1PVU5UXwAAAAACbGECAAAADUxFQVNFX0FNT1VOVF8AAAAAAml4AgAAAANJRF8AAAAADGV4Y2hhbmdlUmF0ZQAAAA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lbGV0ZUVudHJ5AAAAAQkAASwAAAACBQAAAAJhMQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAIFAAAAAmEyBQAAAAdhZGRyZXNzBQAAAANuaWwFAAAACWRlbGV0RW50eQQAAAAHYmJlbnRyeQkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAAEsAAAAAgIAAAAFUE9PTF8FAAAABFBNQUEJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACAgAAAAlscF9hc3NldF8FAAAABFBNQUEJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACBQAAAANhYTEFAAAAB2FkZHJlc3MJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACBQAAAANhYTIFAAAAB2FkZHJlc3MJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACBQAAAAR0eXBlBQAAAAdhZGRyZXNzBQAAAANuaWwFAAAAB2JiZW50cnkJAAACAAAAAQIAAAAuT25seSB0aGUgQWRtaW4gaXRzZWxmIGNhbiBpbnZva2UgdGhpcyBmdW5jdGlvbgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleRVVlK8=", "height": 2037366, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: eqbcHuimumrFQy33VSYmh2ENB5VF31jmJac5miPvo4Y Next: none Diff:
OldNewDifferences
5959 then throw("The pool has been previously added.")
6060 else if ((w == C))
6161 then throw("Pool address cannot be the same as staker")
62- else [StringEntry(r, x), StringEntry(("POOL_" + x), C), StringEntry((b + x), D), StringEntry((h + r), E), StringEntry((i + r), F), StringEntry((k + r), "pools")]
62+ else if ((E == F))
63+ then throw("Asset1 cannot be equal to Asset2 and vice versa")
64+ else [StringEntry(r, x), StringEntry(("POOL_" + x), C), StringEntry((b + x), D), StringEntry((h + r), E), StringEntry((i + r), F), StringEntry((k + r), "pools")]
6365 else throw("Only the Admin itself can invoke this function")
6466 }
6567
7375
7476
7577 @Callable(u)
76-func addSwap (w,z,x,E,F) = {
78+func addSwap (w,z,x,A,B) = {
7779 let r = q(w)
7880 let C = q(z)
7981 let G = getString(this, r)
82+ let E = s(A)
83+ let F = s(B)
8084 if ((u.caller == this))
8185 then if (isDefined(G))
8286 then throw("The address for this swap has been previously added.")
8387 else if ((w == C))
8488 then throw("Swap address cannot be the same as staker")
85- else [StringEntry(("swap_" + x), C), StringEntry(r, x), StringEntry((c + r), E), StringEntry((g + r), F), StringEntry((k + r), "swap")]
89+ else if ((E == F))
90+ then throw("Asset1 cannot be equal to Asset2 and vice versa")
91+ else [StringEntry(("swap_" + x), C), StringEntry(r, x), StringEntry((c + r), E), StringEntry((g + r), F), StringEntry((k + r), "swap")]
8692 else throw("Only the Admin itself can invoke this function")
8793 }
8894
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "main_asset"
55
66 let b = "lp_asset_"
77
88 let c = "swap_asset1_"
99
1010 let d = "address_staker_"
1111
1212 let e = "address_pool_"
1313
1414 let f = "address_swap_"
1515
1616 let g = "swap_asset2_"
1717
1818 let h = "pool_1_"
1919
2020 let i = "pool_2_"
2121
2222 let j = "staker_address"
2323
2424 let k = "type_"
2525
2626 let l = Address(this.bytes)
2727
2828 let m = "STAKING_AMOUNT_"
2929
3030 let n = "LEASE_AMOUNT_"
3131
3232 let o = "ID_"
3333
3434 let p = 5
3535
3636 func q (r) = toString(valueOrErrorMessage(addressFromString(r), (("Can't parse " + r) + " as address")))
3737
3838
3939 func s (t) = toBase58String(valueOrErrorMessage(value(assetInfo(fromBase58String(t))).id, (("Asset Id: " + t) + " is invalid.")))
4040
4141
4242 @Callable(u)
4343 func addMainAsset (v) = if ((u.caller == this))
4444 then [StringEntry(a, v)]
4545 else throw("Only the Admin itself can invoke this function")
4646
4747
4848
4949 @Callable(u)
5050 func addPool (w,x,y,z,A,B) = {
5151 let r = q(w)
5252 let C = q(z)
5353 let D = s(y)
5454 let E = s(A)
5555 let F = s(B)
5656 let G = getString(this, r)
5757 if ((u.caller == this))
5858 then if (isDefined(G))
5959 then throw("The pool has been previously added.")
6060 else if ((w == C))
6161 then throw("Pool address cannot be the same as staker")
62- else [StringEntry(r, x), StringEntry(("POOL_" + x), C), StringEntry((b + x), D), StringEntry((h + r), E), StringEntry((i + r), F), StringEntry((k + r), "pools")]
62+ else if ((E == F))
63+ then throw("Asset1 cannot be equal to Asset2 and vice versa")
64+ else [StringEntry(r, x), StringEntry(("POOL_" + x), C), StringEntry((b + x), D), StringEntry((h + r), E), StringEntry((i + r), F), StringEntry((k + r), "pools")]
6365 else throw("Only the Admin itself can invoke this function")
6466 }
6567
6668
6769
6870 @Callable(u)
6971 func activate (H) = if ((u.caller == this))
7072 then [BooleanEntry("activate", H)]
7173 else throw("Only the Admin itself can invoke this function")
7274
7375
7476
7577 @Callable(u)
76-func addSwap (w,z,x,E,F) = {
78+func addSwap (w,z,x,A,B) = {
7779 let r = q(w)
7880 let C = q(z)
7981 let G = getString(this, r)
82+ let E = s(A)
83+ let F = s(B)
8084 if ((u.caller == this))
8185 then if (isDefined(G))
8286 then throw("The address for this swap has been previously added.")
8387 else if ((w == C))
8488 then throw("Swap address cannot be the same as staker")
85- else [StringEntry(("swap_" + x), C), StringEntry(r, x), StringEntry((c + r), E), StringEntry((g + r), F), StringEntry((k + r), "swap")]
89+ else if ((E == F))
90+ then throw("Asset1 cannot be equal to Asset2 and vice versa")
91+ else [StringEntry(("swap_" + x), C), StringEntry(r, x), StringEntry((c + r), E), StringEntry((g + r), F), StringEntry((k + r), "swap")]
8692 else throw("Only the Admin itself can invoke this function")
8793 }
8894
8995
9096
9197 @Callable(u)
9298 func removeSwapOrPool (r) = {
9399 let I = getStringValue(this, (k + r))
94100 let G = getStringValue(this, r)
95101 if ((u.caller == this))
96102 then if ((I == "swap"))
97103 then {
98104 let J = [DeleteEntry(("swap_" + G)), DeleteEntry(r), DeleteEntry((k + r)), DeleteEntry((c + r)), DeleteEntry((g + r))]
99105 J
100106 }
101107 else {
102108 let K = [DeleteEntry(r), DeleteEntry(("POOL_" + G)), DeleteEntry(("lp_asset_" + G)), DeleteEntry((h + r)), DeleteEntry((i + r)), DeleteEntry((k + r))]
103109 K
104110 }
105111 else throw("Only the Admin itself can invoke this function")
106112 }
107113
108114
109115 @Verifier(L)
110116 func M () = {
111117 let N = L
112118 sigVerify(L.bodyBytes, L.proofs[0], L.senderPublicKey)
113119 }
114120

github/deemru/w8io/169f3d6 
59.27 ms