tx · 9NnHueLGEi62d3ggwunUKwNLujFro7PbZXVTLqLSZzRE

3MwBGvHwMsCkfpjNczpKyPwjZn8kguZc1aT:  -0.04000000 Waves

2022.05.19 12:21 [2058371] smart account 3MwBGvHwMsCkfpjNczpKyPwjZn8kguZc1aT > SELF 0.00000000 Waves

{ "type": 13, "id": "9NnHueLGEi62d3ggwunUKwNLujFro7PbZXVTLqLSZzRE", "fee": 4000000, "feeAssetId": null, "timestamp": 1652952070566, "version": 2, "chainId": 84, "sender": "3MwBGvHwMsCkfpjNczpKyPwjZn8kguZc1aT", "senderPublicKey": "HR6KqHHmjzGx8fdbFkG9LMHCiNx2t8ExYHP5fWMomCJu", "proofs": [ "4DoL1m8u6W5jHiSarZDUwyBxpzSrXBDXm849TiAmAULtWtLS2cTn96QdwBWZxf8sXoxRzJieoB83mC3npcntbQDz" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAAFAAAAAAV0b2tlbgEAAAAg202DNWRHG5bvnwwvoM991XmdkujhmzUPwT/MewJwKQsAAAAABWxwVENJAQAAACAaMxpM7J2AkwQeyUXAgj0RTdaP0uNhJJ62DJZuUfMG8AAAAAAJaXNTdG9wcGVkBwAAAAAJa2V5U3Rha2VkAgAAAAlTVEFLRURfTFAAAAAAC2tleUNvbXBvdW5kAgAAAA1Gcm9tX0NvbXBvdW5kAAAAAgAAAAFpAQAAAAVzdGFrZQAAAAAEAAAAA3BtdAkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAJcG10QW1vdW50CAUAAAADcG10AAAABmFtb3VudAMJAQAAAAIhPQAAAAIIBQAAAANwbXQAAAAHYXNzZXRJZAUAAAAFdG9rZW4JAAACAAAAAQIAAAAdYXR0YWNoIFVTRFRVU0ROTFAgdG9rZW5zIG9ubHkDBQAAAAlpc1N0b3BwZWQJAAACAAAAAQIAAAAZc21hcnQgY29udHJhY3QgaXMgb24gbG9jawQAAAAIdGtTdGF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RlU3RhdGUJAARMAAAAAgUAAAACdGMFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAAAigQwGA==", "height": 2058371, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4W9v1aAwno6c7kkZTit8tQjP9RXckV8hADLjFr4s4fiX Next: GLQGCerPZxBeq6T51izriESQFkkfBux6QFDu22QfovYb Diff:
OldNewDifferences
2525 let k = IntegerEntry(d, (i + f.payments[0].amount))
2626 if ((k == k))
2727 then {
28- let l = {
29- let m = assetInfo(b)
30- if ($isInstanceOf(m, "Asset"))
31- then {
32- let n = m
33- n.quantity
34- }
35- else throw("Can't find asset")
36- }
37- let o = (i + assetBalance(this, a))
38- let p = fraction(l, 100000000, o)
39- let q = fraction(h, p, 100000000)
40- let r = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [g])
41- if ((r == r))
28+ let l = (i - j)
29+ let m = fraction(l, 100000000, i)
30+ let n = fraction(h, m, 100000000)
31+ let o = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [g])
32+ if ((o == o))
4233 then {
43- let s = Reissue(b, q, true)
44- let t = ScriptTransfer(f.caller, q, b)
45-[s, t, k]
34+ let p = Reissue(b, n, true)
35+ let q = ScriptTransfer(f.caller, n, b)
36+[p, q, k]
4637 }
4738 else throw("Strict value is not equal to itself.")
4839 }
5445
5546 @Callable(f)
5647 func compound () = {
57- let u = value(f.payments[0])
58- let v = u.amount
59- if ((u.assetId != a))
48+ let r = value(f.payments[0])
49+ let s = r.amount
50+ if ((r.assetId != a))
6051 then throw("attach USDTUSDNLP tokens only")
6152 else {
6253 let j = valueOrElse(getInteger(this, e), 0)
63- let w = valueOrElse(getInteger(this, d), 0)
64- let x = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [u])
65- if ((x == x))
54+ let t = valueOrElse(getInteger(this, d), 0)
55+ let u = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [r])
56+ if ((u == u))
6657 then {
67- let k = IntegerEntry(d, (w + v))
68- let y = IntegerEntry(e, (j + v))
69-[k, y]
58+ let k = IntegerEntry(d, (t + s))
59+ let v = IntegerEntry(e, (j + s))
60+[k, v]
7061 }
7162 else throw("Strict value is not equal to itself.")
7263 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'Fm4qczu6Pepz8KUhh3Heb6LeTVfpSMX5vvNgw3x764CS'
55
66 let b = base58'2mGo9byNgTSxPC4J8wXkGkdjhB3Tk3gjGYiiHsyCrnHd'
77
88 let c = false
99
1010 let d = "STAKED_LP"
1111
1212 let e = "From_Compound"
1313
1414 @Callable(f)
1515 func stake () = {
1616 let g = value(f.payments[0])
1717 let h = g.amount
1818 if ((g.assetId != a))
1919 then throw("attach USDTUSDNLP tokens only")
2020 else if (c)
2121 then throw("smart contract is on lock")
2222 else {
2323 let i = valueOrElse(getInteger(this, d), 0)
2424 let j = valueOrElse(getInteger(this, e), 0)
2525 let k = IntegerEntry(d, (i + f.payments[0].amount))
2626 if ((k == k))
2727 then {
28- let l = {
29- let m = assetInfo(b)
30- if ($isInstanceOf(m, "Asset"))
31- then {
32- let n = m
33- n.quantity
34- }
35- else throw("Can't find asset")
36- }
37- let o = (i + assetBalance(this, a))
38- let p = fraction(l, 100000000, o)
39- let q = fraction(h, p, 100000000)
40- let r = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [g])
41- if ((r == r))
28+ let l = (i - j)
29+ let m = fraction(l, 100000000, i)
30+ let n = fraction(h, m, 100000000)
31+ let o = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [g])
32+ if ((o == o))
4233 then {
43- let s = Reissue(b, q, true)
44- let t = ScriptTransfer(f.caller, q, b)
45-[s, t, k]
34+ let p = Reissue(b, n, true)
35+ let q = ScriptTransfer(f.caller, n, b)
36+[p, q, k]
4637 }
4738 else throw("Strict value is not equal to itself.")
4839 }
4940 else throw("Strict value is not equal to itself.")
5041 }
5142 }
5243
5344
5445
5546 @Callable(f)
5647 func compound () = {
57- let u = value(f.payments[0])
58- let v = u.amount
59- if ((u.assetId != a))
48+ let r = value(f.payments[0])
49+ let s = r.amount
50+ if ((r.assetId != a))
6051 then throw("attach USDTUSDNLP tokens only")
6152 else {
6253 let j = valueOrElse(getInteger(this, e), 0)
63- let w = valueOrElse(getInteger(this, d), 0)
64- let x = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [u])
65- if ((x == x))
54+ let t = valueOrElse(getInteger(this, d), 0)
55+ let u = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [r])
56+ if ((u == u))
6657 then {
67- let k = IntegerEntry(d, (w + v))
68- let y = IntegerEntry(e, (j + v))
69-[k, y]
58+ let k = IntegerEntry(d, (t + s))
59+ let v = IntegerEntry(e, (j + s))
60+[k, v]
7061 }
7162 else throw("Strict value is not equal to itself.")
7263 }
7364 }
7465
7566

github/deemru/w8io/169f3d6 
37.84 ms