tx · E99CVQApqSGgBbVHoHHNJWkcxEKEStWU5kjz5bjJoSp1 3N17A1zqJZ1R2dZtMvyChQwSzepRZ1d98t9: -0.01400000 Waves 2019.11.26 00:57 [781357] smart account 3N17A1zqJZ1R2dZtMvyChQwSzepRZ1d98t9 > SELF 0.00000000 Waves
{ "type": 13, "id": "E99CVQApqSGgBbVHoHHNJWkcxEKEStWU5kjz5bjJoSp1", "fee": 1400000, "feeAssetId": null, "timestamp": 1574719092852, "version": 1, "sender": "3N17A1zqJZ1R2dZtMvyChQwSzepRZ1d98t9", "senderPublicKey": "AXt3aNDevk6MRY2RVvB3HzC5FgWDoMFZ4EuW9kHN9VpW", "proofs": [ "64iCF9WJSY9HfbWJxPnrEzjp5y3bzkYw7ad3tqtV26dPLUigsoeuTT1D6juT25LRXPJqu1KkmHGqB5J5SZLhuBGy" ], "script": "base64:AAIDAAAAAAAAAAkIARIFCgMICAgAAAAFAQAAAAZwYXlyZWYAAAAEAAAAAmxkAAAABHVzZXIAAAAFcmVmZXIAAAAGcmVmc3VtBAAAAANsZGUIBQAAAAJsZAAAAARkYXRhBAAAAAdpc3JlZmVyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMJAAEsAAAAAgIAAAAEcmVmXwUAAAAEdXNlcgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAADCQAAAAAAAAIFAAAAB2lzcmVmZXICAAAAAAQAAAAHbGFzdGJhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAICAAAAB3dhbGxldF8FAAAABXJlZmVyAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAACmxhc3RyZWZiYWwEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwkAASwAAAACAgAAAAdyZWZwYXlfBQAAA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QAAaAAAAAIFAAAACXBheXRpY2tldAAAAAAAAAAACgUAAAABeAQAAAAEZHNsNQkBAAAABnBheXJlZgAAAAQFAAAABGRzbDQFAAAABHVzZXIFAAAABXJlZmVyBQAAAApyZWZwYXltZW50BQAAAARkc2w1AAAAAKn/kYo=", "chainId": 84, "height": 781357, "spentComplexity": 0 } View: original | compacted Prev: FpjCia3TtTmjJ15jTFBupDyTMoH4sLpCFcKuvGCi2MxX Next: 4nXd4houXDdEj9nXWt6u3VpeUGSajGDCwe3yPW2sMp8k Diff:
Old | New | Differences | |
---|---|---|---|
115 | 115 | let pmt = extract(inv.payment) | |
116 | 116 | let payval = (value(pmt.amount) / 100000000) | |
117 | 117 | let x = parseIntValue(betx) | |
118 | - | let payticket = | |
118 | + | let payticket = x | |
119 | 119 | if ((payticket > payval)) | |
120 | 120 | then throw("Ticket price is 1 WAVES") | |
121 | 121 | else { |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func payref (ld,user,refer,refsum) = { | |
5 | 5 | let lde = ld.data | |
6 | 6 | let isrefer = match getString(this, ("ref_" + user)) { | |
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 lastbal = match getInteger(this, ("wallet_" + refer)) { | |
15 | 15 | case a: Int => | |
16 | 16 | a | |
17 | 17 | case _ => | |
18 | 18 | 0 | |
19 | 19 | } | |
20 | 20 | let lastrefbal = match getInteger(this, ("refpay_" + refer)) { | |
21 | 21 | case a: Int => | |
22 | 22 | a | |
23 | 23 | case _ => | |
24 | 24 | 0 | |
25 | 25 | } | |
26 | 26 | let lastrefbalref = match getInteger(this, ((("refpay_" + refer) + "_") + user)) { | |
27 | 27 | case a: Int => | |
28 | 28 | a | |
29 | 29 | case _ => | |
30 | 30 | 0 | |
31 | 31 | } | |
32 | 32 | let dsl = DataEntry(("wallet_" + refer), (lastbal + refsum)) :: lde | |
33 | 33 | let dslref = DataEntry(("refpay_" + refer), (lastrefbal + refsum)) :: dsl | |
34 | 34 | let dslrefpay = DataEntry(((("refpay_" + refer) + "_") + user), (lastrefbalref + refsum)) :: dslref | |
35 | 35 | let dsl1 = WriteSet(dslrefpay) | |
36 | 36 | dsl1 | |
37 | 37 | } | |
38 | 38 | else { | |
39 | 39 | let lastbal1 = match getInteger(this, ("wallet_" + isrefer)) { | |
40 | 40 | case a: Int => | |
41 | 41 | a | |
42 | 42 | case _ => | |
43 | 43 | 0 | |
44 | 44 | } | |
45 | 45 | let lastrefbal1 = match getInteger(this, ("refpay_" + isrefer)) { | |
46 | 46 | case a: Int => | |
47 | 47 | a | |
48 | 48 | case _ => | |
49 | 49 | 0 | |
50 | 50 | } | |
51 | 51 | let lastrefbalref1 = match getInteger(this, ((("refpay_" + isrefer) + "_") + user)) { | |
52 | 52 | case a: Int => | |
53 | 53 | a | |
54 | 54 | case _ => | |
55 | 55 | 0 | |
56 | 56 | } | |
57 | 57 | let dsl2 = DataEntry(("wallet_" + isrefer), (lastbal1 + refsum)) :: lde | |
58 | 58 | let dslref1 = DataEntry(("refpay_" + isrefer), (lastrefbal1 + refsum)) :: dsl2 | |
59 | 59 | let dslrefpay = DataEntry(((("refpay_" + isrefer) + "_") + user), (lastrefbalref1 + refsum)) :: dslref1 | |
60 | 60 | let dsl3 = WriteSet(dslrefpay) | |
61 | 61 | dsl3 | |
62 | 62 | } | |
63 | 63 | } | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func setref (ld,user,refer) = { | |
67 | 67 | let lde = ld.data | |
68 | 68 | let isrefer = match getString(this, ("ref_" + user)) { | |
69 | 69 | case a: String => | |
70 | 70 | a | |
71 | 71 | case _ => | |
72 | 72 | "" | |
73 | 73 | } | |
74 | 74 | if ((isrefer == "")) | |
75 | 75 | then { | |
76 | 76 | let dsl = DataEntry(("ref_" + user), refer) :: lde | |
77 | 77 | let dslref = DataEntry(((("refer_" + refer) + "_") + user), user) :: dsl | |
78 | 78 | let dsl1 = WriteSet(dslref) | |
79 | 79 | dsl1 | |
80 | 80 | } | |
81 | 81 | else ld | |
82 | 82 | } | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func nextcountticket (ld,newcount) = { | |
86 | 86 | let lde = ld.data | |
87 | 87 | let newcounttik = DataEntry("ticketcount", newcount) :: lde | |
88 | 88 | let nws = WriteSet(newcounttik) | |
89 | 89 | nws | |
90 | 90 | } | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func dataticket (ld,ticketkey,ticketdata,xticket) = { | |
94 | 94 | let lde = ld.data | |
95 | 95 | let newtikdata = DataEntry(ticketkey, ((ticketdata + ",") + xticket)) :: lde | |
96 | 96 | let nws = WriteSet(newtikdata) | |
97 | 97 | nws | |
98 | 98 | } | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func checknextround (ld,ticketcount,numofround) = { | |
102 | 102 | let lde = ld.data | |
103 | 103 | if ((ticketcount == 100)) | |
104 | 104 | then { | |
105 | 105 | let newtikdata = DataEntry("numberofround", (numofround + 1)) :: lde | |
106 | 106 | let nws = WriteSet(newtikdata) | |
107 | 107 | nws | |
108 | 108 | } | |
109 | 109 | else ld | |
110 | 110 | } | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | @Callable(inv) | |
114 | 114 | func playbingo (ticket,betx,refer) = { | |
115 | 115 | let pmt = extract(inv.payment) | |
116 | 116 | let payval = (value(pmt.amount) / 100000000) | |
117 | 117 | let x = parseIntValue(betx) | |
118 | - | let payticket = | |
118 | + | let payticket = x | |
119 | 119 | if ((payticket > payval)) | |
120 | 120 | then throw("Ticket price is 1 WAVES") | |
121 | 121 | else { | |
122 | 122 | let lastfondprize = match getInteger(this, "fondprize") { | |
123 | 123 | case a: Int => | |
124 | 124 | a | |
125 | 125 | case _ => | |
126 | 126 | 0 | |
127 | 127 | } | |
128 | 128 | let newfondprize = DataEntry("fondprize", (lastfondprize + (payticket / 2))) | |
129 | 129 | let dsl = WriteSet([newfondprize]) | |
130 | 130 | let numberround = match getInteger(this, "numberofround") { | |
131 | 131 | case a: Int => | |
132 | 132 | a | |
133 | 133 | case _ => | |
134 | 134 | 1 | |
135 | 135 | } | |
136 | 136 | let user = toString(inv.caller) | |
137 | 137 | let dsl1 = setref(dsl, user, refer) | |
138 | 138 | let currentTicketcount = match getInteger(this, "ticketcount") { | |
139 | 139 | case a: Int => | |
140 | 140 | a | |
141 | 141 | case _ => | |
142 | 142 | 0 | |
143 | 143 | } | |
144 | 144 | let newTicketcount = (currentTicketcount + 1) | |
145 | 145 | let dsl2 = nextcountticket(dsl1, newTicketcount) | |
146 | 146 | let currentkeyticket = ((((("ticket_" + toString(numberround)) + "_") + toString(newTicketcount)) + "_") + user) | |
147 | 147 | let dsl3 = dataticket(dsl2, currentkeyticket, ticket, betx) | |
148 | 148 | let dsl4 = checknextround(dsl3, newTicketcount, numberround) | |
149 | 149 | let refpayment = ((payticket * 10) * x) | |
150 | 150 | let dsl5 = payref(dsl4, user, refer, refpayment) | |
151 | 151 | dsl5 | |
152 | 152 | } | |
153 | 153 | } | |
154 | 154 | ||
155 | 155 |
github/deemru/w8io/169f3d6 29.61 ms ◑