tx · 8wn6b7KHg9Xxt7x4Frs34WsdRdZg2nSba621tRE6U7TJ

3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw:  -0.01000000 Waves

2022.06.08 22:07 [2087786] smart account 3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw > SELF 0.00000000 Waves

{ "type": 13, "id": "8wn6b7KHg9Xxt7x4Frs34WsdRdZg2nSba621tRE6U7TJ", "fee": 1000000, "feeAssetId": null, "timestamp": 1654715312104, "version": 2, "chainId": 84, "sender": "3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw", "senderPublicKey": "GTKqLSK6nuFkRdebB5SmTwTU2DnTeLMvhymCFfT2CxX2", "proofs": [ "4vQpJd6UW4vXfTsaAHrqAS4d8EeBQMMmkBHV75QBqXxfHb26RSbJrk8HtvhnfWncpBwJ4yqyLwzehiHYMYkuuoeg" ], "script": "base64:AAIFAAAAAAAAAAsIAhIAEgMKAQgSAAAAAA0AAAAABEhBU0gBAAAAIJklwE3i+u/bc48vf4d/BnVXhMLmuX4eB+81QVXPc36rAAAAAAhLcm9zc0NhcgEAAAAgNewIuJ8fl0L3aDIXfe5KYUI4pQbPPcpdLtTikAZosrsAAAAABlRvd2luZwEAAAAgLzVn9FxXOELHRV9NM7WHnRz83AP0i2FsXYU/kxb44koAAAAACGRBcHBGZWVzAQAAABoBV5prAZfpnthmNq2ZMbws44Htl6ZEmG28iwAAAAAJQWRtaW5kQXBwAQAAABoBV9BDQuIchL6bmoa833jKal/OBiGoZGoQDgAAAAAJTWluQW1vdW50AAAAAAAAAAK8AAAAAA5Lcm9zc0NhclJld2FyZAAAAAAAAAAAAQAAAAAMVG93aW5nUmV3YXJkAAAAAAAAAAABAAAAAApSZWZlcnJlVGlwAAAAAAAAAAABAAAAAAxtaW5Kb2luV2Vla3MAAAAAAAAAAAgAAAAAClRpbWVUb3dpbmcAAAAAAAAAAB4AAAAABFdlZWsAAAAAAAAAAAoAAAAAA0RheQAAAAAAAAAABQAAAAMAA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AAIFAAAACU1pbkFtb3VudAAAAAAABfXhAAkAAGkAAAACCQAAaAAAAAIFAAAABmFtb3VudAkAAGUAAAACBQAAAAZoZWlnaHQFAAAAEVVzZXJNYXR1cml0eVZhbHVlBQAAAARXZWVrBgkAAGYAAAACCQAAaAAAAAIFAAAADG1pbkpvaW5XZWVrcwUAAAAEV2VlawkAAGUAAAACBQAAAAZoZWlnaHQFAAAAEVVzZXJNYXR1cml0eVZhbHVlBgkAAGYAAAACCQAAaAAAAAIFAAAAClRpbWVUb3dpbmcFAAAAA0RheQUAAAAUTGFzdFRvd2luZ0Jsb2NrVmFsdWUJAAACAAAAAQIAAAAACQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAAQX0xhc3RUb3dpbmdCbG9jawUAAAAGaGVpZ2h0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgkAAGgAAAACBQAAAAxUb3dpbmdSZXdhcmQAAAAAAAX14QAFAAAABlRvd2luZwUAAAADbmlsAAAAAPFDnEY=", "height": 2087786, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7pvMHoQzHgSyGkLLr47ezpYn5Ros1wvkbzhuPYnyzkCA Next: 4TKUWPBoMW8BGMBYAYHawuoGfx2F6aun89AZ34CnmKmP Diff:
OldNewDifferences
3636 case _ =>
3737 0
3838 }
39- if ((amount != 0))
40- then throw("You have already deposited funds, deposits can only be done once")
39+ let pmt = if ((size(i.payments) == 1))
40+ then i.payments[0]
41+ else throw("Attached payment is required")
42+ if (if (((MinAmount * 100000000) >= pmt.amount))
43+ then true
44+ else (pmt.assetId != HASH))
45+ then throw("Can only deposit HASH tokens, and minimum amount is 700 HASH")
4146 else {
42- let pmt = if ((size(i.payments) == 1))
43- then i.payments[0]
44- else throw("Attached payment is required")
45- if (if (((MinAmount * 100000000) >= pmt.amount))
46- then true
47- else (pmt.assetId != HASH))
48- then throw("Can only deposit HASH tokens, and minimum amount is 700 HASH")
49- else {
50- let UserDepositValue = (amount + pmt.amount)
47+ let UserDepositValue = (amount + pmt.amount)
5148 [IntegerEntry((toBase58String(i.caller.bytes) + "_Deposit"), UserDepositValue), IntegerEntry((toBase58String(i.caller.bytes) + "_DepositBlock"), height), ScriptTransfer(i.caller, (KrossCarReward * 100000000), KrossCar)]
52- }
5349 }
5450 }
5551
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 = 30
2525
2626 let Week = 10
2727
2828 let Day = 5
2929
3030 @Callable(i)
3131 func DepositHASH () = {
3232 let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit")
3333 let amount = match getInteger(this, UserDeposit) {
3434 case a: Int =>
3535 a
3636 case _ =>
3737 0
3838 }
39- if ((amount != 0))
40- then throw("You have already deposited funds, deposits can only be done once")
39+ let pmt = if ((size(i.payments) == 1))
40+ then i.payments[0]
41+ else throw("Attached payment is required")
42+ if (if (((MinAmount * 100000000) >= pmt.amount))
43+ then true
44+ else (pmt.assetId != HASH))
45+ then throw("Can only deposit HASH tokens, and minimum amount is 700 HASH")
4146 else {
42- let pmt = if ((size(i.payments) == 1))
43- then i.payments[0]
44- else throw("Attached payment is required")
45- if (if (((MinAmount * 100000000) >= pmt.amount))
46- then true
47- else (pmt.assetId != HASH))
48- then throw("Can only deposit HASH tokens, and minimum amount is 700 HASH")
49- else {
50- let UserDepositValue = (amount + pmt.amount)
47+ let UserDepositValue = (amount + pmt.amount)
5148 [IntegerEntry((toBase58String(i.caller.bytes) + "_Deposit"), UserDepositValue), IntegerEntry((toBase58String(i.caller.bytes) + "_DepositBlock"), height), ScriptTransfer(i.caller, (KrossCarReward * 100000000), KrossCar)]
52- }
5349 }
5450 }
5551
5652
5753
5854 @Callable(i)
5955 func RewardReferrer (UserWalletAddress) = {
6056 let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit")
6157 let TippedStatus = (toBase58String(i.caller.bytes) + "_TippedStatus")
6258 let amount = match getInteger(this, UserDeposit) {
6359 case a: Int =>
6460 a
6561 case _ =>
6662 0
6763 }
6864 let TippedStatusValue = getStringValue(this, TippedStatus)
6965 if ((TippedStatusValue == "YES"))
7066 then throw("You already tipped a User, you only can tip once a user")
7167 else if (((MinAmount * 100000000) > amount))
7268 then throw((("To tip your referrer you must have at least deposited: " + toString(MinAmount)) + " HASH"))
7369 else [StringEntry((toBase58String(i.caller.bytes) + "_TippedStatus"), "YES"), ScriptTransfer(i.caller, (ReferreTip * 100000000), KrossCar)]
7470 }
7571
7672
7773
7874 @Callable(i)
7975 func RequestTowing () = {
8076 let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit")
8177 let UserMaturity = (toBase58String(i.caller.bytes) + "_DepositBlock")
8278 let LastTowingBlock = (toBase58String(i.caller.bytes) + "_LastTowingBlock")
8379 let amount = match getInteger(this, UserDeposit) {
8480 case a: Int =>
8581 a
8682 case _ =>
8783 0
8884 }
8985 let UserMaturityValue = match getInteger(this, UserMaturity) {
9086 case a: Int =>
9187 a
9288 case _ =>
9389 0
9490 }
9591 let LastTowingBlockValue = match getInteger(this, LastTowingBlock) {
9692 case a: Int =>
9793 a
9894 case _ =>
9995 0
10096 }
10197 if (if (if (((MinAmount * 100000000) > ((amount * (height - UserMaturityValue)) / Week)))
10298 then true
10399 else ((minJoinWeeks * Week) > (height - UserMaturityValue)))
104100 then true
105101 else ((TimeTowing * Day) > LastTowingBlockValue))
106102 then throw("")
107103 else [IntegerEntry((toBase58String(i.caller.bytes) + "_LastTowingBlock"), height), ScriptTransfer(i.caller, (TowingReward * 100000000), Towing)]
108104 }
109105
110106

github/deemru/w8io/169f3d6 
26.86 ms