tx · G4i7mtZVUgVRAU94KmjGVcLbBNp4ZPCGRr5jEMAQEkqX

3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep:  -0.01400000 Waves

2019.07.09 13:50 [577987] smart account 3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep > SELF 0.00000000 Waves

{ "type": 13, "id": "G4i7mtZVUgVRAU94KmjGVcLbBNp4ZPCGRr5jEMAQEkqX", "fee": 1400000, "feeAssetId": null, "timestamp": 1562669405017, "version": 1, "sender": "3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep", "senderPublicKey": "BJAeTqNbDSA5FiYihZZaSWvD6XL5XjpqVXbTGerBJjRK", "proofs": [ "8rwxqwMyK3qq1sZGDqr4vQPQXL5DSUm6oUEAMsbnAUVG1ZqKepiuNx2nuYfYM5arETDxJ9QEHsvdrDGdTymczSd" ], "script": "base64:AAIDAAAAAAAAAAAAAAABAQAAABJ1c2VySGFzQWRtaW5BY2Nlc3MAAAABAAAADXVzZXJQdWJsaWNLZXkEAAAAC2FkbWluUHViS2V5AQAAACCY+qZRd1gHYRktvSnZH9tBqdE0k+t7zknFMQp1UqdbEgMJAQAAAAIhPQAAAAIFAAAADXVzZXJQdWJsaWNLZXkFAAAAC2FkbWluUHViS2V5BwYAAAACAAAAAWkBAAAAA2JldAAAAAEAAAAFcHJpY2UEAAAAEnN0YXJ0VHJhbnNhY3Rpb25JZAkBAAAAEUBleHRyTmF0aXZlKDEwNTIpAAAAAgUAAAAEdGhpcwIAAAAFc3RhcnQEAAAACXRpbWVEZWx0YQkAAGUAAAACCQEAAAAHZXh0cmFjdAAAAAEJAAPpAAAAAQgFAAAAAWkAAAANdHJhbnNhY3Rpb25JZAkBAAAAB2V4dHJhY3QAAAABCQAD6QAAAAEFAAAAEnN0YXJ0VHJhbnNhY3Rpb25JZAMJAABmAAAAAgUAAAAJdGltZURlbHRhAAAAAAAAAAACCQAAAgAAAAECAAAAFlRoZSBhdWN0aW9uIHdhcyBjbG9zZWQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAJYAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5BQAAAAVwcmljZQUAAAADbmlsAAAAAWkBAAAABXN0YXJ0AAAAAAMJAQAAAAEhAAAAAQkBAAAAEnVzZXJIYXNBZG1pbkFjY2VzcwAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQkAAAIAAAABAgAAABNZb3UgaGF2ZSBubyBhY2Nlc3MhCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAVzdGFydAkAAlgAAAABCAUAAAABaQAAAA10cmFuc2FjdGlvbklkBQAAAANuaWwAAAAAZjK6cg==", "chainId": 84, "height": 577987, "spentComplexity": 0 } View: original | compacted Prev: J42wkLHaKD5KXQoGgMhS1Aq7od693R1w5Rhp3iLYH92X Next: GVHo4STgHvLkf1Fegzs85mioYd9V4fXE9kKbncA27sFv Diff:
OldNewDifferences
1010
1111
1212 @Callable(i)
13-func bet (price) = WriteSet([DataEntry(toBase58String(i.callerPublicKey), price)])
13+func bet (price) = {
14+ let startTransactionId = getBinaryValue(this, "start")
15+ let timeDelta = (extract(transactionHeightById(i.transactionId)) - extract(transactionHeightById(startTransactionId)))
16+ if ((timeDelta > 2))
17+ then throw("The auction was closed")
18+ else WriteSet([DataEntry(toBase58String(i.callerPublicKey), price)])
19+ }
1420
1521
1622
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func userHasAdminAccess (userPublicKey) = {
55 let adminPubKey = base58'BJAeTqNbDSA5FiYihZZaSWvD6XL5XjpqVXbTGerBJjRK'
66 if ((userPublicKey != adminPubKey))
77 then false
88 else true
99 }
1010
1111
1212 @Callable(i)
13-func bet (price) = WriteSet([DataEntry(toBase58String(i.callerPublicKey), price)])
13+func bet (price) = {
14+ let startTransactionId = getBinaryValue(this, "start")
15+ let timeDelta = (extract(transactionHeightById(i.transactionId)) - extract(transactionHeightById(startTransactionId)))
16+ if ((timeDelta > 2))
17+ then throw("The auction was closed")
18+ else WriteSet([DataEntry(toBase58String(i.callerPublicKey), price)])
19+ }
1420
1521
1622
1723 @Callable(i)
1824 func start () = if (!(userHasAdminAccess(i.callerPublicKey)))
1925 then throw("You have no access!")
2026 else WriteSet([DataEntry("start", toBase58String(i.transactionId))])
2127
2228

github/deemru/w8io/169f3d6 
22.85 ms