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:AAIDAAAAAAAAAAkIARIFCgMICAgAAAAFAQAAAAZwYXlyZWYAAAAEAAAAAmxkAAAABHVzZXIAAAAFcmVmZXIAAAAGcmVmc3VtBAAAAANsZGUIBQAAAAJsZAAAAARkYXRhBAAAAAdpc3JlZmVyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMJAAEsAAAAAgIAAAAEcmVmXwUAAAAEdXNlcgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAADCQAAAAAAAAIFAAAAB2lzcmVmZXICAAAAAAQAAAAHbGFzdGJhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAICAAAAB3dhbGxldF8FAAAABXJlZmVyAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAACmxhc3RyZWZiYWwEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwkAASwAAAACAgAAAAdyZWZwYXlfBQAA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CQAAaAAAAAIFAAAACXBheXRpY2tldAAAAAAAAAAACgUAAAABeAQAAAAEZHNsNQkBAAAABnBheXJlZgAAAAQFAAAABGRzbDQFAAAABHVzZXIFAAAABXJlZmVyBQAAAApyZWZwYXltZW50BQAAAARkc2w1AAAAAKn/kYo=", "chainId": 84, "height": 781357, "spentComplexity": 0 } View: original | compacted Prev: FpjCia3TtTmjJ15jTFBupDyTMoH4sLpCFcKuvGCi2MxX Next: 4nXd4houXDdEj9nXWt6u3VpeUGSajGDCwe3yPW2sMp8k Diff:
OldNewDifferences
115115 let pmt = extract(inv.payment)
116116 let payval = (value(pmt.amount) / 100000000)
117117 let x = parseIntValue(betx)
118- let payticket = (payval * x)
118+ let payticket = x
119119 if ((payticket > payval))
120120 then throw("Ticket price is 1 WAVES")
121121 else {
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 }
2626 let lastrefbalref = match getInteger(this, ((("refpay_" + refer) + "_") + user)) {
2727 case a: Int =>
2828 a
2929 case _ =>
3030 0
3131 }
3232 let dsl = DataEntry(("wallet_" + refer), (lastbal + refsum)) :: lde
3333 let dslref = DataEntry(("refpay_" + refer), (lastrefbal + refsum)) :: dsl
3434 let dslrefpay = DataEntry(((("refpay_" + refer) + "_") + user), (lastrefbalref + refsum)) :: dslref
3535 let dsl1 = WriteSet(dslrefpay)
3636 dsl1
3737 }
3838 else {
3939 let lastbal1 = match getInteger(this, ("wallet_" + isrefer)) {
4040 case a: Int =>
4141 a
4242 case _ =>
4343 0
4444 }
4545 let lastrefbal1 = match getInteger(this, ("refpay_" + isrefer)) {
4646 case a: Int =>
4747 a
4848 case _ =>
4949 0
5050 }
5151 let lastrefbalref1 = match getInteger(this, ((("refpay_" + isrefer) + "_") + user)) {
5252 case a: Int =>
5353 a
5454 case _ =>
5555 0
5656 }
5757 let dsl2 = DataEntry(("wallet_" + isrefer), (lastbal1 + refsum)) :: lde
5858 let dslref1 = DataEntry(("refpay_" + isrefer), (lastrefbal1 + refsum)) :: dsl2
5959 let dslrefpay = DataEntry(((("refpay_" + isrefer) + "_") + user), (lastrefbalref1 + refsum)) :: dslref1
6060 let dsl3 = WriteSet(dslrefpay)
6161 dsl3
6262 }
6363 }
6464
6565
6666 func setref (ld,user,refer) = {
6767 let lde = ld.data
6868 let isrefer = match getString(this, ("ref_" + user)) {
6969 case a: String =>
7070 a
7171 case _ =>
7272 ""
7373 }
7474 if ((isrefer == ""))
7575 then {
7676 let dsl = DataEntry(("ref_" + user), refer) :: lde
7777 let dslref = DataEntry(((("refer_" + refer) + "_") + user), user) :: dsl
7878 let dsl1 = WriteSet(dslref)
7979 dsl1
8080 }
8181 else ld
8282 }
8383
8484
8585 func nextcountticket (ld,newcount) = {
8686 let lde = ld.data
8787 let newcounttik = DataEntry("ticketcount", newcount) :: lde
8888 let nws = WriteSet(newcounttik)
8989 nws
9090 }
9191
9292
9393 func dataticket (ld,ticketkey,ticketdata,xticket) = {
9494 let lde = ld.data
9595 let newtikdata = DataEntry(ticketkey, ((ticketdata + ",") + xticket)) :: lde
9696 let nws = WriteSet(newtikdata)
9797 nws
9898 }
9999
100100
101101 func checknextround (ld,ticketcount,numofround) = {
102102 let lde = ld.data
103103 if ((ticketcount == 100))
104104 then {
105105 let newtikdata = DataEntry("numberofround", (numofround + 1)) :: lde
106106 let nws = WriteSet(newtikdata)
107107 nws
108108 }
109109 else ld
110110 }
111111
112112
113113 @Callable(inv)
114114 func playbingo (ticket,betx,refer) = {
115115 let pmt = extract(inv.payment)
116116 let payval = (value(pmt.amount) / 100000000)
117117 let x = parseIntValue(betx)
118- let payticket = (payval * x)
118+ let payticket = x
119119 if ((payticket > payval))
120120 then throw("Ticket price is 1 WAVES")
121121 else {
122122 let lastfondprize = match getInteger(this, "fondprize") {
123123 case a: Int =>
124124 a
125125 case _ =>
126126 0
127127 }
128128 let newfondprize = DataEntry("fondprize", (lastfondprize + (payticket / 2)))
129129 let dsl = WriteSet([newfondprize])
130130 let numberround = match getInteger(this, "numberofround") {
131131 case a: Int =>
132132 a
133133 case _ =>
134134 1
135135 }
136136 let user = toString(inv.caller)
137137 let dsl1 = setref(dsl, user, refer)
138138 let currentTicketcount = match getInteger(this, "ticketcount") {
139139 case a: Int =>
140140 a
141141 case _ =>
142142 0
143143 }
144144 let newTicketcount = (currentTicketcount + 1)
145145 let dsl2 = nextcountticket(dsl1, newTicketcount)
146146 let currentkeyticket = ((((("ticket_" + toString(numberround)) + "_") + toString(newTicketcount)) + "_") + user)
147147 let dsl3 = dataticket(dsl2, currentkeyticket, ticket, betx)
148148 let dsl4 = checknextround(dsl3, newTicketcount, numberround)
149149 let refpayment = ((payticket * 10) * x)
150150 let dsl5 = payref(dsl4, user, refer, refpayment)
151151 dsl5
152152 }
153153 }
154154
155155

github/deemru/w8io/169f3d6 
29.61 ms