tx · J7iWmSH2DdnaqvG88AKpfMMBVPWT6i7kW9juqb8MAx3a

3MrC1oqVCoLkfHabhJtrLJS6GxcooQwRWuP:  -0.01400000 Waves

2019.11.15 12:11 [765996] smart account 3MrC1oqVCoLkfHabhJtrLJS6GxcooQwRWuP > SELF 0.00000000 Waves

{ "type": 13, "id": "J7iWmSH2DdnaqvG88AKpfMMBVPWT6i7kW9juqb8MAx3a", "fee": 1400000, "feeAssetId": null, "timestamp": 1573809161791, "version": 1, "sender": "3MrC1oqVCoLkfHabhJtrLJS6GxcooQwRWuP", "senderPublicKey": "3bmZaUZ9wp3K1YZQFqTkN1oZzumQPi7WLQ9QowMaqqEZ", "proofs": [ "2UmpCuoJFYLpWjakKH5NoasGgq7vYQWE3cMTULTfhMuMBCsc9Zn4iFEbdrWFy7xLDGdo3mpNxwEkypX1fFgsLhie" ], "script": "base64:AAIDAAAAAAAAAAwIARIDCgEIEgMKAQgAAAACAAAAAAt0aWNrZXRQcmljZQAAAAAAAAAnEAAAAAAFTVJUaWQCAAAALDhhZllyYkRCcjZUdzVKZ2FXVWdtMkduY1k3ckw4N0p2R0c3YVdleldNR2daAAAAAgAAAApjb250ZXh0T2JqAQAAAAlidXlUaWNrZXQAAAABAAAADWFkZHJlc1RvTGVhc2UEAAAAByRtYXRjaDAIBQAAAApjb250ZXh0T2JqAAAAB3BheW1lbnQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0F0dGFjaGVkUGF5bWVudAQAAAABcAUAAAAHJG1hdGNoMAMDCQAAAAAAAAIIBQAAAAFwAAAABmFtb3VudAUAAAALdGlja2V0UHJpY2UJAAAAAAAAAgkAAlgAAAABCQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFwAAAAB2Fzc2V0SWQFAAAABU1SVGlkBwQAAAAPdGlja2V0QW1vdW50TmV3CQAAZAAAAAIJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAADHRpY2tldEFtb3VudAAAAAAAAAAAAQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACAgAAAAZ0aWNrZXQJAAGkAAAAAQUAAAAPdGlja2V0QW1vdW50TmV3BQAAAA1hZGRyZXNUb0xlYXNlCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAx0aWNrZXRBbW91bnQFAAAAD3RpY2tldEFtb3VudE5ldwUAAAADbmlsCQAAAgAAAAECAAAAJkluY29ycmVjdCBhbW91bnQgb3IgYXNzZXRJZCBpbiBwYXltZW50CQAAAgAAAAECAAAAFFBheW1lbnQgbm90IGF0dGFjaGVkAAAACmNvbnRleHRPYmoBAAAACWFkZFdpbm5lcgAAAAEAAAAHbG90dGVyeQQAAAAObG90dGVyeUFkZHJlc3MJAQAAAAdleHRyYWN0AAAAAQkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQUAAAAHbG90dGVyeQMJAQAAAAlpc0RlZmluZWQAAAABCQAEGwAAAAIFAAAABHRoaXMFAAAAB2xvdHRlcnkEAAAADXdpbm5lckFkZHJlc3MJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAADmxvdHRlcnlBZGRyZXNzAgAAAA13aW5uZXJBZGRyZXNzBAAAAAx3aW5uZXJUaWNrZXQJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAADmxvdHRlcnlBZGRyZXNzAgAAAAx3aW5uZXJUaWNrZXQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgIAAAANd2lubmluZ1RpY2tldAkAAaQAAAABBQAAAAx3aW5uZXJUaWNrZXQFAAAADXdpbm5lckFkZHJlc3MFAAAAA25pbAkAAAIAAAABAgAAACN5b3UgdG91Y2ggaW5jb3JyZWN0IGxvdHRlcnkgYWRkcmVzcwAAAACiZ7bI", "chainId": 84, "height": 765996, "spentComplexity": 0 } View: original | compacted Prev: AEaHTefo6PjA3d37Cv6rkSjs1kKJjWy7ZVWUQTYrAQbC Next: FHtpkWkdLU7Xfq9MtSg4XdfAVY92Y36jWPpGfaAoSXsg Diff:
OldNewDifferences
2525 @Callable(contextObj)
2626 func addWinner (lottery) = {
2727 let lotteryAddress = extract(addressFromString(lottery))
28- if (isDefined(getString(this, lottery)))
28+ if (isDefined(getBoolean(this, lottery)))
2929 then {
3030 let winnerAddress = getStringValue(lotteryAddress, "winnerAddress")
3131 let winnerTicket = getIntegerValue(lotteryAddress, "winnerTicket")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let ticketPrice = 10000
55
66 let MRTid = "8afYrbDBr6Tw5JgaWUgm2GncY7rL87JvGG7aWezWMGgZ"
77
88 @Callable(contextObj)
99 func buyTicket (addresToLease) = match contextObj.payment {
1010 case p: AttachedPayment =>
1111 if (if ((p.amount == ticketPrice))
1212 then (toBase58String(extract(p.assetId)) == MRTid)
1313 else false)
1414 then {
1515 let ticketAmountNew = (getIntegerValue(this, "ticketAmount") + 1)
1616 WriteSet([DataEntry(("ticket" + toString(ticketAmountNew)), addresToLease), DataEntry("ticketAmount", ticketAmountNew)])
1717 }
1818 else throw("Incorrect amount or assetId in payment")
1919 case _ =>
2020 throw("Payment not attached")
2121 }
2222
2323
2424
2525 @Callable(contextObj)
2626 func addWinner (lottery) = {
2727 let lotteryAddress = extract(addressFromString(lottery))
28- if (isDefined(getString(this, lottery)))
28+ if (isDefined(getBoolean(this, lottery)))
2929 then {
3030 let winnerAddress = getStringValue(lotteryAddress, "winnerAddress")
3131 let winnerTicket = getIntegerValue(lotteryAddress, "winnerTicket")
3232 WriteSet([DataEntry(("winningTicket" + toString(winnerTicket)), winnerAddress)])
3333 }
3434 else throw("you touch incorrect lottery address")
3535 }
3636
3737

github/deemru/w8io/026f985 
27.47 ms