tx · E3mdFayH67Rvo749aGhgMUecGP2KqNeQ4KmWjbHJxLY7

3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep:  -0.01400000 Waves

2019.07.09 15:20 [578081] smart account 3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep > SELF 0.00000000 Waves

{ "type": 13, "id": "E3mdFayH67Rvo749aGhgMUecGP2KqNeQ4KmWjbHJxLY7", "fee": 1400000, "feeAssetId": null, "timestamp": 1562674832488, "version": 1, "sender": "3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep", "senderPublicKey": "BJAeTqNbDSA5FiYihZZaSWvD6XL5XjpqVXbTGerBJjRK", "proofs": [ "36xq8r85coHT57gDZwZqpJ1T7eB7M2j5Cpive7kYtQ6cTMSPtee9mRPrtQrEFLoyucjfHg3g8B2jiDjbnNPkW7TJ" ], "script": "base64:AAIDAAAAAAAAAAAAAAABAQAAABJ1c2VySGFzQWRtaW5BY2Nlc3MAAAABAAAADXVzZXJQdWJsaWNLZXkEAAAAC2FkbWluUHViS2V5AQAAACCY+qZRd1gHYRktvSnZH9tBqdE0k+t7zknFMQp1UqdbEgMJAQAAAAIhPQAAAAIFAAAADXVzZXJQdWJsaWNLZXkFAAAAC2FkbWluUHViS2V5BwYAAAACAAAAAWkBAAAAA2JldAAAAAEAAAAFcHJpY2UEAAAAFnN0YXJ0VHJhbnNhY3Rpb25IZWlnaHQJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAABXN0YXJ0BAAAAAl0aW1lRGVsdGEJAABlAAAAAgUAAAAGaGVpZ2h0BQAAABZzdGFydFRyYW5zYWN0aW9uSGVpZ2h0AwkAAGYAAAACBQAAAAl0aW1lRGVsdGEAAAAAAAAAAAIJAAACAAAAAQIAAAAWVGhlIGF1Y3Rpb24gd2FzIGNsb3NlZAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAAlgAAAABCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkFAAAABXByaWNlBQAAAANuaWwAAAABaQEAAAAFc3RhcnQAAAAAAwkBAAAAASEAAAABCQEAAAASdXNlckhhc0FkbWluQWNjZXNzAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5CQAAAgAAAAECAAAAE1lvdSBoYXZlIG5vIGFjY2VzcyEJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAABXN0YXJ0BQAAAAZoZWlnaHQFAAAAA25pbAAAAADTHCQR", "chainId": 84, "height": 578081, "spentComplexity": 0 } View: original | compacted Prev: CSkKK65P22CQVKeq1S4vyRRcdBLs4TzqxJfT88JxDxP8 Next: BxQC9RDUncNtfaCs7A95Y321oDSNsK1ceThGC6gpg9ds Diff:
OldNewDifferences
1111
1212 @Callable(i)
1313 func bet (price) = {
14- let startTransactionId = getStringValue(this, "start")
15- let timeDelta = (height - extract(transactionHeightById(toBytes(startTransactionId))))
14+ let startTransactionHeight = getIntegerValue(this, "start")
15+ let timeDelta = (height - startTransactionHeight)
1616 if ((timeDelta > 2))
1717 then throw("The auction was closed")
1818 else WriteSet([DataEntry(toBase58String(i.callerPublicKey), price)])
2323 @Callable(i)
2424 func start () = if (!(userHasAdminAccess(i.callerPublicKey)))
2525 then throw("You have no access!")
26- else WriteSet([DataEntry("start", toBase58String(i.transactionId))])
26+ else WriteSet([DataEntry("start", height)])
2727
2828
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)
1313 func bet (price) = {
14- let startTransactionId = getStringValue(this, "start")
15- let timeDelta = (height - extract(transactionHeightById(toBytes(startTransactionId))))
14+ let startTransactionHeight = getIntegerValue(this, "start")
15+ let timeDelta = (height - startTransactionHeight)
1616 if ((timeDelta > 2))
1717 then throw("The auction was closed")
1818 else WriteSet([DataEntry(toBase58String(i.callerPublicKey), price)])
1919 }
2020
2121
2222
2323 @Callable(i)
2424 func start () = if (!(userHasAdminAccess(i.callerPublicKey)))
2525 then throw("You have no access!")
26- else WriteSet([DataEntry("start", toBase58String(i.transactionId))])
26+ else WriteSet([DataEntry("start", height)])
2727
2828

github/deemru/w8io/169f3d6 
24.61 ms