tx · 7pvMHoQzHgSyGkLLr47ezpYn5Ros1wvkbzhuPYnyzkCA 3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw: -0.01000000 Waves 2022.06.08 22:05 [2087784] smart account 3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw > SELF 0.00000000 Waves
{ "type": 13, "id": "7pvMHoQzHgSyGkLLr47ezpYn5Ros1wvkbzhuPYnyzkCA", "fee": 1000000, "feeAssetId": null, "timestamp": 1654715144028, "version": 2, "chainId": 84, "sender": "3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw", "senderPublicKey": "GTKqLSK6nuFkRdebB5SmTwTU2DnTeLMvhymCFfT2CxX2", "proofs": [ "rWek4xioU3ZsLjXVWSaehWRQdyJZ8Kjpt8wDQKgCyRyjSA8FF6GhxTD9abZXPKQg4F28VVoU3UgFnbKz6zdLURz" ], "script": "base64:AAIFAAAAAAAAAAsIAhIAEgMKAQgSAAAAAA0AAAAABEhBU0gBAAAAIJklwE3i+u/bc48vf4d/BnVXhMLmuX4eB+81QVXPc36rAAAAAAhLcm9zc0NhcgEAAAAgNewIuJ8fl0L3aDIXfe5KYUI4pQbPPcpdLtTikAZosrsAAAAABlRvd2luZwEAAAAgLzVn9FxXOELHRV9NM7WHnRz83AP0i2FsXYU/kxb44koAAAAACGRBcHBGZWVzAQAAABoBV5prAZfpnthmNq2ZMbws44Htl6ZEmG28iwAAAAAJQWRtaW5kQXBwAQAAABoBV9BDQuIchL6bmoa833jKal/OBiGoZGoQDgAAAAAJTWluQW1vdW50AAAAAAAAAAK8AAAAAA5Lcm9zc0NhclJld2FyZAAAAAAAAAAAAQAAAAAMVG93aW5nUmV3YXJkAAAAAAAAAAABAAAAAApSZWZlcnJlVGlwAAAAAAAAAAABAAAAAAxtaW5Kb2luV2Vla3MAAAAAAAAAAAgAAAAAClRpbWVUb3dpbmcAAAAAAAAAAB4AAAAABFdlZWsAAAAAAAAAAAoAAAAAA0RheQAAAAAAAAAABQAAAAMAA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QAEGgAAAAIFAAAABHRoaXMFAAAAD0xhc3RUb3dpbmdCbG9jawMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAwMDCQAAZgAAAAIJAABoAAAAAgUAAAAJTWluQW1vdW50AAAAAAAF9eEACQAAaQAAAAIJAABoAAAAAgUAAAAGYW1vdW50CQAAZQAAAAIFAAAABmhlaWdodAUAAAARVXNlck1hdHVyaXR5VmFsdWUFAAAABFdlZWsGCQAAZgAAAAIJAABoAAAAAgUAAAAMbWluSm9pbldlZWtzBQAAAARXZWVrCQAAZQAAAAIFAAAABmhlaWdodAUAAAARVXNlck1hdHVyaXR5VmFsdWUGCQAAZgAAAAIJAABoAAAAAgUAAAAKVGltZVRvd2luZwUAAAADRGF5BQAAABRMYXN0VG93aW5nQmxvY2tWYWx1ZQkAAAIAAAABAgAAAAAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAABBfTGFzdFRvd2luZ0Jsb2NrBQAAAAZoZWlnaHQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyCQAAaAAAAAIFAAAADFRvd2luZ1Jld2FyZAAAAAAABfXhAAUAAAAGVG93aW5nBQAAAANuaWwAAAAA0MBGXA==", "height": 2087784, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8JAb4SAbpHjUFHZYdy8xwKcqiceVgpwcoATMtTT1HX1i Next: 8wn6b7KHg9Xxt7x4Frs34WsdRdZg2nSba621tRE6U7TJ Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let HASH = base58' | |
4 | + | let HASH = base58'BJpmNoB9MABJ1ytHhbLNxuUaeoYcYVeTM1r7kh39P24i' | |
5 | 5 | ||
6 | - | let KrossCar = base58' | |
6 | + | let KrossCar = base58'4dVMkKtzaWuHC21kmxBBUwKQ5LGayLZLV9snpkJxsGeW' | |
7 | 7 | ||
8 | - | let Towing = base58' | |
8 | + | let Towing = base58'4BHPskP7pBoXLD7U8nk54CstqbsqRvuWr3SDP8uMrz5w' | |
9 | 9 | ||
10 | 10 | let dAppFees = base58'3PG1NyiC2rdgX46jb8c5zPGuEAzWXhr4L2W' | |
11 | 11 | ||
22 | 22 | let minJoinWeeks = 8 | |
23 | 23 | ||
24 | 24 | let TimeTowing = 30 | |
25 | + | ||
26 | + | let Week = 10 | |
27 | + | ||
28 | + | let Day = 5 | |
25 | 29 | ||
26 | 30 | @Callable(i) | |
27 | 31 | func DepositHASH () = { | |
94 | 98 | case _ => | |
95 | 99 | 0 | |
96 | 100 | } | |
97 | - | if (if (if (((MinAmount * 100000000) > ((amount * (height - UserMaturityValue)) / | |
101 | + | if (if (if (((MinAmount * 100000000) > ((amount * (height - UserMaturityValue)) / Week))) | |
98 | 102 | then true | |
99 | - | else (( | |
103 | + | else ((minJoinWeeks * Week) > (height - UserMaturityValue))) | |
100 | 104 | then true | |
101 | - | else (( | |
105 | + | else ((TimeTowing * Day) > LastTowingBlockValue)) | |
102 | 106 | then throw("") | |
103 | 107 | else [IntegerEntry((toBase58String(i.caller.bytes) + "_LastTowingBlock"), height), ScriptTransfer(i.caller, (TowingReward * 100000000), Towing)] | |
104 | 108 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let HASH = base58' | |
4 | + | let HASH = base58'BJpmNoB9MABJ1ytHhbLNxuUaeoYcYVeTM1r7kh39P24i' | |
5 | 5 | ||
6 | - | let KrossCar = base58' | |
6 | + | let KrossCar = base58'4dVMkKtzaWuHC21kmxBBUwKQ5LGayLZLV9snpkJxsGeW' | |
7 | 7 | ||
8 | - | let Towing = base58' | |
8 | + | let Towing = base58'4BHPskP7pBoXLD7U8nk54CstqbsqRvuWr3SDP8uMrz5w' | |
9 | 9 | ||
10 | 10 | let dAppFees = base58'3PG1NyiC2rdgX46jb8c5zPGuEAzWXhr4L2W' | |
11 | 11 | ||
12 | 12 | let AdmindApp = base58'3PLv5rYMqR4gSiP5ZSjrX2FStLhHTRgFPbb' | |
13 | 13 | ||
14 | 14 | let MinAmount = 700 | |
15 | 15 | ||
16 | 16 | let KrossCarReward = 1 | |
17 | 17 | ||
18 | 18 | let TowingReward = 1 | |
19 | 19 | ||
20 | 20 | let ReferreTip = 1 | |
21 | 21 | ||
22 | 22 | let minJoinWeeks = 8 | |
23 | 23 | ||
24 | 24 | let TimeTowing = 30 | |
25 | + | ||
26 | + | let Week = 10 | |
27 | + | ||
28 | + | let Day = 5 | |
25 | 29 | ||
26 | 30 | @Callable(i) | |
27 | 31 | func DepositHASH () = { | |
28 | 32 | let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit") | |
29 | 33 | let amount = match getInteger(this, UserDeposit) { | |
30 | 34 | case a: Int => | |
31 | 35 | a | |
32 | 36 | case _ => | |
33 | 37 | 0 | |
34 | 38 | } | |
35 | 39 | if ((amount != 0)) | |
36 | 40 | then throw("You have already deposited funds, deposits can only be done once") | |
37 | 41 | else { | |
38 | 42 | let pmt = if ((size(i.payments) == 1)) | |
39 | 43 | then i.payments[0] | |
40 | 44 | else throw("Attached payment is required") | |
41 | 45 | if (if (((MinAmount * 100000000) >= pmt.amount)) | |
42 | 46 | then true | |
43 | 47 | else (pmt.assetId != HASH)) | |
44 | 48 | then throw("Can only deposit HASH tokens, and minimum amount is 700 HASH") | |
45 | 49 | else { | |
46 | 50 | let UserDepositValue = (amount + pmt.amount) | |
47 | 51 | [IntegerEntry((toBase58String(i.caller.bytes) + "_Deposit"), UserDepositValue), IntegerEntry((toBase58String(i.caller.bytes) + "_DepositBlock"), height), ScriptTransfer(i.caller, (KrossCarReward * 100000000), KrossCar)] | |
48 | 52 | } | |
49 | 53 | } | |
50 | 54 | } | |
51 | 55 | ||
52 | 56 | ||
53 | 57 | ||
54 | 58 | @Callable(i) | |
55 | 59 | func RewardReferrer (UserWalletAddress) = { | |
56 | 60 | let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit") | |
57 | 61 | let TippedStatus = (toBase58String(i.caller.bytes) + "_TippedStatus") | |
58 | 62 | let amount = match getInteger(this, UserDeposit) { | |
59 | 63 | case a: Int => | |
60 | 64 | a | |
61 | 65 | case _ => | |
62 | 66 | 0 | |
63 | 67 | } | |
64 | 68 | let TippedStatusValue = getStringValue(this, TippedStatus) | |
65 | 69 | if ((TippedStatusValue == "YES")) | |
66 | 70 | then throw("You already tipped a User, you only can tip once a user") | |
67 | 71 | else if (((MinAmount * 100000000) > amount)) | |
68 | 72 | then throw((("To tip your referrer you must have at least deposited: " + toString(MinAmount)) + " HASH")) | |
69 | 73 | else [StringEntry((toBase58String(i.caller.bytes) + "_TippedStatus"), "YES"), ScriptTransfer(i.caller, (ReferreTip * 100000000), KrossCar)] | |
70 | 74 | } | |
71 | 75 | ||
72 | 76 | ||
73 | 77 | ||
74 | 78 | @Callable(i) | |
75 | 79 | func RequestTowing () = { | |
76 | 80 | let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit") | |
77 | 81 | let UserMaturity = (toBase58String(i.caller.bytes) + "_DepositBlock") | |
78 | 82 | let LastTowingBlock = (toBase58String(i.caller.bytes) + "_LastTowingBlock") | |
79 | 83 | let amount = match getInteger(this, UserDeposit) { | |
80 | 84 | case a: Int => | |
81 | 85 | a | |
82 | 86 | case _ => | |
83 | 87 | 0 | |
84 | 88 | } | |
85 | 89 | let UserMaturityValue = match getInteger(this, UserMaturity) { | |
86 | 90 | case a: Int => | |
87 | 91 | a | |
88 | 92 | case _ => | |
89 | 93 | 0 | |
90 | 94 | } | |
91 | 95 | let LastTowingBlockValue = match getInteger(this, LastTowingBlock) { | |
92 | 96 | case a: Int => | |
93 | 97 | a | |
94 | 98 | case _ => | |
95 | 99 | 0 | |
96 | 100 | } | |
97 | - | if (if (if (((MinAmount * 100000000) > ((amount * (height - UserMaturityValue)) / | |
101 | + | if (if (if (((MinAmount * 100000000) > ((amount * (height - UserMaturityValue)) / Week))) | |
98 | 102 | then true | |
99 | - | else (( | |
103 | + | else ((minJoinWeeks * Week) > (height - UserMaturityValue))) | |
100 | 104 | then true | |
101 | - | else (( | |
105 | + | else ((TimeTowing * Day) > LastTowingBlockValue)) | |
102 | 106 | then throw("") | |
103 | 107 | else [IntegerEntry((toBase58String(i.caller.bytes) + "_LastTowingBlock"), height), ScriptTransfer(i.caller, (TowingReward * 100000000), Towing)] | |
104 | 108 | } | |
105 | 109 | ||
106 | 110 |
github/deemru/w8io/169f3d6 34.21 ms ◑