tx · CHsvREfCBsemVaShopucsz5AHmprXPsaxSabXs7fDaf 3N72SETEKtTuaA3YNVYWgVEmXKrRrZYXHGo: -0.01000000 Waves 2022.12.07 12:33 [2349751] smart account 3N72SETEKtTuaA3YNVYWgVEmXKrRrZYXHGo > SELF 0.00000000 Waves
{ "type": 13, "id": "CHsvREfCBsemVaShopucsz5AHmprXPsaxSabXs7fDaf", "fee": 1000000, "feeAssetId": null, "timestamp": 1670405108875, "version": 2, "chainId": 84, "sender": "3N72SETEKtTuaA3YNVYWgVEmXKrRrZYXHGo", "senderPublicKey": "Kwu4LYBMntApXv8t7csxV23Kvc3tvak26wMKK56tA4V", "proofs": [ "w38kstPzXfmA4JD2jma4jyLpGgDfaytaw6Scd8UbwFxHC9B3nSYahKv8cPibwY1AKkiPWXqbubQ3YpZpjiiuN6c" ], "script": "base64:BgIKCAISBgoECAgIAQEAEm1heEF1Y3Rpb25EdXJhdGlvbgAHAQFpAQphZGRBdWN0aW9uBAVzdGFydANlbmQKc3RhcnRQcmljZQhkdXJhdGlvbgQEdHhJZAkA2AQBCAUBaQ10cmFuc2FjdGlvbklkBAVuZnRJZAkBBXZhbHVlAQgJAJEDAggFAWkIcGF5bWVudHMAAAdhc3NldElkBAVwcmljZQkBBXZhbHVlAQUKc3RhcnRQcmljZQQJZW5kSGVpZ2h0CQBkAggFCWxhc3RCbG9jawZoZWlnaHQFCGR1cmF0aW9uBAZjYWxsZXIICAUBaQZjYWxsZXIFYnl0ZXMEEWNoZWNrTmZ0QXVjdGlvbmVkBAckbWF0Y2gwCQCdCAIFBHRoaXMJAKwCAgkArAICCQDYBAEFBW5mdElkAgtuZnRfc3RhdHVzXwkA2AQBBQZjYWxsZXIDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAFhBQckbWF0Y2gwBgcDCQAAAggJAJEDAggFAWkIcGF5bWVudHMAAAdhc3NldElkBQR1bml0CQACAQIQTkZUIG5vdCBhdHRhY2hlZAMJAAACBRFjaGVja05mdEF1Y3Rpb25lZAYJAAIBAhdBbHJlYWR5IGluIGF1Y3Rpb24gbGlzdAMJAGYCBQhkdXJhdGlvbgUSbWF4QXVjdGlvbkR1cmF0aW9uCQACAQkArAICAjZEdXJhdGlvbiBpcyB0b28gbG9uZy4gTXVzdCBiZSBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gNyAJAKQDAQUSbWF4QXVjdGlvbkR1cmF0aW9uCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgkArAICBQR0eElkAhhfbmZ0X3N0YXJ0X2F1Y3Rpb25fZGF0ZV8JANgEAQUGY2FsbGVyBQVzdGFydAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJAKwCAgUEdHhJZAIWX25mdF9lbmRfYXVjdGlvbl9kYXRlXwkA2AQBBQZjYWxsZXIFA2VuZAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFBHR4SWQCEF9uZnRfc3RhcnRfcHJpY2UFCnN0YXJ0UHJpY2UJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQR0eElkAgpfbmZ0X293bmVyCQClCAEIBQFpBmNhbGxlcgkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFBHR4SWQCD19uZnRfb25fYXVjdGlvbgkA2AQBBQVuZnRJZAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFBHR4SWQCEF9wcmV2aW91c19iaWRkZXICBG5vbmUJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQR0eElkAgxfaGlnaGVzdF9iaWQCATAJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQR0eElkAg5fd2lubmVyX29mX25mdAIBMAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFBHR4SWQCDV9iaWRkZXJfY291bnQCATAJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQR0eElkAgtfbmZ0X3N0YXR1cwIET1BFTgUDbmlsAC9/3Bk=", "height": 2349751, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2jgZgg5SmxTVjhHVWbU9ofWSDxn1Ys7buzbGkK2pURAi Next: FDbSwW8swCGVRa5dWeD1HSAGCirkpHUPipLmZC19Yh9M Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let maxAuctionDuration = 7 | |
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func addAuction (start,end,startPrice,duration) = { | |
8 | 8 | let txId = toBase58String(i.transactionId) | |
9 | 9 | let nftId = value(i.payments[0].assetId) | |
10 | 10 | let price = value(startPrice) | |
11 | 11 | let endHeight = (lastBlock.height + duration) | |
12 | 12 | let caller = i.caller.bytes | |
13 | 13 | let checkNftAuctioned = match getString(this, ((toBase58String(nftId) + "nft_status_") + toBase58String(caller))) { | |
14 | 14 | case a: String => | |
15 | 15 | true | |
16 | 16 | case _ => | |
17 | 17 | false | |
18 | 18 | } | |
19 | 19 | if ((i.payments[0].assetId == unit)) | |
20 | 20 | then throw("NFT not attached") | |
21 | 21 | else if ((checkNftAuctioned == true)) | |
22 | 22 | then throw("Already in auction list") | |
23 | 23 | else if ((duration > maxAuctionDuration)) | |
24 | 24 | then throw(("Duration is too long. Must be less than or equal to 7 " + toString(maxAuctionDuration))) | |
25 | 25 | else [StringEntry(((txId + "_nft_start_auction_date_") + toBase58String(caller)), start), StringEntry(((txId + "_nft_end_auction_date_") + toBase58String(caller)), end), StringEntry((txId + "_nft_start_price"), startPrice), StringEntry((txId + "_nft_owner"), toString(i.caller)), StringEntry((txId + "_nft_on_auction"), toBase58String(nftId)), StringEntry((txId + "_previous_bidder"), "none"), StringEntry((txId + "_highest_bid"), "0"), StringEntry((txId + "_winner_of_nft"), "0"), StringEntry((txId + "_bidder_count"), "0"), StringEntry((txId + "_nft_status"), "OPEN")] | |
26 | 26 | } | |
27 | 27 | ||
28 | 28 |
github/deemru/w8io/026f985 21.51 ms ◑