tx · 9VikNaS8B2N1Zsp3iAegegqps4c1mSrBQYW8kCzhLUn5
3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep: -0.01400000 Waves
2019.07.12 13:25 [582382] smart account 3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep > SELF 0.00000000 Waves
{
"type": 13,
"id": "9VikNaS8B2N1Zsp3iAegegqps4c1mSrBQYW8kCzhLUn5",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1562927196775,
"version": 1,
"sender": "3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep",
"senderPublicKey": "BJAeTqNbDSA5FiYihZZaSWvD6XL5XjpqVXbTGerBJjRK",
"proofs": [
"2bcCDt8j75B45LYkLLSg2SnW2FqrsTX1DyioTBSNShHoVy7G9pzcUN9XsRfTnS8nU8yRYXsaGCGn1Qs3EqRg8Sus"
],
"script": "base64:AAIDAAAAAAAAAAAAAAADAAAAAAd0b2tlbklkAQAAACCU1B7l35UfeySUCJ5Oe8nTMKHr4huFqp+vPk8CQCqTZQEAAAASdXNlckhhc0FkbWluQWNjZXNzAAAAAQAAAAdhZGRyZXNzCQAAAAAAAAIFAAAAB2FkZHJlc3MFAAAABHRoaXMBAAAABGFkZHIAAAACAAAAB3Rva2VuSWQAAAADcGFyCQABLAAAAAIJAAEsAAAAAgkAAlgAAAABBQAAAAd0b2tlbklkAgAAAAFfBQAAAANwYXIAAAADAAAAAWkBAAAAA2JldAAAAAEAAAAHdG9rZW5JZAkAAAIAAAABCQACWAAAAAEFAAAAB3Rva2VuSWQAAAABaQEAAAAFc3RhcnQAAAACAAAACnN0YXJ0UHJpY2UAAAAPYXVjdGlvbkR1cmF0aW9uBAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAQAAAAHdG9rZW5JbggFAAAAA3BtdAAAAAdhc3NldElkAwkBAAAACWlzRGVmaW5lZAAAAAEFAAAAB3Rva2VuSWQJAQAAAAhXcml0ZVNldAAAAAE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YmxpY0tleQAAAAEJAAGbAAAAAQkBAAAAEUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGhpcwkBAAAABGFkZHIAAAACBQAAAAd0b2tlbklkAgAAAAttYXhCZXRPd25lcgkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAARhZGRyAAAAAgUAAAAHdG9rZW5JZAIAAAAFc3RhcnQAAAAAAAAAAAAFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAttYXhCZXRPd25lcgAAAAAAAAAAAQUAAAAHdG9rZW5JZAUAAAADbmlsAAAAAEpVO2A=",
"chainId": 84,
"height": 582382,
"spentComplexity": 0
}
View: original | compacted
Prev: 7UWvPtLyC73zZ2DpyxieQWeFzvhTDuMxsjjeNJZypZgj
Next: 5pQFFZJ9iWWFpoDjgN8PbwYH5xeKSP3vUBD7YfWwsno9
Diff:
Old | New | | Differences |
---|
10 | 10 | | |
---|
11 | 11 | | |
---|
12 | 12 | | @Callable(f) |
---|
13 | | - | func bet (a) = { |
---|
14 | | - | let g = getIntegerValue(this, d(a, "start")) |
---|
15 | | - | let h = (height - g) |
---|
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) |
---|
19 | | - | if ((3000 > 2000)) |
---|
20 | | - | then throw("The betting was closed") |
---|
21 | | - | else throw("ok5") |
---|
22 | | - | } |
---|
| 13 | + | func bet (a) = throw(toBase58String(a)) |
---|
23 | 14 | | |
---|
24 | 15 | | |
---|
25 | 16 | | |
---|
26 | 17 | | @Callable(f) |
---|
27 | | - | func start (l,m) = { |
---|
28 | | - | let k = extract(f.payment) |
---|
29 | | - | let n = k.assetId |
---|
| 18 | + | func start (g,h) = { |
---|
| 19 | + | let i = extract(f.payment) |
---|
| 20 | + | let j = i.assetId |
---|
30 | 21 | | if (isDefined(a)) |
---|
31 | | - | then WriteSet([DataEntry(d(a, "start"), height), DataEntry(d(a, "startPrice"), l), DataEntry(d(a, "duration"), m), DataEntry(d(a, "maxBetOwner"), toBase58String(f.callerPublicKey))]) |
---|
| 22 | + | then WriteSet([DataEntry(d(a, "start"), height), DataEntry(d(a, "startPrice"), g), DataEntry(d(a, "duration"), h), DataEntry(d(a, "maxBetOwner"), toBase58String(f.callerPublicKey))]) |
---|
32 | 23 | | else throw("You can't sell waves using the auction") |
---|
33 | 24 | | } |
---|
34 | 25 | | |
---|
|
36 | 27 | | |
---|
37 | 28 | | @Callable(f) |
---|
38 | 29 | | func finish (a) = { |
---|
39 | | - | let o = (getIntegerValue(this, d(a, "start")) - height) |
---|
40 | | - | let p = (getIntegerValue(this, d(a, "duration")) - o) |
---|
41 | | - | if ((p > 0)) |
---|
42 | | - | then throw((("The auction cannot be finished yet! " + toString(p)) + " minutes remaining")) |
---|
| 30 | + | let k = (getIntegerValue(this, d(a, "start")) - height) |
---|
| 31 | + | let l = (getIntegerValue(this, d(a, "duration")) - k) |
---|
| 32 | + | if ((l > 0)) |
---|
| 33 | + | then throw((("The auction cannot be finished yet! " + toString(l)) + " minutes remaining")) |
---|
43 | 34 | | else { |
---|
44 | | - | let j = addressFromPublicKey(toBytes(getStringValue(this, d(a, "maxBetOwner")))) |
---|
45 | | - | ScriptResult(WriteSet([DataEntry(d(a, "start"), 0)]), TransferSet([ScriptTransfer(j, 1, a)])) |
---|
| 35 | + | let m = addressFromPublicKey(toBytes(getStringValue(this, d(a, "maxBetOwner")))) |
---|
| 36 | + | ScriptResult(WriteSet([DataEntry(d(a, "start"), 0)]), TransferSet([ScriptTransfer(m, 1, a)])) |
---|
46 | 37 | | } |
---|
47 | 38 | | } |
---|
48 | 39 | | |
---|
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 | | - | func bet (a) = { |
---|
14 | | - | let g = getIntegerValue(this, d(a, "start")) |
---|
15 | | - | let h = (height - g) |
---|
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) |
---|
19 | | - | if ((3000 > 2000)) |
---|
20 | | - | then throw("The betting was closed") |
---|
21 | | - | else throw("ok5") |
---|
22 | | - | } |
---|
| 13 | + | func bet (a) = throw(toBase58String(a)) |
---|
23 | 14 | | |
---|
24 | 15 | | |
---|
25 | 16 | | |
---|
26 | 17 | | @Callable(f) |
---|
27 | | - | func start (l,m) = { |
---|
28 | | - | let k = extract(f.payment) |
---|
29 | | - | let n = k.assetId |
---|
| 18 | + | func start (g,h) = { |
---|
| 19 | + | let i = extract(f.payment) |
---|
| 20 | + | let j = i.assetId |
---|
30 | 21 | | if (isDefined(a)) |
---|
31 | | - | then WriteSet([DataEntry(d(a, "start"), height), DataEntry(d(a, "startPrice"), l), DataEntry(d(a, "duration"), m), DataEntry(d(a, "maxBetOwner"), toBase58String(f.callerPublicKey))]) |
---|
| 22 | + | then WriteSet([DataEntry(d(a, "start"), height), DataEntry(d(a, "startPrice"), g), DataEntry(d(a, "duration"), h), DataEntry(d(a, "maxBetOwner"), toBase58String(f.callerPublicKey))]) |
---|
32 | 23 | | else throw("You can't sell waves using the auction") |
---|
33 | 24 | | } |
---|
34 | 25 | | |
---|
35 | 26 | | |
---|
36 | 27 | | |
---|
37 | 28 | | @Callable(f) |
---|
38 | 29 | | func finish (a) = { |
---|
39 | | - | let o = (getIntegerValue(this, d(a, "start")) - height) |
---|
40 | | - | let p = (getIntegerValue(this, d(a, "duration")) - o) |
---|
41 | | - | if ((p > 0)) |
---|
42 | | - | then throw((("The auction cannot be finished yet! " + toString(p)) + " minutes remaining")) |
---|
| 30 | + | let k = (getIntegerValue(this, d(a, "start")) - height) |
---|
| 31 | + | let l = (getIntegerValue(this, d(a, "duration")) - k) |
---|
| 32 | + | if ((l > 0)) |
---|
| 33 | + | then throw((("The auction cannot be finished yet! " + toString(l)) + " minutes remaining")) |
---|
43 | 34 | | else { |
---|
44 | | - | let j = addressFromPublicKey(toBytes(getStringValue(this, d(a, "maxBetOwner")))) |
---|
45 | | - | ScriptResult(WriteSet([DataEntry(d(a, "start"), 0)]), TransferSet([ScriptTransfer(j, 1, a)])) |
---|
| 35 | + | let m = addressFromPublicKey(toBytes(getStringValue(this, d(a, "maxBetOwner")))) |
---|
| 36 | + | ScriptResult(WriteSet([DataEntry(d(a, "start"), 0)]), TransferSet([ScriptTransfer(m, 1, a)])) |
---|
46 | 37 | | } |
---|
47 | 38 | | } |
---|
48 | 39 | | |
---|
49 | 40 | | |
---|