tx · 3qq2sXCZydXCfDPnxtANiF6TjUWefMS8xqzYqwouki68
3N2dRaZobzhvApXZdrFKsTWZfczyyx6FboD: -0.01400000 Waves
2021.08.19 19:49 [1665497] smart account 3N2dRaZobzhvApXZdrFKsTWZfczyyx6FboD > SELF 0.00000000 Waves
{
"type": 13,
"id": "3qq2sXCZydXCfDPnxtANiF6TjUWefMS8xqzYqwouki68",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1629391748924,
"version": 2,
"chainId": 84,
"sender": "3N2dRaZobzhvApXZdrFKsTWZfczyyx6FboD",
"senderPublicKey": "9WSLkkzDD1adiGFyZbCjY47yzFtCW8U5DKWUqpiuaL3p",
"proofs": [
"4mPfaqNwELBtDnGfeZq2t3FeLXSocFu8Si1Tr3bzaB55563VhLLYXrfKnR4JefQnWiAxPfWaLWACfuwHK3HHug4z"
],
"script": "base64:AAIFAAAAAAAAASEIAhIECgIBARIECgIBARoICgJhMRICV1UaCAoCYTISAlNXGggKAmEzEgJTVRoHCgJhNBIBVxoHCgJhNRIBVRoHCgJhNhIBUxoLCgJhNxIFYWRtaW4aDAoCYTgSBnNjYWxlOBoMCgJhORIGc2NhbGU2GgcKAmIxEgFpGgoKAmIyEgRhbW50GgkKAmIzEgNtaW4aCQoCYjQSA2JidRoJCgJiNRIDYmJ3GgkKAmI2EgNiYnMaCwoCYjcSBXN3YXAxGgsKAmI4EgVkaWZmdRoLCgJiORIFc3dhcDIaCwoCYzESBWRpZmZzGgsKAmMyEgVzd2FwMxoLCgJjMxIFZGlmZncaCAoCYzQSAm9rGggKAmM1EgJ0eBoMCgJjNhIGdmVyaWZ5AAAACQAAAAACYTEJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEJAQAAAAV2YWx1ZQAAAAECAAAAIzNOREQzaWZBQzE3Y0x6eHVZcXNnWERSWTlEVFE1QnFtdndMAAAAAAJhMgkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQkBAAAABXZhbHVlAAAAAQIAAAA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kBAAAAD0F0dGFjaGVkUGF5bWVudAAAAAIFAAAAAmE1BQAAAAJiOAUAAAADbmlsAwkAAAAAAAACBQAAAAJjMgUAAAACYzIEAAAAAmMzCQAAZQAAAAIJAAPwAAAAAgUAAAAEdGhpcwUAAAACYTQFAAAAAmI1AwkAAAAAAAACBQAAAAJjMwUAAAACYzMDCQAAZgAAAAIFAAAAAmMzBQAAAAJiMwQAAAACYzQCAAAAAm9rCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAAVkZWJ1ZwUAAAACYzMFAAAAA25pbAkAAAIAAAABCQABpAAAAAEFAAAAAmMzCQAAAgAAAAECAAAAGnN0cmljdCB2YWx1ZSB3aGF0IHRoZSBmdWNrCQAAAgAAAAECAAAAGnN0cmljdCB2YWx1ZSB3aGF0IHRoZSBmdWNrCQAAAgAAAAECAAAAGnN0cmljdCB2YWx1ZSB3aGF0IHRoZSBmdWNrCQAAAgAAAAECAAAAGnN0cmljdCB2YWx1ZSB3aGF0IHRoZSBmdWNrCQAAAgAAAAECAAAAGnN0cmljdCB2YWx1ZSB3aGF0IHRoZSBmdWNrCQAAAgAAAAECAAAAGnN0cmljdCB2YWx1ZSB3aGF0IHRoZSBmdWNrCQAAAgAAAAECAAAAI1N0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmAAAAAQAAAAJjNQEAAAACYzYAAAAACQAB9AAAAAMIBQAAAAJjNQAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAmM1AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAmM1AAAAD3NlbmRlclB1YmxpY0tleb27Q24=",
"height": 1665497,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: CY5rNBWccUSahazx1uRD1LHrjUuoxooitZJGKfDcUTQG
Next: 3Byyha4Beir9iiLqHTKtkhojsRXnhnZGj45U9BSs5v1p
Diff:
Old | New | | Differences |
---|
20 | 20 | | let scale6 = 1000000 |
---|
21 | 21 | | |
---|
22 | 22 | | @Callable(i) |
---|
23 | | - | func call1 () = if ((i.caller != admin)) |
---|
| 23 | + | func call1 (amnt,min) = if ((i.caller != admin)) |
---|
24 | 24 | | then throw("only admin") |
---|
25 | 25 | | else { |
---|
26 | 26 | | let bbu = assetBalance(this, U) |
---|
|
32 | 32 | | then (bbs == bbs) |
---|
33 | 33 | | else false) |
---|
34 | 34 | | then { |
---|
35 | | - | let swap1 = invoke(WU, "exchange", [1], [AttachedPayment(W, (1 * scale8))]) |
---|
| 35 | + | let swap1 = invoke(WU, "exchange", [1], [AttachedPayment(W, (amnt * scale8))]) |
---|
36 | 36 | | if ((swap1 == swap1)) |
---|
37 | 37 | | then { |
---|
38 | 38 | | let diffu = (assetBalance(this, U) - bbu) |
---|
|
49 | 49 | | then { |
---|
50 | 50 | | let diffw = (assetBalance(this, W) - bbw) |
---|
51 | 51 | | if ((diffw == diffw)) |
---|
52 | | - | then if ((diffw > 0)) |
---|
| 52 | + | then if ((diffw > min)) |
---|
53 | 53 | | then { |
---|
54 | 54 | | let ok = "ok" |
---|
55 | 55 | | [IntegerEntry("debug", diffw)] |
---|
|
73 | 73 | | |
---|
74 | 74 | | |
---|
75 | 75 | | @Callable(i) |
---|
76 | | - | func call2 () = if ((i.caller != admin)) |
---|
| 76 | + | func call2 (amnt,min) = if ((i.caller != admin)) |
---|
77 | 77 | | then throw("only admin") |
---|
78 | 78 | | else { |
---|
79 | 79 | | let bbu = assetBalance(this, U) |
---|
|
85 | 85 | | then (bbs == bbs) |
---|
86 | 86 | | else false) |
---|
87 | 87 | | then { |
---|
88 | | - | let swap1 = invoke(SW, "exchange", [1], [AttachedPayment(W, (1 * scale8))]) |
---|
| 88 | + | let swap1 = invoke(SW, "exchange", [1], [AttachedPayment(W, (amnt * scale8))]) |
---|
89 | 89 | | if ((swap1 == swap1)) |
---|
90 | 90 | | then { |
---|
91 | 91 | | let diffs = (assetBalance(this, S) - bbs) |
---|
|
102 | 102 | | then { |
---|
103 | 103 | | let diffw = (assetBalance(this, W) - bbw) |
---|
104 | 104 | | if ((diffw == diffw)) |
---|
105 | | - | then if ((diffw > 0)) |
---|
| 105 | + | then if ((diffw > min)) |
---|
106 | 106 | | then { |
---|
107 | 107 | | let ok = "ok" |
---|
108 | 108 | | [IntegerEntry("debug", diffw)] |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let WU = addressFromStringValue(value("3NDD3ifAC17cLzxuYqsgXDRY9DTQ5BqmvwL")) |
---|
5 | 5 | | |
---|
6 | 6 | | let SW = addressFromStringValue(value("3NAzES7pSjfoHsKNumP5HRtSt3qadbqnHip")) |
---|
7 | 7 | | |
---|
8 | 8 | | let SU = addressFromStringValue(value("3MrBtdped4oUFs1BvLNu53Dm1AMGiTHkT9B")) |
---|
9 | 9 | | |
---|
10 | 10 | | let W = base58'3Tg4GRpKeek5wWAQRJKH1ucjMuKNom3f2h67WNNu6xVS' |
---|
11 | 11 | | |
---|
12 | 12 | | let U = base58'gAAmMoquySsX6q5EmzciFfB8RecAhZR9W1HKNntNekL' |
---|
13 | 13 | | |
---|
14 | 14 | | let S = base58'89G3XEYzMSztS6RPN5h2da7j43r4zgKufReZWn1MqX7g' |
---|
15 | 15 | | |
---|
16 | 16 | | let admin = addressFromStringValue("3N97G98bPF5ghnZ1iMmQ7tMH6MBsNZnS272") |
---|
17 | 17 | | |
---|
18 | 18 | | let scale8 = 100000000 |
---|
19 | 19 | | |
---|
20 | 20 | | let scale6 = 1000000 |
---|
21 | 21 | | |
---|
22 | 22 | | @Callable(i) |
---|
23 | | - | func call1 () = if ((i.caller != admin)) |
---|
| 23 | + | func call1 (amnt,min) = if ((i.caller != admin)) |
---|
24 | 24 | | then throw("only admin") |
---|
25 | 25 | | else { |
---|
26 | 26 | | let bbu = assetBalance(this, U) |
---|
27 | 27 | | let bbw = assetBalance(this, W) |
---|
28 | 28 | | let bbs = assetBalance(this, S) |
---|
29 | 29 | | if (if (if ((bbu == bbu)) |
---|
30 | 30 | | then (bbw == bbw) |
---|
31 | 31 | | else false) |
---|
32 | 32 | | then (bbs == bbs) |
---|
33 | 33 | | else false) |
---|
34 | 34 | | then { |
---|
35 | | - | let swap1 = invoke(WU, "exchange", [1], [AttachedPayment(W, (1 * scale8))]) |
---|
| 35 | + | let swap1 = invoke(WU, "exchange", [1], [AttachedPayment(W, (amnt * scale8))]) |
---|
36 | 36 | | if ((swap1 == swap1)) |
---|
37 | 37 | | then { |
---|
38 | 38 | | let diffu = (assetBalance(this, U) - bbu) |
---|
39 | 39 | | if ((diffu == diffu)) |
---|
40 | 40 | | then { |
---|
41 | 41 | | let swap2 = invoke(SU, "exchange", [1], [AttachedPayment(U, diffu)]) |
---|
42 | 42 | | if ((swap2 == swap2)) |
---|
43 | 43 | | then { |
---|
44 | 44 | | let diffs = (assetBalance(this, S) - bbs) |
---|
45 | 45 | | if ((diffs == diffs)) |
---|
46 | 46 | | then { |
---|
47 | 47 | | let swap3 = invoke(SW, "exchange", [1], [AttachedPayment(S, diffs)]) |
---|
48 | 48 | | if ((swap3 == swap3)) |
---|
49 | 49 | | then { |
---|
50 | 50 | | let diffw = (assetBalance(this, W) - bbw) |
---|
51 | 51 | | if ((diffw == diffw)) |
---|
52 | | - | then if ((diffw > 0)) |
---|
| 52 | + | then if ((diffw > min)) |
---|
53 | 53 | | then { |
---|
54 | 54 | | let ok = "ok" |
---|
55 | 55 | | [IntegerEntry("debug", diffw)] |
---|
56 | 56 | | } |
---|
57 | 57 | | else throw(toString(diffw)) |
---|
58 | 58 | | else throw("strict value what the fuck") |
---|
59 | 59 | | } |
---|
60 | 60 | | else throw("strict value what the fuck") |
---|
61 | 61 | | } |
---|
62 | 62 | | else throw("strict value what the fuck") |
---|
63 | 63 | | } |
---|
64 | 64 | | else throw("strict value what the fuck") |
---|
65 | 65 | | } |
---|
66 | 66 | | else throw("strict value what the fuck") |
---|
67 | 67 | | } |
---|
68 | 68 | | else throw("strict value what the fuck") |
---|
69 | 69 | | } |
---|
70 | 70 | | else throw("Strict value is not equal to itself") |
---|
71 | 71 | | } |
---|
72 | 72 | | |
---|
73 | 73 | | |
---|
74 | 74 | | |
---|
75 | 75 | | @Callable(i) |
---|
76 | | - | func call2 () = if ((i.caller != admin)) |
---|
| 76 | + | func call2 (amnt,min) = if ((i.caller != admin)) |
---|
77 | 77 | | then throw("only admin") |
---|
78 | 78 | | else { |
---|
79 | 79 | | let bbu = assetBalance(this, U) |
---|
80 | 80 | | let bbw = assetBalance(this, W) |
---|
81 | 81 | | let bbs = assetBalance(this, S) |
---|
82 | 82 | | if (if (if ((bbu == bbu)) |
---|
83 | 83 | | then (bbw == bbw) |
---|
84 | 84 | | else false) |
---|
85 | 85 | | then (bbs == bbs) |
---|
86 | 86 | | else false) |
---|
87 | 87 | | then { |
---|
88 | | - | let swap1 = invoke(SW, "exchange", [1], [AttachedPayment(W, (1 * scale8))]) |
---|
| 88 | + | let swap1 = invoke(SW, "exchange", [1], [AttachedPayment(W, (amnt * scale8))]) |
---|
89 | 89 | | if ((swap1 == swap1)) |
---|
90 | 90 | | then { |
---|
91 | 91 | | let diffs = (assetBalance(this, S) - bbs) |
---|
92 | 92 | | if ((diffs == diffs)) |
---|
93 | 93 | | then { |
---|
94 | 94 | | let swap2 = invoke(SU, "exchange", [1], [AttachedPayment(S, diffs)]) |
---|
95 | 95 | | if ((swap2 == swap2)) |
---|
96 | 96 | | then { |
---|
97 | 97 | | let diffu = (assetBalance(this, U) - bbu) |
---|
98 | 98 | | if ((diffu == diffu)) |
---|
99 | 99 | | then { |
---|
100 | 100 | | let swap3 = invoke(WU, "exchange", [1], [AttachedPayment(U, diffu)]) |
---|
101 | 101 | | if ((swap3 == swap3)) |
---|
102 | 102 | | then { |
---|
103 | 103 | | let diffw = (assetBalance(this, W) - bbw) |
---|
104 | 104 | | if ((diffw == diffw)) |
---|
105 | | - | then if ((diffw > 0)) |
---|
| 105 | + | then if ((diffw > min)) |
---|
106 | 106 | | then { |
---|
107 | 107 | | let ok = "ok" |
---|
108 | 108 | | [IntegerEntry("debug", diffw)] |
---|
109 | 109 | | } |
---|
110 | 110 | | else throw(toString(diffw)) |
---|
111 | 111 | | else throw("strict value what the fuck") |
---|
112 | 112 | | } |
---|
113 | 113 | | else throw("strict value what the fuck") |
---|
114 | 114 | | } |
---|
115 | 115 | | else throw("strict value what the fuck") |
---|
116 | 116 | | } |
---|
117 | 117 | | else throw("strict value what the fuck") |
---|
118 | 118 | | } |
---|
119 | 119 | | else throw("strict value what the fuck") |
---|
120 | 120 | | } |
---|
121 | 121 | | else throw("strict value what the fuck") |
---|
122 | 122 | | } |
---|
123 | 123 | | else throw("Strict value is not equal to itself") |
---|
124 | 124 | | } |
---|
125 | 125 | | |
---|
126 | 126 | | |
---|
127 | 127 | | @Verifier(tx) |
---|
128 | 128 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
129 | 129 | | |
---|