tx · C2uUEFgyxQazoPp1iwJYPiqPsCdwLQNDF27Wc6WJ4Yro 3N9QhjBmyFRrGW5d8VQojB4wZhHmQhuvVrL: -0.01000000 Waves 2022.11.14 14:16 [2316732] smart account 3N9QhjBmyFRrGW5d8VQojB4wZhHmQhuvVrL > SELF 0.00000000 Waves
{ "type": 13, "id": "C2uUEFgyxQazoPp1iwJYPiqPsCdwLQNDF27Wc6WJ4Yro", "fee": 1000000, "feeAssetId": null, "timestamp": 1668424626161, "version": 2, "chainId": 84, "sender": "3N9QhjBmyFRrGW5d8VQojB4wZhHmQhuvVrL", "senderPublicKey": "BefhVEanzhrtdYfeWquaoSsMZw3BEaEZZB86Kosqw7Qb", "proofs": [ "3QJjRCTpEDbVXaMgUZBX14X39N6rK9CfzCMQC6Hbhy5tr99jAgVRPzEmzo9SP7itqj89ajrtp27jBdYr53PEjvZx" ], "script": "base64:AAIFAAAAAAAAABYIAhIDCgEBEgMKAQESCAoGCAgICAgIAAAADQAAAAAFYWRtaW4CAAAALEJlZmhWRWFuemhydGRZZmVXcXVhb1NzTVp3M0JFYUVaWkI4Nktvc3F3N1FiAAAAAA5yZXN1bHRDb250cmFjdAIAAAAAAAAAAAxiZXRBbW91bnRLZXkCAAAAEGdsb2JhbF9iZXRBbW91bnQAAAAAC2RlYWRsaW5lS2V5AgAAABFnbG9iYWxfZGVhZGxpbmVfaAAAAAAFc2NhbGUAAAAAAAX14QABAAAADmdldEFzc2V0U3RyaW5nAAAAAQAAAAdhc3NldElkBAAAAAckbWF0Y2gwBQAAAAdhc3NldElkAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAFiBQAAAAckbWF0Y2gwCQACWAAAAAEFAAAAAWICAAAABVdBVkVTAQAAAA1nZXRBc3NldEJ5dGVzAAAAAQAAAAdhc3NldElkAwkAAAAAAAACBQAAAAdhc3NldElkAgAAAAVXQVZFUwUAAAAEdW5pdAkAAlkAAAABBQAAAAdhc3NldElkAQAAAA10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bGVyQWRkcgIAAAAQX1F1YXJ0ZXI0LXdpbm5lcgkAAZEAAAACBQAAAA5xdWFydGVyV2lubmVycwAAAAAAAAAAAwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIFAAAACmNhbGxlckFkZHICAAAADV9TZW1pMS13aW5uZXIJAAGRAAAAAgUAAAALc2VtaVdpbm5lcnMAAAAAAAAAAAAJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACBQAAAApjYWxsZXJBZGRyAgAAAA1fU2VtaTItd2lubmVyCQABkQAAAAIFAAAAC3NlbWlXaW5uZXJzAAAAAAAAAAABCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgUAAAAKY2FsbGVyQWRkcgIAAAAMRmluYWwtd2lubmVyBQAAAAZ3aW5uZXIFAAAAA25pbAkAAAIAAAABAgAAACNJbmNvcnJlY3QgZGF0YSBhcnJpdmVkIGluIGFyZ3VtZW50cwkAAAIAAAABCQABLAAAAAIJAAEsAAAAAgIAAAAPQXR0YWNoIGV4YWN0bHkgCQABpAAAAAEFAAAACWJldEFtb3VudAIAAAARIFdhdmVzIGFzIHBheW1lbnQJAAACAAAAAQIAAAAkWmVybyBiZXRBbW91bnQgZnJvbSBjb250cmFjdCBzdG9yYWdlCQAAAgAAAAECAAAALU9ubHkgV2F2ZXMgaXMgYWxsb3dlZCBhcyBwYXltZW50IGFzc2V0IHRvIGJldAkAAAIAAAABAgAAABBCZXQgYWxyZWFkeSBtYWRlAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXleuqc4", "height": 2316732, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GeNUxjtsQhNkTmnE8gUtBhrgQnzAF5Z23VJm6G2tQY9t Next: 6ZedKy5ddrUPpyUNZKcwHhMciEU7yRo6HpiMxDB3TyKJ Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let admin = "" | |
4 | + | let admin = "BefhVEanzhrtdYfeWquaoSsMZw3BEaEZZB86Kosqw7Qb" | |
5 | 5 | ||
6 | 6 | let resultContract = "" | |
7 | 7 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let admin = "" | |
4 | + | let admin = "BefhVEanzhrtdYfeWquaoSsMZw3BEaEZZB86Kosqw7Qb" | |
5 | 5 | ||
6 | 6 | let resultContract = "" | |
7 | 7 | ||
8 | 8 | let betAmountKey = "global_betAmount" | |
9 | 9 | ||
10 | 10 | let deadlineKey = "global_deadline_h" | |
11 | 11 | ||
12 | 12 | let scale = 100000000 | |
13 | 13 | ||
14 | 14 | func getAssetString (assetId) = match assetId { | |
15 | 15 | case b: ByteVector => | |
16 | 16 | toBase58String(b) | |
17 | 17 | case _ => | |
18 | 18 | "WAVES" | |
19 | 19 | } | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func getAssetBytes (assetId) = if ((assetId == "WAVES")) | |
23 | 23 | then unit | |
24 | 24 | else fromBase58String(assetId) | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func tryGetInteger (key) = match getInteger(this, key) { | |
28 | 28 | case i: Int => | |
29 | 29 | i | |
30 | 30 | case _ => | |
31 | 31 | 0 | |
32 | 32 | } | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func tryGetBoolean (key) = match getBoolean(this, key) { | |
36 | 36 | case b: Boolean => | |
37 | 37 | b | |
38 | 38 | case _ => | |
39 | 39 | false | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func tryGetString (key) = match getString(this, key) { | |
44 | 44 | case s: String => | |
45 | 45 | s | |
46 | 46 | case _ => | |
47 | 47 | "" | |
48 | 48 | } | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func allow (callerPBK) = (toBase58String(callerPBK) == admin) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func isBet (address) = tryGetBoolean((address + "_betted")) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func getBetAmount () = tryGetInteger(betAmountKey) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | @Callable(i) | |
61 | 61 | func setBetAmount (amount) = if (allow(i.callerPublicKey)) | |
62 | 62 | then [IntegerEntry(betAmountKey, amount)] | |
63 | 63 | else throw("Only admin") | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | ||
67 | 67 | @Callable(i) | |
68 | 68 | func setDeadLine (deadlineHeight) = if (allow(i.callerPublicKey)) | |
69 | 69 | then [IntegerEntry(deadlineKey, deadlineHeight)] | |
70 | 70 | else throw("Only admin") | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | ||
74 | 74 | @Callable(i) | |
75 | 75 | func makeBet (group_winners,group_second,octo_winners,quarter_winners,semi_winners,winner) = { | |
76 | 76 | let pmt = i.payments[0] | |
77 | 77 | let pmt_asset = value(pmt.assetId) | |
78 | 78 | let pmt_amount = value(pmt.amount) | |
79 | 79 | let callerAddr = toString(i.caller) | |
80 | 80 | let betted = isBet(callerAddr) | |
81 | 81 | if (!(betted)) | |
82 | 82 | then if ((getAssetString(pmt_asset) == "WAVES")) | |
83 | 83 | then { | |
84 | 84 | let betAmount = getBetAmount() | |
85 | 85 | if ((betAmount != 0)) | |
86 | 86 | then if ((pmt_amount == (betAmount * scale))) | |
87 | 87 | then { | |
88 | 88 | let groupWinners = split(group_winners, "_") | |
89 | 89 | let groupSecond = split(group_second, "_") | |
90 | 90 | let octoWinners = split(octo_winners, "_") | |
91 | 91 | let quarterWinners = split(quarter_winners, "_") | |
92 | 92 | let semiWinners = split(semi_winners, "_") | |
93 | 93 | if (if (if (if (if ((size(groupWinners) == 8)) | |
94 | 94 | then (size(groupSecond) == 8) | |
95 | 95 | else false) | |
96 | 96 | then (size(octoWinners) == 8) | |
97 | 97 | else false) | |
98 | 98 | then (size(quarterWinners) == 4) | |
99 | 99 | else false) | |
100 | 100 | then (size(semiWinners) == 2) | |
101 | 101 | else false) | |
102 | 102 | then [BooleanEntry((callerAddr + "_betted"), true), IntegerEntry((callerAddr + "_height"), height), StringEntry((callerAddr + "_GroupA-1st"), groupWinners[0]), StringEntry((callerAddr + "_GroupA-2nd"), groupSecond[0]), StringEntry((callerAddr + "_GroupB-1st"), groupWinners[1]), StringEntry((callerAddr + "_GroupB-2nd"), groupWinners[1]), StringEntry((callerAddr + "_GroupC-1st"), groupWinners[2]), StringEntry((callerAddr + "_GroupC-2nd"), groupSecond[2]), StringEntry((callerAddr + "_GroupD-1st"), groupWinners[3]), StringEntry((callerAddr + "_GroupD-2nd"), groupWinners[3]), StringEntry((callerAddr + "_GroupE-1st"), groupWinners[4]), StringEntry((callerAddr + "_GroupE-2nd"), groupSecond[4]), StringEntry((callerAddr + "_GroupF-1st"), groupWinners[5]), StringEntry((callerAddr + "_GroupF-2nd"), groupWinners[5]), StringEntry((callerAddr + "_GroupG-1st"), groupWinners[6]), StringEntry((callerAddr + "_GroupG-2nd"), groupSecond[6]), StringEntry((callerAddr + "_GroupH-1st"), groupWinners[7]), StringEntry((callerAddr + "_GroupH-2nd"), groupWinners[7]), StringEntry((callerAddr + "_Octo1-winner"), octoWinners[0]), StringEntry((callerAddr + "_Octo2-winner"), octoWinners[1]), StringEntry((callerAddr + "_Octo3-winner"), octoWinners[2]), StringEntry((callerAddr + "_Octo4-winner"), octoWinners[3]), StringEntry((callerAddr + "_Octo5-winner"), octoWinners[4]), StringEntry((callerAddr + "_Octo6-winner"), octoWinners[5]), StringEntry((callerAddr + "_Octo7-winner"), octoWinners[6]), StringEntry((callerAddr + "_Octo8-winner"), octoWinners[7]), StringEntry((callerAddr + "_Quarter1-winner"), quarterWinners[0]), StringEntry((callerAddr + "_Quarter2-winner"), quarterWinners[1]), StringEntry((callerAddr + "_Quarter3-winner"), quarterWinners[2]), StringEntry((callerAddr + "_Quarter4-winner"), quarterWinners[3]), StringEntry((callerAddr + "_Semi1-winner"), semiWinners[0]), StringEntry((callerAddr + "_Semi2-winner"), semiWinners[1]), StringEntry((callerAddr + "Final-winner"), winner)] | |
103 | 103 | else throw("Incorrect data arrived in arguments") | |
104 | 104 | } | |
105 | 105 | else throw((("Attach exactly " + toString(betAmount)) + " Waves as payment")) | |
106 | 106 | else throw("Zero betAmount from contract storage") | |
107 | 107 | } | |
108 | 108 | else throw("Only Waves is allowed as payment asset to bet") | |
109 | 109 | else throw("Bet already made") | |
110 | 110 | } | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | @Verifier(tx) | |
114 | 114 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
115 | 115 |
github/deemru/w8io/026f985 42.99 ms ◑