tx · EmtnCnQhCMg2AyNUc1GXtte7FkBuXrHtk1oEpj4p32aE

3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK:  -0.01400000 Waves

2022.08.13 18:02 [2182862] smart account 3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK > SELF 0.00000000 Waves

{ "type": 13, "id": "EmtnCnQhCMg2AyNUc1GXtte7FkBuXrHtk1oEpj4p32aE", "fee": 1400000, "feeAssetId": null, "timestamp": 1660403033952, "version": 2, "chainId": 84, "sender": "3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK", "senderPublicKey": "FshLkkgzcLs6iQJ1Z8Nnfhm494tC8xZQczf9iXpZep3Y", "proofs": [ "4kapT1dCHuFfPC11Qnr3R4GVqPN8mC9mVmJLZL7LXNWgsgz3FPH1z3EmTQS1KTtM65q6cpjc9oqz1Q3Pz6pfwubQ" ], "script": "base64:AAIDAAAAAAAAABoIARIFCgMBAQgSAwoBCBIDCgEIEgMKAQgSAAAAAAEAAAAAEm1heEF1Y3Rpb25EdXJhdGlvbgAAAAAAAAgGiAAAAAUAAAABaQEAAAAMc3RhcnRBdWN0aW9uAAAAAwAAAAhkdXJhdGlvbgAAAApzdGFydFByaWNlAAAADHByaWNlQXNzZXRJZAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQEAAAACWF1Y3Rpb25JZAkAAlgAAAABCAUAAAABaQAAAA10cmFuc2FjdGlvbklkBAAAAAllbmRIZWlnaHQJAABkAAAAAggFAAAACWxhc3RCbG9jawAAAAZoZWlnaHQFAAAACGR1cmF0aW9uBAAAAAtvcmdhbmlzZXJpZAkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAA9BdWN0aW9uZHVyYXRpb24JAQAAAAlEYXRhRW50cnkAAAACBQAAAAlhdWN0aW9uSWQFAAAACWVuZEhlaWdodAQAAAAJb3JnYW5pc2VyCQEAAAAJRGF0YUVudHJ5AAAAAg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AACWRhcHBvd25lcgUAAAAQY2FsbGVyQWRkcmVzc1N0cgUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnBAkRx", "height": 2182862, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9t4fU3R54jp12iYmydvRv8eFncE2EBe9rc7juXZPfZS8 Next: 7Aw1sjeUGb9H77ZF3jMhsY8v6mrk979dBSXJR3t7wAGn Diff:
OldNewDifferences
136136 func Owner () = {
137137 let pmt = extract(i.payment)
138138 let callerAddressStr = toBase58String(i.caller.bytes)
139- WriteSet([DataEntry("dappowner", "3MshBTYYGc24JWzE2aYEktiz5KzeNQGA4GV")])
139+ WriteSet([DataEntry("dappowner", callerAddressStr)])
140140 }
141141
142142
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let maxAuctionDuration = 525960
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)))
2222 else WriteSet([Auctionduration, organiser, lotassetid, lotamount, startprice, priceassetid])
2323 }
2424
2525
2626
2727 @Callable(i)
2828 func bid (auctionId) = {
2929 let pmt = extract(i.payment)
3030 let pmtAssetIdStr = if (isDefined(pmt.assetId))
3131 then toBase58String(value(pmt.assetId))
3232 else "WAVES"
3333 let callerAddressStr = toBase58String(i.caller.bytes)
3434 let endHeight = getIntegerValue(this, auctionId)
3535 let startPrice = getIntegerValue(this, (auctionId + "_startPrice"))
3636 let priceAssetId = getStringValue(this, (auctionId + "_priceAssetId"))
3737 let winAmount = getInteger(this, (auctionId + "_winAmount"))
3838 let winner = getString(this, (auctionId + "_winner"))
3939 let bidFromTheSameUser = if (isDefined(winner))
4040 then (value(winner) == callerAddressStr)
4141 else false
4242 let totalBidAmount = (pmt.amount + (if (bidFromTheSameUser)
4343 then value(winAmount)
4444 else 0))
4545 if ((lastBlock.height >= endHeight))
4646 then throw("Auction already finished.")
4747 else if ((priceAssetId != pmtAssetIdStr))
4848 then throw((("Bid must be in asset '" + priceAssetId) + "'"))
4949 else if (if (if (isDefined(winAmount))
5050 then (value(winAmount) >= totalBidAmount)
5151 else false)
5252 then true
5353 else if (!(isDefined(winAmount)))
5454 then (startPrice >= totalBidAmount)
5555 else false)
5656 then throw(("Bid must be more then " + toString(if (isDefined(winAmount))
5757 then value(winAmount)
5858 else startPrice)))
5959 else if (if (bidFromTheSameUser)
6060 then true
6161 else !(isDefined(winner)))
6262 then WriteSet([DataEntry((auctionId + "_winner"), callerAddressStr), DataEntry((auctionId + "_winAmount"), totalBidAmount)])
6363 else {
6464 let previousBidderAddr = addressFromStringValue(value(winner))
6565 let priceAsset = if (if ((priceAssetId == "WAVES"))
6666 then true
6767 else (priceAssetId == ""))
6868 then unit
6969 else fromBase58String(priceAssetId)
7070 ScriptResult(WriteSet([DataEntry((auctionId + "_winner"), callerAddressStr), DataEntry((auctionId + "_winAmount"), totalBidAmount)]), TransferSet([ScriptTransfer(previousBidderAddr, value(winAmount), priceAsset)]))
7171 }
7272 }
7373
7474
7575
7676 @Callable(i)
7777 func withdraw (auctionId) = {
7878 let pmt = extract(i.payment)
7979 let pmtAssetIdStr = if (isDefined(pmt.assetId))
8080 then toBase58String(value(pmt.assetId))
8181 else "WAVES"
8282 let callerAddressStr = toBase58String(i.caller.bytes)
8383 let endHeight = getIntegerValue(this, auctionId)
8484 let organizer = getStringValue(this, (auctionId + "_organizer"))
8585 let winner = getString(this, (auctionId + "_winner"))
8686 let lotAssetId = getStringValue(this, (auctionId + "_lot_assetId"))
8787 let lotAmount = getIntegerValue(this, (auctionId + "_lot_amount"))
8888 let priceAssetId = getStringValue(this, (auctionId + "_priceAssetId"))
8989 let winAmount = getIntegerValue(this, (auctionId + "_winAmount"))
9090 let lotAsset = if ((lotAssetId == "WAVES"))
9191 then unit
9292 else fromBase58String(lotAssetId)
9393 let priceAsset = if (if ((priceAssetId == "WAVES"))
9494 then true
9595 else (priceAssetId == ""))
9696 then unit
9797 else fromBase58String(priceAssetId)
9898 let winnerAddr = addressFromStringValue(value(winner))
9999 let organizerAddr = addressFromStringValue(value(organizer))
100100 let betAmount = getInteger(this, ((auctionId + "_bidder_") + callerAddressStr))
101101 if ((endHeight > lastBlock.height))
102102 then throw("Auction is not finished yet")
103103 else if (!(isDefined(winner)))
104104 then if (isDefined(getString(this, (auctionId + "_lot_passed"))))
105105 then throw("Organizer has already got his lot back")
106106 else ScriptResult(WriteSet([DataEntry((auctionId + "_lot_passed"), organizer)]), TransferSet([ScriptTransfer(organizerAddr, lotAmount, lotAsset)]))
107107 else if (isDefined(getString(this, (auctionId + "_lot_passed"))))
108108 then throw("Lot is already passed to the winner, and organizer got his reward")
109109 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)]))
110110 }
111111
112112
113113
114114 @Callable(i)
115115 func Expedite (auctionId) = {
116116 let pmt = extract(i.payment)
117117 let callerAddressStr = toBase58String(i.caller.bytes)
118118 let endHeight = getIntegerValue(this, auctionId)
119119 let organizer = getStringValue(this, (auctionId + "_organizer"))
120120 let DAppowner = getStringValue(this, "dappowner")
121121 let Auctionduration = DataEntry(auctionId, (lastBlock.height + 1))
122122 let diff = (endHeight - lastBlock.height)
123123 let organizerAddr = addressFromStringValue(value(organizer))
124124 if ((organizer != callerAddressStr))
125125 then throw("You are not Orgnaniser to Sign this transaction.")
126126 else if ((DAppowner != callerAddressStr))
127127 then throw("You are not Dapp Owner.")
128128 else if ((diff > 15))
129129 then WriteSet([Auctionduration])
130130 else throw("Auction is already finished.")
131131 }
132132
133133
134134
135135 @Callable(i)
136136 func Owner () = {
137137 let pmt = extract(i.payment)
138138 let callerAddressStr = toBase58String(i.caller.bytes)
139- WriteSet([DataEntry("dappowner", "3MshBTYYGc24JWzE2aYEktiz5KzeNQGA4GV")])
139+ WriteSet([DataEntry("dappowner", callerAddressStr)])
140140 }
141141
142142
143143 @Verifier(tx)
144144 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
145145

github/deemru/w8io/169f3d6 
40.26 ms