tx · 9ouKiSKNFHongyUb1ScXUBQkUcDge3hkRzqRJjgpAovu

3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep:  -0.01400000 Waves

2019.07.11 13:06 [580890] smart account 3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep > SELF 0.00000000 Waves

{ "type": 13, "id": "9ouKiSKNFHongyUb1ScXUBQkUcDge3hkRzqRJjgpAovu", "fee": 1400000, "feeAssetId": null, "timestamp": 1562839567811, "version": 1, "sender": "3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep", "senderPublicKey": "BJAeTqNbDSA5FiYihZZaSWvD6XL5XjpqVXbTGerBJjRK", "proofs": [ "4P7zRBhBvHCWkQn3uPGC8mevJFKmVMqbXRDoJu2yABoyVAKVCeD5cTAR6cp7cxCG3mNMhCvPMqmfFgG4Yv5ADCFT" ], "script": "base64:AAIDAAAAAAAAAAAAAAABAQAAABJ1c2VySGFzQWRtaW5BY2Nlc3MAAAABAAAAB2FkZHJlc3MJAAAAAAAAAgUAAAAHYWRkcmVzcwUAAAAEdGhpcwAAAAIAAAABaQEAAAADYmV0AAAAAAQAAAAWc3RhcnRUcmFuc2FjdGlvbkhlaWdodAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAAFc3RhcnQEAAAACXRpbWVEZWx0YQkAAGUAAAACBQAAAAZoZWlnaHQFAAAAFnN0YXJ0VHJhbnNhY3Rpb25IZWlnaHQEAAAABm1heEJldAkBAAAAB2V4dHJhY3QAAAABCQAEGgAAAAIFAAAABHRoaXMCAAAABm1heEJldAQAAAALbWF4QmV0T3duZXIJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEJAQAAABFAZXh0ck5hdGl2ZSgxMDUyKQAAAAIFAAAABHRoaXMCAAAAC21heEJldE93bmVyBAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAABmAAAAAgUAAAAJdGltZURlbHRhA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QcmljZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAALbWF4QmV0T3duZXIJAAJYAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5BQAAAANuaWwAAAAAJaGljw==", "chainId": 84, "height": 580890, "spentComplexity": 0 } View: original | compacted Prev: GnrJ71dtJszKZJMrPNdPFjBGhmuH8jCdepfAse6wvfDQ Next: 9EWDLMLN7FrDzmQYSTQWefWAVhGotwyt59SbDuhKHJNA 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")))
12+ let maxBetOwner = addressFromPublicKey(getBinaryValue(this, "maxBetOwner"))
1313 let pmt = extract(i.payment)
1414 if ((timeDelta > 2000))
1515 then throw("The betting was closed")
1717 then {
1818 let price = pmt.amount
1919 if ((price > maxBet))
20- then ScriptResult(WriteSet([DataEntry("maxBet", price), DataEntry("maxBetOwner", toBase58String(i.callerPublicKey)), DataEntry(toBase58String(i.callerPublicKey), price)]), TransferSet([ScriptTransfer(this, maxBet, unit)]))
20+ then ScriptResult(WriteSet([DataEntry("maxBet", price), DataEntry("maxBetOwner", toBase58String(i.callerPublicKey)), DataEntry(toBase58String(i.callerPublicKey), price)]), TransferSet([ScriptTransfer(maxBetOwner, maxBet, unit)]))
2121 else throw("Your bet isn't the max bet")
2222 }
2323 else throw("You need to place a bet using waves currency")
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 () = {
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")))
12+ let maxBetOwner = addressFromPublicKey(getBinaryValue(this, "maxBetOwner"))
1313 let pmt = extract(i.payment)
1414 if ((timeDelta > 2000))
1515 then throw("The betting was closed")
1616 else if (!(isDefined(pmt.assetId)))
1717 then {
1818 let price = pmt.amount
1919 if ((price > maxBet))
20- then ScriptResult(WriteSet([DataEntry("maxBet", price), DataEntry("maxBetOwner", toBase58String(i.callerPublicKey)), DataEntry(toBase58String(i.callerPublicKey), price)]), TransferSet([ScriptTransfer(this, maxBet, unit)]))
20+ then ScriptResult(WriteSet([DataEntry("maxBet", price), DataEntry("maxBetOwner", toBase58String(i.callerPublicKey)), DataEntry(toBase58String(i.callerPublicKey), price)]), TransferSet([ScriptTransfer(maxBetOwner, maxBet, unit)]))
2121 else throw("Your bet isn't the max bet")
2222 }
2323 else throw("You need to place a bet using waves currency")
2424 }
2525
2626
2727
2828 @Callable(i)
2929 func start (startPrice) = if (!(userHasAdminAccess(i.caller)))
3030 then throw("You have no access!")
3131 else WriteSet([DataEntry("start", height), DataEntry("maxBet", startPrice), DataEntry("maxBetOwner", toBase58String(i.callerPublicKey))])
3232
3333

github/deemru/w8io/169f3d6 
23.75 ms