tx · eqbcHuimumrFQy33VSYmh2ENB5VF31jmJac5miPvo4Y
3N19jxhEYkphA6vga9hXTPsU5YfRMR27YoE: -0.04000000 Waves
2022.05.04 22:24 [2037362] smart account 3N19jxhEYkphA6vga9hXTPsU5YfRMR27YoE > SELF 0.00000000 Waves
{
"type": 13,
"id": "eqbcHuimumrFQy33VSYmh2ENB5VF31jmJac5miPvo4Y",
"fee": 4000000,
"feeAssetId": null,
"timestamp": 1651692319503,
"version": 2,
"chainId": 84,
"sender": "3N19jxhEYkphA6vga9hXTPsU5YfRMR27YoE",
"senderPublicKey": "B3JNxLE1zmVDjs6MqSA1d3N7V6dS5Rq2wvxZqqVHo1fK",
"proofs": [
"wPhXqXVchBdp5Uyp3TRtQFmWePKANzi4QGnthcm4pWEr1Z9MezqbJCBxKTx2uZP2hg3x1WfKT2YTXhF3qtxKuYR"
],
"script": "base64:AAIFAAAAAAAAACQIAhIDCgEIEggKBggICAgICBIDCgEEEgcKBQgICAgIEgMKAQgAAAASAAAAAARtYWluAgAAAAptYWluX2Fzc2V0AAAAAAFsAgAAAAlscF9hc3NldF8AAAAAAmExAgAAAAxzd2FwX2Fzc2V0MV8AAAAAAnN0AgAAAA9hZGRyZXNzX3N0YWtlcl8AAAAAA3NzdAIAAAANYWRkcmVzc19wb29sXwAAAAADc3dwAgAAAA1hZGRyZXNzX3N3YXBfAAAAAAJhMgIAAAAMc3dhcF9hc3NldDJfAAAAAANhYTECAAAAB3Bvb2xfMV8AAAAAA2FhMgIAAAAHcG9vbF8yXwAAAAADc3QxAgAAAA5zdGFrZXJfYWRkcmVzcwAAAAAEdHlwZQIAAAAFdHlwZV8AAAAACWxlYXNlUG9vbAkBAAAAB0FkZHJlc3MAAAABCAUAAAAEdGhpcwAAAAVieXRlcwAAAAACc2ECAAAAD1NUQUtJTkdfQU1PVU5UXwAAAAACbGECAAAADUxFQVNFX0FNT1VOVF8AAAAAAml4AgAAAANJRF8AAAAADGV4Y2hhbmdlUmF0ZQAAAAAAAA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AAALRGVsZXRlRW50cnkAAAABCQABLAAAAAIFAAAAA2FhMQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAIFAAAAA2FhMgUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAIFAAAABHR5cGUFAAAAB2FkZHJlc3MFAAAAA25pbAUAAAAHYmJlbnRyeQkAAAIAAAABAgAAAC5Pbmx5IHRoZSBBZG1pbiBpdHNlbGYgY2FuIGludm9rZSB0aGlzIGZ1bmN0aW9uAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V58PzLWQ==",
"height": 2037362,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: FojiDjck3sVZ4wKiy9Fef5RrU23FVGP6javx8ahypcai
Next: 85iKRZVSPmoyb4Z1JMrvgD8HC6xeHk3Bf1gkbiaiimtf
Diff:
Old | New | | Differences |
---|
36 | 36 | | func q (r) = toString(valueOrErrorMessage(addressFromString(r), (("Can't parse " + r) + " as address"))) |
---|
37 | 37 | | |
---|
38 | 38 | | |
---|
39 | | - | @Callable(s) |
---|
40 | | - | func addMainAsset (t) = if ((s.caller == this)) |
---|
41 | | - | then [StringEntry(a, t)] |
---|
| 39 | + | func s (t) = toBase58String(valueOrErrorMessage(value(assetInfo(fromBase58String(t))).id, (("Asset Id: " + t) + " is invalid."))) |
---|
| 40 | + | |
---|
| 41 | + | |
---|
| 42 | + | @Callable(u) |
---|
| 43 | + | func addMainAsset (v) = if ((u.caller == this)) |
---|
| 44 | + | then [StringEntry(a, v)] |
---|
42 | 45 | | else throw("Only the Admin itself can invoke this function") |
---|
43 | 46 | | |
---|
44 | 47 | | |
---|
45 | 48 | | |
---|
46 | | - | @Callable(s) |
---|
47 | | - | func addPool (u,v,w,x,y,z) = { |
---|
48 | | - | let r = q(u) |
---|
49 | | - | let A = q(x) |
---|
50 | | - | let B = getString(this, r) |
---|
51 | | - | if ((s.caller == this)) |
---|
52 | | - | then if (isDefined(B)) |
---|
| 49 | + | @Callable(u) |
---|
| 50 | + | func addPool (w,x,y,z,A,B) = { |
---|
| 51 | + | let r = q(w) |
---|
| 52 | + | let C = q(z) |
---|
| 53 | + | let D = s(y) |
---|
| 54 | + | let E = s(A) |
---|
| 55 | + | let F = s(B) |
---|
| 56 | + | let G = getString(this, r) |
---|
| 57 | + | if ((u.caller == this)) |
---|
| 58 | + | then if (isDefined(G)) |
---|
53 | 59 | | then throw("The pool has been previously added.") |
---|
54 | | - | else if ((u == A)) |
---|
| 60 | + | else if ((w == C)) |
---|
55 | 61 | | then throw("Pool address cannot be the same as staker") |
---|
56 | | - | else [StringEntry(r, v), StringEntry(("POOL_" + v), A), StringEntry((b + v), w), StringEntry((h + r), y), StringEntry((i + r), z), StringEntry((k + r), "pools")] |
---|
| 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")] |
---|
57 | 63 | | else throw("Only the Admin itself can invoke this function") |
---|
58 | 64 | | } |
---|
59 | 65 | | |
---|
60 | 66 | | |
---|
61 | 67 | | |
---|
62 | | - | @Callable(s) |
---|
63 | | - | func activate (C) = if ((s.caller == this)) |
---|
64 | | - | then [BooleanEntry("activate", C)] |
---|
| 68 | + | @Callable(u) |
---|
| 69 | + | func activate (H) = if ((u.caller == this)) |
---|
| 70 | + | then [BooleanEntry("activate", H)] |
---|
65 | 71 | | else throw("Only the Admin itself can invoke this function") |
---|
66 | 72 | | |
---|
67 | 73 | | |
---|
68 | 74 | | |
---|
69 | | - | @Callable(s) |
---|
70 | | - | func addSwap (u,x,v,y,z) = { |
---|
71 | | - | let r = q(u) |
---|
72 | | - | let A = q(x) |
---|
73 | | - | let B = getString(this, r) |
---|
74 | | - | if ((s.caller == this)) |
---|
75 | | - | then if (isDefined(B)) |
---|
| 75 | + | @Callable(u) |
---|
| 76 | + | func addSwap (w,z,x,E,F) = { |
---|
| 77 | + | let r = q(w) |
---|
| 78 | + | let C = q(z) |
---|
| 79 | + | let G = getString(this, r) |
---|
| 80 | + | if ((u.caller == this)) |
---|
| 81 | + | then if (isDefined(G)) |
---|
76 | 82 | | then throw("The address for this swap has been previously added.") |
---|
77 | | - | else if ((u == A)) |
---|
| 83 | + | else if ((w == C)) |
---|
78 | 84 | | then throw("Swap address cannot be the same as staker") |
---|
79 | | - | else [StringEntry(("swap_" + v), A), StringEntry(r, v), StringEntry((c + r), y), StringEntry((g + r), z), StringEntry((k + r), "swap")] |
---|
| 85 | + | else [StringEntry(("swap_" + x), C), StringEntry(r, x), StringEntry((c + r), E), StringEntry((g + r), F), StringEntry((k + r), "swap")] |
---|
80 | 86 | | else throw("Only the Admin itself can invoke this function") |
---|
81 | 87 | | } |
---|
82 | 88 | | |
---|
83 | 89 | | |
---|
84 | 90 | | |
---|
85 | | - | @Callable(s) |
---|
| 91 | + | @Callable(u) |
---|
86 | 92 | | func removeSwapOrPool (r) = { |
---|
87 | | - | let D = getStringValue(this, (k + r)) |
---|
88 | | - | let B = getStringValue(this, r) |
---|
89 | | - | if ((s.caller == this)) |
---|
90 | | - | then if ((D == "swap")) |
---|
| 93 | + | let I = getStringValue(this, (k + r)) |
---|
| 94 | + | let G = getStringValue(this, r) |
---|
| 95 | + | if ((u.caller == this)) |
---|
| 96 | + | then if ((I == "swap")) |
---|
91 | 97 | | then { |
---|
92 | | - | let E = [DeleteEntry(("swap_" + B)), DeleteEntry(r), DeleteEntry((k + r)), DeleteEntry((c + r)), DeleteEntry((g + r))] |
---|
93 | | - | E |
---|
| 98 | + | let J = [DeleteEntry(("swap_" + G)), DeleteEntry(r), DeleteEntry((k + r)), DeleteEntry((c + r)), DeleteEntry((g + r))] |
---|
| 99 | + | J |
---|
94 | 100 | | } |
---|
95 | 101 | | else { |
---|
96 | | - | let F = [DeleteEntry(r), DeleteEntry(("POOL_" + B)), DeleteEntry(("lp_asset_" + B)), DeleteEntry((h + r)), DeleteEntry((i + r)), DeleteEntry((k + r))] |
---|
97 | | - | F |
---|
| 102 | + | let K = [DeleteEntry(r), DeleteEntry(("POOL_" + G)), DeleteEntry(("lp_asset_" + G)), DeleteEntry((h + r)), DeleteEntry((i + r)), DeleteEntry((k + r))] |
---|
| 103 | + | K |
---|
98 | 104 | | } |
---|
99 | 105 | | else throw("Only the Admin itself can invoke this function") |
---|
100 | 106 | | } |
---|
101 | 107 | | |
---|
102 | 108 | | |
---|
103 | | - | @Verifier(G) |
---|
104 | | - | func H () = { |
---|
105 | | - | let I = G |
---|
106 | | - | sigVerify(G.bodyBytes, G.proofs[0], G.senderPublicKey) |
---|
| 109 | + | @Verifier(L) |
---|
| 110 | + | func M () = { |
---|
| 111 | + | let N = L |
---|
| 112 | + | sigVerify(L.bodyBytes, L.proofs[0], L.senderPublicKey) |
---|
107 | 113 | | } |
---|
108 | 114 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = "main_asset" |
---|
5 | 5 | | |
---|
6 | 6 | | let b = "lp_asset_" |
---|
7 | 7 | | |
---|
8 | 8 | | let c = "swap_asset1_" |
---|
9 | 9 | | |
---|
10 | 10 | | let d = "address_staker_" |
---|
11 | 11 | | |
---|
12 | 12 | | let e = "address_pool_" |
---|
13 | 13 | | |
---|
14 | 14 | | let f = "address_swap_" |
---|
15 | 15 | | |
---|
16 | 16 | | let g = "swap_asset2_" |
---|
17 | 17 | | |
---|
18 | 18 | | let h = "pool_1_" |
---|
19 | 19 | | |
---|
20 | 20 | | let i = "pool_2_" |
---|
21 | 21 | | |
---|
22 | 22 | | let j = "staker_address" |
---|
23 | 23 | | |
---|
24 | 24 | | let k = "type_" |
---|
25 | 25 | | |
---|
26 | 26 | | let l = Address(this.bytes) |
---|
27 | 27 | | |
---|
28 | 28 | | let m = "STAKING_AMOUNT_" |
---|
29 | 29 | | |
---|
30 | 30 | | let n = "LEASE_AMOUNT_" |
---|
31 | 31 | | |
---|
32 | 32 | | let o = "ID_" |
---|
33 | 33 | | |
---|
34 | 34 | | let p = 5 |
---|
35 | 35 | | |
---|
36 | 36 | | func q (r) = toString(valueOrErrorMessage(addressFromString(r), (("Can't parse " + r) + " as address"))) |
---|
37 | 37 | | |
---|
38 | 38 | | |
---|
39 | | - | @Callable(s) |
---|
40 | | - | func addMainAsset (t) = if ((s.caller == this)) |
---|
41 | | - | then [StringEntry(a, t)] |
---|
| 39 | + | func s (t) = toBase58String(valueOrErrorMessage(value(assetInfo(fromBase58String(t))).id, (("Asset Id: " + t) + " is invalid."))) |
---|
| 40 | + | |
---|
| 41 | + | |
---|
| 42 | + | @Callable(u) |
---|
| 43 | + | func addMainAsset (v) = if ((u.caller == this)) |
---|
| 44 | + | then [StringEntry(a, v)] |
---|
42 | 45 | | else throw("Only the Admin itself can invoke this function") |
---|
43 | 46 | | |
---|
44 | 47 | | |
---|
45 | 48 | | |
---|
46 | | - | @Callable(s) |
---|
47 | | - | func addPool (u,v,w,x,y,z) = { |
---|
48 | | - | let r = q(u) |
---|
49 | | - | let A = q(x) |
---|
50 | | - | let B = getString(this, r) |
---|
51 | | - | if ((s.caller == this)) |
---|
52 | | - | then if (isDefined(B)) |
---|
| 49 | + | @Callable(u) |
---|
| 50 | + | func addPool (w,x,y,z,A,B) = { |
---|
| 51 | + | let r = q(w) |
---|
| 52 | + | let C = q(z) |
---|
| 53 | + | let D = s(y) |
---|
| 54 | + | let E = s(A) |
---|
| 55 | + | let F = s(B) |
---|
| 56 | + | let G = getString(this, r) |
---|
| 57 | + | if ((u.caller == this)) |
---|
| 58 | + | then if (isDefined(G)) |
---|
53 | 59 | | then throw("The pool has been previously added.") |
---|
54 | | - | else if ((u == A)) |
---|
| 60 | + | else if ((w == C)) |
---|
55 | 61 | | then throw("Pool address cannot be the same as staker") |
---|
56 | | - | else [StringEntry(r, v), StringEntry(("POOL_" + v), A), StringEntry((b + v), w), StringEntry((h + r), y), StringEntry((i + r), z), StringEntry((k + r), "pools")] |
---|
| 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")] |
---|
57 | 63 | | else throw("Only the Admin itself can invoke this function") |
---|
58 | 64 | | } |
---|
59 | 65 | | |
---|
60 | 66 | | |
---|
61 | 67 | | |
---|
62 | | - | @Callable(s) |
---|
63 | | - | func activate (C) = if ((s.caller == this)) |
---|
64 | | - | then [BooleanEntry("activate", C)] |
---|
| 68 | + | @Callable(u) |
---|
| 69 | + | func activate (H) = if ((u.caller == this)) |
---|
| 70 | + | then [BooleanEntry("activate", H)] |
---|
65 | 71 | | else throw("Only the Admin itself can invoke this function") |
---|
66 | 72 | | |
---|
67 | 73 | | |
---|
68 | 74 | | |
---|
69 | | - | @Callable(s) |
---|
70 | | - | func addSwap (u,x,v,y,z) = { |
---|
71 | | - | let r = q(u) |
---|
72 | | - | let A = q(x) |
---|
73 | | - | let B = getString(this, r) |
---|
74 | | - | if ((s.caller == this)) |
---|
75 | | - | then if (isDefined(B)) |
---|
| 75 | + | @Callable(u) |
---|
| 76 | + | func addSwap (w,z,x,E,F) = { |
---|
| 77 | + | let r = q(w) |
---|
| 78 | + | let C = q(z) |
---|
| 79 | + | let G = getString(this, r) |
---|
| 80 | + | if ((u.caller == this)) |
---|
| 81 | + | then if (isDefined(G)) |
---|
76 | 82 | | then throw("The address for this swap has been previously added.") |
---|
77 | | - | else if ((u == A)) |
---|
| 83 | + | else if ((w == C)) |
---|
78 | 84 | | then throw("Swap address cannot be the same as staker") |
---|
79 | | - | else [StringEntry(("swap_" + v), A), StringEntry(r, v), StringEntry((c + r), y), StringEntry((g + r), z), StringEntry((k + r), "swap")] |
---|
| 85 | + | else [StringEntry(("swap_" + x), C), StringEntry(r, x), StringEntry((c + r), E), StringEntry((g + r), F), StringEntry((k + r), "swap")] |
---|
80 | 86 | | else throw("Only the Admin itself can invoke this function") |
---|
81 | 87 | | } |
---|
82 | 88 | | |
---|
83 | 89 | | |
---|
84 | 90 | | |
---|
85 | | - | @Callable(s) |
---|
| 91 | + | @Callable(u) |
---|
86 | 92 | | func removeSwapOrPool (r) = { |
---|
87 | | - | let D = getStringValue(this, (k + r)) |
---|
88 | | - | let B = getStringValue(this, r) |
---|
89 | | - | if ((s.caller == this)) |
---|
90 | | - | then if ((D == "swap")) |
---|
| 93 | + | let I = getStringValue(this, (k + r)) |
---|
| 94 | + | let G = getStringValue(this, r) |
---|
| 95 | + | if ((u.caller == this)) |
---|
| 96 | + | then if ((I == "swap")) |
---|
91 | 97 | | then { |
---|
92 | | - | let E = [DeleteEntry(("swap_" + B)), DeleteEntry(r), DeleteEntry((k + r)), DeleteEntry((c + r)), DeleteEntry((g + r))] |
---|
93 | | - | E |
---|
| 98 | + | let J = [DeleteEntry(("swap_" + G)), DeleteEntry(r), DeleteEntry((k + r)), DeleteEntry((c + r)), DeleteEntry((g + r))] |
---|
| 99 | + | J |
---|
94 | 100 | | } |
---|
95 | 101 | | else { |
---|
96 | | - | let F = [DeleteEntry(r), DeleteEntry(("POOL_" + B)), DeleteEntry(("lp_asset_" + B)), DeleteEntry((h + r)), DeleteEntry((i + r)), DeleteEntry((k + r))] |
---|
97 | | - | F |
---|
| 102 | + | let K = [DeleteEntry(r), DeleteEntry(("POOL_" + G)), DeleteEntry(("lp_asset_" + G)), DeleteEntry((h + r)), DeleteEntry((i + r)), DeleteEntry((k + r))] |
---|
| 103 | + | K |
---|
98 | 104 | | } |
---|
99 | 105 | | else throw("Only the Admin itself can invoke this function") |
---|
100 | 106 | | } |
---|
101 | 107 | | |
---|
102 | 108 | | |
---|
103 | | - | @Verifier(G) |
---|
104 | | - | func H () = { |
---|
105 | | - | let I = G |
---|
106 | | - | sigVerify(G.bodyBytes, G.proofs[0], G.senderPublicKey) |
---|
| 109 | + | @Verifier(L) |
---|
| 110 | + | func M () = { |
---|
| 111 | + | let N = L |
---|
| 112 | + | sigVerify(L.bodyBytes, L.proofs[0], L.senderPublicKey) |
---|
107 | 113 | | } |
---|
108 | 114 | | |
---|