tx · AF3Uh5BTus5Nf5uBWTrHybrWt6x3K4CYTKGeoYr3TRMF

3N8wF4ntF9niEgikocU8yb1UU9spbdCtWsh:  -0.01400000 Waves

2022.02.23 01:24 [1935460] smart account 3N8wF4ntF9niEgikocU8yb1UU9spbdCtWsh > SELF 0.00000000 Waves

{ "type": 13, "id": "AF3Uh5BTus5Nf5uBWTrHybrWt6x3K4CYTKGeoYr3TRMF", "fee": 1400000, "feeAssetId": null, "timestamp": 1645568637289, "version": 2, "chainId": 84, "sender": "3N8wF4ntF9niEgikocU8yb1UU9spbdCtWsh", "senderPublicKey": "HD1V9wMeKPrrSPB7aVX6wDgfTgYayNB6vb7LHkVJZzvV", "proofs": [ "5pMzrxAqY3EM7Kug7H8ktd4y3WrK2CPCCLCiG8x7eRhK5ibNkHAt32CCpifr1n29eYn9z8CdKYB9LjLRhGd9BPou" ], "script": "base64:AAIDAAAAAAAAABMIARIFCgMBAQgSAwoBCBIDCgEIAAAAAQAAAAASbWF4QXVjdGlvbkR1cmF0aW9uAAAAAAAAAfpAAAAAAwAAAAFpAQAAAAxzdGFydEF1Y3Rpb24AAAADAAAACGR1cmF0aW9uAAAACnN0YXJ0UHJpY2UAAAAMcHJpY2VBc3NldElkBAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAQAAAAJYXVjdGlvbklkCQACWAAAAAEIBQAAAAFpAAAADXRyYW5zYWN0aW9uSWQEAAAACWVuZEhlaWdodAkAAGQAAAACCAUAAAAJbGFzdEJsb2NrAAAABmhlaWdodAUAAAAIZHVyYXRpb24EAAAAC29yZ2FuaXNlcmlkCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAD0F1Y3Rpb25kdXJhdGlvbgkBAAAACURhdGFFbnRyeQAAAAIFAAAACWF1Y3Rpb25JZAUAAAAJZW5kSGVpZ2h0BAAAAAlvcmdhbmlzZXIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAA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9wYXNzZWQJAAACAAAAAQIAAABBTG90IGlzIGFscmVhZHkgcGFzc2VkIHRvIHRoZSB3aW5uZXIsIGFuZCBvcmdhbml6ZXIgZ290IGhpcyByZXdhcmQJAQAAAAxTY3JpcHRSZXN1bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAACWF1Y3Rpb25JZAIAAAALX2xvdF9wYXNzZWQJAAJYAAAAAQgFAAAACndpbm5lckFkZHIAAAAFYnl0ZXMFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAp3aW5uZXJBZGRyBQAAAAlsb3RBbW91bnQFAAAACGxvdEFzc2V0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAADW9yZ2FuaXplckFkZHIJAABpAAAAAgkAAGgAAAACBQAAAAl3aW5BbW91bnQAAAAAAAAAAF8AAAAAAAAAAGQFAAAACnByaWNlQXNzZXQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQEAAAAgPbGudhoC2EmTbbT+1HzFYzykEopCrrlDCkRclNVlCm8JAABpAAAAAgkAAGgAAAACBQAAAAl3aW5BbW91bnQAAAAAAAAAAAUAAAAAAAAAAGQFAAAACnByaWNlQXNzZXQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5Vbw8RA==", "height": 1935460, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6uwZMkyvAptbq46j3GbFN9Dca8jXwAnrUaLF4YPaV8Bn Next: 55F1TTY5LEyZA8gSAa6sHPQVRDcvrj3oo4QEhKrWnixZ Diff:
OldNewDifferences
1919 let priceassetid = DataEntry((auctionId + "_priceAssetId"), priceAssetId)
2020 if ((duration > maxAuctionDuration))
2121 then throw(("Duration is too long. Must be less than " + toString(maxAuctionDuration)))
22- else WriteSet([Auctionduration, organiser, lotassetid, lotamount, startprice, priceassetid])
22+ else if ((1000 >= startPrice))
23+ then throw("Auction StartPrice less than 0.001")
24+ else WriteSet([Auctionduration, organiser, lotassetid, lotamount, startprice, priceassetid])
2325 }
2426
2527
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let maxAuctionDuration = 129600
55
66 @Callable(i)
77 func startAuction (duration,startPrice,priceAssetId) = {
88 let pmt = extract(i.payment)
99 let auctionId = toBase58String(i.transactionId)
1010 let endHeight = (lastBlock.height + duration)
1111 let organiserid = toBase58String(i.caller.bytes)
1212 let Auctionduration = DataEntry(auctionId, endHeight)
1313 let organiser = DataEntry((auctionId + "_organizer"), organiserid)
1414 let lotassetid = DataEntry((auctionId + "_lot_assetId"), if (isDefined(pmt.assetId))
1515 then toBase58String(value(pmt.assetId))
1616 else "WAVES")
1717 let lotamount = DataEntry((auctionId + "_lot_amount"), pmt.amount)
1818 let startprice = DataEntry((auctionId + "_startPrice"), startPrice)
1919 let priceassetid = DataEntry((auctionId + "_priceAssetId"), priceAssetId)
2020 if ((duration > maxAuctionDuration))
2121 then throw(("Duration is too long. Must be less than " + toString(maxAuctionDuration)))
22- else WriteSet([Auctionduration, organiser, lotassetid, lotamount, startprice, priceassetid])
22+ else if ((1000 >= startPrice))
23+ then throw("Auction StartPrice less than 0.001")
24+ else WriteSet([Auctionduration, organiser, lotassetid, lotamount, startprice, priceassetid])
2325 }
2426
2527
2628
2729 @Callable(i)
2830 func bid (auctionId) = {
2931 let pmt = extract(i.payment)
3032 let pmtAssetIdStr = if (isDefined(pmt.assetId))
3133 then toBase58String(value(pmt.assetId))
3234 else "WAVES"
3335 let callerAddressStr = toBase58String(i.caller.bytes)
3436 let endHeight = getIntegerValue(this, auctionId)
3537 let startPrice = getIntegerValue(this, (auctionId + "_startPrice"))
3638 let priceAssetId = getStringValue(this, (auctionId + "_priceAssetId"))
3739 let winAmount = getInteger(this, (auctionId + "_winAmount"))
3840 let winner = getString(this, (auctionId + "_winner"))
3941 let bidFromTheSameUser = if (isDefined(winner))
4042 then (value(winner) == callerAddressStr)
4143 else false
4244 let totalBidAmount = (pmt.amount + (if (bidFromTheSameUser)
4345 then value(winAmount)
4446 else 0))
4547 if ((lastBlock.height >= endHeight))
4648 then throw("Auction already finished")
4749 else if ((priceAssetId != pmtAssetIdStr))
4850 then throw((("Bid must be in asset '" + priceAssetId) + "'"))
4951 else if (if (if (isDefined(winAmount))
5052 then (value(winAmount) >= totalBidAmount)
5153 else false)
5254 then true
5355 else if (!(isDefined(winAmount)))
5456 then (startPrice >= totalBidAmount)
5557 else false)
5658 then throw(("Bid must be more then " + toString(if (isDefined(winAmount))
5759 then value(winAmount)
5860 else startPrice)))
5961 else if (if (bidFromTheSameUser)
6062 then true
6163 else !(isDefined(winner)))
6264 then WriteSet([DataEntry((auctionId + "_winner"), callerAddressStr), DataEntry((auctionId + "_winAmount"), totalBidAmount)])
6365 else {
6466 let previousBidderAddr = addressFromStringValue(value(winner))
6567 let priceAsset = if (if ((priceAssetId == "WAVES"))
6668 then true
6769 else (priceAssetId == ""))
6870 then unit
6971 else fromBase58String(priceAssetId)
7072 ScriptResult(WriteSet([DataEntry((auctionId + "_winner"), callerAddressStr), DataEntry((auctionId + "_winAmount"), totalBidAmount)]), TransferSet([ScriptTransfer(previousBidderAddr, value(winAmount), priceAsset)]))
7173 }
7274 }
7375
7476
7577
7678 @Callable(i)
7779 func withdraw (auctionId) = {
7880 let pmt = extract(i.payment)
7981 let pmtAssetIdStr = if (isDefined(pmt.assetId))
8082 then toBase58String(value(pmt.assetId))
8183 else "WAVES"
8284 let callerAddressStr = toBase58String(i.caller.bytes)
8385 let endHeight = getIntegerValue(this, auctionId)
8486 let organizer = getStringValue(this, (auctionId + "_organizer"))
8587 let winner = getString(this, (auctionId + "_winner"))
8688 let lotAssetId = getStringValue(this, (auctionId + "_lot_assetId"))
8789 let lotAmount = getIntegerValue(this, (auctionId + "_lot_amount"))
8890 let priceAssetId = getStringValue(this, (auctionId + "_priceAssetId"))
8991 let winAmount = getIntegerValue(this, (auctionId + "_winAmount"))
9092 let lotAsset = if ((lotAssetId == "WAVES"))
9193 then unit
9294 else fromBase58String(lotAssetId)
9395 let priceAsset = if (if ((priceAssetId == "WAVES"))
9496 then true
9597 else (priceAssetId == ""))
9698 then unit
9799 else fromBase58String(priceAssetId)
98100 let winnerAddr = addressFromStringValue(value(winner))
99101 let organizerAddr = addressFromStringValue(value(organizer))
100102 let betAmount = getInteger(this, ((auctionId + "_bidder_") + callerAddressStr))
101103 if ((endHeight > lastBlock.height))
102104 then throw("Auction is not finished yet")
103105 else if (!(isDefined(winner)))
104106 then if (isDefined(getString(this, (auctionId + "_lot_passed"))))
105107 then throw("Organizer has already got his lot back")
106108 else ScriptResult(WriteSet([DataEntry((auctionId + "_lot_passed"), organizer)]), TransferSet([ScriptTransfer(organizerAddr, lotAmount, lotAsset)]))
107109 else if (isDefined(getString(this, (auctionId + "_lot_passed"))))
108110 then throw("Lot is already passed to the winner, and organizer got his reward")
109111 else ScriptResult(WriteSet([DataEntry((auctionId + "_lot_passed"), toBase58String(winnerAddr.bytes))]), TransferSet([ScriptTransfer(winnerAddr, lotAmount, lotAsset), ScriptTransfer(organizerAddr, ((winAmount * 95) / 100), priceAsset), ScriptTransfer(addressFromPublicKey(base58'59q1hHBmeQgfSRst9Dn52VTBbtCu4SQ7AujhGDjHCqn6'), ((winAmount * 5) / 100), priceAsset)]))
110112 }
111113
112114
113115 @Verifier(tx)
114116 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
115117

github/deemru/w8io/026f985 
38.27 ms