tx · DCTzMJzjQ2J21LrixGfXehJiryt8eY88HhKyRWNo3JrN

3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b:  -0.01400000 Waves

2021.02.03 17:14 [1382096] smart account 3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b > SELF 0.00000000 Waves

{ "type": 13, "id": "DCTzMJzjQ2J21LrixGfXehJiryt8eY88HhKyRWNo3JrN", "fee": 1400000, "feeAssetId": null, "timestamp": 1612361714585, "version": 2, "chainId": 84, "sender": "3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b", "senderPublicKey": "3BKFQLeo5ExZ5Y1pt9Ftzsno7aRwzD96zoYVHP3tcLgV", "proofs": [ "4ETcWK3YbaJCBGMMwGwQznQdPYzRwVCndedM4FmXUa4E77rXfDC3kU29MLc9Nqt8ajCc6mXzAAsAYeWZpSG8siFx" ], "script": "base64:AAIDAAAAAAAAAAkIARIFCgMBCAgAAAABAQAAAApyYW5kb21pemVyAAAAAQAAAANpbnYEAAAABHJhbmQJAADLAAAAAgkAAMsAAAACCQAAywAAAAIJAADLAAAAAggFAAAAA2ludgAAAA10cmFuc2FjdGlvbklkCAUAAAADaW52AAAAD2NhbGxlclB1YmxpY0tleQgFAAAACWxhc3RCbG9jawAAABNnZW5lcmF0aW9uU2lnbmF0dXJlCQABmgAAAAEIBQAAAAlsYXN0QmxvY2sAAAAJdGltZXN0YW1wCQABmgAAAAEIBQAAAAlsYXN0QmxvY2sAAAAGaGVpZ2h0CQAB9wAAAAEFAAAABHJhbmQAAAABAAAAAWkBAAAACnN0YXJ0bG90dG8AAAADAAAABnRpY2tldAAAAAdhc3NldElkAAAADXdhbGxldEFkZHJlc3MEAAAADWNhbGxlckFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAQcmVjaXBpZW50YWRkcmVzcwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAA13YWxsZXRBZGRy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AAAAIFAAAADWNhbGxlckFkZHJlc3MCAAAADF93aW5fdGlja2V0XwIAAAAACQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAADWNhbGxlckFkZHJlc3MCAAAACl93aW5fcHJpY2UFAAAABXByaWNlCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAADWNhbGxlckFkZHJlc3MCAAAABV93aW5fBQAAAA13YWxsZXRBZGRyZXNzBQAAAANuaWwJAQAAAAxTY3JpcHRSZXN1bHQAAAACBQAAAAl3cml0ZVNldHMJAQAAAAtUcmFuc2ZlclNldAAAAAEFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24GAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V55cWl0g==", "height": 1382096, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: ipoWs3rAGqvNXnLq2CjjaX7M1EgjfuohMWEB7ADnpUt Next: 7PXDHYZCkbjVd3LaDV2P1s4e9CPyURZkL5PhCXECQPpC Diff:
OldNewDifferences
1212 let callerAddress = toBase58String(i.caller.bytes)
1313 let recipientaddress = addressFromStringValue(walletAddress)
1414 let randhash = randomizer(i)
15- let winTransfer = TransferSet([ScriptTransfer(i.caller, ((ticket * 390) / 100), unit)])
15+ let price = ((ticket * 190) / 100)
16+ let winTransfer = TransferSet([ScriptTransfer(i.caller, price, unit)])
1617 if ((500 > (toInt(randhash) % 1000)))
1718 then {
18- let writeSets = WriteSet([DataEntry((callerAddress + "_win_assetId_"), assetId), DataEntry((callerAddress + "_win_ticket_"), ticket), DataEntry((callerAddress + "_win_"), randhash), DataEntry((callerAddress + "_win_"), walletAddress)])
19+ let writeSets = WriteSet([DataEntry((callerAddress + "_win_assetId_"), assetId), DataEntry((callerAddress + "_win_ticket_"), ticket), DataEntry((callerAddress + "_win_price"), price), DataEntry((callerAddress + "_win_"), walletAddress)])
1920 ScriptResult(writeSets, winTransfer)
2021 }
2122 else {
22- let writeSets = WriteSet([DataEntry((callerAddress + "_win_assetId_"), ""), DataEntry((callerAddress + "_win_ticket_"), ""), DataEntry((callerAddress + "_win_"), ""), DataEntry((callerAddress + "_win_"), walletAddress)])
23+ let writeSets = WriteSet([DataEntry((callerAddress + "_win_assetId_"), ""), DataEntry((callerAddress + "_win_ticket_"), ""), DataEntry((callerAddress + "_win_price"), price), DataEntry((callerAddress + "_win_"), walletAddress)])
2324 ScriptResult(writeSets, TransferSet(nil))
2425 }
2526 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func randomizer (inv) = {
55 let rand = ((((inv.transactionId + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
66 sha256(rand)
77 }
88
99
1010 @Callable(i)
1111 func startlotto (ticket,assetId,walletAddress) = {
1212 let callerAddress = toBase58String(i.caller.bytes)
1313 let recipientaddress = addressFromStringValue(walletAddress)
1414 let randhash = randomizer(i)
15- let winTransfer = TransferSet([ScriptTransfer(i.caller, ((ticket * 390) / 100), unit)])
15+ let price = ((ticket * 190) / 100)
16+ let winTransfer = TransferSet([ScriptTransfer(i.caller, price, unit)])
1617 if ((500 > (toInt(randhash) % 1000)))
1718 then {
18- let writeSets = WriteSet([DataEntry((callerAddress + "_win_assetId_"), assetId), DataEntry((callerAddress + "_win_ticket_"), ticket), DataEntry((callerAddress + "_win_"), randhash), DataEntry((callerAddress + "_win_"), walletAddress)])
19+ let writeSets = WriteSet([DataEntry((callerAddress + "_win_assetId_"), assetId), DataEntry((callerAddress + "_win_ticket_"), ticket), DataEntry((callerAddress + "_win_price"), price), DataEntry((callerAddress + "_win_"), walletAddress)])
1920 ScriptResult(writeSets, winTransfer)
2021 }
2122 else {
22- let writeSets = WriteSet([DataEntry((callerAddress + "_win_assetId_"), ""), DataEntry((callerAddress + "_win_ticket_"), ""), DataEntry((callerAddress + "_win_"), ""), DataEntry((callerAddress + "_win_"), walletAddress)])
23+ let writeSets = WriteSet([DataEntry((callerAddress + "_win_assetId_"), ""), DataEntry((callerAddress + "_win_ticket_"), ""), DataEntry((callerAddress + "_win_price"), price), DataEntry((callerAddress + "_win_"), walletAddress)])
2324 ScriptResult(writeSets, TransferSet(nil))
2425 }
2526 }
2627
2728
2829 @Verifier(tx)
2930 func verify () = match tx {
3031 case _: DataTransaction =>
3132 true
3233 case _: SetScriptTransaction =>
3334 true
3435 case _ =>
3536 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
3637 }
3738

github/deemru/w8io/026f985 
34.60 ms