tx · GYaYkb8qsVNkuWjZzz23Z9ZzJ5EUGKLaHLntrHbaTFo5 3N17A1zqJZ1R2dZtMvyChQwSzepRZ1d98t9: -0.01400000 Waves 2019.11.25 17:25 [780914] smart account 3N17A1zqJZ1R2dZtMvyChQwSzepRZ1d98t9 > SELF 0.00000000 Waves
{ "type": 13, "id": "GYaYkb8qsVNkuWjZzz23Z9ZzJ5EUGKLaHLntrHbaTFo5", "fee": 1400000, "feeAssetId": null, "timestamp": 1574691933853, "version": 1, "sender": "3N17A1zqJZ1R2dZtMvyChQwSzepRZ1d98t9", "senderPublicKey": "AXt3aNDevk6MRY2RVvB3HzC5FgWDoMFZ4EuW9kHN9VpW", "proofs": [ "39tBZ6M5Js1Jemw2Tc8rFfP8f7Jjzf42u1wPQgzJpqBjTUeEcxzNw35bDXKLBLLLMea3cWasyYtzBxCegzjE1cwM" ], "script": "base64:AAIDAAAAAAAAAAkIARIFCgMICAgAAAAEAQAAAAZzZXRyZWYAAAADAAAAAmxkAAAABHVzZXIAAAAFcmVmZXIEAAAAA2xkZQgFAAAAAmxkAAAABGRhdGEEAAAAB2lzcmVmZXIEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAAR1c2VyAgAAAARfcmVmAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAAAAMJAAAAAAAAAgUAAAAHaXNyZWZlcgIAAAAABAAAAANkc2wJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAEdXNlcgIAAAAEX3JlZgUAAAAFcmVmZXIFAAAAA2xkZQQAAAAEZHNsMQkBAAAACFdyaXRlU2V0AAAAAQUAAAADZHNsBQAAAARkc2wxBQAAAAJsZAEAAAAPbmV4dGNvdW50dGlja2V0AAAAAgAAAAJsZAAAAAhuZXdjb3VudAQAAAADbGRlCAUAAAACbGQAAAAEZGF0YQQAAAALbmV3Y291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vdW50BAAAABBjdXJyZW50a2V5dGlja2V0CQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAHdGlja2V0XwkAAaQAAAABBQAAAAtudW1iZXJyb3VuZAIAAAABXwkAAaQAAAABBQAAAA5uZXdUaWNrZXRjb3VudAIAAAABXwUAAAAEdXNlcgQAAAAEZHNsMwkBAAAACmRhdGF0aWNrZXQAAAADBQAAAARkc2wyBQAAABBjdXJyZW50a2V5dGlja2V0BQAAAAZ0aWNrZXQEAAAABGRzbDQJAQAAAA5jaGVja25leHRyb3VuZAAAAAMFAAAABGRzbDMFAAAADm5ld1RpY2tldGNvdW50BQAAAAtudW1iZXJyb3VuZAUAAAAEZHNsNAAAAAAvdVu2", "chainId": 84, "height": 780914, "spentComplexity": 0 } View: original | compacted Prev: 297jcJw6PCXqJF4M7MmdgTi4Sr4feagrCxe6QUreoXT3 Next: 9ejjoQdvPZzPhoZFNdcV1y6Zn3F5auUHpdSUH5muA1Ug Diff:
Old | New | Differences | |
---|---|---|---|
50 | 50 | @Callable(inv) | |
51 | 51 | func playbingo (ticket,betx,refer) = { | |
52 | 52 | let pmt = extract(inv.payment) | |
53 | - | let payval = pmt.amount | |
53 | + | let payval = extract(pmt.amount) | |
54 | 54 | let x = parseIntValue(betx) | |
55 | 55 | let payticket = (payval * x) | |
56 | 56 | if ((1 > payticket)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func setref (ld,user,refer) = { | |
5 | 5 | let lde = ld.data | |
6 | 6 | let isrefer = match getString(this, (user + "_ref")) { | |
7 | 7 | case a: String => | |
8 | 8 | a | |
9 | 9 | case _ => | |
10 | 10 | "" | |
11 | 11 | } | |
12 | 12 | if ((isrefer == "")) | |
13 | 13 | then { | |
14 | 14 | let dsl = DataEntry((user + "_ref"), refer) :: lde | |
15 | 15 | let dsl1 = WriteSet(dsl) | |
16 | 16 | dsl1 | |
17 | 17 | } | |
18 | 18 | else ld | |
19 | 19 | } | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func nextcountticket (ld,newcount) = { | |
23 | 23 | let lde = ld.data | |
24 | 24 | let newcounttik = DataEntry("ticketcount", newcount) :: lde | |
25 | 25 | let nws = WriteSet(newcounttik) | |
26 | 26 | nws | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func dataticket (ld,ticketkey,ticketdata) = { | |
31 | 31 | let lde = ld.data | |
32 | 32 | let newtikdata = DataEntry(ticketkey, ticketdata) :: lde | |
33 | 33 | let nws = WriteSet(newtikdata) | |
34 | 34 | nws | |
35 | 35 | } | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func checknextround (ld,ticketcount,numofround) = { | |
39 | 39 | let lde = ld.data | |
40 | 40 | if ((ticketcount == 100)) | |
41 | 41 | then { | |
42 | 42 | let newtikdata = DataEntry("numberofround", (numofround + 1)) :: lde | |
43 | 43 | let nws = WriteSet(newtikdata) | |
44 | 44 | nws | |
45 | 45 | } | |
46 | 46 | else ld | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | @Callable(inv) | |
51 | 51 | func playbingo (ticket,betx,refer) = { | |
52 | 52 | let pmt = extract(inv.payment) | |
53 | - | let payval = pmt.amount | |
53 | + | let payval = extract(pmt.amount) | |
54 | 54 | let x = parseIntValue(betx) | |
55 | 55 | let payticket = (payval * x) | |
56 | 56 | if ((1 > payticket)) | |
57 | 57 | then throw("Ticket price is 1 WAVES") | |
58 | 58 | else { | |
59 | 59 | let lastfondprize = match getInteger(this, "fondprize") { | |
60 | 60 | case a: Int => | |
61 | 61 | a | |
62 | 62 | case _ => | |
63 | 63 | 0 | |
64 | 64 | } | |
65 | 65 | let newfondprize = DataEntry("fondprize", (lastfondprize + (payticket / 2))) | |
66 | 66 | let dsl = WriteSet([newfondprize]) | |
67 | 67 | let numberround = match getInteger(this, "numberofround") { | |
68 | 68 | case a: Int => | |
69 | 69 | a | |
70 | 70 | case _ => | |
71 | 71 | 1 | |
72 | 72 | } | |
73 | 73 | let user = toString(inv.caller) | |
74 | 74 | let dsl1 = setref(dsl, user, refer) | |
75 | 75 | let currentTicketcount = match getInteger(this, "ticketcount") { | |
76 | 76 | case a: Int => | |
77 | 77 | a | |
78 | 78 | case _ => | |
79 | 79 | 0 | |
80 | 80 | } | |
81 | 81 | let newTicketcount = (currentTicketcount + 1) | |
82 | 82 | let dsl2 = nextcountticket(dsl1, newTicketcount) | |
83 | 83 | let currentkeyticket = ((((("ticket_" + toString(numberround)) + "_") + toString(newTicketcount)) + "_") + user) | |
84 | 84 | let dsl3 = dataticket(dsl2, currentkeyticket, ticket) | |
85 | 85 | let dsl4 = checknextround(dsl3, newTicketcount, numberround) | |
86 | 86 | dsl4 | |
87 | 87 | } | |
88 | 88 | } | |
89 | 89 | ||
90 | 90 |
github/deemru/w8io/026f985 23.63 ms ◑