tx · FpjCia3TtTmjJ15jTFBupDyTMoH4sLpCFcKuvGCi2MxX

3N17A1zqJZ1R2dZtMvyChQwSzepRZ1d98t9:  -0.01400000 Waves

2019.11.26 00:09 [781310] smart account 3N17A1zqJZ1R2dZtMvyChQwSzepRZ1d98t9 > SELF 0.00000000 Waves

{ "type": 13, "id": "FpjCia3TtTmjJ15jTFBupDyTMoH4sLpCFcKuvGCi2MxX", "fee": 1400000, "feeAssetId": null, "timestamp": 1574716145451, "version": 1, "sender": "3N17A1zqJZ1R2dZtMvyChQwSzepRZ1d98t9", "senderPublicKey": "AXt3aNDevk6MRY2RVvB3HzC5FgWDoMFZ4EuW9kHN9VpW", "proofs": [ "BPvMYaPxDibtLpPXDyag9QCDYeyHZfGqR9DV9remR8R1xsKzu334BBsgMwnVyTk6kopN7A5EdPZStgRTSYv8HfX" ], "script": "base64:AAIDAAAAAAAAAAkIARIFCgMICAgAAAAFAQAAAAZwYXlyZWYAAAAEAAAAAmxkAAAABHVzZXIAAAAFcmVmZXIAAAAGcmVmc3VtBAAAAANsZGUIBQAAAAJsZAAAAARkYXRhBAAAAAdpc3JlZmVyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMJAAEsAAAAAgIAAAAEcmVmXwUAAAAEdXNlcgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAADCQAAAAAAAAIFAAAAB2lzcmVmZXICAAAAAAQAAAAHbGFzdGJhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAICAAAAB3dhbGxldF8FAAAABXJlZmVyAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAACmxhc3RyZWZiYWwEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwkAASwAAAACAgAAAAdyZWZwYXlfBQAAAA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QJAABoAAAAAgkAAGgAAAACBQAAAAlwYXl0aWNrZXQAAAAAAAAAAAoFAAAAAXgEAAAABGRzbDUJAQAAAAZwYXlyZWYAAAAEBQAAAARkc2w0BQAAAAR1c2VyBQAAAAVyZWZlcgUAAAAKcmVmcGF5bWVudAUAAAAEZHNsNQAAAAAOIUoa", "chainId": 84, "height": 781310, "spentComplexity": 0 } View: original | compacted Prev: 8esqGdozpuPopFTCHVB5ffSe2jJQXrHJyP1RhgXjqwqS Next: E99CVQApqSGgBbVHoHHNJWkcxEKEStWU5kjz5bjJoSp1 Diff:
OldNewDifferences
2323 case _ =>
2424 0
2525 }
26+ let lastrefbalref = match getInteger(this, ((("refpay_" + refer) + "_") + user)) {
27+ case a: Int =>
28+ a
29+ case _ =>
30+ 0
31+ }
2632 let dsl = DataEntry(("wallet_" + refer), (lastbal + refsum)) :: lde
2733 let dslref = DataEntry(("refpay_" + refer), (lastrefbal + refsum)) :: dsl
28- let dsl1 = WriteSet(dslref)
34+ let dslrefpay = DataEntry(((("refpay_" + refer) + "_") + user), (lastrefbalref + refsum)) :: dslref
35+ let dsl1 = WriteSet(dslrefpay)
2936 dsl1
3037 }
3138 else {
4148 case _ =>
4249 0
4350 }
51+ let lastrefbalref1 = match getInteger(this, ((("refpay_" + isrefer) + "_") + user)) {
52+ case a: Int =>
53+ a
54+ case _ =>
55+ 0
56+ }
4457 let dsl2 = DataEntry(("wallet_" + isrefer), (lastbal1 + refsum)) :: lde
4558 let dslref1 = DataEntry(("refpay_" + isrefer), (lastrefbal1 + refsum)) :: dsl2
46- let dsl3 = WriteSet(dslref1)
59+ let dslrefpay = DataEntry(((("refpay_" + isrefer) + "_") + user), (lastrefbalref1 + refsum)) :: dslref1
60+ let dsl3 = WriteSet(dslrefpay)
4761 dsl3
4862 }
4963 }
6074 if ((isrefer == ""))
6175 then {
6276 let dsl = DataEntry(("ref_" + user), refer) :: lde
63- let dslref = DataEntry(("refer_" + refer), user) :: dsl
77+ let dslref = DataEntry(((("refer_" + refer) + "_") + user), user) :: dsl
6478 let dsl1 = WriteSet(dslref)
6579 dsl1
6680 }
7690 }
7791
7892
79-func dataticket (ld,ticketkey,ticketdata) = {
93+func dataticket (ld,ticketkey,ticketdata,xticket) = {
8094 let lde = ld.data
81- let newtikdata = DataEntry(ticketkey, ticketdata) :: lde
95+ let newtikdata = DataEntry(ticketkey, ((ticketdata + ",") + xticket)) :: lde
8296 let nws = WriteSet(newtikdata)
8397 nws
8498 }
130144 let newTicketcount = (currentTicketcount + 1)
131145 let dsl2 = nextcountticket(dsl1, newTicketcount)
132146 let currentkeyticket = ((((("ticket_" + toString(numberround)) + "_") + toString(newTicketcount)) + "_") + user)
133- let dsl3 = dataticket(dsl2, currentkeyticket, ticket)
147+ let dsl3 = dataticket(dsl2, currentkeyticket, ticket, betx)
134148 let dsl4 = checknextround(dsl3, newTicketcount, numberround)
135149 let refpayment = ((payticket * 10) * x)
136150 let dsl5 = payref(dsl4, user, refer, refpayment)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func payref (ld,user,refer,refsum) = {
55 let lde = ld.data
66 let isrefer = match getString(this, ("ref_" + user)) {
77 case a: String =>
88 a
99 case _ =>
1010 ""
1111 }
1212 if ((isrefer == ""))
1313 then {
1414 let lastbal = match getInteger(this, ("wallet_" + refer)) {
1515 case a: Int =>
1616 a
1717 case _ =>
1818 0
1919 }
2020 let lastrefbal = match getInteger(this, ("refpay_" + refer)) {
2121 case a: Int =>
2222 a
2323 case _ =>
2424 0
2525 }
26+ let lastrefbalref = match getInteger(this, ((("refpay_" + refer) + "_") + user)) {
27+ case a: Int =>
28+ a
29+ case _ =>
30+ 0
31+ }
2632 let dsl = DataEntry(("wallet_" + refer), (lastbal + refsum)) :: lde
2733 let dslref = DataEntry(("refpay_" + refer), (lastrefbal + refsum)) :: dsl
28- let dsl1 = WriteSet(dslref)
34+ let dslrefpay = DataEntry(((("refpay_" + refer) + "_") + user), (lastrefbalref + refsum)) :: dslref
35+ let dsl1 = WriteSet(dslrefpay)
2936 dsl1
3037 }
3138 else {
3239 let lastbal1 = match getInteger(this, ("wallet_" + isrefer)) {
3340 case a: Int =>
3441 a
3542 case _ =>
3643 0
3744 }
3845 let lastrefbal1 = match getInteger(this, ("refpay_" + isrefer)) {
3946 case a: Int =>
4047 a
4148 case _ =>
4249 0
4350 }
51+ let lastrefbalref1 = match getInteger(this, ((("refpay_" + isrefer) + "_") + user)) {
52+ case a: Int =>
53+ a
54+ case _ =>
55+ 0
56+ }
4457 let dsl2 = DataEntry(("wallet_" + isrefer), (lastbal1 + refsum)) :: lde
4558 let dslref1 = DataEntry(("refpay_" + isrefer), (lastrefbal1 + refsum)) :: dsl2
46- let dsl3 = WriteSet(dslref1)
59+ let dslrefpay = DataEntry(((("refpay_" + isrefer) + "_") + user), (lastrefbalref1 + refsum)) :: dslref1
60+ let dsl3 = WriteSet(dslrefpay)
4761 dsl3
4862 }
4963 }
5064
5165
5266 func setref (ld,user,refer) = {
5367 let lde = ld.data
5468 let isrefer = match getString(this, ("ref_" + user)) {
5569 case a: String =>
5670 a
5771 case _ =>
5872 ""
5973 }
6074 if ((isrefer == ""))
6175 then {
6276 let dsl = DataEntry(("ref_" + user), refer) :: lde
63- let dslref = DataEntry(("refer_" + refer), user) :: dsl
77+ let dslref = DataEntry(((("refer_" + refer) + "_") + user), user) :: dsl
6478 let dsl1 = WriteSet(dslref)
6579 dsl1
6680 }
6781 else ld
6882 }
6983
7084
7185 func nextcountticket (ld,newcount) = {
7286 let lde = ld.data
7387 let newcounttik = DataEntry("ticketcount", newcount) :: lde
7488 let nws = WriteSet(newcounttik)
7589 nws
7690 }
7791
7892
79-func dataticket (ld,ticketkey,ticketdata) = {
93+func dataticket (ld,ticketkey,ticketdata,xticket) = {
8094 let lde = ld.data
81- let newtikdata = DataEntry(ticketkey, ticketdata) :: lde
95+ let newtikdata = DataEntry(ticketkey, ((ticketdata + ",") + xticket)) :: lde
8296 let nws = WriteSet(newtikdata)
8397 nws
8498 }
8599
86100
87101 func checknextround (ld,ticketcount,numofround) = {
88102 let lde = ld.data
89103 if ((ticketcount == 100))
90104 then {
91105 let newtikdata = DataEntry("numberofround", (numofround + 1)) :: lde
92106 let nws = WriteSet(newtikdata)
93107 nws
94108 }
95109 else ld
96110 }
97111
98112
99113 @Callable(inv)
100114 func playbingo (ticket,betx,refer) = {
101115 let pmt = extract(inv.payment)
102116 let payval = (value(pmt.amount) / 100000000)
103117 let x = parseIntValue(betx)
104118 let payticket = (payval * x)
105119 if ((payticket > payval))
106120 then throw("Ticket price is 1 WAVES")
107121 else {
108122 let lastfondprize = match getInteger(this, "fondprize") {
109123 case a: Int =>
110124 a
111125 case _ =>
112126 0
113127 }
114128 let newfondprize = DataEntry("fondprize", (lastfondprize + (payticket / 2)))
115129 let dsl = WriteSet([newfondprize])
116130 let numberround = match getInteger(this, "numberofround") {
117131 case a: Int =>
118132 a
119133 case _ =>
120134 1
121135 }
122136 let user = toString(inv.caller)
123137 let dsl1 = setref(dsl, user, refer)
124138 let currentTicketcount = match getInteger(this, "ticketcount") {
125139 case a: Int =>
126140 a
127141 case _ =>
128142 0
129143 }
130144 let newTicketcount = (currentTicketcount + 1)
131145 let dsl2 = nextcountticket(dsl1, newTicketcount)
132146 let currentkeyticket = ((((("ticket_" + toString(numberround)) + "_") + toString(newTicketcount)) + "_") + user)
133- let dsl3 = dataticket(dsl2, currentkeyticket, ticket)
147+ let dsl3 = dataticket(dsl2, currentkeyticket, ticket, betx)
134148 let dsl4 = checknextround(dsl3, newTicketcount, numberround)
135149 let refpayment = ((payticket * 10) * x)
136150 let dsl5 = payref(dsl4, user, refer, refpayment)
137151 dsl5
138152 }
139153 }
140154
141155

github/deemru/w8io/026f985 
55.51 ms