tx · UsMPPXtXzHWh89DKfTWpZ8ikggRucy6MpUsvbNAZF72

3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep:  -0.01400000 Waves

2019.07.11 12:44 [580867] smart account 3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep > SELF 0.00000000 Waves

{ "type": 13, "id": "UsMPPXtXzHWh89DKfTWpZ8ikggRucy6MpUsvbNAZF72", "fee": 1400000, "feeAssetId": null, "timestamp": 1562838280369, "version": 1, "sender": "3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep", "senderPublicKey": "BJAeTqNbDSA5FiYihZZaSWvD6XL5XjpqVXbTGerBJjRK", "proofs": [ "oWyatiNPeqiWbTvbJzgLg6JdmhiNpxfAmPg47GwWe7krAYtAdThXXcmiK8VfncWWCMHzGRkykUqfNfsStE5nUPM" ], "script": "base64:AAIDAAAAAAAAAAAAAAABAQAAABJ1c2VySGFzQWRtaW5BY2Nlc3MAAAABAAAAB2FkZHJlc3MJAAAAAAAAAgUAAAAHYWRkcmVzcwUAAAAEdGhpcwAAAAIAAAABaQEAAAADYmV0AAAAAQAAAAVwcmljZQQAAAAWc3RhcnRUcmFuc2FjdGlvbkhlaWdodAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAAFc3RhcnQEAAAACXRpbWVEZWx0YQkAAGUAAAACBQAAAAZoZWlnaHQFAAAAFnN0YXJ0VHJhbnNhY3Rpb25IZWlnaHQEAAAABm1heEJldAkBAAAAB2V4dHJhY3QAAAABCQAEGgAAAAIFAAAABHRoaXMCAAAABm1heEJldAQAAAALbWF4QmV0T3duZXIJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEJAQAAAAdleHRyYWN0AAAAAQkABBwAAAACBQAAAAR0aGlzAgAAAAttYXhCZXRPd25lcgMJAABmAAAAAgUAAAAJdGltZURlbHRhAAAAAAAAAAfQCQAAAgAAAAECAAAAFlRoZSBiZXR0aW5nIHdhcyBjbG9zZWQDCQAAZgAAAAIFAAAABXByaWNlBQAAAAZtYXhCZXQJAQAAAAxTY3JpcHRSZXN1bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAZtYXhCZXQFAAAABXByaWNlCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAttYXhCZXRPd25lcgkAAlgAAAABCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAJYAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5BQAAAAVwcmljZQUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAABHRoaXMJAABlAAAAAgUAAAAFcHJpY2UFAAAABm1heEJldAUAAAAEdW5pdAUAAAADbmlsCQAAAgAAAAECAAAAGllvdXIgYmV0IGlzbid0IHRoZSBtYXggYmV0AAAAAWkBAAAABXN0YXJ0AAAAAQAAAApzdGFydFByaWNlAwkBAAAAASEAAAABCQEAAAASdXNlckhhc0FkbWluQWNjZXNzAAAAAQgFAAAAAWkAAAAGY2FsbGVyCQAAAgAAAAECAAAAE1lvdSBoYXZlIG5vIGFjY2VzcyEJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAABXN0YXJ0BQAAAAZoZWlnaHQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAABm1heEJldAUAAAAKc3RhcnRQcmljZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAALbWF4QmV0T3duZXIJAAJYAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5BQAAAANuaWwAAAAAqRchLQ==", "chainId": 84, "height": 580867, "spentComplexity": 0 } View: original | compacted Prev: 8sEnserXfg21XaopFQ29oKtqRttQoiT3NTc9HB5EMarA Next: 3ZMFSd5LH2khrC2oY8nGsR8EcZX4Y4R3ycqfhmdsmqxY Diff:
OldNewDifferences
1010 let timeDelta = (height - startTransactionHeight)
1111 let maxBet = extract(getInteger(this, "maxBet"))
1212 let maxBetOwner = addressFromPublicKey(extract(getBinary(this, "maxBetOwner")))
13- let testBetOwner = addressFromPublicKey(base58'3nLaq8Mii8HoWP7iB5ruTcozseuC1WzQGJ9MwuX9S9EE')
1413 if ((timeDelta > 2000))
1514 then throw("The betting was closed")
1615 else if ((price > maxBet))
17- then ScriptResult(WriteSet([DataEntry("maxBet", price), DataEntry("maxBetOwner", toBase58String(i.callerPublicKey)), DataEntry(toBase58String(i.callerPublicKey), price)]), TransferSet([ScriptTransfer(maxBetOwner, maxBet, unit)]))
16+ then ScriptResult(WriteSet([DataEntry("maxBet", price), DataEntry("maxBetOwner", toBase58String(i.callerPublicKey)), DataEntry(toBase58String(i.callerPublicKey), price)]), TransferSet([ScriptTransfer(this, (price - maxBet), unit)]))
1817 else throw("Your bet isn't the max bet")
1918 }
2019
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"))
1212 let maxBetOwner = addressFromPublicKey(extract(getBinary(this, "maxBetOwner")))
13- let testBetOwner = addressFromPublicKey(base58'3nLaq8Mii8HoWP7iB5ruTcozseuC1WzQGJ9MwuX9S9EE')
1413 if ((timeDelta > 2000))
1514 then throw("The betting was closed")
1615 else if ((price > maxBet))
17- then ScriptResult(WriteSet([DataEntry("maxBet", price), DataEntry("maxBetOwner", toBase58String(i.callerPublicKey)), DataEntry(toBase58String(i.callerPublicKey), price)]), TransferSet([ScriptTransfer(maxBetOwner, maxBet, unit)]))
16+ then ScriptResult(WriteSet([DataEntry("maxBet", price), DataEntry("maxBetOwner", toBase58String(i.callerPublicKey)), DataEntry(toBase58String(i.callerPublicKey), price)]), TransferSet([ScriptTransfer(this, (price - maxBet), unit)]))
1817 else throw("Your bet isn't the max bet")
1918 }
2019
2120
2221
2322 @Callable(i)
2423 func start (startPrice) = if (!(userHasAdminAccess(i.caller)))
2524 then throw("You have no access!")
2625 else WriteSet([DataEntry("start", height), DataEntry("maxBet", startPrice), DataEntry("maxBetOwner", toBase58String(i.callerPublicKey))])
2726
2827

github/deemru/w8io/169f3d6 
34.00 ms