tx · HxiTscvZdKWKreKhF6oqun29jxg41dEuXaCdSWavho5o

3MpQMfcqygL5TqY51peDk3tD4YC35ZtLHDR:  -0.00400000 Waves

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

{ "type": 13, "id": "HxiTscvZdKWKreKhF6oqun29jxg41dEuXaCdSWavho5o", "fee": 400000, "feeAssetId": null, "timestamp": 1714333855532, "version": 1, "sender": "3MpQMfcqygL5TqY51peDk3tD4YC35ZtLHDR", "senderPublicKey": "6gZhJH4ky42qJRCmfh8c56C2eeKTB5MRzEKsSZToBtYT", "proofs": [ "4Fs6dQSeH4iR1pmcwfvxhG9QcNTJ2jhZEq3CPPa1UK3srY79s5iHnTFhXHbvSNNidzHrK3nMLW6M8YdMvCu36M5n" ], "script": "base64:BgINCAISABIDCgEIEgASAAkABnVzZG5JZAEgD/IcEqzkxDya7EYaqyWosOy6BytGzG2IcvC14pJJAbQACXVzZG5JZFN0cgIsMjVGRXFFalJrcUs2eUNraVQ3THo2U0FZejdnVUZDdHhmQ0NobnJWRkQ1QVQACHB1enpsZUlkASBUIP2ahsY3H5qgvXhIyN9J/Le53Mzn5csGOcF0H4nk2wAFU2NhbGUAgKCUpY0dAQ10cnlHZXRJbnRlZ2VyAQNrZXkEByRtYXRjaDAJAJoIAgUEdGhpcwUDa2V5AwkAAQIFByRtYXRjaDACA0ludAQBYgUHJG1hdGNoMAUBYgAAAQx0cnlHZXRTdHJpbmcBA2tleQQHJG1hdGNoMAkAnQgCBQR0aGlzBQNrZXkDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAFhBQckbWF0Y2gwBQFhAgABEGNsYWltQWxpYXNSZXN1bHQCB2FkZHJlc3MKYXNzZXRJZFN0cgQKYWRkcmVzc1N0cgkApQgBBQdhZGRyZXNzBA9jdXJyZW50SW50ZXJlc3QJAQ10cnlHZXRJbnRlZ2VyAQkArAICCQCsAgICEWdsb2JhbF9sYXN0Q2hl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0cgIJX2Vhcm5pbmdzCQBkAgkBDXRyeUdldEludGVnZXIBCQCsAgIJAKwCAgIHZ2xvYmFsXwUKYXNzZXRJZFN0cgIJX2Vhcm5pbmdzBQZhbW91bnQJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgkArAICAhFnbG9iYWxfbGFzdENoZWNrXwUKYXNzZXRJZFN0cgIJX2ludGVyZXN0CQBkAgUPY3VycmVudEludGVyZXN0BQ1pbnRlcmVzdERlbHRhBQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5UPw7/w==", "chainId": 84, "height": 3083150, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 92votuufkWPrPiLdRsmxfSoyeQ2pDX8GxRemzA5mM2sH Next: none Diff:
OldNewDifferences
55
66 let b = "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"
77
8-let c = base58'HEB8Qaw9xrWpWs8tHsiATYGBWDBtP2S7kcPALrMu43AS'
8+let c = base58'6fQRaL3L25nGqevXT8kxwjBS28fkBErrJ69JYcj7qKgW'
99
1010 let d = 1000000000000
1111
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
1010 let d = 1000000000000
1111
1212 func e (f) = {
1313 let g = getInteger(this, f)
1414 if ($isInstanceOf(g, "Int"))
1515 then {
1616 let h = g
1717 h
1818 }
1919 else 0
2020 }
2121
2222
2323 func i (f) = {
2424 let g = getString(this, f)
2525 if ($isInstanceOf(g, "String"))
2626 then {
2727 let j = g
2828 j
2929 }
3030 else ""
3131 }
3232
3333
3434 func k (l,m) = {
3535 let n = toString(l)
3636 let o = e((("global_lastCheck_" + m) + "_interest"))
3737 let p = e((((n + "_lastCheck_") + m) + "_interest"))
3838 let q = if ((m == b))
3939 then e((n + "_staked"))
4040 else e((((n + "_") + m) + "_staked"))
4141 let r = if ((p > 0))
4242 then fraction((o - p), q, d)
4343 else 0
4444 [IntegerEntry((((n + "_lastCheck_") + m) + "_interest"), o), IntegerEntry((((n + "_") + m) + "_claimed"), (e((((n + "_") + m) + "_claimed")) + r)), ScriptTransfer(l, r, a)]
4545 }
4646
4747
4848 func s (l) = k(l, b)
4949
5050
5151 func t (u) = {
5252 let g = getString(Address(base58'3N9yxp4gyTCsEtPUzE7CFLnae4YwqRgwUkW'), (("art_" + toBase58String(u)) + "_type"))
5353 if ($isInstanceOf(g, "String"))
5454 then {
5555 let v = g
5656 5
5757 }
5858 else if ((getString(Address(base58'3N7CE8qNvnNNzk1pCxFJ4S8LA4sTyWakczC'), (("nft_" + toBase58String(u)) + "_issuer")) == "3N7G3XELPvHrkSrTLzbWQwAxPLcEUhNnsht"))
5959 then 1
6060 else 0
6161 }
6262
6363
6464 @Callable(w)
6565 func stake () = {
6666 let n = toString(w.caller)
6767 let x = if ((w.payments[0].amount == 1))
6868 then value(w.payments[0].assetId)
6969 else throw("please attach NFT")
7070 let m = toBase58String(a)
7171 let o = e((("global_lastCheck_" + m) + "_interest"))
7272 let y = e("global_staked")
7373 let z = fraction(10000, t(x), 5)
7474 let A = if ((z == 10000))
7575 then "Eagle NFT"
7676 else "Ania NFT"
7777 if ((z == 0))
7878 then throw("not valid NFT attached")
7979 else (s(w.caller) ++ [IntegerEntry("global_staked", (y + z)), IntegerEntry((n + "_staked"), (e((n + "_staked")) + z)), StringEntry((toBase58String(x) + "_owner"), n), IntegerEntry(((("address_" + toString(w.caller)) + "_nft_") + toBase58String(x)), lastBlock.timestamp), StringEntry((toBase58String(x) + "_name"), A)])
8080 }
8181
8282
8383
8484 @Callable(w)
8585 func unStake (B) = {
8686 let z = fraction(10000, t(fromBase58String(B)), 5)
8787 let n = toString(w.caller)
8888 let q = e((n + "_staked"))
8989 let C = i((B + "_owner"))
9090 if ((n != C))
9191 then throw("you don't have NFT available")
9292 else (s(w.caller) ++ [IntegerEntry((n + "_staked"), (q - z)), IntegerEntry("global_staked", (e("global_staked") - z)), ScriptTransfer(w.caller, 1, fromBase58String(B)), DeleteEntry((B + "_owner")), DeleteEntry(((("address_" + toString(w.caller)) + "_nft_") + B))])
9393 }
9494
9595
9696
9797 @Callable(w)
9898 func claimReward () = s(w.caller)
9999
100100
101101
102102 @Callable(w)
103103 func topUpReward () = {
104104 let D = w.payments[0].amount
105105 let m = b
106106 let o = e((("global_lastCheck_" + m) + "_interest"))
107107 let y = e("global_staked")
108108 let E = if ((y > 0))
109109 then fraction(D, d, y)
110110 else 0
111111 let F = e("global_lastCheck_ultra_interest")
112112 let G = e("global_ultra_staked")
113113 let H = if ((y > 0))
114114 then fraction(D, d, y)
115115 else 0
116116 if ((w.payments[0].assetId != a))
117117 then throw("wrong asset attached")
118118 else [IntegerEntry((("global_" + m) + "_earnings"), (e((("global_" + m) + "_earnings")) + D)), IntegerEntry((("global_lastCheck_" + m) + "_interest"), (o + E))]
119119 }
120120
121121
122122 @Verifier(I)
123123 func J () = sigVerify(I.bodyBytes, I.proofs[0], I.senderPublicKey)
124124

github/deemru/w8io/169f3d6 
53.07 ms