tx · CKBn3SEHtZqG6bDc1tw5jFAMoNHvo5k7ZUAHpbLyC6V1

3N17A1zqJZ1R2dZtMvyChQwSzepRZ1d98t9:  -0.01400000 Waves

2019.11.26 01:22 [781388] smart account 3N17A1zqJZ1R2dZtMvyChQwSzepRZ1d98t9 > SELF 0.00000000 Waves

{ "type": 13, "id": "CKBn3SEHtZqG6bDc1tw5jFAMoNHvo5k7ZUAHpbLyC6V1", "fee": 1400000, "feeAssetId": null, "timestamp": 1574720554819, "version": 1, "sender": "3N17A1zqJZ1R2dZtMvyChQwSzepRZ1d98t9", "senderPublicKey": "AXt3aNDevk6MRY2RVvB3HzC5FgWDoMFZ4EuW9kHN9VpW", "proofs": [ "Xyaw9bdigXJ5hbvoYLMxWWgLAZBBtbijPscp32dcAyc4nm85EkP65BByS7F2AkAqiHiVGNwmacEnxY4ommnWgWg" ], "script": "base64:AAIDAAAAAAAAAAkIARIFCgMICAgAAAAFAQAAAAZwYXlyZWYAAAAEAAAAAmxkAAAABHVzZXIAAAAFcmVmZXIAAAAGcmVmc3VtBAAAAANsZGUIBQAAAAJsZAAAAARkYXRhBAAAAAdpc3JlZmVyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMJAAEsAAAAAgIAAAAEcmVmXwUAAAAEdXNlcgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAADCQAAAAAAAAIFAAAAB2lzcmVmZXICAAAAAAQAAAAHbGFzdGJhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAICAAAAB3dhbGxldF8FAAAABXJlZmVyAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAACmxhc3RyZWZiYWwEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwkAASwAAAACAgAAAAdyZWZwYXl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AAAAQUAAAAObmV3VGlja2V0Y291bnQCAAAAAV8FAAAABHVzZXIEAAAABGRzbDMJAQAAAApkYXRhdGlja2V0AAAAAwUAAAAEZHNsMgUAAAAQY3VycmVudGtleXRpY2tldAUAAAAGdGlja2V0BAAAAARkc2w0CQEAAAAOY2hlY2tuZXh0cm91bmQAAAADBQAAAARkc2wzBQAAAA5uZXdUaWNrZXRjb3VudAUAAAALbnVtYmVycm91bmQEAAAACnJlZnBheW1lbnQJAABoAAAAAgkAAGgAAAACBQAAAAlwYXl0aWNrZXQAAAAAAAAAAAoFAAAAAXgEAAAABGRzbDUJAQAAAAZwYXlyZWYAAAAEBQAAAARkc2w0BQAAAAR1c2VyBQAAAAVyZWZlcgUAAAAKcmVmcGF5bWVudAUAAAAEZHNsNQAAAABWAJzW", "chainId": 84, "height": 781388, "spentComplexity": 0 } View: original | compacted Prev: 4nXd4houXDdEj9nXWt6u3VpeUGSajGDCwe3yPW2sMp8k Next: none Diff:
OldNewDifferences
7171 case _ =>
7272 ""
7373 }
74+ let lastrefkol = match getInteger(this, ("refkol_" + refer)) {
75+ case a: Int =>
76+ a
77+ case _ =>
78+ 0
79+ }
7480 if ((isrefer == ""))
7581 then {
7682 let dsl = DataEntry(("ref_" + user), refer) :: lde
7783 let dslref = DataEntry(((("refer_" + refer) + "_") + user), user) :: dsl
78- let dsl1 = WriteSet(dslref)
84+ let dslrefkol = DataEntry(("refkol_" + refer), (lastrefkol + 1)) :: dslref
85+ let dsl1 = WriteSet(dslrefkol)
7986 dsl1
8087 }
8188 else ld
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 }
74+ let lastrefkol = match getInteger(this, ("refkol_" + refer)) {
75+ case a: Int =>
76+ a
77+ case _ =>
78+ 0
79+ }
7480 if ((isrefer == ""))
7581 then {
7682 let dsl = DataEntry(("ref_" + user), refer) :: lde
7783 let dslref = DataEntry(((("refer_" + refer) + "_") + user), user) :: dsl
78- let dsl1 = WriteSet(dslref)
84+ let dslrefkol = DataEntry(("refkol_" + refer), (lastrefkol + 1)) :: dslref
85+ let dsl1 = WriteSet(dslrefkol)
7986 dsl1
8087 }
8188 else ld
8289 }
8390
8491
8592 func nextcountticket (ld,newcount) = {
8693 let lde = ld.data
8794 let newcounttik = DataEntry("ticketcount", newcount) :: lde
8895 let nws = WriteSet(newcounttik)
8996 nws
9097 }
9198
9299
93100 func dataticket (ld,ticketkey,ticketdata) = {
94101 let lde = ld.data
95102 let newtikdata = DataEntry(ticketkey, ticketdata) :: lde
96103 let nws = WriteSet(newtikdata)
97104 nws
98105 }
99106
100107
101108 func checknextround (ld,ticketcount,numofround) = {
102109 let lde = ld.data
103110 if ((ticketcount == 100))
104111 then {
105112 let newtikdata = DataEntry("numberofround", (numofround + 1)) :: lde
106113 let nws = WriteSet(newtikdata)
107114 nws
108115 }
109116 else ld
110117 }
111118
112119
113120 @Callable(inv)
114121 func playbingo (ticket,betx,refer) = {
115122 let pmt = extract(inv.payment)
116123 let payval = (value(pmt.amount) / 100000000)
117124 let x = parseIntValue(betx)
118125 let payticket = x
119126 if ((payticket > payval))
120127 then throw("Ticket price is 1 WAVES")
121128 else {
122129 let lastfondprize = match getInteger(this, "fondprize") {
123130 case a: Int =>
124131 a
125132 case _ =>
126133 0
127134 }
128135 let newfondprize = DataEntry("fondprize", (lastfondprize + (payticket / 2)))
129136 let dsl = WriteSet([newfondprize])
130137 let numberround = match getInteger(this, "numberofround") {
131138 case a: Int =>
132139 a
133140 case _ =>
134141 1
135142 }
136143 let user = toString(inv.caller)
137144 let dsl1 = setref(dsl, user, refer)
138145 let currentTicketcount = match getInteger(this, "ticketcount") {
139146 case a: Int =>
140147 a
141148 case _ =>
142149 0
143150 }
144151 let newTicketcount = (currentTicketcount + 1)
145152 let dsl2 = nextcountticket(dsl1, newTicketcount)
146153 let currentkeyticket = ((((("ticket_" + toString(numberround)) + "_") + toString(newTicketcount)) + "_") + user)
147154 let dsl3 = dataticket(dsl2, currentkeyticket, ticket)
148155 let dsl4 = checknextround(dsl3, newTicketcount, numberround)
149156 let refpayment = ((payticket * 10) * x)
150157 let dsl5 = payref(dsl4, user, refer, refpayment)
151158 dsl5
152159 }
153160 }
154161
155162

github/deemru/w8io/169f3d6 
40.02 ms