tx · 5Yryt7zhTg8nYLeEbhC3HFGMzMWoqu1eqQiqMMQ3ZKxw 3MvU8vDCk4NkA1Ag4vE3mETA4U9ioFh6VEM: -0.01500000 Waves 2019.12.14 10:10 [808214] smart account 3MvU8vDCk4NkA1Ag4vE3mETA4U9ioFh6VEM > SELF 0.00000000 Waves
{ "type": 13, "id": "5Yryt7zhTg8nYLeEbhC3HFGMzMWoqu1eqQiqMMQ3ZKxw", "fee": 1500000, "feeAssetId": null, "timestamp": 1576307404485, "version": 1, "sender": "3MvU8vDCk4NkA1Ag4vE3mETA4U9ioFh6VEM", "senderPublicKey": "LknnJnwRo6xRdriHmjgVbRDgpexijZFTYBU3Lw4HBS1", "proofs": [ "27ijdHbUp4q9SnsA5z2jQTtCqPiD1DEuB1sPazCc8Uzv7v8KQCfHQ33ZTHBMZiVLcLzGiQh9bGZLUUhxQDs7Y55P" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAAAAAAAAEAAAABaQEAAAADYmlkAAAAAQAAAAlhdWN0aW9uSWQEAAAADWNhbGxlckFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAHZW5kVGltZQkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAAlhdWN0aW9uSWQCAAAACF9lbmRUaW1lBAAAAAhtaW5QcmljZQkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAAlhdWN0aW9uSWQCAAAACV9taW5QcmljZQQAAAANaGlnaGVzdEJpZEFtdAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAIFAAAACWF1Y3Rpb25JZAIAAAAOX2hpZ2hlc3RCaWRBbXQEAAAADWhpZ2hlc3RCaWRkZXIJAAQdAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAAlhdWN0aW9uSWQCAAAADl9oaWdoZXN0QmlkZGVyBAAAABJiaWRGcm9tVG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XRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAlhdWN0aW9uSWQCAAAADl9oaWdoZXN0QmlkZGVyBQAAAA1jYWxsZXJBZGRyZXNzCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAACWF1Y3Rpb25JZAIAAAAOX2hpZ2hlc3RCaWRBbXQFAAAADnRvdGFsQmlkQW1vdW50BQAAAANuaWwDBQAAABJiaWRGcm9tVGhlU2FtZVVzZXIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAJYXVjdGlvbklkAgAAAA5faGlnaGVzdEJpZEFtdAUAAAAOdG90YWxCaWRBbW91bnQFAAAAA25pbAQAAAAOcHJldmlvdXNCaWRkZXIJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQkBAAAABXZhbHVlAAAAAQUAAAANaGlnaGVzdEJpZGRlcgkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAJYXVjdGlvbklkAgAAAA5faGlnaGVzdEJpZGRlcgUAAAANY2FsbGVyQWRkcmVzcwkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAlhdWN0aW9uSWQCAAAADl9oaWdoZXN0QmlkQW10BQAAAA50b3RhbEJpZEFtb3VudAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAADnByZXZpb3VzQmlkZGVyCQEAAAAFdmFsdWUAAAABBQAAAA1oaWdoZXN0QmlkQW10BQAAAAR1bml0BQAAAANuaWwAAAAAIiMrUQ==", "chainId": 84, "height": 808214, "spentComplexity": 0 } View: original | compacted Prev: GsjCA1cpQw944yMhzZxRmy29yvartR8GkxG8yZxxXdmX Next: 9n383F3fE9DSUafwSA5s9XiptSwhsjG2XKwjQt1mN8VX Diff:
Old | New | Differences | |
---|---|---|---|
5 | 5 | ||
6 | 6 | @Callable(a) | |
7 | 7 | func bid (b) = { | |
8 | - | let c = extract(a.payment) | |
9 | - | let d = toBase58String(a.caller.bytes) | |
10 | - | let e = getIntegerValue(this, (b + "_endTime")) | |
11 | - | let f = getIntegerValue(this, (b + "_minPrice")) | |
12 | - | let g = getInteger(this, (b + "_highestBidAmt")) | |
13 | - | let h = getString(this, (b + "_highestBidder")) | |
14 | - | let i = if (isDefined(h)) | |
15 | - | then (value(h) == d) | |
8 | + | let c = toBase58String(a.caller.bytes) | |
9 | + | let d = getIntegerValue(this, (b + "_endTime")) | |
10 | + | let e = getIntegerValue(this, (b + "_minPrice")) | |
11 | + | let f = getInteger(this, (b + "_highestBidAmt")) | |
12 | + | let g = getString(this, (b + "_highestBidder")) | |
13 | + | let h = if (isDefined(g)) | |
14 | + | then (value(g) == c) | |
16 | 15 | else false | |
17 | - | let | |
18 | - | then value( | |
16 | + | let i = (100000 + (if (h) | |
17 | + | then value(f) | |
19 | 18 | else 0)) | |
20 | 19 | if (!(isDefined(getIntegerValue(this, b)))) | |
21 | 20 | then throw("Auction Id not found") | |
22 | - | else if ((lastBlock.height >= | |
21 | + | else if ((lastBlock.height >= d)) | |
23 | 22 | then throw("Auction Completed") | |
24 | - | else if (if (if (!(isDefined( | |
25 | - | then ( | |
23 | + | else if (if (if (!(isDefined(f))) | |
24 | + | then (e >= i) | |
26 | 25 | else false) | |
27 | 26 | then true | |
28 | - | else if (isDefined( | |
29 | - | then (value( | |
27 | + | else if (isDefined(f)) | |
28 | + | then (value(f) >= i) | |
30 | 29 | else false) | |
31 | - | then throw(("Bid must be more then " + (if (!(isDefined( | |
32 | - | then toString( | |
33 | - | else toString(value( | |
34 | - | else if (!(isDefined( | |
35 | - | then WriteSet([DataEntry((b + "_highestBidder"), | |
36 | - | else if ( | |
37 | - | then WriteSet([DataEntry((b + "_highestBidAmt"), | |
30 | + | then throw(("Bid must be more then " + (if (!(isDefined(f))) | |
31 | + | then toString(e) | |
32 | + | else toString(value(f))))) | |
33 | + | else if (!(isDefined(g))) | |
34 | + | then WriteSet([DataEntry((b + "_highestBidder"), c), DataEntry((b + "_highestBidAmt"), i)]) | |
35 | + | else if (h) | |
36 | + | then WriteSet([DataEntry((b + "_highestBidAmt"), i)]) | |
38 | 37 | else { | |
39 | - | let | |
40 | - | ScriptResult(WriteSet([DataEntry((b + "_highestBidder"), | |
38 | + | let j = addressFromStringValue(value(g)) | |
39 | + | ScriptResult(WriteSet([DataEntry((b + "_highestBidder"), c), DataEntry((b + "_highestBidAmt"), i)]), TransferSet([ScriptTransfer(j, value(f), unit)])) | |
41 | 40 | } | |
42 | 41 | } | |
43 | 42 |
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(a) | |
7 | 7 | func bid (b) = { | |
8 | - | let c = extract(a.payment) | |
9 | - | let d = toBase58String(a.caller.bytes) | |
10 | - | let e = getIntegerValue(this, (b + "_endTime")) | |
11 | - | let f = getIntegerValue(this, (b + "_minPrice")) | |
12 | - | let g = getInteger(this, (b + "_highestBidAmt")) | |
13 | - | let h = getString(this, (b + "_highestBidder")) | |
14 | - | let i = if (isDefined(h)) | |
15 | - | then (value(h) == d) | |
8 | + | let c = toBase58String(a.caller.bytes) | |
9 | + | let d = getIntegerValue(this, (b + "_endTime")) | |
10 | + | let e = getIntegerValue(this, (b + "_minPrice")) | |
11 | + | let f = getInteger(this, (b + "_highestBidAmt")) | |
12 | + | let g = getString(this, (b + "_highestBidder")) | |
13 | + | let h = if (isDefined(g)) | |
14 | + | then (value(g) == c) | |
16 | 15 | else false | |
17 | - | let | |
18 | - | then value( | |
16 | + | let i = (100000 + (if (h) | |
17 | + | then value(f) | |
19 | 18 | else 0)) | |
20 | 19 | if (!(isDefined(getIntegerValue(this, b)))) | |
21 | 20 | then throw("Auction Id not found") | |
22 | - | else if ((lastBlock.height >= | |
21 | + | else if ((lastBlock.height >= d)) | |
23 | 22 | then throw("Auction Completed") | |
24 | - | else if (if (if (!(isDefined( | |
25 | - | then ( | |
23 | + | else if (if (if (!(isDefined(f))) | |
24 | + | then (e >= i) | |
26 | 25 | else false) | |
27 | 26 | then true | |
28 | - | else if (isDefined( | |
29 | - | then (value( | |
27 | + | else if (isDefined(f)) | |
28 | + | then (value(f) >= i) | |
30 | 29 | else false) | |
31 | - | then throw(("Bid must be more then " + (if (!(isDefined( | |
32 | - | then toString( | |
33 | - | else toString(value( | |
34 | - | else if (!(isDefined( | |
35 | - | then WriteSet([DataEntry((b + "_highestBidder"), | |
36 | - | else if ( | |
37 | - | then WriteSet([DataEntry((b + "_highestBidAmt"), | |
30 | + | then throw(("Bid must be more then " + (if (!(isDefined(f))) | |
31 | + | then toString(e) | |
32 | + | else toString(value(f))))) | |
33 | + | else if (!(isDefined(g))) | |
34 | + | then WriteSet([DataEntry((b + "_highestBidder"), c), DataEntry((b + "_highestBidAmt"), i)]) | |
35 | + | else if (h) | |
36 | + | then WriteSet([DataEntry((b + "_highestBidAmt"), i)]) | |
38 | 37 | else { | |
39 | - | let | |
40 | - | ScriptResult(WriteSet([DataEntry((b + "_highestBidder"), | |
38 | + | let j = addressFromStringValue(value(g)) | |
39 | + | ScriptResult(WriteSet([DataEntry((b + "_highestBidder"), c), DataEntry((b + "_highestBidAmt"), i)]), TransferSet([ScriptTransfer(j, value(f), unit)])) | |
41 | 40 | } | |
42 | 41 | } | |
43 | 42 | ||
44 | 43 |
github/deemru/w8io/169f3d6 48.29 ms ◑