tx · HP9J7Mp8v3jpficpRcwxbgfD4XacAp6zwgix6DKdPjrk 3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep: -0.01400000 Waves 2019.07.11 12:47 [580871] smart account 3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep > SELF 0.00000000 Waves
{ "type": 13, "id": "HP9J7Mp8v3jpficpRcwxbgfD4XacAp6zwgix6DKdPjrk", "fee": 1400000, "feeAssetId": null, "timestamp": 1562838506043, "version": 1, "sender": "3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep", "senderPublicKey": "BJAeTqNbDSA5FiYihZZaSWvD6XL5XjpqVXbTGerBJjRK", "proofs": [ "32tRjCGq1veaamfCsHArFmvSkntKs8boiq5avoKdTakVakQYfF1Afyv5pCGwnzwMBcVUz2AoZeLRHKLgXsJ3Rvmc" ], "script": "base64:AAIDAAAAAAAAAAAAAAABAQAAABJ1c2VySGFzQWRtaW5BY2Nlc3MAAAABAAAAB2FkZHJlc3MJAAAAAAAAAgUAAAAHYWRkcmVzcwUAAAAEdGhpcwAAAAIAAAABaQEAAAADYmV0AAAAAQAAAAVwcmljZQQAAAAWc3RhcnRUcmFuc2FjdGlvbkhlaWdodAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAAFc3RhcnQEAAAACXRpbWVEZWx0YQkAAGUAAAACBQAAAAZoZWlnaHQFAAAAFnN0YXJ0VHJhbnNhY3Rpb25IZWlnaHQEAAAABm1heEJldAkBAAAAB2V4dHJhY3QAAAABCQAEGgAAAAIFAAAABHRoaXMCAAAABm1heEJldAQAAAALbWF4QmV0T3duZXIJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEJAQAAAAdleHRyYWN0AAAAAQkABBwAAAACBQAAAAR0aGlzAgAAAAttYXhCZXRPd25lcgMJAABmAAAAAgUAAAAJdGltZURlbHRhAAAAAAAAAAfQCQAAAgAAAAECAAAAFlRoZSBiZXR0aW5nIHdhcyBjbG9zZWQDCQAAZgAAAAIFAAAABXByaWNlBQAAAAZtYXhCZXQJAQAAAAxTY3JpcHRSZXN1bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAZtYXhCZXQFAAAABXByaWNlCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAttYXhCZXRPd25lcgkAAlgAAAABCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAJYAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5BQAAAAVwcmljZQUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAABHRoaXMFAAAABXByaWNlBQAAAAR1bml0BQAAAANuaWwJAAACAAAAAQIAAAAaWW91ciBiZXQgaXNuJ3QgdGhlIG1heCBiZXQAAAABaQEAAAAFc3RhcnQAAAABAAAACnN0YXJ0UHJpY2UDCQEAAAABIQAAAAEJAQAAABJ1c2VySGFzQWRtaW5BY2Nlc3MAAAABCAUAAAABaQAAAAZjYWxsZXIJAAACAAAAAQIAAAATWW91IGhhdmUgbm8gYWNjZXNzIQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAAFc3RhcnQFAAAABmhlaWdodAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAAGbWF4QmV0BQAAAApzdGFydFByaWNlCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAttYXhCZXRPd25lcgkAAlgAAAABCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkFAAAAA25pbAAAAABEbxrE", "chainId": 84, "height": 580871, "spentComplexity": 0 } View: original | compacted Prev: 6H2JiAeL9eKRhttFqQYTJ8ZrxWrnidxuLDsqUan5VrM2 Next: EAMtQCdpvS5TeQC8sA8tFiHCjyUnC75f85ZQAuY6m5cG Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func userHasAdminAccess (address) = (address == this) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | @Callable(i) | |
8 | 8 | func bet (price) = { | |
9 | 9 | let startTransactionHeight = getIntegerValue(this, "start") | |
10 | 10 | let timeDelta = (height - startTransactionHeight) | |
11 | 11 | let maxBet = extract(getInteger(this, "maxBet")) | |
12 | 12 | let maxBetOwner = addressFromPublicKey(extract(getBinary(this, "maxBetOwner"))) | |
13 | 13 | if ((timeDelta > 2000)) | |
14 | 14 | then throw("The betting was closed") | |
15 | 15 | else if ((price > maxBet)) | |
16 | 16 | then ScriptResult(WriteSet([DataEntry("maxBet", price), DataEntry("maxBetOwner", toBase58String(i.callerPublicKey)), DataEntry(toBase58String(i.callerPublicKey), price)]), TransferSet([ScriptTransfer(this, price, unit)])) | |
17 | 17 | else throw("Your bet isn't the max bet") | |
18 | 18 | } | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | ||
22 | 22 | @Callable(i) | |
23 | 23 | func start (startPrice) = if (!(userHasAdminAccess(i.caller))) | |
24 | 24 | then throw("You have no access!") | |
25 | 25 | else WriteSet([DataEntry("start", height), DataEntry("maxBet", startPrice), DataEntry("maxBetOwner", toBase58String(i.callerPublicKey))]) | |
26 | 26 | ||
27 | 27 |
github/deemru/w8io/169f3d6 19.06 ms ◑