tx · EKg8zNRJquvz1sG88CqBp5aDrn4sJgFG7ui7QsWg2fKe 3MppNCm5DNcq9NGSEd8qcwdwebmnhEiYE4o: -0.01000000 Waves 2023.09.28 12:05 [2775065] smart account 3MppNCm5DNcq9NGSEd8qcwdwebmnhEiYE4o > SELF 0.00000000 Waves
{ "type": 13, "id": "EKg8zNRJquvz1sG88CqBp5aDrn4sJgFG7ui7QsWg2fKe", "fee": 1000000, "feeAssetId": null, "timestamp": 1695891998306, "version": 2, "chainId": 84, "sender": "3MppNCm5DNcq9NGSEd8qcwdwebmnhEiYE4o", "senderPublicKey": "5mRitb3ddKjtCqYvL1wanLFrri8MuS5uK4n2G1bHP1Eu", "proofs": [ "PPaQRx5WiiwQh8ASjj1FptM9LHesvW9bqff7VmVCbmdVLYtpuJobc6DBXx28w39J9fYFLEP17gYf9sK7XSXYvpH" ], "script": "base64:BgINCAISABIDCgEBEgASAAkABnVzZG5JZAEgbySjyqsw3FIpmOgsYVruWn8jTcItdbvpnapU4NLQB8EACXVzZG5JZFN0cgIsOFVyZkRWZDVHcmVlVXdtN3VQazdlWXoxZU12Mzc2a3pSNTJDNnNBTlBrd1MACHB1enpsZUlkASBhIEdqteU0lNOM+a3jecT6cJU92ajDMxppPdJKJ6I3YAALcHV6emxlSWRTdHICLDdZOTZVVGJCUTQ1Y2pXb0hlRmoyRWhuamRnRXQ2aUsyTG5BNGVUY2Z4ZG9EAAVTY2FsZQCAoJSljR0BDXRyeUdldEludGVnZXIBA2tleQQHJG1hdGNoMAkAmggCBQR0aGlzBQNrZXkDCQABAgUHJG1hdGNoMAIDSW50BAFiBQckbWF0Y2gwBQFiAAABDHRyeUdldFN0cmluZwEDa2V5BAckbWF0Y2gwCQCdCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgZTdHJpbmcEAWEFByRtYXRjaDAFAWECAAEQY2xhaW1BbGlhc1Jlc3VsdAIHYWRkcmVzcwphc3NldElkU3RyBAphZGRyZXNzU3RyCQClCAEFB2FkZ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GVsdGEFA25pbAUGYW1vdW50BQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5zPf1VQ==", "height": 2775065, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 44vX1DNTB2L3omWZXCSFM5NzGpcrML52b9H7DpfVp42H Next: none Diff:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let | |
4 | + | let usdnId = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
5 | 5 | ||
6 | - | let | |
6 | + | let usdnIdStr = "8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS" | |
7 | 7 | ||
8 | - | let | |
8 | + | let puzzleId = base58'7Y96UTbBQ45cjWoHeFj2EhnjdgEt6iK2LnA4eTcfxdoD' | |
9 | 9 | ||
10 | - | let | |
10 | + | let puzzleIdStr = "7Y96UTbBQ45cjWoHeFj2EhnjdgEt6iK2LnA4eTcfxdoD" | |
11 | 11 | ||
12 | - | let | |
12 | + | let Scale = 1000000000000 | |
13 | 13 | ||
14 | - | let usdcUsdnLPTCI = base58'HZKFpNfyPG5gt4D6Nfy1zQSg2Ptmqv932GjNTCyBEeKP' | |
14 | + | func tryGetInteger (key) = match getInteger(this, key) { | |
15 | + | case b: Int => | |
16 | + | b | |
17 | + | case _ => | |
18 | + | 0 | |
19 | + | } | |
15 | 20 | ||
16 | - | let usdcUsdtLP = base58'EPhdEfmQaNcHyvDmRGhnLhgcJtKZ2a4k3ZBmKWtAEWyH' | |
17 | 21 | ||
18 | - | let usdcUsdtLPTCI = base58'BqPYkaiz7Le6fFu1rjZ54anrpT57EpvyugZCUqrsjXj' | |
22 | + | func tryGetString (key) = match getString(this, key) { | |
23 | + | case a: String => | |
24 | + | a | |
25 | + | case _ => | |
26 | + | "" | |
27 | + | } | |
19 | 28 | ||
20 | - | let puzzleUsdnLP = base58'E8zHu33GfcNyGLypX77gZiUXfvuZQeaYmiEfsy7VYNwP' | |
21 | 29 | ||
22 | - | let puzzleUsdnLPTCI = base58'Dh9QXSSABE5V6aRfu3mCbDAUokbpE7ER7pbZV6cvyg1A' | |
30 | + | func claimAliasResult (address,assetIdStr) = { | |
31 | + | let addressStr = toString(address) | |
32 | + | let currentInterest = tryGetInteger((("global_lastCheck_" + assetIdStr) + "_interest")) | |
33 | + | let stakedAmount = tryGetInteger((addressStr + "_staked")) | |
34 | + | let lastCheckInterestInState = tryGetInteger((((addressStr + "_lastCheck_") + assetIdStr) + "_interest")) | |
35 | + | let lastCheckInterest = if ((lastCheckInterestInState == 0)) | |
36 | + | then 0 | |
37 | + | else lastCheckInterestInState | |
38 | + | let reward = fraction((currentInterest - lastCheckInterest), stakedAmount, Scale) | |
39 | + | [IntegerEntry((((addressStr + "_lastCheck_") + assetIdStr) + "_interest"), currentInterest), IntegerEntry((((addressStr + "_") + assetIdStr) + "_claimed"), (tryGetInteger((((addressStr + "_") + assetIdStr) + "_claimed")) + reward)), ScriptTransfer(address, reward, fromBase58String(assetIdStr))] | |
40 | + | } | |
23 | 41 | ||
24 | - | func getTciId (id) = if ((id == usdn)) | |
25 | - | then usdnTest | |
26 | - | else if ((id == waves)) | |
27 | - | then wavesTest | |
28 | - | else throw("invalid asset") | |
42 | + | ||
43 | + | func claimResult (address) = (claimAliasResult(address, usdnIdStr) ++ claimAliasResult(address, puzzleIdStr)) | |
29 | 44 | ||
30 | 45 | ||
31 | 46 | @Callable(i) | |
32 | - | func deposit () = { | |
33 | - | let assetId = i.payments[0].assetId | |
34 | - | let pmtAmount = value(i.payments[0]).amount | |
35 | - | let tciId = getTciId(assetId) | |
36 | - | [StringEntry("test", tciId)] | |
47 | + | func stake () = { | |
48 | + | let amount = i.payments[0].amount | |
49 | + | let addressStr = toString(i.caller) | |
50 | + | let assetIdStr = toBase58String(usdnId) | |
51 | + | let totalStakedAmount = tryGetInteger("global_staked") | |
52 | + | if ((i.payments[0].assetId != puzzleId)) | |
53 | + | then throw("wrong asset attached") | |
54 | + | else (claimResult(i.caller) ++ [IntegerEntry("global_staked", (totalStakedAmount + amount)), IntegerEntry((addressStr + "_staked"), (tryGetInteger((addressStr + "_staked")) + amount))]) | |
55 | + | } | |
56 | + | ||
57 | + | ||
58 | + | ||
59 | + | @Callable(i) | |
60 | + | func unStake (amount) = { | |
61 | + | let addressStr = toString(i.caller) | |
62 | + | let stakedAmount = tryGetInteger((addressStr + "_staked")) | |
63 | + | if ((amount > stakedAmount)) | |
64 | + | then throw("you don't have tokens available") | |
65 | + | else (claimResult(i.caller) ++ [IntegerEntry((addressStr + "_staked"), (stakedAmount - amount)), IntegerEntry("global_staked", (tryGetInteger("global_staked") - amount)), ScriptTransfer(i.caller, amount, puzzleId)]) | |
66 | + | } | |
67 | + | ||
68 | + | ||
69 | + | ||
70 | + | @Callable(i) | |
71 | + | func claimReward () = claimResult(i.caller) | |
72 | + | ||
73 | + | ||
74 | + | ||
75 | + | @Callable(i) | |
76 | + | func topUpReward () = { | |
77 | + | let pmtAsset = value(i.payments[0].assetId) | |
78 | + | let pmtAmount = i.payments[0].amount | |
79 | + | let amount = if ((pmtAsset == puzzleId)) | |
80 | + | then 0 | |
81 | + | else if ((pmtAsset == usdnId)) | |
82 | + | then pmtAmount | |
83 | + | else throw("not correct asset attached") | |
84 | + | if ((amount == amount)) | |
85 | + | then { | |
86 | + | let currentInterest = tryGetInteger((("global_lastCheck_" + usdnIdStr) + "_interest")) | |
87 | + | let totalStakedAmount = tryGetInteger("global_staked") | |
88 | + | let interestDelta = if ((totalStakedAmount > 0)) | |
89 | + | then fraction(amount, Scale, totalStakedAmount) | |
90 | + | else 0 | |
91 | + | if ((pmtAsset != puzzleId)) | |
92 | + | then $Tuple2([IntegerEntry((("global_" + usdnIdStr) + "_earnings"), (tryGetInteger((("global_" + usdnIdStr) + "_earnings")) + amount)), IntegerEntry((("global_lastCheck_" + usdnIdStr) + "_interest"), (currentInterest + interestDelta))], amount) | |
93 | + | else nil | |
94 | + | } | |
95 | + | else throw("Strict value is not equal to itself.") | |
37 | 96 | } | |
38 | 97 | ||
39 | 98 |
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let | |
4 | + | let usdnId = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
5 | 5 | ||
6 | - | let | |
6 | + | let usdnIdStr = "8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS" | |
7 | 7 | ||
8 | - | let | |
8 | + | let puzzleId = base58'7Y96UTbBQ45cjWoHeFj2EhnjdgEt6iK2LnA4eTcfxdoD' | |
9 | 9 | ||
10 | - | let | |
10 | + | let puzzleIdStr = "7Y96UTbBQ45cjWoHeFj2EhnjdgEt6iK2LnA4eTcfxdoD" | |
11 | 11 | ||
12 | - | let | |
12 | + | let Scale = 1000000000000 | |
13 | 13 | ||
14 | - | let usdcUsdnLPTCI = base58'HZKFpNfyPG5gt4D6Nfy1zQSg2Ptmqv932GjNTCyBEeKP' | |
14 | + | func tryGetInteger (key) = match getInteger(this, key) { | |
15 | + | case b: Int => | |
16 | + | b | |
17 | + | case _ => | |
18 | + | 0 | |
19 | + | } | |
15 | 20 | ||
16 | - | let usdcUsdtLP = base58'EPhdEfmQaNcHyvDmRGhnLhgcJtKZ2a4k3ZBmKWtAEWyH' | |
17 | 21 | ||
18 | - | let usdcUsdtLPTCI = base58'BqPYkaiz7Le6fFu1rjZ54anrpT57EpvyugZCUqrsjXj' | |
22 | + | func tryGetString (key) = match getString(this, key) { | |
23 | + | case a: String => | |
24 | + | a | |
25 | + | case _ => | |
26 | + | "" | |
27 | + | } | |
19 | 28 | ||
20 | - | let puzzleUsdnLP = base58'E8zHu33GfcNyGLypX77gZiUXfvuZQeaYmiEfsy7VYNwP' | |
21 | 29 | ||
22 | - | let puzzleUsdnLPTCI = base58'Dh9QXSSABE5V6aRfu3mCbDAUokbpE7ER7pbZV6cvyg1A' | |
30 | + | func claimAliasResult (address,assetIdStr) = { | |
31 | + | let addressStr = toString(address) | |
32 | + | let currentInterest = tryGetInteger((("global_lastCheck_" + assetIdStr) + "_interest")) | |
33 | + | let stakedAmount = tryGetInteger((addressStr + "_staked")) | |
34 | + | let lastCheckInterestInState = tryGetInteger((((addressStr + "_lastCheck_") + assetIdStr) + "_interest")) | |
35 | + | let lastCheckInterest = if ((lastCheckInterestInState == 0)) | |
36 | + | then 0 | |
37 | + | else lastCheckInterestInState | |
38 | + | let reward = fraction((currentInterest - lastCheckInterest), stakedAmount, Scale) | |
39 | + | [IntegerEntry((((addressStr + "_lastCheck_") + assetIdStr) + "_interest"), currentInterest), IntegerEntry((((addressStr + "_") + assetIdStr) + "_claimed"), (tryGetInteger((((addressStr + "_") + assetIdStr) + "_claimed")) + reward)), ScriptTransfer(address, reward, fromBase58String(assetIdStr))] | |
40 | + | } | |
23 | 41 | ||
24 | - | func getTciId (id) = if ((id == usdn)) | |
25 | - | then usdnTest | |
26 | - | else if ((id == waves)) | |
27 | - | then wavesTest | |
28 | - | else throw("invalid asset") | |
42 | + | ||
43 | + | func claimResult (address) = (claimAliasResult(address, usdnIdStr) ++ claimAliasResult(address, puzzleIdStr)) | |
29 | 44 | ||
30 | 45 | ||
31 | 46 | @Callable(i) | |
32 | - | func deposit () = { | |
33 | - | let assetId = i.payments[0].assetId | |
34 | - | let pmtAmount = value(i.payments[0]).amount | |
35 | - | let tciId = getTciId(assetId) | |
36 | - | [StringEntry("test", tciId)] | |
47 | + | func stake () = { | |
48 | + | let amount = i.payments[0].amount | |
49 | + | let addressStr = toString(i.caller) | |
50 | + | let assetIdStr = toBase58String(usdnId) | |
51 | + | let totalStakedAmount = tryGetInteger("global_staked") | |
52 | + | if ((i.payments[0].assetId != puzzleId)) | |
53 | + | then throw("wrong asset attached") | |
54 | + | else (claimResult(i.caller) ++ [IntegerEntry("global_staked", (totalStakedAmount + amount)), IntegerEntry((addressStr + "_staked"), (tryGetInteger((addressStr + "_staked")) + amount))]) | |
55 | + | } | |
56 | + | ||
57 | + | ||
58 | + | ||
59 | + | @Callable(i) | |
60 | + | func unStake (amount) = { | |
61 | + | let addressStr = toString(i.caller) | |
62 | + | let stakedAmount = tryGetInteger((addressStr + "_staked")) | |
63 | + | if ((amount > stakedAmount)) | |
64 | + | then throw("you don't have tokens available") | |
65 | + | else (claimResult(i.caller) ++ [IntegerEntry((addressStr + "_staked"), (stakedAmount - amount)), IntegerEntry("global_staked", (tryGetInteger("global_staked") - amount)), ScriptTransfer(i.caller, amount, puzzleId)]) | |
66 | + | } | |
67 | + | ||
68 | + | ||
69 | + | ||
70 | + | @Callable(i) | |
71 | + | func claimReward () = claimResult(i.caller) | |
72 | + | ||
73 | + | ||
74 | + | ||
75 | + | @Callable(i) | |
76 | + | func topUpReward () = { | |
77 | + | let pmtAsset = value(i.payments[0].assetId) | |
78 | + | let pmtAmount = i.payments[0].amount | |
79 | + | let amount = if ((pmtAsset == puzzleId)) | |
80 | + | then 0 | |
81 | + | else if ((pmtAsset == usdnId)) | |
82 | + | then pmtAmount | |
83 | + | else throw("not correct asset attached") | |
84 | + | if ((amount == amount)) | |
85 | + | then { | |
86 | + | let currentInterest = tryGetInteger((("global_lastCheck_" + usdnIdStr) + "_interest")) | |
87 | + | let totalStakedAmount = tryGetInteger("global_staked") | |
88 | + | let interestDelta = if ((totalStakedAmount > 0)) | |
89 | + | then fraction(amount, Scale, totalStakedAmount) | |
90 | + | else 0 | |
91 | + | if ((pmtAsset != puzzleId)) | |
92 | + | then $Tuple2([IntegerEntry((("global_" + usdnIdStr) + "_earnings"), (tryGetInteger((("global_" + usdnIdStr) + "_earnings")) + amount)), IntegerEntry((("global_lastCheck_" + usdnIdStr) + "_interest"), (currentInterest + interestDelta))], amount) | |
93 | + | else nil | |
94 | + | } | |
95 | + | else throw("Strict value is not equal to itself.") | |
37 | 96 | } | |
38 | 97 | ||
39 | 98 | ||
40 | 99 | @Verifier(tx) | |
41 | 100 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
42 | 101 |
github/deemru/w8io/169f3d6 27.21 ms ◑