tx · BaQqwX4aH7B2UPZjo9RZihEjpugvHK1trz2udKkUMr1p

3N9rn6oHDHVvfENDBwYm5P2LGuQkBLL4sVE:  -0.01870000 Waves

2020.10.04 01:16 [1204965] smart account 3N9rn6oHDHVvfENDBwYm5P2LGuQkBLL4sVE > SELF 0.00000000 Waves

{ "type": 13, "id": "BaQqwX4aH7B2UPZjo9RZihEjpugvHK1trz2udKkUMr1p", "fee": 1870000, "feeAssetId": null, "timestamp": 1601763291671, "version": 2, "chainId": 84, "sender": "3N9rn6oHDHVvfENDBwYm5P2LGuQkBLL4sVE", "senderPublicKey": "8dXboB91BfUTr4CrHZCqQR1g5SPMGtAQKRGFmPtcokrZ", "proofs": [ "4fG48LMc5UXf6XVAYMDNzUPbbyt9wdVqMXjGiC7wrruJy12M6JaBc3rxp6CwWYtck6YG8L8bMr5iu6cYQYd4zmEL" ], "script": "base64:AAIDAAAAAAAAAAYIARIAEgAAAAACAQAAAApyYW5kb21pemVyAAAAAQAAAANpbnYEAAAACGxhc3RQbGF5BAAAAAckbWF0Y2gwCQAEHAAAAAIFAAAABHRoaXMCAAAABFBsYXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAXMFAAAAByRtYXRjaDAFAAAAAXMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQEAAAAAWEFAAAAByRtYXRjaDABAAAADFdhdmVzTG90dG9WMgkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgQAAAAEcmFuZAkAAMsAAAACCQAAywAAAAIJAADLAAAAAgkAAMsAAAACCQAAywAAAAIFAAAACGxhc3RQbGF5CAUAAAADaW52AAAADXRyYW5zYWN0aW9uSWQIBQAAAANpbnYAAAAPY2FsbGVyUHVibGljS2V5CAUAAAAJbGFzdEJsb2NrAAAAE2dlbmVyYXRpb25TaWduYXR1cmUJAAGaAAAAAQgFAAAACWxhc3RCbG9jawAAAAl0aW1lc3RhbXAJAAGaAAAAAQgFAAAACWxhc3R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AAAPoCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgUAAAANd3JpdGVMYXN0UGxheQUAAAALd2luVHJhbnNmZXIJAQAAAAxTY3JpcHRSZXN1bHQAAAACBQAAAA13cml0ZUxhc3RQbGF5CQEAAAALVHJhbnNmZXJTZXQAAAABBQAAAANuaWwAAAACAAAAA2ludgEAAAAFbG90dG8AAAAACQEAAAAKc3RhcnRMb3R0bwAAAAEFAAAAA2ludgAAAANpbnYBAAAAB2RlZmF1bHQAAAAACQEAAAAKc3RhcnRMb3R0bwAAAAEFAAAAA2ludgAAAABi+Do+", "height": 1204965, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HHswXFZ258qfg3V4edTCvf6Vp12MY9SiEBSrXMb4m9Lm Next: none Diff:
OldNewDifferences
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func randomizer (inv) = {
5- let lastPlay = match getBinary(this, "lastPlay") {
5+ let lastPlay = match getBinary(this, "Play") {
66 case s: ByteVector =>
77 s
88 case a: Unit =>
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func randomizer (inv) = {
5- let lastPlay = match getBinary(this, "lastPlay") {
5+ let lastPlay = match getBinary(this, "Play") {
66 case s: ByteVector =>
77 s
88 case a: Unit =>
99 base58'2ee4oFDYriWJ9EMeR'
1010 case _ =>
1111 throw("Match error")
1212 }
1313 let rand = (((((lastPlay + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
1414 sha256(rand)
1515 }
1616
1717
1818 func startLotto (inv) = {
1919 let playLimit = (wavesBalance(this) / 100)
2020 let payment = extract(inv.payment)
2121 if (!(isDefined(inv.payment)))
2222 then throw("Should be with Payment in Waves")
2323 else if (isDefined(payment.assetId))
2424 then throw("Payment should be in Waves")
2525 else if ((payment.amount > playLimit))
2626 then throw(("Payment should be less than " + toString(playLimit)))
2727 else {
2828 let randhash = randomizer(inv)
2929 let winTransfer = TransferSet([ScriptTransfer(inv.caller, ((payment.amount * 190) / 100), unit)])
3030 let writeLastPlay = WriteSet([DataEntry("lastPlay", randhash)])
3131 if ((500 > (toInt(randhash) % 1000)))
3232 then ScriptResult(writeLastPlay, winTransfer)
3333 else ScriptResult(writeLastPlay, TransferSet(nil))
3434 }
3535 }
3636
3737
3838 @Callable(inv)
3939 func lotto () = startLotto(inv)
4040
4141
4242
4343 @Callable(inv)
4444 func default () = startLotto(inv)
4545
4646

github/deemru/w8io/169f3d6 
20.62 ms