tx · HC7vdMwYPGpjpHGvHud1bEPJnnkshrccyNfda7kfx1E3

3Mw2biLQi5ygMk7zexboNGrnMYuaSfrziY8:  -0.01000000 Waves

2022.03.14 21:51 [1964015] smart account 3Mw2biLQi5ygMk7zexboNGrnMYuaSfrziY8 > SELF 0.00000000 Waves

{ "type": 13, "id": "HC7vdMwYPGpjpHGvHud1bEPJnnkshrccyNfda7kfx1E3", "fee": 1000000, "feeAssetId": null, "timestamp": 1647283927776, "version": 2, "chainId": 84, "sender": "3Mw2biLQi5ygMk7zexboNGrnMYuaSfrziY8", "senderPublicKey": "7KdKmjfPuTXGRNZv4VEz9mZiC2qb9JPzuji5z6jszZyo", "proofs": [ "3u32XzTT24JNoCrnUYkHg2uyGuz8XePkZgRUXsL1kRbZ9Msi4kRt4HktLpoyzTmgXetVPoBtYMY3ChMbbdEU8S85" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIBCAAAAAoAAAAADGV4Y2hhbmdlUmF0ZQAAAAAAAAAACgAAAAAXZXhjaGFuZ2VSYXRlRGlmZlBlcmNlbnQAAAAAAAAAABQAAAAAD1VTRE50b1dBVkVTcmF0ZQkAAGsAAAADBQAAAAxleGNoYW5nZVJhdGUJAABlAAAAAgAAAAAAAAAAZAUAAAAXZXhjaGFuZ2VSYXRlRGlmZlBlcmNlbnQAAAAAAAAAAGQAAAAABFVTRE4BAAAAICJkPx6+YEbpEWoTE9ymM/4Wfgf5d+mz8hX8mUkqMAo3AAAAAAVXQVZFUwEAAAAEE6vZMwAAAAAPVVNETnRvV0FWRVNSYXRlAAAAAAAAAAAFAAAAAA5sb2FuRmVlUGVyY2VudAkAAGkAAAACAAAAAAAAAAAJAAAAAAAAAABkAQAAABNleGNoYW5nZVdBVkVTdG9VU0ROAAAAAwAAAAZhbW91bnQAAAAHYXNzZXRJZAAAAAZjYWxsZXIDCQAAAAAAAAIFAAAAB2Fzc2V0SWQFAAAABVdBVkVTCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2Z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AABHRlc3QFAAAABHRlc3QEAAAAC2JhbGFuY2VEaWZmCQAAZQAAAAIJAAPwAAAAAgUAAAAEdGhpcwUAAAAEVVNETgUAAAAMc3RhcnRCYWxhbmNlBAAAAAZwcm9maXQJAABrAAAAAwUAAAAGYW1vdW50BQAAAA5sb2FuRmVlUGVyY2VudAAAAAAAAAAAZAMJAABmAAAAAgUAAAAGcHJvZml0BQAAAAtiYWxhbmNlRGlmZgkAAAIAAAABCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAB5EZWJ0IG5vdCBwYWlkLCBiZWNhdXNlIGRpZmYgPSAJAAGkAAAAAQUAAAALYmFsYW5jZURpZmYCAAAAEi4gRXhwZWN0ZWQgZGlmZiA9IAkAAaQAAAABBQAAAAZwcm9maXQFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAFFc84c=", "height": 1964015, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DCEqFhc7FHgYtHouoTq1SG1y4KYuMyZXeUdVvRn8rBwZ Next: 7iCHc12dbSnEArBYcNy4xdJfS6N9CvK8YfuKMiwRY2NL Diff:
OldNewDifferences
5656
5757
5858 @Callable(v)
59-func flashloan (i,n,j) = {
60- let w = assetBalance(this, d)
61- if ((w == w))
59+func flashloan (i,w) = {
60+ let x = assetBalance(this, d)
61+ if ((x == x))
6262 then {
63- let x = m(n, i, j)
64- if ((x == x))
63+ let n = w
64+ let y = m(fromBase58String(w), i, d)
65+ if ((y == y))
6566 then {
66- let y = (assetBalance(this, d) - w)
67+ let z = (assetBalance(this, d) - x)
6768 let u = fraction(i, g, 100)
68- if ((u > y))
69- then throw(((("Debt not paid, because diff = " + toString(y)) + ". Expected diff = ") + toString(u)))
69+ if ((u > z))
70+ then throw(((("Debt not paid, because diff = " + toString(z)) + ". Expected diff = ") + toString(u)))
7071 else nil
7172 }
7273 else throw("Strict value is not equal to itself.")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 10
55
66 let b = 20
77
88 let c = fraction(a, (100 - b), 100)
99
1010 let d = base58'3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC'
1111
1212 let e = base58'WAVES'
1313
1414 let f = 5
1515
1616 let g = (9 / 100)
1717
1818 func h (i,j,k) = if ((j == e))
1919 then [ScriptTransfer(Address(k), (i / c), d)]
2020 else throw("Unexpected Token")
2121
2222
2323 func l (i,j,k) = if ((j == d))
2424 then [ScriptTransfer(Address(k), (i * f), e)]
2525 else throw("Unexpected Token")
2626
2727
2828 func m (n,i,j) = {
2929 let o = if ((j == d))
3030 then i
3131 else throw("Unexpected payment asset")
3232 let p = assetBalance(this, e)
3333 if ((p == p))
3434 then {
3535 let q = l(i, j, n)
3636 if ((q == q))
3737 then {
3838 let r = (assetBalance(this, e) - p)
3939 if ((r == r))
4040 then {
4141 let s = h(i, j, n)
4242 if ((s == s))
4343 then {
4444 let t = fraction(o, (100 + g), 100)
4545 let u = (assetBalance(this, d) - t)
4646 [ScriptTransfer(Address(n), u, d), ScriptTransfer(this, t, d)]
4747 }
4848 else throw("Strict value is not equal to itself.")
4949 }
5050 else throw("Strict value is not equal to itself.")
5151 }
5252 else throw("Strict value is not equal to itself.")
5353 }
5454 else throw("Strict value is not equal to itself.")
5555 }
5656
5757
5858 @Callable(v)
59-func flashloan (i,n,j) = {
60- let w = assetBalance(this, d)
61- if ((w == w))
59+func flashloan (i,w) = {
60+ let x = assetBalance(this, d)
61+ if ((x == x))
6262 then {
63- let x = m(n, i, j)
64- if ((x == x))
63+ let n = w
64+ let y = m(fromBase58String(w), i, d)
65+ if ((y == y))
6566 then {
66- let y = (assetBalance(this, d) - w)
67+ let z = (assetBalance(this, d) - x)
6768 let u = fraction(i, g, 100)
68- if ((u > y))
69- then throw(((("Debt not paid, because diff = " + toString(y)) + ". Expected diff = ") + toString(u)))
69+ if ((u > z))
70+ then throw(((("Debt not paid, because diff = " + toString(z)) + ". Expected diff = ") + toString(u)))
7071 else nil
7172 }
7273 else throw("Strict value is not equal to itself.")
7374 }
7475 else throw("Strict value is not equal to itself.")
7576 }
7677
7778

github/deemru/w8io/169f3d6 
33.03 ms