tx · 7SJTMpACkFvoAK64nM4ZGcic8gLDQ7QhQZX7nDbkQU6K

3N2dRaZobzhvApXZdrFKsTWZfczyyx6FboD:  -0.05000000 Waves

2021.08.19 18:33 [1665421] smart account 3N2dRaZobzhvApXZdrFKsTWZfczyyx6FboD > SELF 0.00000000 Waves

{ "type": 13, "id": "7SJTMpACkFvoAK64nM4ZGcic8gLDQ7QhQZX7nDbkQU6K", "fee": 5000000, "feeAssetId": null, "timestamp": 1629387300077, "version": 2, "chainId": 84, "sender": "3N2dRaZobzhvApXZdrFKsTWZfczyyx6FboD", "senderPublicKey": "9WSLkkzDD1adiGFyZbCjY47yzFtCW8U5DKWUqpiuaL3p", "proofs": [ "vGzrFWwV3rUesioE8vk7qFnQwTqThtRHRFv3VxNu5s3f3SFtKCaAz8Qrj6RuLQzqv5uWBSBpcowinBBC9TyrYHf" ], "script": "base64:AAIFAAAAAAAAAAQIAhIAAAAACQAAAAACV1UJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEJAQAAAAV2YWx1ZQAAAAECAAAAIzNOREQzaWZBQzE3Y0x6eHVZcXNnWERSWTlEVFE1QnFtdndMAAAAAAJTVwkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQkBAAAABXZhbHVlAAAAAQIAAAAjM05BekVTN3BTamZvSHNLTnVtUDVIUnRTdDNxYWRicW5IaXAAAAAAAlNVCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABCQEAAAAFdmFsdWUAAAABAgAAACMzTXJCdGRwZWQ0b1VGczFCdkxOdTUzRG0xQU1HaVRIa1Q5QgAAAAABVwEAAAAgJIyi0N0MX05S3Cl2SRTQQu7iWcF/08O72gFc6eKeTRUAAAAAAVUBAAAAIAoIBKwLVIq6udfnAo+uIATZOIkz04RHWPYS4mbgbGDdAAAAAAFTAQAAACBqH3b0J8KDRkYUL/gvKZFWCc69s28noTAvNCdHtg7UOwAAAAAFYWRtaW4JAQAAABFAZXh0ck5hdGl2ZSgxMDYyK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fM5Wz6C7aRi5AnwoU8mYU8rpNd6Qzw4 Next: BvWwcQ9bGxcCd9aRarVACQcjSuqkPCJT4v4bGfSFMmee Diff:
OldNewDifferences
3535 let swap1 = invoke(WU, "exchange", [1], [AttachedPayment(W, (1 * scale8))])
3636 if ((swap1 == swap1))
3737 then {
38- let diffu = (bbu - assetBalance(this, U))
38+ let diffu = (assetBalance(this, U) - bbu)
3939 if ((diffu == diffu))
4040 then {
41- let ok = "ok"
42-[IntegerEntry("debug", diffu)]
41+ let swap2 = invoke(SU, "exchange", [0], [AttachedPayment(U, (diffu * scale6))])
42+ if ((swap2 == swap2))
43+ then {
44+ let diffs = (assetBalance(this, S) - bbs)
45+ if ((diffs == diffs))
46+ then {
47+ let swap3 = invoke(SW, "exchange", [0], [AttachedPayment(S, (diffs * scale8))])
48+ if ((swap3 == swap3))
49+ then {
50+ let diffw = (assetBalance(this, W) - bbw)
51+ if ((diffw == diffw))
52+ then {
53+ let ok = "ok"
54+[IntegerEntry("debug", diffw)]
55+ }
56+ else throw("strict value what the fuck")
57+ }
58+ else throw("strict value what the fuck")
59+ }
60+ else throw("strict value what the fuck")
61+ }
62+ else throw("strict value what the fuck")
4363 }
4464 else throw("strict value what the fuck")
4565 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let WU = addressFromStringValue(value("3NDD3ifAC17cLzxuYqsgXDRY9DTQ5BqmvwL"))
55
66 let SW = addressFromStringValue(value("3NAzES7pSjfoHsKNumP5HRtSt3qadbqnHip"))
77
88 let SU = addressFromStringValue(value("3MrBtdped4oUFs1BvLNu53Dm1AMGiTHkT9B"))
99
1010 let W = base58'3Tg4GRpKeek5wWAQRJKH1ucjMuKNom3f2h67WNNu6xVS'
1111
1212 let U = base58'gAAmMoquySsX6q5EmzciFfB8RecAhZR9W1HKNntNekL'
1313
1414 let S = base58'89G3XEYzMSztS6RPN5h2da7j43r4zgKufReZWn1MqX7g'
1515
1616 let admin = addressFromStringValue("3N97G98bPF5ghnZ1iMmQ7tMH6MBsNZnS272")
1717
1818 let scale8 = 100000000
1919
2020 let scale6 = 1000000
2121
2222 @Callable(i)
2323 func call () = if ((i.caller != admin))
2424 then throw("only admin")
2525 else {
2626 let bbu = assetBalance(this, U)
2727 let bbw = assetBalance(this, W)
2828 let bbs = assetBalance(this, S)
2929 if (if (if ((bbu == bbu))
3030 then (bbw == bbw)
3131 else false)
3232 then (bbs == bbs)
3333 else false)
3434 then {
3535 let swap1 = invoke(WU, "exchange", [1], [AttachedPayment(W, (1 * scale8))])
3636 if ((swap1 == swap1))
3737 then {
38- let diffu = (bbu - assetBalance(this, U))
38+ let diffu = (assetBalance(this, U) - bbu)
3939 if ((diffu == diffu))
4040 then {
41- let ok = "ok"
42-[IntegerEntry("debug", diffu)]
41+ let swap2 = invoke(SU, "exchange", [0], [AttachedPayment(U, (diffu * scale6))])
42+ if ((swap2 == swap2))
43+ then {
44+ let diffs = (assetBalance(this, S) - bbs)
45+ if ((diffs == diffs))
46+ then {
47+ let swap3 = invoke(SW, "exchange", [0], [AttachedPayment(S, (diffs * scale8))])
48+ if ((swap3 == swap3))
49+ then {
50+ let diffw = (assetBalance(this, W) - bbw)
51+ if ((diffw == diffw))
52+ then {
53+ let ok = "ok"
54+[IntegerEntry("debug", diffw)]
55+ }
56+ else throw("strict value what the fuck")
57+ }
58+ else throw("strict value what the fuck")
59+ }
60+ else throw("strict value what the fuck")
61+ }
62+ else throw("strict value what the fuck")
4363 }
4464 else throw("strict value what the fuck")
4565 }
4666 else throw("strict value what the fuck")
4767 }
4868 else throw("Strict value is not equal to itself")
4969 }
5070
5171
5272 @Verifier(tx)
5373 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
5474

github/deemru/w8io/169f3d6 
45.53 ms