tx · 74TkubP6tTbzYWr1ykQ8aJSUFQvrogfxWejrAdUFi3GQ

3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep:  -0.01400000 Waves

2019.07.11 12:28 [580851] smart account 3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep > SELF 0.00000000 Waves

{ "type": 13, "id": "74TkubP6tTbzYWr1ykQ8aJSUFQvrogfxWejrAdUFi3GQ", "fee": 1400000, "feeAssetId": null, "timestamp": 1562837361788, "version": 1, "sender": "3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep", "senderPublicKey": "BJAeTqNbDSA5FiYihZZaSWvD6XL5XjpqVXbTGerBJjRK", "proofs": [ "3KjuGPub5oVjn4uRwd3UWXJDyA6b7ayHgGvbQnY1pBR8ns45ZtEB4GxkDydufHX3tv66kqFYfjR9q9kKmdrrVAvk" ], "script": "base64:AAIDAAAAAAAAAAAAAAABAQAAABJ1c2VySGFzQWRtaW5BY2Nlc3MAAAABAAAAB2FkZHJlc3MJAAAAAAAAAgUAAAAHYWRkcmVzcwUAAAAEdGhpcwAAAAIAAAABaQEAAAADYmV0AAAAAQAAAAVwcmljZQQAAAAWc3RhcnRUcmFuc2FjdGlvbkhlaWdodAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAAFc3RhcnQEAAAACXRpbWVEZWx0YQkAAGUAAAACBQAAAAZoZWlnaHQFAAAAFnN0YXJ0VHJhbnNhY3Rpb25IZWlnaHQEAAAABm1heEJldAkBAAAAB2V4dHJhY3QAAAABCQAEGgAAAAIFAAAABHRoaXMCAAAABm1heEJldAkAAAIAAAABAgAAAARoZXJlAAAAAWkBAAAABXN0YXJ0AAAAAQAAAApzdGFydFByaWNlAwkBAAAAASEAAAABCQEAAAASdXNlckhhc0FkbWluQWNjZXNzAAAAAQgFAAAAAWkAAAAGY2FsbGVyCQAAAgAAAAECAAAAE1lvdSBoYXZlIG5vIGFjY2VzcyEJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAABXN0YXJ0BQAAAAZoZWlnaHQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAABm1heEJldAUAAAAKc3RhcnRQcmljZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAALbWF4QmV0T3duZXIJAAJYAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5BQAAAANuaWwAAAAAMWR0hQ==", "chainId": 84, "height": 580851, "spentComplexity": 0 } View: original | compacted Prev: agNycTAweMLSH4fKaFKiQ5KVkEG6WBS9CVZJYgCPcty Next: E4LUf4BmAiqYXe2aXBFuErcTSqLhfTwXpfSv1meVNxWU Diff:
OldNewDifferences
99 let startTransactionHeight = getIntegerValue(this, "start")
1010 let timeDelta = (height - startTransactionHeight)
1111 let maxBet = extract(getInteger(this, "maxBet"))
12- let maxBetOwner = addressFromPublicKey(extract(getBinary(this, "maxBetOwner")))
13- if ((timeDelta > 2000))
14- then throw("The betting was closed")
15- else if ((price > maxBet))
16- then ScriptResult(WriteSet([DataEntry("maxBet", price), DataEntry("maxBetOwner", toBase58String(i.callerPublicKey)), DataEntry(toBase58String(i.callerPublicKey), price)]), TransferSet([ScriptTransfer(maxBetOwner, maxBet, unit), ScriptTransfer(this, (price - maxBet), unit)]))
17- else throw("Your bet isn't the max bet")
12+ throw("here")
1813 }
1914
2015
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func userHasAdminAccess (address) = (address == this)
55
66
77 @Callable(i)
88 func bet (price) = {
99 let startTransactionHeight = getIntegerValue(this, "start")
1010 let timeDelta = (height - startTransactionHeight)
1111 let maxBet = extract(getInteger(this, "maxBet"))
12- let maxBetOwner = addressFromPublicKey(extract(getBinary(this, "maxBetOwner")))
13- if ((timeDelta > 2000))
14- then throw("The betting was closed")
15- else if ((price > maxBet))
16- then ScriptResult(WriteSet([DataEntry("maxBet", price), DataEntry("maxBetOwner", toBase58String(i.callerPublicKey)), DataEntry(toBase58String(i.callerPublicKey), price)]), TransferSet([ScriptTransfer(maxBetOwner, maxBet, unit), ScriptTransfer(this, (price - maxBet), unit)]))
17- else throw("Your bet isn't the max bet")
12+ throw("here")
1813 }
1914
2015
2116
2217 @Callable(i)
2318 func start (startPrice) = if (!(userHasAdminAccess(i.caller)))
2419 then throw("You have no access!")
2520 else WriteSet([DataEntry("start", height), DataEntry("maxBet", startPrice), DataEntry("maxBetOwner", toBase58String(i.callerPublicKey))])
2621
2722

github/deemru/w8io/169f3d6 
20.47 ms