tx · 7xVBpdkQZyaVKuJr9wBM82SrsqRQaQ4GiJhVLi6uWANT 3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw: -0.01000000 Waves 2022.06.09 17:29 [2088964] smart account 3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw > SELF 0.00000000 Waves
{ "type": 13, "id": "7xVBpdkQZyaVKuJr9wBM82SrsqRQaQ4GiJhVLi6uWANT", "fee": 1000000, "feeAssetId": null, "timestamp": 1654784993998, "version": 2, "chainId": 84, "sender": "3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw", "senderPublicKey": "GTKqLSK6nuFkRdebB5SmTwTU2DnTeLMvhymCFfT2CxX2", "proofs": [ "CgY7quJ7yi5eShvTG8pLqvv4w8PEcsUKiRjuXdrhEboJoWjHq9SSnfMbJDGAcGD88hAreGumeCyoZFTBjAXm76n" ], "script": "base64:AAIFAAAAAAAAAAsIAhIAEgMKAQgSAAAAAA0AAAAABEhBU0gBAAAAIJklwE3i+u/bc48vf4d/BnVXhMLmuX4eB+81QVXPc36rAAAAAAhLcm9zc0NhcgEAAAAgNewIuJ8fl0L3aDIXfe5KYUI4pQbPPcpdLtTikAZosrsAAAAABlRvd2luZwEAAAAgLzVn9FxXOELHRV9NM7WHnRz83AP0i2FsXYU/kxb44koAAAAACGRBcHBGZWVzAQAAABoBV5prAZfpnthmNq2ZMbws44Htl6ZEmG28iwAAAAAJQWRtaW5kQXBwAQAAABoBV9BDQuIchL6bmoa833jKal/OBiGoZGoQDgAAAAAJTWluQW1vdW50AAAAAAAAAAK8AAAAAA5Lcm9zc0NhclJld2FyZAAAAAAAAAAAAQAAAAAMVG93aW5nUmV3YXJkAAAAAAAAAAABAAAAAApSZWZlcnJlVGlwAAAAAAAAAAABAAAAAAxtaW5Kb2luV2Vla3MAAAAAAAAAAAgAAAAAClRpbWVUb3dpbmcAAAAAAAAAAAIAAAAABFdlZWsAAAAAAAAAAAoAAAAAA0RheQAAAAAAAAAABQAAAAMAAAABa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UTGFzdFRvd2luZ0Jsb2NrVmFsdWUFAAAAA0RheQIAAAAFIGRheXMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAABBfTGFzdFRvd2luZ0Jsb2NrBQAAAAZoZWlnaHQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyCQAAaAAAAAIFAAAADFRvd2luZ1Jld2FyZAAAAAAABfXhAAUAAAAGVG93aW5nBQAAAANuaWwAAAAABMCnMQ==", "height": 2088964, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4Vk8uC8o6yLYCsQLcKyD7D3HJMpvXB6bS1vSXkDMdbWr Next: Bs3eFB1nEf5JHF9FbKZnqhRuAwfrbcHSB8aLtktFPn9d Diff:
Old | New | Differences | |
---|---|---|---|
107 | 107 | else if (((minJoinWeeks * Week) > (height - UserMaturityValue))) | |
108 | 108 | then throw((("You should at least be a member of " + toString(minJoinWeeks)) + " Weeks")) | |
109 | 109 | else if (((TimeTowing * Day) > ((height - LastTowingBlockValue) / Day))) | |
110 | - | then throw((( | |
110 | + | then throw((("You cannot claim the reward before" + toString(((height - LastTowingBlockValue) / Day))) + " days")) | |
111 | 111 | else [IntegerEntry((toBase58String(i.caller.bytes) + "_LastTowingBlock"), height), ScriptTransfer(i.caller, (TowingReward * 100000000), Towing)] | |
112 | 112 | } | |
113 | 113 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let HASH = base58'BJpmNoB9MABJ1ytHhbLNxuUaeoYcYVeTM1r7kh39P24i' | |
5 | 5 | ||
6 | 6 | let KrossCar = base58'4dVMkKtzaWuHC21kmxBBUwKQ5LGayLZLV9snpkJxsGeW' | |
7 | 7 | ||
8 | 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 = 2 | |
25 | 25 | ||
26 | 26 | let Week = 10 | |
27 | 27 | ||
28 | 28 | let Day = 5 | |
29 | 29 | ||
30 | 30 | @Callable(i) | |
31 | 31 | func DepositHASH () = { | |
32 | 32 | let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit") | |
33 | 33 | let amount = match getInteger(this, UserDeposit) { | |
34 | 34 | case a: Int => | |
35 | 35 | a | |
36 | 36 | case _ => | |
37 | 37 | 0 | |
38 | 38 | } | |
39 | 39 | let pmt = if ((size(i.payments) == 1)) | |
40 | 40 | then i.payments[0] | |
41 | 41 | else throw("Attached payment is required") | |
42 | 42 | if (if (((MinAmount * 100000000) > pmt.amount)) | |
43 | 43 | then true | |
44 | 44 | else (pmt.assetId != HASH)) | |
45 | 45 | then throw("Can only deposit HASH tokens, and minimum amount is 700 HASH") | |
46 | 46 | else { | |
47 | 47 | let UserDepositValue = (amount + pmt.amount) | |
48 | 48 | [IntegerEntry((toBase58String(i.caller.bytes) + "_Deposit"), UserDepositValue), IntegerEntry((toBase58String(i.caller.bytes) + "_DepositBlock"), height), ScriptTransfer(i.caller, (KrossCarReward * 100000000), KrossCar)] | |
49 | 49 | } | |
50 | 50 | } | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | ||
54 | 54 | @Callable(i) | |
55 | 55 | func RewardReferrer (UserWalletAddressStr) = if ((UserWalletAddressStr == "")) | |
56 | 56 | then throw("Referrer Wallet Address cannot be empty !") | |
57 | 57 | else { | |
58 | 58 | let UserWalletAddress = addressFromStringValue(UserWalletAddressStr) | |
59 | 59 | let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit") | |
60 | 60 | let TippedStatus = (toBase58String(i.caller.bytes) + "_TippedStatus") | |
61 | 61 | let amount = match getInteger(this, UserDeposit) { | |
62 | 62 | case a: Int => | |
63 | 63 | a | |
64 | 64 | case _ => | |
65 | 65 | 0 | |
66 | 66 | } | |
67 | 67 | let TippedStatusValue = match getString(this, TippedStatus) { | |
68 | 68 | case a: String => | |
69 | 69 | a | |
70 | 70 | case _ => | |
71 | 71 | "NO" | |
72 | 72 | } | |
73 | 73 | if ((TippedStatusValue == "YES")) | |
74 | 74 | then throw("You already tipped a User, you only can tip once a user") | |
75 | 75 | else if (((MinAmount * 100000000) > amount)) | |
76 | 76 | then throw((("To tip your referrer you must have at least deposited: " + toString(MinAmount)) + " HASH")) | |
77 | 77 | else [StringEntry((toBase58String(i.caller.bytes) + "_TippedStatus"), "YES"), ScriptTransfer(UserWalletAddress, (ReferreTip * 100000000), KrossCar)] | |
78 | 78 | } | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | ||
82 | 82 | @Callable(i) | |
83 | 83 | func RequestTowing () = { | |
84 | 84 | let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit") | |
85 | 85 | let UserMaturity = (toBase58String(i.caller.bytes) + "_DepositBlock") | |
86 | 86 | let LastTowingBlock = (toBase58String(i.caller.bytes) + "_LastTowingBlock") | |
87 | 87 | let amount = match getInteger(this, UserDeposit) { | |
88 | 88 | case a: Int => | |
89 | 89 | a | |
90 | 90 | case _ => | |
91 | 91 | 0 | |
92 | 92 | } | |
93 | 93 | let UserMaturityValue = match getInteger(this, UserMaturity) { | |
94 | 94 | case a: Int => | |
95 | 95 | a | |
96 | 96 | case _ => | |
97 | 97 | 0 | |
98 | 98 | } | |
99 | 99 | let LastTowingBlockValue = match getInteger(this, LastTowingBlock) { | |
100 | 100 | case a: Int => | |
101 | 101 | a | |
102 | 102 | case _ => | |
103 | 103 | 0 | |
104 | 104 | } | |
105 | 105 | if (((MinAmount * 100000000) > ((amount * (height - UserMaturityValue)) / Week))) | |
106 | 106 | then throw(("You should hav deposited at least: " + toString((MinAmount * 100000000)))) | |
107 | 107 | else if (((minJoinWeeks * Week) > (height - UserMaturityValue))) | |
108 | 108 | then throw((("You should at least be a member of " + toString(minJoinWeeks)) + " Weeks")) | |
109 | 109 | else if (((TimeTowing * Day) > ((height - LastTowingBlockValue) / Day))) | |
110 | - | then throw((( | |
110 | + | then throw((("You cannot claim the reward before" + toString(((height - LastTowingBlockValue) / Day))) + " days")) | |
111 | 111 | else [IntegerEntry((toBase58String(i.caller.bytes) + "_LastTowingBlock"), height), ScriptTransfer(i.caller, (TowingReward * 100000000), Towing)] | |
112 | 112 | } | |
113 | 113 | ||
114 | 114 |
github/deemru/w8io/026f985 34.34 ms ◑