tx · 6yAxRLVbsBLPffrkgfQy31PsxXFN8ZSgkdsXmWxX41Bd 3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep: -0.01400000 Waves 2019.07.12 13:16 [582373] smart account 3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep > SELF 0.00000000 Waves
{ "type": 13, "id": "6yAxRLVbsBLPffrkgfQy31PsxXFN8ZSgkdsXmWxX41Bd", "fee": 1400000, "feeAssetId": null, "timestamp": 1562926599454, "version": 1, "sender": "3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep", "senderPublicKey": "BJAeTqNbDSA5FiYihZZaSWvD6XL5XjpqVXbTGerBJjRK", "proofs": [ "V6xmkUjHiGTCzBG6ysRcQwCSaw74hWprKZGx1oXhyiUKoXdNMiJqGhE7M1r46F9m6671SA4mYeh53ixqZviMNbF" ], "script": "base64:AAIDAAAAAAAAAAAAAAADAAAAAAd0b2tlbklkAQAAACCU1B7l35UfeySUCJ5Oe8nTMKHr4huFqp+vPk8CQCqTZQEAAAASdXNlckhhc0FkbWluQWNjZXNzAAAAAQAAAAdhZGRyZXNzCQAAAAAAAAIFAAAAB2FkZHJlc3MFAAAABHRoaXMBAAAABGFkZHIAAAACAAAAB3Rva2VuSWQAAAADcGFyCQABLAAAAAIJAAEsAAAAAgkAAlgAAAABBQAAAAd0b2tlbklkAgAAAAFfBQAAAANwYXIAAAADAAAAAWkBAAAAA2JldAAAAAEAAAAHdG9rZW5JZAQAAAAWc3RhcnRUcmFuc2FjdGlvbkhlaWdodAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwkBAAAABGFkZHIAAAACBQAAAAd0b2tlbklkAgAAAAVzdGFydAQAAAAJdGltZURlbHRhCQAAZQAAAAIFAAAABmhlaWdodAUAAAAWc3RhcnRUcmFuc2FjdGlvbkhlaWdodAQAAAAGbWF4QmV0CQEAAAAHZXh0cmFjdAAAAAEJAAQaAAAAAgUAAAAEdGhpcwkBAAAABGFkZH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QAAAAZmaW5pc2gAAAABAAAAB3Rva2VuSWQEAAAABmxlbmd0aAkAAGUAAAACCQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzCQEAAAAEYWRkcgAAAAIFAAAAB3Rva2VuSWQCAAAABXN0YXJ0BQAAAAZoZWlnaHQEAAAABWRlbHRhCQAAZQAAAAIJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMJAQAAAARhZGRyAAAAAgUAAAAHdG9rZW5JZAIAAAAIZHVyYXRpb24FAAAABmxlbmd0aAMJAABmAAAAAgUAAAAFZGVsdGEAAAAAAAAAAAAJAAACAAAAAQkAASwAAAACCQABLAAAAAICAAAAJFRoZSBhdWN0aW9uIGNhbm5vdCBiZSBmaW5pc2hlZCB5ZXQhIAkAAaQAAAABBQAAAAVkZWx0YQIAAAASIG1pbnV0ZXMgcmVtYWluaW5nBAAAAAttYXhCZXRPd25lcgkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQkAAZsAAAABCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACBQAAAAR0aGlzCQEAAAAEYWRkcgAAAAIFAAAAB3Rva2VuSWQCAAAAC21heEJldE93bmVyCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAABGFkZHIAAAACBQAAAAd0b2tlbklkAgAAAAVzdGFydAAAAAAAAAAAAAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAC21heEJldE93bmVyAAAAAAAAAAABBQAAAAd0b2tlbklkBQAAAANuaWwAAAAATEvbWw==", "chainId": 84, "height": 582373, "spentComplexity": 0 } View: original | compacted Prev: A8bNzr9FPNdNYqfsPCB55Crq8CD1W83knYwktyjJwMDe Next: 2hkt5YDQnm7DjKPLBFCJFf2CARsRuki8zYJVXrdYFDEi Diff:
Old | New | Differences | |
---|---|---|---|
14 | 14 | let startTransactionHeight = getIntegerValue(this, addr(tokenId, "start")) | |
15 | 15 | let timeDelta = (height - startTransactionHeight) | |
16 | 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) | |
17 | 19 | throw("ok1") | |
18 | 20 | } | |
19 | 21 |
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 | 13 | func bet (tokenId) = { | |
14 | 14 | let startTransactionHeight = getIntegerValue(this, addr(tokenId, "start")) | |
15 | 15 | let timeDelta = (height - startTransactionHeight) | |
16 | 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) | |
17 | 19 | throw("ok1") | |
18 | 20 | } | |
19 | 21 | ||
20 | 22 | ||
21 | 23 | ||
22 | 24 | @Callable(i) | |
23 | 25 | func start (startPrice,auctionDuration) = { | |
24 | 26 | let pmt = extract(i.payment) | |
25 | 27 | let tokenIn = pmt.assetId | |
26 | 28 | if (isDefined(tokenId)) | |
27 | 29 | then WriteSet([DataEntry(addr(tokenId, "start"), height), DataEntry(addr(tokenId, "startPrice"), startPrice), DataEntry(addr(tokenId, "duration"), auctionDuration), DataEntry(addr(tokenId, "maxBetOwner"), toBase58String(i.callerPublicKey))]) | |
28 | 30 | else throw("You can't sell waves using the auction") | |
29 | 31 | } | |
30 | 32 | ||
31 | 33 | ||
32 | 34 | ||
33 | 35 | @Callable(i) | |
34 | 36 | func finish (tokenId) = { | |
35 | 37 | let length = (getIntegerValue(this, addr(tokenId, "start")) - height) | |
36 | 38 | let delta = (getIntegerValue(this, addr(tokenId, "duration")) - length) | |
37 | 39 | if ((delta > 0)) | |
38 | 40 | then throw((("The auction cannot be finished yet! " + toString(delta)) + " minutes remaining")) | |
39 | 41 | else { | |
40 | 42 | let maxBetOwner = addressFromPublicKey(toBytes(getStringValue(this, addr(tokenId, "maxBetOwner")))) | |
41 | 43 | ScriptResult(WriteSet([DataEntry(addr(tokenId, "start"), 0)]), TransferSet([ScriptTransfer(maxBetOwner, 1, tokenId)])) | |
42 | 44 | } | |
43 | 45 | } | |
44 | 46 | ||
45 | 47 |
github/deemru/w8io/169f3d6 33.95 ms ◑