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:
Old | New | | Differences |
---|
11 | 11 | | |
---|
12 | 12 | | @Callable(i) |
---|
13 | 13 | | 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) |
---|
16 | 16 | | if ((timeDelta > 2)) |
---|
17 | 17 | | then throw("The auction was closed") |
---|
18 | 18 | | else WriteSet([DataEntry(toBase58String(i.callerPublicKey), price)]) |
---|
|
23 | 23 | | @Callable(i) |
---|
24 | 24 | | func start () = if (!(userHasAdminAccess(i.callerPublicKey))) |
---|
25 | 25 | | then throw("You have no access!") |
---|
26 | | - | else WriteSet([DataEntry("start", toBase58String(i.transactionId))]) |
---|
| 26 | + | else WriteSet([DataEntry("start", height)]) |
---|
27 | 27 | | |
---|
28 | 28 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | func userHasAdminAccess (userPublicKey) = { |
---|
5 | 5 | | let adminPubKey = base58'BJAeTqNbDSA5FiYihZZaSWvD6XL5XjpqVXbTGerBJjRK' |
---|
6 | 6 | | if ((userPublicKey != adminPubKey)) |
---|
7 | 7 | | then false |
---|
8 | 8 | | else true |
---|
9 | 9 | | } |
---|
10 | 10 | | |
---|
11 | 11 | | |
---|
12 | 12 | | @Callable(i) |
---|
13 | 13 | | 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) |
---|
16 | 16 | | if ((timeDelta > 2)) |
---|
17 | 17 | | then throw("The auction was closed") |
---|
18 | 18 | | else WriteSet([DataEntry(toBase58String(i.callerPublicKey), price)]) |
---|
19 | 19 | | } |
---|
20 | 20 | | |
---|
21 | 21 | | |
---|
22 | 22 | | |
---|
23 | 23 | | @Callable(i) |
---|
24 | 24 | | func start () = if (!(userHasAdminAccess(i.callerPublicKey))) |
---|
25 | 25 | | then throw("You have no access!") |
---|
26 | | - | else WriteSet([DataEntry("start", toBase58String(i.transactionId))]) |
---|
| 26 | + | else WriteSet([DataEntry("start", height)]) |
---|
27 | 27 | | |
---|
28 | 28 | | |
---|