tx · 6yAxRLVbsBLPffrkgfQy31PsxXFN8ZSgkdsXmWxX41Bd
3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep: -0.01400000 Waves
2019.07.12 13:16 [582373] smart account 3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep > SELF 0.00000000 Waves
{
"type": 13,
"id": "6yAxRLVbsBLPffrkgfQy31PsxXFN8ZSgkdsXmWxX41Bd",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1562926599454,
"version": 1,
"sender": "3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep",
"senderPublicKey": "BJAeTqNbDSA5FiYihZZaSWvD6XL5XjpqVXbTGerBJjRK",
"proofs": [
"V6xmkUjHiGTCzBG6ysRcQwCSaw74hWprKZGx1oXhyiUKoXdNMiJqGhE7M1r46F9m6671SA4mYeh53ixqZviMNbF"
],
"script": "base64:AAIDAAAAAAAAAAAAAAADAAAAAAd0b2tlbklkAQAAACCU1B7l35UfeySUCJ5Oe8nTMKHr4huFqp+vPk8CQCqTZQEAAAASdXNlckhhc0FkbWluQWNjZXNzAAAAAQAAAAdhZGRyZXNzCQAAAAAAAAIFAAAAB2FkZHJlc3MFAAAABHRoaXMBAAAABGFkZHIAAAACAAAAB3Rva2VuSWQAAAADcGFyCQABLAAAAAIJAAEsAAAAAgkAAlgAAAABBQAAAAd0b2tlbklkAgAAAAFfBQAAAANwYXIAAAADAAAAAWkBAAAAA2JldAAAAAEAAAAHdG9rZW5JZAQAAAAWc3RhcnRUcmFuc2FjdGlvbkhlaWdodAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwkBAAAABGFkZHIAAAACBQAAAAd0b2tlbklkAgAAAAVzdGFydAQAAAAJdGltZURlbHRhCQAAZQAAAAIFAAAABmhlaWdodAUAAAAWc3RhcnRUcmFuc2FjdGlvbkhlaWdodAQAAAAGbWF4QmV0CQEAAAAHZXh0cmFjdAAAAAEJAAQaAAAAAgUAAAAEdGhpcwkB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Qnm7DjKPLBFCJFf2CARsRuki8zYJVXrdYFDEi
Diff:
Old | New | | Differences |
---|
14 | 14 | | let g = getIntegerValue(this, d(a, "start")) |
---|
15 | 15 | | let h = (height - g) |
---|
16 | 16 | | let i = extract(getInteger(this, d(a, "maxBet"))) |
---|
| 17 | + | let j = addressFromPublicKey(toBytes(getStringValue(this, d(a, "maxBetOwner")))) |
---|
| 18 | + | let k = extract(f.payment) |
---|
17 | 19 | | throw("ok1") |
---|
18 | 20 | | } |
---|
19 | 21 | | |
---|
20 | 22 | | |
---|
21 | 23 | | |
---|
22 | 24 | | @Callable(f) |
---|
23 | | - | func start (j,k) = { |
---|
24 | | - | let l = extract(f.payment) |
---|
25 | | - | let m = l.assetId |
---|
| 25 | + | func start (l,m) = { |
---|
| 26 | + | let k = extract(f.payment) |
---|
| 27 | + | let n = k.assetId |
---|
26 | 28 | | if (isDefined(a)) |
---|
27 | | - | then WriteSet([DataEntry(d(a, "start"), height), DataEntry(d(a, "startPrice"), j), DataEntry(d(a, "duration"), k), DataEntry(d(a, "maxBetOwner"), toBase58String(f.callerPublicKey))]) |
---|
| 29 | + | then WriteSet([DataEntry(d(a, "start"), height), DataEntry(d(a, "startPrice"), l), DataEntry(d(a, "duration"), m), DataEntry(d(a, "maxBetOwner"), toBase58String(f.callerPublicKey))]) |
---|
28 | 30 | | else throw("You can't sell waves using the auction") |
---|
29 | 31 | | } |
---|
30 | 32 | | |
---|
|
32 | 34 | | |
---|
33 | 35 | | @Callable(f) |
---|
34 | 36 | | func finish (a) = { |
---|
35 | | - | let n = (getIntegerValue(this, d(a, "start")) - height) |
---|
36 | | - | let o = (getIntegerValue(this, d(a, "duration")) - n) |
---|
37 | | - | if ((o > 0)) |
---|
38 | | - | then throw((("The auction cannot be finished yet! " + toString(o)) + " minutes remaining")) |
---|
| 37 | + | let o = (getIntegerValue(this, d(a, "start")) - height) |
---|
| 38 | + | let p = (getIntegerValue(this, d(a, "duration")) - o) |
---|
| 39 | + | if ((p > 0)) |
---|
| 40 | + | then throw((("The auction cannot be finished yet! " + toString(p)) + " minutes remaining")) |
---|
39 | 41 | | else { |
---|
40 | | - | let p = addressFromPublicKey(toBytes(getStringValue(this, d(a, "maxBetOwner")))) |
---|
41 | | - | ScriptResult(WriteSet([DataEntry(d(a, "start"), 0)]), TransferSet([ScriptTransfer(p, 1, a)])) |
---|
| 42 | + | let j = addressFromPublicKey(toBytes(getStringValue(this, d(a, "maxBetOwner")))) |
---|
| 43 | + | ScriptResult(WriteSet([DataEntry(d(a, "start"), 0)]), TransferSet([ScriptTransfer(j, 1, a)])) |
---|
42 | 44 | | } |
---|
43 | 45 | | } |
---|
44 | 46 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = base58'B1xwWnBLB7z79VPr4sq1jBb5GDqs8TeT5jHojTdiwxfE' |
---|
5 | 5 | | |
---|
6 | 6 | | func b (c) = (c == this) |
---|
7 | 7 | | |
---|
8 | 8 | | |
---|
9 | 9 | | func d (a,e) = ((toBase58String(a) + "_") + e) |
---|
10 | 10 | | |
---|
11 | 11 | | |
---|
12 | 12 | | @Callable(f) |
---|
13 | 13 | | func bet (a) = { |
---|
14 | 14 | | let g = getIntegerValue(this, d(a, "start")) |
---|
15 | 15 | | let h = (height - g) |
---|
16 | 16 | | let i = extract(getInteger(this, d(a, "maxBet"))) |
---|
| 17 | + | let j = addressFromPublicKey(toBytes(getStringValue(this, d(a, "maxBetOwner")))) |
---|
| 18 | + | let k = extract(f.payment) |
---|
17 | 19 | | throw("ok1") |
---|
18 | 20 | | } |
---|
19 | 21 | | |
---|
20 | 22 | | |
---|
21 | 23 | | |
---|
22 | 24 | | @Callable(f) |
---|
23 | | - | func start (j,k) = { |
---|
24 | | - | let l = extract(f.payment) |
---|
25 | | - | let m = l.assetId |
---|
| 25 | + | func start (l,m) = { |
---|
| 26 | + | let k = extract(f.payment) |
---|
| 27 | + | let n = k.assetId |
---|
26 | 28 | | if (isDefined(a)) |
---|
27 | | - | then WriteSet([DataEntry(d(a, "start"), height), DataEntry(d(a, "startPrice"), j), DataEntry(d(a, "duration"), k), DataEntry(d(a, "maxBetOwner"), toBase58String(f.callerPublicKey))]) |
---|
| 29 | + | then WriteSet([DataEntry(d(a, "start"), height), DataEntry(d(a, "startPrice"), l), DataEntry(d(a, "duration"), m), DataEntry(d(a, "maxBetOwner"), toBase58String(f.callerPublicKey))]) |
---|
28 | 30 | | else throw("You can't sell waves using the auction") |
---|
29 | 31 | | } |
---|
30 | 32 | | |
---|
31 | 33 | | |
---|
32 | 34 | | |
---|
33 | 35 | | @Callable(f) |
---|
34 | 36 | | func finish (a) = { |
---|
35 | | - | let n = (getIntegerValue(this, d(a, "start")) - height) |
---|
36 | | - | let o = (getIntegerValue(this, d(a, "duration")) - n) |
---|
37 | | - | if ((o > 0)) |
---|
38 | | - | then throw((("The auction cannot be finished yet! " + toString(o)) + " minutes remaining")) |
---|
| 37 | + | let o = (getIntegerValue(this, d(a, "start")) - height) |
---|
| 38 | + | let p = (getIntegerValue(this, d(a, "duration")) - o) |
---|
| 39 | + | if ((p > 0)) |
---|
| 40 | + | then throw((("The auction cannot be finished yet! " + toString(p)) + " minutes remaining")) |
---|
39 | 41 | | else { |
---|
40 | | - | let p = addressFromPublicKey(toBytes(getStringValue(this, d(a, "maxBetOwner")))) |
---|
41 | | - | ScriptResult(WriteSet([DataEntry(d(a, "start"), 0)]), TransferSet([ScriptTransfer(p, 1, a)])) |
---|
| 42 | + | let j = addressFromPublicKey(toBytes(getStringValue(this, d(a, "maxBetOwner")))) |
---|
| 43 | + | ScriptResult(WriteSet([DataEntry(d(a, "start"), 0)]), TransferSet([ScriptTransfer(j, 1, a)])) |
---|
42 | 44 | | } |
---|
43 | 45 | | } |
---|
44 | 46 | | |
---|
45 | 47 | | |
---|