tx · 2wY7TGqGPht9UUfs7keyXRVzcTV9hcbMkUQ5VHH6U8jz

3MxwtQTF1cHZBzHdVMmfdeeTJAoF58usNzC:  -0.01400000 Waves

2019.10.25 01:16 [734764] smart account 3MxwtQTF1cHZBzHdVMmfdeeTJAoF58usNzC > SELF 0.00000000 Waves

{ "type": 13, "id": "2wY7TGqGPht9UUfs7keyXRVzcTV9hcbMkUQ5VHH6U8jz", "fee": 1400000, "feeAssetId": null, "timestamp": 1571955463652, "version": 1, "sender": "3MxwtQTF1cHZBzHdVMmfdeeTJAoF58usNzC", "senderPublicKey": "AtB1c3RaAbi5bMXf4twdpm182Pcj5tgADufjhfxjt5YP", "proofs": [ "4iWikiCk3GmPn4MTrNaNRx14P251CX6hFJAuBctMES4JiCcMQnBXQ6neLkJs6qjjm4iDsAqnjf6w3A1HwUpBNMtd" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAAAgAAAAALb3duZXJQdWJLZXkBAAAAIJLVH1aKS7GiLdMgBtKumrDgMoaT5BFPrNSzSjm7iLMkAQAAAApyYW5kb21pemVyAAAAAQAAAANpbnYEAAAABGxhc3QEAAAAByRtYXRjaDAJAAQcAAAAAgUAAAAEdGhpcwIAAAAEdGVzdAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAKQnl0ZVZlY3RvcgQAAAABcwUAAAAHJG1hdGNoMAUAAAABcwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAQAAAABYQUAAAAHJG1hdGNoMAEAAAAMV2F2ZXNMb3R0b1YyCQEAAAAFdGhyb3cAAAAABAAAAARyYW5kCQAAywAAAAIJAADLAAAAAgkAAMsAAAACCQAAywAAAAIJAADLAAAAAgUAAAAEbGFzdAgFAAAAA2ludgAAAA10cmFuc2FjdGlvbklkCAUAAAADaW52AAAAD2NhbGxlclB1YmxpY0tleQgFAAAACWxhc3RCbG9jawAAABNnZW5lcmF0aW9uU2lnbmF0dXJlCQABmgAAAAEIBQAAAAlsYXN0Qm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2NyaXB0VHJhbnNhY3Rpb24EAAAAAWMFAAAAByRtYXRjaDAGAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDAGBwZR1y4=", "chainId": 84, "height": 734764, "spentComplexity": 0 } View: original | compacted Prev: 2PQzRAgYcC1bEUqkMABoxADN3TyGd6owLXGC51bsaJGA Next: 9nww1Vfqjg1vEAaR4DwNPKs9L25BqL2LSpMGmrYs8X4i Diff:
OldNewDifferences
2222 let playerAddress = inv.caller
2323 let winAmt = 1000000
2424 let me = "value2"
25- let gameData = ((((toBase58String(inv.callerPublicKey) + "-") + choise) + "-") + me)
25+ let gameData = ((((toBase58String(inv.transactionId) + "-") + choise) + "-") + me)
2626 if ((me != choise))
2727 then WriteSet([DataEntry(gameData, "LOSS")])
2828 else ScriptResult(WriteSet([DataEntry(gameData, "WIN")]), TransferSet([ScriptTransfer(playerAddress, winAmt, unit)]))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let ownerPubKey = base58'AtB1c3RaAbi5bMXf4twdpm182Pcj5tgADufjhfxjt5YP'
55
66 func randomizer (inv) = {
77 let last = match getBinary(this, "test") {
88 case s: ByteVector =>
99 s
1010 case a: Unit =>
1111 base58'2ee4oFDYriWJ9EMeR'
1212 case _ =>
1313 throw()
1414 }
1515 let rand = (((((last + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
1616 sha256(rand)
1717 }
1818
1919
2020 @Callable(inv)
2121 func test (choise) = {
2222 let playerAddress = inv.caller
2323 let winAmt = 1000000
2424 let me = "value2"
25- let gameData = ((((toBase58String(inv.callerPublicKey) + "-") + choise) + "-") + me)
25+ let gameData = ((((toBase58String(inv.transactionId) + "-") + choise) + "-") + me)
2626 if ((me != choise))
2727 then WriteSet([DataEntry(gameData, "LOSS")])
2828 else ScriptResult(WriteSet([DataEntry(gameData, "WIN")]), TransferSet([ScriptTransfer(playerAddress, winAmt, unit)]))
2929 }
3030
3131
3232 @Verifier(tx)
3333 func verify () = match tx {
3434 case t: SetScriptTransaction =>
3535 sigVerify(tx.bodyBytes, tx.proofs[0], ownerPubKey)
3636 case c: InvokeScriptTransaction =>
3737 true
3838 case d: DataTransaction =>
3939 true
4040 case _ =>
4141 false
4242 }
4343

github/deemru/w8io/169f3d6 
39.73 ms