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:AAIDAAAAAAAAAAkIARIFCgMICAgAAAAEAQAAAAZzZXRyZWYAAAADAAAAAmxkAAAABHVzZXIAAAAFcmVmZXIEAAAAA2xkZQgFAAAAAmxkAAAABGRhdGEEAAAAB2lzcmVmZXIEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAAR1c2VyAgAAAARfcmVmAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAAAAMJAAAAAAAAAgUAAAAHaXNyZWZlcgIAAAAABAAAAANkc2wJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAEdXNlcgIAAAAEX3JlZgUAAAAFcmVmZXIFAAAAA2xkZQQAAAAEZHNsMQkBAAAACFdyaXRlU2V0AAAAAQUAAAADZHNsBQAAAARkc2wxBQAAAAJsZAEAAAAPbmV4dGNvdW50dGlja2V0AAAAAgAAAAJsZAAAAAhuZXdjb3VudAQAAAADbGRlCAUAAAACbGQAAAAEZGF0YQQAAAALbmV3Y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NvdW50BAAAABBjdXJyZW50a2V5dGlja2V0CQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAHdGlja2V0XwkAAaQAAAABBQAAAAtudW1iZXJyb3VuZAIAAAABXwkAAaQAAAABBQAAAA5uZXdUaWNrZXRjb3VudAIAAAABXwUAAAAEdXNlcgQAAAAEZHNsMwkBAAAACmRhdGF0aWNrZXQAAAADBQAAAARkc2wyBQAAABBjdXJyZW50a2V5dGlja2V0BQAAAAZ0aWNrZXQEAAAABGRzbDQJAQAAAA5jaGVja25leHRyb3VuZAAAAAMFAAAABGRzbDMFAAAADm5ld1RpY2tldGNvdW50BQAAAAtudW1iZXJyb3VuZAUAAAAEZHNsNAAAAAAvdVu2", "chainId": 84, "height": 780914, "spentComplexity": 0 } View: original | compacted Prev: 297jcJw6PCXqJF4M7MmdgTi4Sr4feagrCxe6QUreoXT3 Next: 9ejjoQdvPZzPhoZFNdcV1y6Zn3F5auUHpdSUH5muA1Ug Diff:
OldNewDifferences
5050 @Callable(inv)
5151 func playbingo (ticket,betx,refer) = {
5252 let pmt = extract(inv.payment)
53- let payval = pmt.amount
53+ let payval = extract(pmt.amount)
5454 let x = parseIntValue(betx)
5555 let payticket = (payval * x)
5656 if ((1 > payticket))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func setref (ld,user,refer) = {
55 let lde = ld.data
66 let isrefer = match getString(this, (user + "_ref")) {
77 case a: String =>
88 a
99 case _ =>
1010 ""
1111 }
1212 if ((isrefer == ""))
1313 then {
1414 let dsl = DataEntry((user + "_ref"), refer) :: lde
1515 let dsl1 = WriteSet(dsl)
1616 dsl1
1717 }
1818 else ld
1919 }
2020
2121
2222 func nextcountticket (ld,newcount) = {
2323 let lde = ld.data
2424 let newcounttik = DataEntry("ticketcount", newcount) :: lde
2525 let nws = WriteSet(newcounttik)
2626 nws
2727 }
2828
2929
3030 func dataticket (ld,ticketkey,ticketdata) = {
3131 let lde = ld.data
3232 let newtikdata = DataEntry(ticketkey, ticketdata) :: lde
3333 let nws = WriteSet(newtikdata)
3434 nws
3535 }
3636
3737
3838 func checknextround (ld,ticketcount,numofround) = {
3939 let lde = ld.data
4040 if ((ticketcount == 100))
4141 then {
4242 let newtikdata = DataEntry("numberofround", (numofround + 1)) :: lde
4343 let nws = WriteSet(newtikdata)
4444 nws
4545 }
4646 else ld
4747 }
4848
4949
5050 @Callable(inv)
5151 func playbingo (ticket,betx,refer) = {
5252 let pmt = extract(inv.payment)
53- let payval = pmt.amount
53+ let payval = extract(pmt.amount)
5454 let x = parseIntValue(betx)
5555 let payticket = (payval * x)
5656 if ((1 > payticket))
5757 then throw("Ticket price is 1 WAVES")
5858 else {
5959 let lastfondprize = match getInteger(this, "fondprize") {
6060 case a: Int =>
6161 a
6262 case _ =>
6363 0
6464 }
6565 let newfondprize = DataEntry("fondprize", (lastfondprize + (payticket / 2)))
6666 let dsl = WriteSet([newfondprize])
6767 let numberround = match getInteger(this, "numberofround") {
6868 case a: Int =>
6969 a
7070 case _ =>
7171 1
7272 }
7373 let user = toString(inv.caller)
7474 let dsl1 = setref(dsl, user, refer)
7575 let currentTicketcount = match getInteger(this, "ticketcount") {
7676 case a: Int =>
7777 a
7878 case _ =>
7979 0
8080 }
8181 let newTicketcount = (currentTicketcount + 1)
8282 let dsl2 = nextcountticket(dsl1, newTicketcount)
8383 let currentkeyticket = ((((("ticket_" + toString(numberround)) + "_") + toString(newTicketcount)) + "_") + user)
8484 let dsl3 = dataticket(dsl2, currentkeyticket, ticket)
8585 let dsl4 = checknextround(dsl3, newTicketcount, numberround)
8686 dsl4
8787 }
8888 }
8989
9090

github/deemru/w8io/026f985 
23.63 ms