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+me2GY2rZkxvCzjge2XpkSYbbyLAAAAAAlBZG1pbmRBcHABAAAAGgFX0ENC4hyEvpuahrzfeMpqX84GIahkahAOAAAAAAlNaW5BbW91bnQAAAAAAAAAArwAAAAADktyb3NzQ2FyUmV3YXJkAAAAAAAAAAABAAAAAAxUb3dpbmdSZXdhcmQAAAAAAAAAAAEAAAAAClJlZmVycmVUaXAAAAAAAAAAAAEAAAAADG1pbkpvaW5XZWVrcwAAAAAAAAAACAAAAAAKVGltZVRvd2luZwAAAAAAAAAAAgAAAAAEV2VlawAAAAAAAAAACgAAAAADRGF5AAAAAAAAAAAFAAAABAAAAAFpAQA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2h0BQAAABRMYXN0VG93aW5nQmxvY2tWYWx1ZQUAAAADRGF5CQAAAgAAAAEJAAEsAAAAAgkAASwAAAACAgAAACRZb3UgY2Fubm90IGNsYWltIHRoZSByZXdhcmQgYmVmb3JlOiAJAAGkAAAAAQkAAGkAAAACCQAAZQAAAAIFAAAABmhlaWdodAUAAAAUTGFzdFRvd2luZ0Jsb2NrVmFsdWUFAAAAA0RheQIAAAAFIGRheXMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAABBfTGFzdFRvd2luZ0Jsb2NrBQAAAAZoZWlnaHQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyCQAAaAAAAAIFAAAADFRvd2luZ1Jld2FyZAAAAAAABfXhAAUAAAAGVG93aW5nBQAAAANuaWwAAAAAv+NkZQ==", "height": 2088966, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Bs3eFB1nEf5JHF9FbKZnqhRuAwfrbcHSB8aLtktFPn9d Next: BkcwhRGszZj1UQSZxT8maECjXwz4j5whpkaRS36Pfq2u Diff:
Old | New | Differences | |
---|---|---|---|
26 | 26 | let l = 10 | |
27 | 27 | ||
28 | 28 | let m = 5 | |
29 | + | ||
30 | + | @Callable(n) | |
31 | + | func ReceiveFakeHASHForTest () = [ScriptTransfer(n.caller, (10000 * 100000000), a)] | |
32 | + | ||
33 | + | ||
29 | 34 | ||
30 | 35 | @Callable(n) | |
31 | 36 | func DepositHASH () = { |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'BJpmNoB9MABJ1ytHhbLNxuUaeoYcYVeTM1r7kh39P24i' | |
5 | 5 | ||
6 | 6 | let b = base58'4dVMkKtzaWuHC21kmxBBUwKQ5LGayLZLV9snpkJxsGeW' | |
7 | 7 | ||
8 | 8 | let c = base58'4BHPskP7pBoXLD7U8nk54CstqbsqRvuWr3SDP8uMrz5w' | |
9 | 9 | ||
10 | 10 | let d = base58'3PG1NyiC2rdgX46jb8c5zPGuEAzWXhr4L2W' | |
11 | 11 | ||
12 | 12 | let e = base58'3PLv5rYMqR4gSiP5ZSjrX2FStLhHTRgFPbb' | |
13 | 13 | ||
14 | 14 | let f = 700 | |
15 | 15 | ||
16 | 16 | let g = 1 | |
17 | 17 | ||
18 | 18 | let h = 1 | |
19 | 19 | ||
20 | 20 | let i = 1 | |
21 | 21 | ||
22 | 22 | let j = 8 | |
23 | 23 | ||
24 | 24 | let k = 2 | |
25 | 25 | ||
26 | 26 | let l = 10 | |
27 | 27 | ||
28 | 28 | let m = 5 | |
29 | + | ||
30 | + | @Callable(n) | |
31 | + | func ReceiveFakeHASHForTest () = [ScriptTransfer(n.caller, (10000 * 100000000), a)] | |
32 | + | ||
33 | + | ||
29 | 34 | ||
30 | 35 | @Callable(n) | |
31 | 36 | func DepositHASH () = { | |
32 | 37 | let o = (toBase58String(n.caller.bytes) + "_Deposit") | |
33 | 38 | let p = { | |
34 | 39 | let q = getInteger(this, o) | |
35 | 40 | if ($isInstanceOf(q, "Int")) | |
36 | 41 | then { | |
37 | 42 | let r = q | |
38 | 43 | r | |
39 | 44 | } | |
40 | 45 | else 0 | |
41 | 46 | } | |
42 | 47 | let s = if ((size(n.payments) == 1)) | |
43 | 48 | then n.payments[0] | |
44 | 49 | else throw("Attached payment is required") | |
45 | 50 | if (if (((f * 100000000) > s.amount)) | |
46 | 51 | then true | |
47 | 52 | else (s.assetId != a)) | |
48 | 53 | then throw("Can only deposit HASH tokens, and minimum amount is 700 HASH") | |
49 | 54 | else { | |
50 | 55 | let t = (p + s.amount) | |
51 | 56 | [IntegerEntry((toBase58String(n.caller.bytes) + "_Deposit"), t), IntegerEntry((toBase58String(n.caller.bytes) + "_DepositBlock"), height), ScriptTransfer(n.caller, (g * 100000000), b)] | |
52 | 57 | } | |
53 | 58 | } | |
54 | 59 | ||
55 | 60 | ||
56 | 61 | ||
57 | 62 | @Callable(n) | |
58 | 63 | func RewardReferrer (u) = if ((u == "")) | |
59 | 64 | then throw("Referrer Wallet Address cannot be empty !") | |
60 | 65 | else { | |
61 | 66 | let v = addressFromStringValue(u) | |
62 | 67 | let o = (toBase58String(n.caller.bytes) + "_Deposit") | |
63 | 68 | let w = (toBase58String(n.caller.bytes) + "_TippedStatus") | |
64 | 69 | let p = { | |
65 | 70 | let q = getInteger(this, o) | |
66 | 71 | if ($isInstanceOf(q, "Int")) | |
67 | 72 | then { | |
68 | 73 | let r = q | |
69 | 74 | r | |
70 | 75 | } | |
71 | 76 | else 0 | |
72 | 77 | } | |
73 | 78 | let x = { | |
74 | 79 | let q = getString(this, w) | |
75 | 80 | if ($isInstanceOf(q, "String")) | |
76 | 81 | then { | |
77 | 82 | let r = q | |
78 | 83 | r | |
79 | 84 | } | |
80 | 85 | else "NO" | |
81 | 86 | } | |
82 | 87 | if ((x == "YES")) | |
83 | 88 | then throw("You already tipped a User, you only can tip once a user") | |
84 | 89 | else if (((f * 100000000) > p)) | |
85 | 90 | then throw((("To tip your referrer you must have at least deposited: " + toString(f)) + " HASH")) | |
86 | 91 | else [StringEntry((toBase58String(n.caller.bytes) + "_TippedStatus"), "YES"), ScriptTransfer(v, (i * 100000000), b)] | |
87 | 92 | } | |
88 | 93 | ||
89 | 94 | ||
90 | 95 | ||
91 | 96 | @Callable(n) | |
92 | 97 | func RequestTowing () = { | |
93 | 98 | let o = (toBase58String(n.caller.bytes) + "_Deposit") | |
94 | 99 | let y = (toBase58String(n.caller.bytes) + "_DepositBlock") | |
95 | 100 | let z = (toBase58String(n.caller.bytes) + "_LastTowingBlock") | |
96 | 101 | let p = { | |
97 | 102 | let q = getInteger(this, o) | |
98 | 103 | if ($isInstanceOf(q, "Int")) | |
99 | 104 | then { | |
100 | 105 | let r = q | |
101 | 106 | r | |
102 | 107 | } | |
103 | 108 | else 0 | |
104 | 109 | } | |
105 | 110 | let A = { | |
106 | 111 | let q = getInteger(this, y) | |
107 | 112 | if ($isInstanceOf(q, "Int")) | |
108 | 113 | then { | |
109 | 114 | let r = q | |
110 | 115 | r | |
111 | 116 | } | |
112 | 117 | else 0 | |
113 | 118 | } | |
114 | 119 | let B = { | |
115 | 120 | let q = getInteger(this, z) | |
116 | 121 | if ($isInstanceOf(q, "Int")) | |
117 | 122 | then { | |
118 | 123 | let r = q | |
119 | 124 | r | |
120 | 125 | } | |
121 | 126 | else 0 | |
122 | 127 | } | |
123 | 128 | if (((f * 100000000) > ((p * (height - A)) / l))) | |
124 | 129 | then throw(("You should hav deposited at least: " + toString((f * 100000000)))) | |
125 | 130 | else if (((j * l) > (height - A))) | |
126 | 131 | then throw((("You should at least be a member of " + toString(j)) + " Weeks")) | |
127 | 132 | else if (((k * m) > ((height - B) / m))) | |
128 | 133 | then throw((("You cannot claim the reward before: " + toString(((height - B) / m))) + " days")) | |
129 | 134 | else [IntegerEntry((toBase58String(n.caller.bytes) + "_LastTowingBlock"), height), ScriptTransfer(n.caller, (h * 100000000), c)] | |
130 | 135 | } | |
131 | 136 | ||
132 | 137 |
github/deemru/w8io/169f3d6 50.66 ms ◑