tx · 7MyNfWvTthGaMoHkBeyWkUzM4NSpAVGzu5HdCybpZRax

3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw:  -0.01000000 Waves

2022.06.09 17:32 [2088966] smart account 3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw > SELF 0.00000000 Waves

{ "type": 13, "id": "7MyNfWvTthGaMoHkBeyWkUzM4NSpAVGzu5HdCybpZRax", "fee": 1000000, "feeAssetId": null, "timestamp": 1654785165121, "version": 2, "chainId": 84, "sender": "3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw", "senderPublicKey": "GTKqLSK6nuFkRdebB5SmTwTU2DnTeLMvhymCFfT2CxX2", "proofs": [ "4j8pnaQr46N8LgQa4A6TyJ2CwBHmVNeX8yZhQs9zUVwto4JcbAa5EjAZbm21g58E6V97w552ZF55QzQ4feJfZWCp" ], "script": "base64:AAIFAAAAAAAAAA0IAhIAEgASAwoBCBIAAAAADQAAAAAESEFTSAEAAAAgmSXATeL679tzjy9/h38GdVeEwua5fh4H7zVBVc9zfqsAAAAACEtyb3NzQ2FyAQAAACA17Ai4nx+XQvdoMhd97kphQjilBs89yl0u1OKQBmiyuwAAAAAGVG93aW5nAQAAACAvNWf0XFc4QsdFX00ztYedHPzcA/SLYWxdhT+TFvjiSgAAAAAIZEFwcEZlZXMBAAAAGgFXmmsBl+me2GY2rZkxvCzjge2XpkSYbbyLAAAAAAlBZG1pbmRBcHABAAAAGgFX0ENC4hyEvpuahrzfeMpqX84GIahkahAOAAAAAAlNaW5BbW91bnQAAAAAAAAAArwAAAAADktyb3NzQ2FyUmV3YXJkAAAAAAAAAAABAAAAAAxUb3dpbmdSZXdhcmQAAAAAAAAAAAEAAAAAClJlZmVycmVUaXAAAAAAAAAAAAEAAAAADG1pbkpvaW5XZWVrcwAAAAAAAAAACAAAAAAKVGltZVRvd2luZwAAAAAAAAAAAgAAAAAEV2VlawAAAAAAAAAACgAAAAADRGF5AAAAAAAAAAAFAAAABAAAAAFpAQ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Z2h0BQAAABRMYXN0VG93aW5nQmxvY2tWYWx1ZQUAAAADRGF5CQAAAgAAAAEJAAEsAAAAAgkAASwAAAACAgAAACRZb3UgY2Fubm90IGNsYWltIHRoZSByZXdhcmQgYmVmb3JlOiAJAAGkAAAAAQkAAGkAAAACCQAAZQAAAAIFAAAABmhlaWdodAUAAAAUTGFzdFRvd2luZ0Jsb2NrVmFsdWUFAAAAA0RheQIAAAAFIGRheXMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAABBfTGFzdFRvd2luZ0Jsb2NrBQAAAAZoZWlnaHQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyCQAAaAAAAAIFAAAADFRvd2luZ1Jld2FyZAAAAAAABfXhAAUAAAAGVG93aW5nBQAAAANuaWwAAAAAv+NkZQ==", "height": 2088966, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Bs3eFB1nEf5JHF9FbKZnqhRuAwfrbcHSB8aLtktFPn9d Next: BkcwhRGszZj1UQSZxT8maECjXwz4j5whpkaRS36Pfq2u Diff:
OldNewDifferences
2626 let Week = 10
2727
2828 let Day = 5
29+
30+@Callable(i)
31+func ReceiveFakeHASHForTest () = [ScriptTransfer(i.caller, (10000 * 100000000), HASH)]
32+
33+
2934
3035 @Callable(i)
3136 func DepositHASH () = {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let HASH = base58'BJpmNoB9MABJ1ytHhbLNxuUaeoYcYVeTM1r7kh39P24i'
55
66 let KrossCar = base58'4dVMkKtzaWuHC21kmxBBUwKQ5LGayLZLV9snpkJxsGeW'
77
88 let Towing = base58'4BHPskP7pBoXLD7U8nk54CstqbsqRvuWr3SDP8uMrz5w'
99
1010 let dAppFees = base58'3PG1NyiC2rdgX46jb8c5zPGuEAzWXhr4L2W'
1111
1212 let AdmindApp = base58'3PLv5rYMqR4gSiP5ZSjrX2FStLhHTRgFPbb'
1313
1414 let MinAmount = 700
1515
1616 let KrossCarReward = 1
1717
1818 let TowingReward = 1
1919
2020 let ReferreTip = 1
2121
2222 let minJoinWeeks = 8
2323
2424 let TimeTowing = 2
2525
2626 let Week = 10
2727
2828 let Day = 5
29+
30+@Callable(i)
31+func ReceiveFakeHASHForTest () = [ScriptTransfer(i.caller, (10000 * 100000000), HASH)]
32+
33+
2934
3035 @Callable(i)
3136 func DepositHASH () = {
3237 let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit")
3338 let amount = match getInteger(this, UserDeposit) {
3439 case a: Int =>
3540 a
3641 case _ =>
3742 0
3843 }
3944 let pmt = if ((size(i.payments) == 1))
4045 then i.payments[0]
4146 else throw("Attached payment is required")
4247 if (if (((MinAmount * 100000000) > pmt.amount))
4348 then true
4449 else (pmt.assetId != HASH))
4550 then throw("Can only deposit HASH tokens, and minimum amount is 700 HASH")
4651 else {
4752 let UserDepositValue = (amount + pmt.amount)
4853 [IntegerEntry((toBase58String(i.caller.bytes) + "_Deposit"), UserDepositValue), IntegerEntry((toBase58String(i.caller.bytes) + "_DepositBlock"), height), ScriptTransfer(i.caller, (KrossCarReward * 100000000), KrossCar)]
4954 }
5055 }
5156
5257
5358
5459 @Callable(i)
5560 func RewardReferrer (UserWalletAddressStr) = if ((UserWalletAddressStr == ""))
5661 then throw("Referrer Wallet Address cannot be empty !")
5762 else {
5863 let UserWalletAddress = addressFromStringValue(UserWalletAddressStr)
5964 let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit")
6065 let TippedStatus = (toBase58String(i.caller.bytes) + "_TippedStatus")
6166 let amount = match getInteger(this, UserDeposit) {
6267 case a: Int =>
6368 a
6469 case _ =>
6570 0
6671 }
6772 let TippedStatusValue = match getString(this, TippedStatus) {
6873 case a: String =>
6974 a
7075 case _ =>
7176 "NO"
7277 }
7378 if ((TippedStatusValue == "YES"))
7479 then throw("You already tipped a User, you only can tip once a user")
7580 else if (((MinAmount * 100000000) > amount))
7681 then throw((("To tip your referrer you must have at least deposited: " + toString(MinAmount)) + " HASH"))
7782 else [StringEntry((toBase58String(i.caller.bytes) + "_TippedStatus"), "YES"), ScriptTransfer(UserWalletAddress, (ReferreTip * 100000000), KrossCar)]
7883 }
7984
8085
8186
8287 @Callable(i)
8388 func RequestTowing () = {
8489 let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit")
8590 let UserMaturity = (toBase58String(i.caller.bytes) + "_DepositBlock")
8691 let LastTowingBlock = (toBase58String(i.caller.bytes) + "_LastTowingBlock")
8792 let amount = match getInteger(this, UserDeposit) {
8893 case a: Int =>
8994 a
9095 case _ =>
9196 0
9297 }
9398 let UserMaturityValue = match getInteger(this, UserMaturity) {
9499 case a: Int =>
95100 a
96101 case _ =>
97102 0
98103 }
99104 let LastTowingBlockValue = match getInteger(this, LastTowingBlock) {
100105 case a: Int =>
101106 a
102107 case _ =>
103108 0
104109 }
105110 if (((MinAmount * 100000000) > ((amount * (height - UserMaturityValue)) / Week)))
106111 then throw(("You should hav deposited at least: " + toString((MinAmount * 100000000))))
107112 else if (((minJoinWeeks * Week) > (height - UserMaturityValue)))
108113 then throw((("You should at least be a member of " + toString(minJoinWeeks)) + " Weeks"))
109114 else if (((TimeTowing * Day) > ((height - LastTowingBlockValue) / Day)))
110115 then throw((("You cannot claim the reward before: " + toString(((height - LastTowingBlockValue) / Day))) + " days"))
111116 else [IntegerEntry((toBase58String(i.caller.bytes) + "_LastTowingBlock"), height), ScriptTransfer(i.caller, (TowingReward * 100000000), Towing)]
112117 }
113118
114119

github/deemru/w8io/169f3d6 
29.06 ms