tx · 9VikNaS8B2N1Zsp3iAegegqps4c1mSrBQYW8kCzhLUn5 3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep: -0.01400000 Waves 2019.07.12 13:25 [582382] smart account 3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep > SELF 0.00000000 Waves
{ "type": 13, "id": "9VikNaS8B2N1Zsp3iAegegqps4c1mSrBQYW8kCzhLUn5", "fee": 1400000, "feeAssetId": null, "timestamp": 1562927196775, "version": 1, "sender": "3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep", "senderPublicKey": "BJAeTqNbDSA5FiYihZZaSWvD6XL5XjpqVXbTGerBJjRK", "proofs": [ "2bcCDt8j75B45LYkLLSg2SnW2FqrsTX1DyioTBSNShHoVy7G9pzcUN9XsRfTnS8nU8yRYXsaGCGn1Qs3EqRg8Sus" ], "script": "base64:AAIDAAAAAAAAAAAAAAADAAAAAAd0b2tlbklkAQAAACCU1B7l35UfeySUCJ5Oe8nTMKHr4huFqp+vPk8CQCqTZQEAAAASdXNlckhhc0FkbWluQWNjZXNzAAAAAQAAAAdhZGRyZXNzCQAAAAAAAAIFAAAAB2FkZHJlc3MFAAAABHRoaXMBAAAABGFkZHIAAAACAAAAB3Rva2VuSWQAAAADcGFyCQABLAAAAAIJAAEsAAAAAgkAAlgAAAABBQAAAAd0b2tlbklkAgAAAAFfBQAAAANwYXIAAAADAAAAAWkBAAAAA2JldAAAAAEAAAAHdG9rZW5JZAkAAAIAAAABCQACWAAAAAEFAAAAB3Rva2VuSWQAAAABaQEAAAAFc3RhcnQAAAACAAAACnN0YXJ0UHJpY2UAAAAPYXVjdGlvbkR1cmF0aW9uBAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAQAAAAHdG9rZW5JbggFAAAAA3BtdAAAAAdhc3NldElkAwkBAAAACWlzRGVmaW5lZAAAAAEFAAAAB3Rva2VuSWQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAA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AAAAEJAAGbAAAAAQkBAAAAEUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGhpcwkBAAAABGFkZHIAAAACBQAAAAd0b2tlbklkAgAAAAttYXhCZXRPd25lcgkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAARhZGRyAAAAAgUAAAAHdG9rZW5JZAIAAAAFc3RhcnQAAAAAAAAAAAAFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAttYXhCZXRPd25lcgAAAAAAAAAAAQUAAAAHdG9rZW5JZAUAAAADbmlsAAAAAEpVO2A=", "chainId": 84, "height": 582382, "spentComplexity": 0 } View: original | compacted Prev: 7UWvPtLyC73zZ2DpyxieQWeFzvhTDuMxsjjeNJZypZgj Next: 5pQFFZJ9iWWFpoDjgN8PbwYH5xeKSP3vUBD7YfWwsno9 Diff:
Old | New | Differences | |
---|---|---|---|
10 | 10 | ||
11 | 11 | ||
12 | 12 | @Callable(i) | |
13 | - | func bet (tokenId) = { | |
14 | - | let startTransactionHeight = getIntegerValue(this, addr(tokenId, "start")) | |
15 | - | let timeDelta = (height - startTransactionHeight) | |
16 | - | let maxBet = extract(getInteger(this, addr(tokenId, "maxBet"))) | |
17 | - | let maxBetOwner = addressFromPublicKey(toBytes(getStringValue(this, addr(tokenId, "maxBetOwner")))) | |
18 | - | let pmt = extract(i.payment) | |
19 | - | if ((3000 > 2000)) | |
20 | - | then throw("The betting was closed") | |
21 | - | else throw("ok5") | |
22 | - | } | |
13 | + | func bet (tokenId) = throw(toBase58String(tokenId)) | |
23 | 14 | ||
24 | 15 | ||
25 | 16 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let tokenId = base58'B1xwWnBLB7z79VPr4sq1jBb5GDqs8TeT5jHojTdiwxfE' | |
5 | 5 | ||
6 | 6 | func userHasAdminAccess (address) = (address == this) | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func addr (tokenId,par) = ((toBase58String(tokenId) + "_") + par) | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | @Callable(i) | |
13 | - | func bet (tokenId) = { | |
14 | - | let startTransactionHeight = getIntegerValue(this, addr(tokenId, "start")) | |
15 | - | let timeDelta = (height - startTransactionHeight) | |
16 | - | let maxBet = extract(getInteger(this, addr(tokenId, "maxBet"))) | |
17 | - | let maxBetOwner = addressFromPublicKey(toBytes(getStringValue(this, addr(tokenId, "maxBetOwner")))) | |
18 | - | let pmt = extract(i.payment) | |
19 | - | if ((3000 > 2000)) | |
20 | - | then throw("The betting was closed") | |
21 | - | else throw("ok5") | |
22 | - | } | |
13 | + | func bet (tokenId) = throw(toBase58String(tokenId)) | |
23 | 14 | ||
24 | 15 | ||
25 | 16 | ||
26 | 17 | @Callable(i) | |
27 | 18 | func start (startPrice,auctionDuration) = { | |
28 | 19 | let pmt = extract(i.payment) | |
29 | 20 | let tokenIn = pmt.assetId | |
30 | 21 | if (isDefined(tokenId)) | |
31 | 22 | then WriteSet([DataEntry(addr(tokenId, "start"), height), DataEntry(addr(tokenId, "startPrice"), startPrice), DataEntry(addr(tokenId, "duration"), auctionDuration), DataEntry(addr(tokenId, "maxBetOwner"), toBase58String(i.callerPublicKey))]) | |
32 | 23 | else throw("You can't sell waves using the auction") | |
33 | 24 | } | |
34 | 25 | ||
35 | 26 | ||
36 | 27 | ||
37 | 28 | @Callable(i) | |
38 | 29 | func finish (tokenId) = { | |
39 | 30 | let length = (getIntegerValue(this, addr(tokenId, "start")) - height) | |
40 | 31 | let delta = (getIntegerValue(this, addr(tokenId, "duration")) - length) | |
41 | 32 | if ((delta > 0)) | |
42 | 33 | then throw((("The auction cannot be finished yet! " + toString(delta)) + " minutes remaining")) | |
43 | 34 | else { | |
44 | 35 | let maxBetOwner = addressFromPublicKey(toBytes(getStringValue(this, addr(tokenId, "maxBetOwner")))) | |
45 | 36 | ScriptResult(WriteSet([DataEntry(addr(tokenId, "start"), 0)]), TransferSet([ScriptTransfer(maxBetOwner, 1, tokenId)])) | |
46 | 37 | } | |
47 | 38 | } | |
48 | 39 | ||
49 | 40 |
github/deemru/w8io/169f3d6 37.26 ms ◑