tx · BwmqPTVoxR4ZWRX3oYWdtZA5owPU3JcNHd6goNZ3p7sg

3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep:  -0.01400000 Waves

2019.07.10 17:19 [579683] smart account 3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep > SELF 0.00000000 Waves

{ "type": 13, "id": "BwmqPTVoxR4ZWRX3oYWdtZA5owPU3JcNHd6goNZ3p7sg", "fee": 1400000, "feeAssetId": null, "timestamp": 1562768430287, "version": 1, "sender": "3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep", "senderPublicKey": "BJAeTqNbDSA5FiYihZZaSWvD6XL5XjpqVXbTGerBJjRK", "proofs": [ "mLqwqJCqAEtKWSUpiNNi4v4Za1UHxiQdSdA9CMWjGqBHtmVfJcsP9hq4SD7T9zhoQSj4Q1L8a5dfxs87P3ZWDsw" ], "script": "base64:AAIDAAAAAAAAAAAAAAABAQAAABJ1c2VySGFzQWRtaW5BY2Nlc3MAAAABAAAAB2FkZHJlc3MJAAAAAAAAAgUAAAAHYWRkcmVzcwUAAAAEdGhpcwAAAAIAAAABaQEAAAADYmV0AAAAAAQAAAAWc3RhcnRUcmFuc2FjdGlvbkhlaWdodAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAAFc3RhcnQEAAAACXRpbWVEZWx0YQkAAGUAAAACBQAAAAZoZWlnaHQFAAAAFnN0YXJ0VHJhbnNhY3Rpb25IZWlnaHQDCQAAZgAAAAIFAAAACXRpbWVEZWx0YQAAAAAAAAAH0AkAAAIAAAABAgAAABZUaGUgYmV0dGluZyB3YXMgY2xvc2VkBAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAQAAAAEhAAAAAQkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAMJAABmAAAAAggFAAAAA3BtdAAAAAZhbW91bnQJAQAAAAdleHRyYWN0AAAAAQkABBoAAAACBQAAAAR0aGlzAgAAAAZtYXhCZXQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAABm1heEJldAgFAAAAA3BtdAAAAAZhbW91bnQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAJYAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5CAUAAAADcG10AAAABmFtb3VudAUAAAADbmlsCQAAAgAAAAECAAAAGllvdXIgYmV0IGlzbid0IHRoZSBtYXggYmV0CQAAAgAAAAECAAAALFlvdSBuZWVkIHRvIHBsYWNlIGEgYmV0IHVzaW5nIHdhdmVzIGN1cnJlbmN5AAAAAWkBAAAABXN0YXJ0AAAAAQAAAApzdGFydFByaWNlAwkBAAAAASEAAAABCQEAAAASdXNlckhhc0FkbWluQWNjZXNzAAAAAQgFAAAAAWkAAAAGY2FsbGVyCQAAAgAAAAECAAAAE1lvdSBoYXZlIG5vIGFjY2VzcyEJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAABXN0YXJ0BQAAAAZoZWlnaHQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAABm1heEJldAUAAAAKc3RhcnRQcmljZQUAAAADbmlsAAAAAHuh+40=", "chainId": 84, "height": 579683, "spentComplexity": 0 } View: original | compacted Prev: 7eRZ3K6wYRsjaiu7NMPja13tcdQ2xosDLaT5ghMzYm2Z Next: G3QVVbuAVYEsHsomeSDeaMpcCiJjAH5g6RvcJzMWXDW1 Diff:
OldNewDifferences
1212 then throw("The betting was closed")
1313 else {
1414 let pmt = extract(i.payment)
15- if (isDefined(pmt.assetId))
15+ if (!(isDefined(pmt.assetId)))
1616 then if ((pmt.amount > extract(getInteger(this, "maxBet"))))
1717 then WriteSet([DataEntry("maxBet", pmt.amount), DataEntry(toBase58String(i.callerPublicKey), pmt.amount)])
1818 else throw("Your bet isn't the max bet")
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 if ((timeDelta > 2000))
1212 then throw("The betting was closed")
1313 else {
1414 let pmt = extract(i.payment)
15- if (isDefined(pmt.assetId))
15+ if (!(isDefined(pmt.assetId)))
1616 then if ((pmt.amount > extract(getInteger(this, "maxBet"))))
1717 then WriteSet([DataEntry("maxBet", pmt.amount), DataEntry(toBase58String(i.callerPublicKey), pmt.amount)])
1818 else throw("Your bet isn't the max bet")
1919 else throw("You need to place a bet using waves currency")
2020 }
2121 }
2222
2323
2424
2525 @Callable(i)
2626 func start (startPrice) = if (!(userHasAdminAccess(i.caller)))
2727 then throw("You have no access!")
2828 else WriteSet([DataEntry("start", height), DataEntry("maxBet", startPrice)])
2929
3030

github/deemru/w8io/169f3d6 
20.86 ms