tx · vWdrnJjG8dxVuBSkJnQg2efiimA6DdXyghgPnG67APd

3Mu7VHAWmzFuC8CC1jL66egwWdzMmU3GMdN:  -0.00400000 Waves

2024.04.28 22:50 [3083150] smart account 3Mu7VHAWmzFuC8CC1jL66egwWdzMmU3GMdN > SELF 0.00000000 Waves

{ "type": 13, "id": "vWdrnJjG8dxVuBSkJnQg2efiimA6DdXyghgPnG67APd", "fee": 400000, "feeAssetId": null, "timestamp": 1714333892951, "version": 1, "sender": "3Mu7VHAWmzFuC8CC1jL66egwWdzMmU3GMdN", "senderPublicKey": "E7bwWH9QduGf4jj1GVqERL7CXjAYaaj9YifNq5o7A5ZM", "proofs": [ "4Km9m6bs6U5fXwhbFq2UsxCNMjTZhpxrnQZCLahyVGCpwCJiGSVZdY7UNwU31qTMzrfAqwP69gLiGrkU7PmewMEE" ], "script": "base64:BgINCAISABIDCgEBEgASAAkABnVzZG5JZAEgD/IcEqzkxDya7EYaqyWosOy6BytGzG2IcvC14pJJAbQACXVzZG5JZFN0cgIsMjVGRXFFalJrcUs2eUNraVQ3THo2U0FZejdnVUZDdHhmQ0NobnJWRkQ1QVQACHB1enpsZUlkASBUIP2ahsY3H5qgvXhIyN9J/Le53Mzn5csGOcF0H4nk2wALcHV6emxlSWRTdHICLDZmUVJhTDNMMjVuR3FldlhUOGt4d2pCUzI4ZmtCRXJySjY5SlljajdxS2dXAAVTY2FsZQCAoJSljR0BDXRyeUdldEludGVnZXIBA2tleQQHJG1hdGNoMAkAmggCBQR0aGlzBQNrZXkDCQABAgUHJG1hdGNoMAIDSW50BAFiBQckbWF0Y2gwBQFiAAABDHRyeUdldFN0cmluZwEDa2V5BAckbWF0Y2gwCQCdCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgZTdHJpbmcEAWEFByRtYXRjaDAFAWECAAEQY2xhaW1BbGlhc1Jlc3VsdAIHYWRkcmVzcwphc3NldElkU3RyBAphZGRyZXNzU3RyCQClCAEFB2FkZHJlc3MED2N1cnJlb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FA25pbAUGYW1vdW50CQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAQdBZGRyZXNzAQEaAVSbLsJROE5UFJ7qeA0vzhO5KVNfK7DweWkFCXBtdEFtb3VudAUIcG10QXNzZXQFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXmG0QSA", "chainId": 84, "height": 3083150, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3kHjWBX9qUrK8faXuKvSmSQzEWpq8iWQgGfJiDL8S47C Next: none Diff:
OldNewDifferences
55
66 let b = "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"
77
8-let c = base58'HEB8Qaw9xrWpWs8tHsiATYGBWDBtP2S7kcPALrMu43AS'
8+let c = base58'6fQRaL3L25nGqevXT8kxwjBS28fkBErrJ69JYcj7qKgW'
99
10-let d = "HEB8Qaw9xrWpWs8tHsiATYGBWDBtP2S7kcPALrMu43AS"
10+let d = "6fQRaL3L25nGqevXT8kxwjBS28fkBErrJ69JYcj7qKgW"
1111
1212 let e = 1000000000000
1313
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'
55
66 let b = "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"
77
8-let c = base58'HEB8Qaw9xrWpWs8tHsiATYGBWDBtP2S7kcPALrMu43AS'
8+let c = base58'6fQRaL3L25nGqevXT8kxwjBS28fkBErrJ69JYcj7qKgW'
99
10-let d = "HEB8Qaw9xrWpWs8tHsiATYGBWDBtP2S7kcPALrMu43AS"
10+let d = "6fQRaL3L25nGqevXT8kxwjBS28fkBErrJ69JYcj7qKgW"
1111
1212 let e = 1000000000000
1313
1414 func f (g) = {
1515 let h = getInteger(this, g)
1616 if ($isInstanceOf(h, "Int"))
1717 then {
1818 let i = h
1919 i
2020 }
2121 else 0
2222 }
2323
2424
2525 func j (g) = {
2626 let h = getString(this, g)
2727 if ($isInstanceOf(h, "String"))
2828 then {
2929 let k = h
3030 k
3131 }
3232 else ""
3333 }
3434
3535
3636 func l (m,n) = {
3737 let o = toString(m)
3838 let p = f((("global_lastCheck_" + n) + "_interest"))
3939 let q = f((o + "_staked"))
4040 let r = f((((o + "_lastCheck_") + n) + "_interest"))
4141 let s = if ((r == 0))
4242 then 0
4343 else r
4444 let t = fraction((p - s), q, e)
4545 [IntegerEntry((((o + "_lastCheck_") + n) + "_interest"), p), IntegerEntry((((o + "_") + n) + "_claimed"), (f((((o + "_") + n) + "_claimed")) + t)), ScriptTransfer(m, t, fromBase58String(n))]
4646 }
4747
4848
4949 func u (m) = (l(m, b) ++ l(m, d))
5050
5151
5252 @Callable(v)
5353 func stake () = {
5454 let w = v.payments[0].amount
5555 let o = toString(v.caller)
5656 let n = toBase58String(a)
5757 let x = f("global_staked")
5858 if ((v.payments[0].assetId != c))
5959 then throw("wrong asset attached")
6060 else (u(v.caller) ++ [IntegerEntry("global_staked", (x + w)), IntegerEntry((o + "_staked"), (f((o + "_staked")) + w))])
6161 }
6262
6363
6464
6565 @Callable(v)
6666 func unStake (w) = {
6767 let o = toString(v.caller)
6868 let q = f((o + "_staked"))
6969 if ((w > q))
7070 then throw("you don't have tokens available")
7171 else (u(v.caller) ++ [IntegerEntry((o + "_staked"), (q - w)), IntegerEntry("global_staked", (f("global_staked") - w)), ScriptTransfer(v.caller, w, c)])
7272 }
7373
7474
7575
7676 @Callable(v)
7777 func claimReward () = u(v.caller)
7878
7979
8080
8181 @Callable(v)
8282 func topUpReward () = {
8383 let y = value(v.payments[0].assetId)
8484 let z = v.payments[0].amount
8585 let w = if ((y == a))
8686 then 0
8787 else if ((y == c))
8888 then z
8989 else throw("not correct asset attached")
9090 if ((w == w))
9191 then {
9292 let p = f((("global_lastCheck_" + d) + "_interest"))
9393 let x = f("global_staked")
9494 let A = if ((x > 0))
9595 then fraction(w, e, x)
9696 else 0
9797 if ((y == c))
9898 then $Tuple2([IntegerEntry((("global_" + d) + "_earnings"), (f((("global_" + d) + "_earnings")) + w)), IntegerEntry((("global_lastCheck_" + d) + "_interest"), (p + A))], w)
9999 else [ScriptTransfer(Address(base58'3N44cXXhd7Xk7hr7JkLa3mTStLQnFpUfKgC'), z, y)]
100100 }
101101 else throw("Strict value is not equal to itself.")
102102 }
103103
104104
105105 @Verifier(B)
106106 func C () = sigVerify(B.bodyBytes, B.proofs[0], B.senderPublicKey)
107107

github/deemru/w8io/026f985 
22.61 ms