tx · 4NPboJj9cyp9TFCWN7Zpd4V6sD7Umwhtw1cqbdv8Zmcs

3Mw2biLQi5ygMk7zexboNGrnMYuaSfrziY8:  -0.01000000 Waves

2022.03.31 13:43 [1987981] smart account 3Mw2biLQi5ygMk7zexboNGrnMYuaSfrziY8 > SELF 0.00000000 Waves

{ "type": 13, "id": "4NPboJj9cyp9TFCWN7Zpd4V6sD7Umwhtw1cqbdv8Zmcs", "fee": 1000000, "feeAssetId": null, "timestamp": 1648723430775, "version": 2, "chainId": 84, "sender": "3Mw2biLQi5ygMk7zexboNGrnMYuaSfrziY8", "senderPublicKey": "7KdKmjfPuTXGRNZv4VEz9mZiC2qb9JPzuji5z6jszZyo", "proofs": [ "54YYmCuRFuQTyJUiG5nyyFdUjVJemBJExYnmFjUJ6MMXk2CranXT7oQJqHwDjzS8T3dxEF896qU9bRw8mfaBRDHw" ], "script": "base64:AAIFAAAAAAAAAB0IAhIFCgMBAgISBQoDAQICEgUKAwIBAhIECgIBCAAAAAcAAAAADGV4Y2hhbmdlUmF0ZQAAAAAAAAAACgAAAAAXZXhjaGFuZ2VSYXRlRGlmZlBlcmNlbnQAAAAAAAAAAAoAAAAAD1VTRE50b1dBVkVTcmF0ZQkAAGsAAAADBQAAAAxleGNoYW5nZVJhdGUJAABlAAAAAgAAAAAAAAAAZAUAAAAXZXhjaGFuZ2VSYXRlRGlmZlBlcmNlbnQAAAAAAAAAAGQAAAAABFVTRE4BAAAAICJkPx6+YEbpEWoTE9ymM/4Wfgf5d+mz8hX8mUkqMAo3AAAAAAVXQVZFUwEAAAAAAAAAAA9VU0ROdG9XQVZFU1JhdGUAAAAAAAAAAAoAAAAADmxvYW5GZWVQZXJjZW50AAAAAAAAAAABAAAABAAAAAFpAQAAABNleGNoYW5nZVdBVkVTdG9VU0ROAAAAAwAAAAZhbW91bnQAAAAHYXNzZXRJZAAAAAZjYWxsZXIDCQAAAAAAAAIFAAAAB2Fzc2V0SWQFAAAABVdBVkVTCQAETAAAAAIJAQA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AAgIAAAAeRGVidCBub3QgcGFpZCwgYmVjYXVzZSBkaWZmID0gCQABpAAAAAEFAAAAC2JhbGFuY2VEaWZmAgAAABIuIEV4cGVjdGVkIGRpZmYgPSAJAAGkAAAAAQUAAAAGcHJvZml0CQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAABHRlc3QCAAAABHRlc3QFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAEsubZE=", "height": 1987981, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 72cGXDccA6xs5VCSQWR2CxE7xsp19dzgQdPxVHsGPdix Next: EAVRc1WPDyCA2VxFME8M65VAH3zQH9KK1Q8J2GuHNEpa Diff:
OldNewDifferences
3737 let n = assetBalance(this, e)
3838 if ((n == n))
3939 then {
40- let o = reentrantInvoke(Address(base58'3Mw2biLQi5ygMk7zexboNGrnMYuaSfrziY8'), "exchangeUSDNtoWAVES", [i, j, l], [AttachedPayment(d, m)])
40+ let o = reentrantInvoke(Address(base58'3Mw2biLQi5ygMk7zexboNGrnMYuaSfrziY8'), "exchangeUSDNtoWAVES", [i, j, l], [AttachedPayment(unit, 0)])
4141 if ((o == o))
4242 then {
4343 let p = (assetBalance(this, e) - n)
4444 if ((p == p))
4545 then {
46- let q = reentrantInvoke(Address(base58'3Mw2biLQi5ygMk7zexboNGrnMYuaSfrziY8'), "exchangeWAVEStoUSDN", [i, j, l], [AttachedPayment(e, p)])
46+ let q = reentrantInvoke(Address(base58'3Mw2biLQi5ygMk7zexboNGrnMYuaSfrziY8'), "exchangeWAVEStoUSDN", [i, j, l], [AttachedPayment(unit, 0)])
4747 if ((q == q))
4848 then {
4949 let r = fraction(m, (100 + g), 100)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 10
55
66 let b = 10
77
88 let c = fraction(a, (100 - b), 100)
99
1010 let d = base58'3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC'
1111
1212 let e = base58''
1313
1414 let f = 10
1515
1616 let g = 1
1717
1818 @Callable(h)
1919 func exchangeWAVEStoUSDN (i,j,k) = if ((j == e))
2020 then [ScriptTransfer(Address(k), (i / c), d), IntegerEntry("WAVEStoUSDN", i)]
2121 else throw("Unexpected Token")
2222
2323
2424
2525 @Callable(h)
2626 func exchangeUSDNtoWAVES (i,j,k) = if ((j == d))
2727 then [ScriptTransfer(Address(k), (i * f), e), IntegerEntry("USDNtoWAVES", i)]
2828 else throw("Unexpected Token")
2929
3030
3131
3232 @Callable(h)
3333 func trade (l,i,j) = {
3434 let m = if ((j == d))
3535 then i
3636 else throw("Unexpected payment asset")
3737 let n = assetBalance(this, e)
3838 if ((n == n))
3939 then {
40- let o = reentrantInvoke(Address(base58'3Mw2biLQi5ygMk7zexboNGrnMYuaSfrziY8'), "exchangeUSDNtoWAVES", [i, j, l], [AttachedPayment(d, m)])
40+ let o = reentrantInvoke(Address(base58'3Mw2biLQi5ygMk7zexboNGrnMYuaSfrziY8'), "exchangeUSDNtoWAVES", [i, j, l], [AttachedPayment(unit, 0)])
4141 if ((o == o))
4242 then {
4343 let p = (assetBalance(this, e) - n)
4444 if ((p == p))
4545 then {
46- let q = reentrantInvoke(Address(base58'3Mw2biLQi5ygMk7zexboNGrnMYuaSfrziY8'), "exchangeWAVEStoUSDN", [i, j, l], [AttachedPayment(e, p)])
46+ let q = reentrantInvoke(Address(base58'3Mw2biLQi5ygMk7zexboNGrnMYuaSfrziY8'), "exchangeWAVEStoUSDN", [i, j, l], [AttachedPayment(unit, 0)])
4747 if ((q == q))
4848 then {
4949 let r = fraction(m, (100 + g), 100)
5050 let s = (assetBalance(this, d) - r)
5151 [StringEntry("trade", ((toString(r) + " ") + toString(s))), ScriptTransfer(Address(l), s, d)]
5252 }
5353 else throw("Strict value is not equal to itself.")
5454 }
5555 else throw("Strict value is not equal to itself.")
5656 }
5757 else throw("Strict value is not equal to itself.")
5858 }
5959 else throw("Strict value is not equal to itself.")
6060 }
6161
6262
6363
6464 @Callable(h)
6565 func flashloan (i,t) = {
6666 let u = assetBalance(this, d)
6767 if ((u == u))
6868 then {
6969 let l = t
7070 let v = reentrantInvoke(Address(base58'3Mw2biLQi5ygMk7zexboNGrnMYuaSfrziY8'), "trade", [fromBase58String(t), i, d], [AttachedPayment(unit, 0)])
7171 if ((v == v))
7272 then {
7373 let w = ((assetBalance(this, d) + 100000) - u)
7474 let s = fraction(i, g, 100)
7575 if ((s > w))
7676 then throw(((("Debt not paid, because diff = " + toString(w)) + ". Expected diff = ") + toString(s)))
7777 else [StringEntry("test", "test")]
7878 }
7979 else throw("Strict value is not equal to itself.")
8080 }
8181 else throw("Strict value is not equal to itself.")
8282 }
8383
8484

github/deemru/w8io/026f985 
28.36 ms