tx · 9n383F3fE9DSUafwSA5s9XiptSwhsjG2XKwjQt1mN8VX 3MvU8vDCk4NkA1Ag4vE3mETA4U9ioFh6VEM: -0.01500000 Waves 2019.12.14 10:12 [808216] smart account 3MvU8vDCk4NkA1Ag4vE3mETA4U9ioFh6VEM > SELF 0.00000000 Waves
{ "type": 13, "id": "9n383F3fE9DSUafwSA5s9XiptSwhsjG2XKwjQt1mN8VX", "fee": 1500000, "feeAssetId": null, "timestamp": 1576307580111, "version": 1, "sender": "3MvU8vDCk4NkA1Ag4vE3mETA4U9ioFh6VEM", "senderPublicKey": "LknnJnwRo6xRdriHmjgVbRDgpexijZFTYBU3Lw4HBS1", "proofs": [ "2m4vNfLcg4LWHSz8tdFcXA2mUbBsQW2AXbM98K8dRYertcSgm4PkmB9oQPDgUduHXZrFFiGx175tQsPtEXTkC24N" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAAAAAAAAEAAAABaQEAAAADYmlkAAAAAQAAAAlhdWN0aW9uSWQEAAAADWNhbGxlckFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAHZW5kVGltZQkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAAlhdWN0aW9uSWQCAAAACF9lbmRUaW1lBAAAAAhtaW5QcmljZQkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAAlhdWN0aW9uSWQCAAAACV9taW5QcmljZQQAAAANaGlnaGVzdEJpZEFtdAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAIFAAAACWF1Y3Rpb25JZAIAAAAOX2hpZ2hlc3RCaWRBbXQEAAAADWhpZ2hlc3RCaWRkZXIJAAQdAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAAlhdWN0aW9uSWQCAAAADl9oaWdoZXN0QmlkZGVyBAAAABJiaWRGcm9tVGhlU2FtZVVzZXIDCQEAAAAJaXNEZWZpbmVkAAAAAQUAAAANaGlnaGVzdEJpZGRlcgkAAAAAAAACCQEAAAAFdmFsdWUAAAABBQAAAA1oaWdoZXN0QmlkZGVyBQAAAA1jYWxsZXJBZGRyZXNzBwQAAAAOdG90YWxCaWRBbW91bnQJAABkAAAAAgAAAAAAAAGGoAMFAAAAEmJpZEZyb21UaGVTYW1lVXNlcgkBAAAABXZhbHVlAAAAAQUAAAANaGlnaGVzdEJpZEFtdAAAAAAAAAAAAAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAAQQ29udGVudF9WYXJpYWJsZQIAAAAFdGVzdHIFAAAAA25pbAAAAACsloyk", "chainId": 84, "height": 808216, "spentComplexity": 0 } View: original | compacted Prev: 5Yryt7zhTg8nYLeEbhC3HFGMzMWoqu1eqQiqMMQ3ZKxw Next: 9qbsXAscdHWyHYrrohZz13N2TgWrtvG8S58hFNpHK5UN Diff:
Old | New | Differences | |
---|---|---|---|
16 | 16 | let totalBidAmount = (100000 + (if (bidFromTheSameUser) | |
17 | 17 | then value(highestBidAmt) | |
18 | 18 | else 0)) | |
19 | - | if (!(isDefined(getIntegerValue(this, auctionId)))) | |
20 | - | then throw("Auction Id not found") | |
21 | - | else if ((lastBlock.height >= endTime)) | |
22 | - | then throw("Auction Completed") | |
23 | - | else if (if (if (!(isDefined(highestBidAmt))) | |
24 | - | then (minPrice >= totalBidAmount) | |
25 | - | else false) | |
26 | - | then true | |
27 | - | else if (isDefined(highestBidAmt)) | |
28 | - | then (value(highestBidAmt) >= totalBidAmount) | |
29 | - | else false) | |
30 | - | then throw(("Bid must be more then " + (if (!(isDefined(highestBidAmt))) | |
31 | - | then toString(minPrice) | |
32 | - | else toString(value(highestBidAmt))))) | |
33 | - | else if (!(isDefined(highestBidder))) | |
34 | - | then WriteSet([DataEntry((auctionId + "_highestBidder"), callerAddress), DataEntry((auctionId + "_highestBidAmt"), totalBidAmount)]) | |
35 | - | else if (bidFromTheSameUser) | |
36 | - | then WriteSet([DataEntry((auctionId + "_highestBidAmt"), totalBidAmount)]) | |
37 | - | else { | |
38 | - | let previousBidder = addressFromStringValue(value(highestBidder)) | |
39 | - | ScriptResult(WriteSet([DataEntry((auctionId + "_highestBidder"), callerAddress), DataEntry((auctionId + "_highestBidAmt"), totalBidAmount)]), TransferSet([ScriptTransfer(previousBidder, value(highestBidAmt), unit)])) | |
40 | - | } | |
19 | + | WriteSet([DataEntry("Content_Variable", "testr")]) | |
41 | 20 | } | |
42 | 21 | ||
43 | 22 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func bid (auctionId) = { | |
8 | 8 | let callerAddress = toBase58String(i.caller.bytes) | |
9 | 9 | let endTime = getIntegerValue(this, (auctionId + "_endTime")) | |
10 | 10 | let minPrice = getIntegerValue(this, (auctionId + "_minPrice")) | |
11 | 11 | let highestBidAmt = getInteger(this, (auctionId + "_highestBidAmt")) | |
12 | 12 | let highestBidder = getString(this, (auctionId + "_highestBidder")) | |
13 | 13 | let bidFromTheSameUser = if (isDefined(highestBidder)) | |
14 | 14 | then (value(highestBidder) == callerAddress) | |
15 | 15 | else false | |
16 | 16 | let totalBidAmount = (100000 + (if (bidFromTheSameUser) | |
17 | 17 | then value(highestBidAmt) | |
18 | 18 | else 0)) | |
19 | - | if (!(isDefined(getIntegerValue(this, auctionId)))) | |
20 | - | then throw("Auction Id not found") | |
21 | - | else if ((lastBlock.height >= endTime)) | |
22 | - | then throw("Auction Completed") | |
23 | - | else if (if (if (!(isDefined(highestBidAmt))) | |
24 | - | then (minPrice >= totalBidAmount) | |
25 | - | else false) | |
26 | - | then true | |
27 | - | else if (isDefined(highestBidAmt)) | |
28 | - | then (value(highestBidAmt) >= totalBidAmount) | |
29 | - | else false) | |
30 | - | then throw(("Bid must be more then " + (if (!(isDefined(highestBidAmt))) | |
31 | - | then toString(minPrice) | |
32 | - | else toString(value(highestBidAmt))))) | |
33 | - | else if (!(isDefined(highestBidder))) | |
34 | - | then WriteSet([DataEntry((auctionId + "_highestBidder"), callerAddress), DataEntry((auctionId + "_highestBidAmt"), totalBidAmount)]) | |
35 | - | else if (bidFromTheSameUser) | |
36 | - | then WriteSet([DataEntry((auctionId + "_highestBidAmt"), totalBidAmount)]) | |
37 | - | else { | |
38 | - | let previousBidder = addressFromStringValue(value(highestBidder)) | |
39 | - | ScriptResult(WriteSet([DataEntry((auctionId + "_highestBidder"), callerAddress), DataEntry((auctionId + "_highestBidAmt"), totalBidAmount)]), TransferSet([ScriptTransfer(previousBidder, value(highestBidAmt), unit)])) | |
40 | - | } | |
19 | + | WriteSet([DataEntry("Content_Variable", "testr")]) | |
41 | 20 | } | |
42 | 21 | ||
43 | 22 |
github/deemru/w8io/169f3d6 37.16 ms ◑