tx · AJYCTu1FSYnDCX2G4dTNugkeWgu4KAyY26oZdGp5vk78 3Mpfd3hihdPKUHqWqC9KYjcM18BKw91VkKe: -0.01400000 Waves 2019.01.29 10:13 [471227] smart account 3Mpfd3hihdPKUHqWqC9KYjcM18BKw91VkKe > SELF 0.00000000 Waves
{ "type": 13, "id": "AJYCTu1FSYnDCX2G4dTNugkeWgu4KAyY26oZdGp5vk78", "fee": 1400000, "feeAssetId": null, "timestamp": 1548746095604, "version": 1, "sender": "3Mpfd3hihdPKUHqWqC9KYjcM18BKw91VkKe", "senderPublicKey": "4f1JNnYPBjnrCyRNwNpfg2zg6V34QG4EBF8a2o2yz9rg", "proofs": [ "5yCxcurJZb4UhQvmTaczvdCL3ckKPSN2kX2y6Vd8fKR1nyKeoJPH5H4W2RtsfufCtpHkURC8F3EzFycWDv1HSJE4" ], "script": "base64:AQQAAAAMbWF4VGltZVRvQmV0AAAAAWinm5GoBAAAABBtaW5UaW1lVG9UcmFkaW5nAAAAAWiswe2oBAAAABBtYXhUaW1lVG9UcmFkaW5nAAAAAWiswtgIBAAAAANmZWUAAAAAAACYloAEAAAACGRlY2ltYWxzAAAAAAAAAAACBAAAAAhtdWx0aXBseQAAAAAAAAAAZAQAAAAKdG90YWxNb25leQAAAAAAAAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAACZHQFAAAAByRtYXRjaDADAwkAAGcAAAACBQAAAAxtYXhUaW1lVG9CZXQIBQAAAAJ0eAAAAAl0aW1lc3RhbXAJAQAAAAlpc0RlZmluZWQAAAABCQAEEwAAAAIIBQAAAAJkdAAAAARkYXRhAgAAAAViZXRfcwcEAAAAC3BheW1lbnRUeElkCQEAAAAHZXh0cmFjdAAAAAEJAAQTAAAAAggFAAAAAmR0AAAABGRhdGECAAAAC3BheW1lbnRUeElkBAAAAAlwYXltZW50VHgJAAPoAAAAAQkAAlkAAAABBQAAAAt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AAkAAaQAAAABBQAAAARkQmV0BwMDCQAAZgAAAAIIBQAAAAJ0eAAAAAl0aW1lc3RhbXAFAAAAEG1heFRpbWVUb1RyYWRpbmcJAQAAAAEhAAAAAQkBAAAACWlzRGVmaW5lZAAAAAEJAAQdAAAAAggFAAAAAnR4AAAABnNlbmRlcgIAAAALdHJhZGluZ1R4SWQHBAAAAAt0cmFkaW5nVHhJZAkBAAAAB2V4dHJhY3QAAAABCQAEEwAAAAIIBQAAAAJkdAAAAARkYXRhAgAAAAt0cmFkaW5nVHhJZAQAAAAJdHJhZGluZ1R4CQAD6AAAAAEJAAJZAAAAAQUAAAALdHJhZGluZ1R4SWQEAAAACHByaWNlV2luCQEAAAAHZXh0cmFjdAAAAAEJAAQQAAAAAggFAAAAAmR0AAAABGRhdGECAAAACHByaWNlV2luBAAAAAckbWF0Y2gxBQAAAAl0cmFkaW5nVHgDCQAAAQAAAAIFAAAAByRtYXRjaDECAAAAE0V4Y2hhbmdlVHJhbnNhY3Rpb24EAAAACGV4Y2hhbmdlBQAAAAckbWF0Y2gxAwMJAAAAAAAAAgUAAAAIcHJpY2VXaW4IBQAAAAhleGNoYW5nZQAAAAVwcmljZQkAAGcAAAACCAUAAAAIZXhjaGFuZ2UAAAAJdGltZXN0YW1wBQAAABBtaW5UaW1lVG9UcmFkaW5nBwkAAGcAAAACBQAAABBtYXhUaW1lVG9UcmFkaW5nCAUAAAAIZXhjaGFuZ2UAAAAJdGltZXN0YW1wBwcDCQEAAAAJaXNEZWZpbmVkAAAAAQkABB0AAAACCAUAAAACdHgAAAAGc2VuZGVyAgAAAAt0cmFkaW5nVHhJZAYHBpFgM90=", "chainId": 84, "height": 471227, "spentComplexity": 0 } View: original | compacted Prev: fANYXGefpZZxfszJTVdXjxFiv7HkRrzvA6Aw3CTEL27 Next: 9SM9k1bUiBPLwieRAzfbkjALXXj7Cum12oGiWXs6aNDH Diff:
Old | New | Differences | |
---|---|---|---|
20 | 20 | let betSummary = if (isDefined(getInteger(tx.sender, betGroup))) | |
21 | 21 | then extract(getInteger(tx.sender, betGroup)) | |
22 | 22 | else 0 | |
23 | + | let vBet = extract(getInteger(dt.data, "bet_v")) | |
24 | + | let iBet = extract(getInteger(dt.data, "bet_i")) | |
25 | + | let dBet = extract(getInteger(dt.data, "bet_d")) | |
26 | + | let c = (decimals - size(toString(dBet))) | |
27 | + | let tBet = (((toString(iBet) + ".") + (if ((c == 1)) | |
28 | + | then "0" | |
29 | + | else if ((c == 2)) | |
30 | + | then "00" | |
31 | + | else if ((c == 3)) | |
32 | + | then "000" | |
33 | + | else if ((c == 4)) | |
34 | + | then "0000" | |
35 | + | else if ((c == 5)) | |
36 | + | then "00000" | |
37 | + | else if ((c == 6)) | |
38 | + | then "000000" | |
39 | + | else if ((c == 7)) | |
40 | + | then "0000000" | |
41 | + | else "")) + toString(dBet)) | |
23 | 42 | false | |
24 | 43 | } | |
25 | 44 | else if (if ((tx.timestamp > maxTimeToTrading)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 1 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let maxTimeToBet = 1549000217000 | |
4 | 4 | let minTimeToTrading = 1549086617000 | |
5 | 5 | let maxTimeToTrading = 1549086677000 | |
6 | 6 | let fee = 10000000 | |
7 | 7 | let decimals = 2 | |
8 | 8 | let multiply = 100 | |
9 | 9 | let totalMoney = 0 | |
10 | 10 | match tx { | |
11 | 11 | case dt: DataTransaction => | |
12 | 12 | if (if ((maxTimeToBet >= tx.timestamp)) | |
13 | 13 | then isDefined(getString(dt.data, "bet_s")) | |
14 | 14 | else false) | |
15 | 15 | then { | |
16 | 16 | let paymentTxId = extract(getString(dt.data, "paymentTxId")) | |
17 | 17 | let paymentTx = transactionById(fromBase58String(paymentTxId)) | |
18 | 18 | let betGroup = extract(getString(dt.data, "bet_s")) | |
19 | 19 | let dtBetSummary = extract(getInteger(dt.data, betGroup)) | |
20 | 20 | let betSummary = if (isDefined(getInteger(tx.sender, betGroup))) | |
21 | 21 | then extract(getInteger(tx.sender, betGroup)) | |
22 | 22 | else 0 | |
23 | + | let vBet = extract(getInteger(dt.data, "bet_v")) | |
24 | + | let iBet = extract(getInteger(dt.data, "bet_i")) | |
25 | + | let dBet = extract(getInteger(dt.data, "bet_d")) | |
26 | + | let c = (decimals - size(toString(dBet))) | |
27 | + | let tBet = (((toString(iBet) + ".") + (if ((c == 1)) | |
28 | + | then "0" | |
29 | + | else if ((c == 2)) | |
30 | + | then "00" | |
31 | + | else if ((c == 3)) | |
32 | + | then "000" | |
33 | + | else if ((c == 4)) | |
34 | + | then "0000" | |
35 | + | else if ((c == 5)) | |
36 | + | then "00000" | |
37 | + | else if ((c == 6)) | |
38 | + | then "000000" | |
39 | + | else if ((c == 7)) | |
40 | + | then "0000000" | |
41 | + | else "")) + toString(dBet)) | |
23 | 42 | false | |
24 | 43 | } | |
25 | 44 | else if (if ((tx.timestamp > maxTimeToTrading)) | |
26 | 45 | then !(isDefined(getString(tx.sender, "tradingTxId"))) | |
27 | 46 | else false) | |
28 | 47 | then { | |
29 | 48 | let tradingTxId = extract(getString(dt.data, "tradingTxId")) | |
30 | 49 | let tradingTx = transactionById(fromBase58String(tradingTxId)) | |
31 | 50 | let priceWin = extract(getInteger(dt.data, "priceWin")) | |
32 | 51 | match tradingTx { | |
33 | 52 | case exchange: ExchangeTransaction => | |
34 | 53 | if (if ((priceWin == exchange.price)) | |
35 | 54 | then (exchange.timestamp >= minTimeToTrading) | |
36 | 55 | else false) | |
37 | 56 | then (maxTimeToTrading >= exchange.timestamp) | |
38 | 57 | else false | |
39 | 58 | case _ => | |
40 | 59 | false | |
41 | 60 | } | |
42 | 61 | } | |
43 | 62 | else if (isDefined(getString(tx.sender, "tradingTxId"))) | |
44 | 63 | then true | |
45 | 64 | else false | |
46 | 65 | case _ => | |
47 | 66 | true | |
48 | 67 | } |
github/deemru/w8io/169f3d6 34.61 ms ◑