tx · 123MpWfdgk1MgAdbDL3v6vJ8PUpKoLgyAJnCngdfdZhN 3MvU8vDCk4NkA1Ag4vE3mETA4U9ioFh6VEM: -0.01500000 Waves 2019.12.13 17:57 [807232] smart account 3MvU8vDCk4NkA1Ag4vE3mETA4U9ioFh6VEM > SELF 0.00000000 Waves
{ "type": 13, "id": "123MpWfdgk1MgAdbDL3v6vJ8PUpKoLgyAJnCngdfdZhN", "fee": 1500000, "feeAssetId": null, "timestamp": 1576249054436, "version": 1, "sender": "3MvU8vDCk4NkA1Ag4vE3mETA4U9ioFh6VEM", "senderPublicKey": "LknnJnwRo6xRdriHmjgVbRDgpexijZFTYBU3Lw4HBS1", "proofs": [ "4Wypf6WCC891pAytEF79kHgLsDru2AFg7y6VUFB3MuSasQBfRfrdCeZTkqyah2JhtZbhe8Mga2sTKsVh99aG5Est" ], "script": "base64:AAIDAAAAAAAAAAgIARIECgIBAQAAAAEAAAAAD2F1Y3Rpb25EdXJhdGlvbgkAAGgAAAACAAAAAAAAAAWgAAAAAAAAAAABAAAAAQAAAAFpAQAAAAxiZWdpbkF1Y3Rpb24AAAACAAAACG1pblByaWNlAAAACGR1cmF0aW9uAwkAAGYAAAACBQAAAAhkdXJhdGlvbgUAAAAPYXVjdGlvbkR1cmF0aW9uCQAAAgAAAAEJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAUU3BlY2lmaWVkIGR1cmF0aW9uKCAJAAGkAAAAAQUAAAAIZHVyYXRpb24CAAAAICkgZXhjZWVkcyB0aGUgbWF4aW11bSBkdXJhdGlvbiggCQABpAAAAAEFAAAAD2F1Y3Rpb25EdXJhdGlvbgIAAAABKQQAAAAJYXVjdGlvbklkCQACWAAAAAEIBQAAAAFpAAAADXRyYW5zYWN0aW9uSWQEAAAAB2VuZFRpbWUJAABkAAAAAggFAAAACWxhc3RCbG9jawAAAAZoZWlnaHQFAAAACGR1cmF0aW9uBAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAJYXVjdGlvbklkBQAAAAdlbmRUaW1lCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAACWF1Y3Rpb25JZAIAAAAGX293bmVyCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAJYXVjdGlvbklkAgAAAAlfY291cG9uSWQDCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQACWAAAAAEJAQAAAAV2YWx1ZQAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAIAAAAFV0FWRVMJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAJYXVjdGlvbklkAgAAAAlfbWluUHJpY2UFAAAACG1pblByaWNlBQAAAANuaWwAAAAAmk9oYw==", "chainId": 84, "height": 807232, "spentComplexity": 0 } View: original | compacted Prev: CBRj7YGgSvFZ7MBt2p6hty4rMtKbdESqg3Aph6SKoKWA Next: 2jwkjsnqP3zaLdpLUH7xqg9teYSeBcw4Bs74PZ1mAKUJ Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | ||
4 | + | let auctionDuration = (1440 * 1) | |
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | - | func enterData (dataVal) = { | |
8 | - | let pmt = extract(i.payment) | |
9 | - | WriteSet([DataEntry("Content_Variable", dataVal), DataEntry("pmt.amount", pmt.amount), DataEntry("pmt.assetId", if (isDefined(pmt.assetId)) | |
10 | - | then toBase58String(value(pmt.assetId)) | |
11 | - | else "WAVES")]) | |
12 | - | } | |
7 | + | func beginAuction (minPrice,duration) = if ((duration > auctionDuration)) | |
8 | + | then throw((((("Specified duration( " + toString(duration)) + ") exceeds the maximum duration( ") + toString(auctionDuration)) + ")")) | |
9 | + | else { | |
10 | + | let auctionId = toBase58String(i.transactionId) | |
11 | + | let endTime = (lastBlock.height + duration) | |
12 | + | let pmt = extract(i.payment) | |
13 | + | WriteSet([DataEntry(auctionId, endTime), DataEntry((auctionId + "_owner"), toBase58String(i.caller.bytes)), DataEntry((auctionId + "_couponId"), if (isDefined(pmt.assetId)) | |
14 | + | then toBase58String(value(pmt.assetId)) | |
15 | + | else "WAVES"), DataEntry((auctionId + "_minPrice"), minPrice)]) | |
16 | + | } | |
13 | 17 | ||
14 | 18 |
github/deemru/w8io/169f3d6 48.76 ms ◑