tx · 7GQseVv3FaupJkR1v86k4vZPQ9kMCdS9mxytJqntbzAJ

3MySJyGK77d6FhzLNaVVQPXdd9a83bM3qDy:  -0.01000000 Waves

2022.05.14 23:36 [2051828] smart account 3MySJyGK77d6FhzLNaVVQPXdd9a83bM3qDy > SELF 0.00000000 Waves

{ "type": 13, "id": "7GQseVv3FaupJkR1v86k4vZPQ9kMCdS9mxytJqntbzAJ", "fee": 1000000, "feeAssetId": null, "timestamp": 1652560577009, "version": 2, "chainId": 84, "sender": "3MySJyGK77d6FhzLNaVVQPXdd9a83bM3qDy", "senderPublicKey": "BfMBEE7fb4c1RcjEUzpvNjTpjoKMmDRef15igPkstvRm", "proofs": [ "MwuvbARK6Gh3KyZG6zC8MoYHryuAe5zebeFLBubsPWfJNBcLMqqMb2GS75Y365kWd2ckkavKWrb726b5p6HUGkM" ], "script": "base64:AAIDAAAAAAAAAAYIARIAEgAAAAACAQAAAApyYW5kb21pemVyAAAAAQAAAANpbnYEAAAACGxhc3RQbGF5BAAAAAckbWF0Y2gwCQAEHAAAAAIFAAAABHRoaXMCAAAACGxhc3RQbGF5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAFzBQAAAAckbWF0Y2gwBQAAAAFzAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAARVbml0AQAAAAxXYXZlc0xvdHRvVjIJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IEAAAABHJhbmQJAADLAAAAAgkAAMsAAAACCQAAywAAAAIJAADLAAAAAgkAAMsAAAACBQAAAAhsYXN0UGxheQgFAAAAA2ludgAAAA10cmFuc2FjdGlvbklkCAUAAAADaW52AAAAD2NhbGxlclB1YmxpY0tleQgFAAAACWxhc3RCbG9jawAAABNnZW5lcmF0aW9uU2lnbmF0dXJlCQABmgAAAAEIBQAAAAlsYXN0QmxvY2sAAAAJdGltZXN0YW1wCQABmgAAAAEIBQAAAAlsYXN0QmxvY2sAAAAGaGVpZ2h0CQAB9wAAAAEFAAAABHJhbmQBAAAACnN0YXJ0TG90dG8AAAABAAAAA2ludgQAAAAJcGxheUxpbWl0CQAAaQAAAAIJAQAAAAx3YXZlc0JhbGFuY2UAAAABBQAAAAR0aGlzAAAAAAAAAABkBAAAAAdwYXltZW50CQEAAAAHZXh0cmFjdAAAAAEIBQAAAANpbnYAAAAHcGF5bWVudAQAAAAIcmFuZGhhc2gJAQAAAApyYW5kb21pemVyAAAAAQUAAAADaW52BAAAAAt3aW5UcmFuc2ZlcgkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAADaW52AAAABmNhbGxlcgkAAGkAAAACCQAAaAAAAAIIBQAAAAdwYXltZW50AAAABmFtb3VudAAAAAAAAAAAvgAAAAAAAAAAZAUAAAAEdW5pdAUAAAADbmlsBAAAAA13cml0ZUxhc3RQbGF5CQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAhsYXN0UGxheQUAAAAIcmFuZGhhc2gFAAAAA25pbAMJAABmAAAAAgAAAAAAAAAB9AkAAGoAAAACCQAEsQAAAAEFAAAACHJhbmRoYXNoAAAAAAAAAAPoCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgUAAAANd3JpdGVMYXN0UGxheQUAAAALd2luVHJhbnNmZXIJAQAAAAxTY3JpcHRSZXN1bHQAAAACBQAAAA13cml0ZUxhc3RQbGF5CQEAAAALVHJhbnNmZXJTZXQAAAABBQAAAANuaWwAAAACAAAAA2ludgEAAAAFbG90dG8AAAAACQEAAAAKc3RhcnRMb3R0bwAAAAEFAAAAA2ludgAAAANpbnYBAAAAB2RlZmF1bHQAAAAACQEAAAAKc3RhcnRMb3R0bwAAAAEFAAAAA2ludgAAAADoDFns", "height": 2051828, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GzYqWSdH5Y1cZYvBhr3KCNV3CdwF1yXYGPZs73zFSTmn Next: 5CvWPxS3DrHE9AMx2hBEueJnHupse7434ep9KnR6dgDQ Diff:
OldNewDifferences
1616
1717
1818 func startLotto (inv) = {
19- let playLimit = (wavesBalance(this) / 1)
19+ let playLimit = (wavesBalance(this) / 100)
2020 let payment = extract(inv.payment)
2121 let randhash = randomizer(inv)
22- let winTransfer = TransferSet([ScriptTransfer(inv.caller, (payment.amount * 1), unit)])
22+ let winTransfer = TransferSet([ScriptTransfer(inv.caller, ((payment.amount * 190) / 100), unit)])
2323 let writeLastPlay = WriteSet([DataEntry("lastPlay", randhash)])
2424 if ((500 > (toInt(randhash) % 1000)))
2525 then ScriptResult(writeLastPlay, winTransfer)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func randomizer (inv) = {
55 let lastPlay = match getBinary(this, "lastPlay") {
66 case s: ByteVector =>
77 s
88 case _: 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) = {
19- let playLimit = (wavesBalance(this) / 1)
19+ let playLimit = (wavesBalance(this) / 100)
2020 let payment = extract(inv.payment)
2121 let randhash = randomizer(inv)
22- let winTransfer = TransferSet([ScriptTransfer(inv.caller, (payment.amount * 1), unit)])
22+ let winTransfer = TransferSet([ScriptTransfer(inv.caller, ((payment.amount * 190) / 100), unit)])
2323 let writeLastPlay = WriteSet([DataEntry("lastPlay", randhash)])
2424 if ((500 > (toInt(randhash) % 1000)))
2525 then ScriptResult(writeLastPlay, winTransfer)
2626 else ScriptResult(writeLastPlay, TransferSet(nil))
2727 }
2828
2929
3030 @Callable(inv)
3131 func lotto () = startLotto(inv)
3232
3333
3434
3535 @Callable(inv)
3636 func default () = startLotto(inv)
3737
3838

github/deemru/w8io/169f3d6 
25.94 ms