tx · 9SM9k1bUiBPLwieRAzfbkjALXXj7Cum12oGiWXs6aNDH 3Mpfd3hihdPKUHqWqC9KYjcM18BKw91VkKe: -0.01400000 Waves 2019.01.29 10:32 [471243] smart account 3Mpfd3hihdPKUHqWqC9KYjcM18BKw91VkKe > SELF 0.00000000 Waves
{ "type": 13, "id": "9SM9k1bUiBPLwieRAzfbkjALXXj7Cum12oGiWXs6aNDH", "fee": 1400000, "feeAssetId": null, "timestamp": 1548747164613, "version": 1, "sender": "3Mpfd3hihdPKUHqWqC9KYjcM18BKw91VkKe", "senderPublicKey": "4f1JNnYPBjnrCyRNwNpfg2zg6V34QG4EBF8a2o2yz9rg", "proofs": [ "4GxawWQMB8tCNPkDLBcUw8nd5b5ZEu5sLLWqVsZWUArdcbK53RLpoe7RP84VFoLqXuRBy5yoMVZ4qJ5LPAaA9Mgq" ], "script": "base64:AQQAAAAMbWF4VGltZVRvQmV0AAAAAWinm5GoBAAAABBtaW5UaW1lVG9UcmFkaW5nAAAAAWiswe2oBAAAABBtYXhUaW1lVG9UcmFkaW5nAAAAAWiswtgIBAAAAANmZWUAAAAAAACYloAEAAAACGRlY2ltYWxzAAAAAAAAAAACBAAAAAhtdWx0aXBseQAAAAAAAAAAZAQAAAAKdG90YWxNb25leQAAAAAAAAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAACZHQFAAAAByRtYXRjaDADAwkAAGcAAAACBQAAAAxtYXhUaW1lVG9CZXQIBQAAAAJ0eAAAAAl0aW1lc3RhbXAJAQAAAAlpc0RlZmluZWQAAAABCQAEEwAAAAIIBQAAAAJkdAAAAARkYXRhAgAAAAViZXRfcwcEAAAAC3BheW1lbnRUeElkCQEAAAAHZXh0cmFjdAAAAAEJAAQTAAAAAggFAAAAAmR0AAAABGRhdGECAAAAC3BheW1lbnRUeElkBAAAAAlwYXltZW50VHgJAAPoAAAAAQkAAlkAAAABBQ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FkaW5nVHgDCQAAAQAAAAIFAAAAByRtYXRjaDECAAAAE0V4Y2hhbmdlVHJhbnNhY3Rpb24EAAAACGV4Y2hhbmdlBQAAAAckbWF0Y2gxAwMJAAAAAAAAAgUAAAAIcHJpY2VXaW4IBQAAAAhleGNoYW5nZQAAAAVwcmljZQkAAGcAAAACCAUAAAAIZXhjaGFuZ2UAAAAJdGltZXN0YW1wBQAAABBtaW5UaW1lVG9UcmFkaW5nBwkAAGcAAAACBQAAABBtYXhUaW1lVG9UcmFkaW5nCAUAAAAIZXhjaGFuZ2UAAAAJdGltZXN0YW1wBwcDCQEAAAAJaXNEZWZpbmVkAAAAAQkABB0AAAACCAUAAAACdHgAAAAGc2VuZGVyAgAAAAt0cmFkaW5nVHhJZAYHBhe1sx8=", "chainId": 84, "height": 471243, "spentComplexity": 0 } View: original | compacted Prev: AJYCTu1FSYnDCX2G4dTNugkeWgu4KAyY26oZdGp5vk78 Next: GS7XuzdzJq7QrK6bBT32XnKXqSQLbkEDCJwfU9hV2bbT Diff:
Old | New | Differences | |
---|---|---|---|
39 | 39 | else if ((c == 7)) | |
40 | 40 | then "0000000" | |
41 | 41 | else "")) + toString(dBet)) | |
42 | - | false | |
42 | + | match paymentTx { | |
43 | + | case payment: TransferTransaction => | |
44 | + | if (if (if (if (!(isDefined(getString(tx.sender, paymentTxId)))) | |
45 | + | then (payment.recipient == tx.sender) | |
46 | + | else false) | |
47 | + | then (payment.amount > fee) | |
48 | + | else false) | |
49 | + | then (extract(getInteger(dt.data, "totalMoney")) == (totalMoney + (payment.amount - fee))) | |
50 | + | else false) | |
51 | + | then (vBet == ((iBet * multiply) + dBet)) | |
52 | + | else false | |
53 | + | case _ => | |
54 | + | false | |
55 | + | } | |
43 | 56 | } | |
44 | 57 | else if (if ((tx.timestamp > maxTimeToTrading)) | |
45 | 58 | then !(isDefined(getString(tx.sender, "tradingTxId"))) |
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 | 23 | let vBet = extract(getInteger(dt.data, "bet_v")) | |
24 | 24 | let iBet = extract(getInteger(dt.data, "bet_i")) | |
25 | 25 | let dBet = extract(getInteger(dt.data, "bet_d")) | |
26 | 26 | let c = (decimals - size(toString(dBet))) | |
27 | 27 | let tBet = (((toString(iBet) + ".") + (if ((c == 1)) | |
28 | 28 | then "0" | |
29 | 29 | else if ((c == 2)) | |
30 | 30 | then "00" | |
31 | 31 | else if ((c == 3)) | |
32 | 32 | then "000" | |
33 | 33 | else if ((c == 4)) | |
34 | 34 | then "0000" | |
35 | 35 | else if ((c == 5)) | |
36 | 36 | then "00000" | |
37 | 37 | else if ((c == 6)) | |
38 | 38 | then "000000" | |
39 | 39 | else if ((c == 7)) | |
40 | 40 | then "0000000" | |
41 | 41 | else "")) + toString(dBet)) | |
42 | - | false | |
42 | + | match paymentTx { | |
43 | + | case payment: TransferTransaction => | |
44 | + | if (if (if (if (!(isDefined(getString(tx.sender, paymentTxId)))) | |
45 | + | then (payment.recipient == tx.sender) | |
46 | + | else false) | |
47 | + | then (payment.amount > fee) | |
48 | + | else false) | |
49 | + | then (extract(getInteger(dt.data, "totalMoney")) == (totalMoney + (payment.amount - fee))) | |
50 | + | else false) | |
51 | + | then (vBet == ((iBet * multiply) + dBet)) | |
52 | + | else false | |
53 | + | case _ => | |
54 | + | false | |
55 | + | } | |
43 | 56 | } | |
44 | 57 | else if (if ((tx.timestamp > maxTimeToTrading)) | |
45 | 58 | then !(isDefined(getString(tx.sender, "tradingTxId"))) | |
46 | 59 | else false) | |
47 | 60 | then { | |
48 | 61 | let tradingTxId = extract(getString(dt.data, "tradingTxId")) | |
49 | 62 | let tradingTx = transactionById(fromBase58String(tradingTxId)) | |
50 | 63 | let priceWin = extract(getInteger(dt.data, "priceWin")) | |
51 | 64 | match tradingTx { | |
52 | 65 | case exchange: ExchangeTransaction => | |
53 | 66 | if (if ((priceWin == exchange.price)) | |
54 | 67 | then (exchange.timestamp >= minTimeToTrading) | |
55 | 68 | else false) | |
56 | 69 | then (maxTimeToTrading >= exchange.timestamp) | |
57 | 70 | else false | |
58 | 71 | case _ => | |
59 | 72 | false | |
60 | 73 | } | |
61 | 74 | } | |
62 | 75 | else if (isDefined(getString(tx.sender, "tradingTxId"))) | |
63 | 76 | then true | |
64 | 77 | else false | |
65 | 78 | case _ => | |
66 | 79 | true | |
67 | 80 | } |
github/deemru/w8io/169f3d6 33.46 ms ◑