tx · F9tmE12DezVLUb4ZBgpRMhKNj7yvnvn9KKNHE6RZVvLV 3Mpfd3hihdPKUHqWqC9KYjcM18BKw91VkKe: -0.01400000 Waves 2019.01.29 10:00 [471214] smart account 3Mpfd3hihdPKUHqWqC9KYjcM18BKw91VkKe > SELF 0.00000000 Waves
{ "type": 13, "id": "F9tmE12DezVLUb4ZBgpRMhKNj7yvnvn9KKNHE6RZVvLV", "fee": 1400000, "feeAssetId": null, "timestamp": 1548745224736, "version": 1, "sender": "3Mpfd3hihdPKUHqWqC9KYjcM18BKw91VkKe", "senderPublicKey": "4f1JNnYPBjnrCyRNwNpfg2zg6V34QG4EBF8a2o2yz9rg", "proofs": [ "54Ur2Tnyq8FXUga3gksFu5U5e2bLPeHaCP2LNnMEWA2DihMuauJabBX6MYWPSEwad2mFjXT7BwQ744UYwcMDbWcy" ], "script": "base64:AQQAAAAMbWF4VGltZVRvQmV0AAAAAWinm5GoBAAAABBtaW5UaW1lVG9UcmFkaW5nAAAAAWiswe2oBAAAABBtYXhUaW1lVG9UcmFkaW5nAAAAAWiswtgIBAAAAANmZWUAAAAAAACYloAEAAAACGRlY2ltYWxzAAAAAAAAAAACBAAAAAhtdWx0aXBseQAAAAAAAAAAZAQAAAAKdG90YWxNb25leQMJAQAAAAlpc0RlZmluZWQAAAABCQAEGgAAAAIIBQAAAAJ0eAAAAAZzZW5kZXICAAAACnRvdGFsTW9uZXkJAQAAAAdleHRyYWN0AAAAAQkABBoAAAACCAUAAAACdHgAAAAGc2VuZGVyAgAAAAp0b3RhbE1vbmV5AAAAAAAAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAJkdAUAAAAHJG1hdGNoMAMDCQAAZwAAAAIFAAAADG1heFRpbWVUb0JldAgFAAAAAnR4AAAACXRpbWVzdGFtcAkBAAAACWlzRGVmaW5lZAAAAAEJAAQTAAAAAggFAAAAAmR0AAA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AAQkAAlkAAAABBQAAAAt0cmFkaW5nVHhJZAQAAAAIcHJpY2VXaW4JAQAAAAdleHRyYWN0AAAAAQkABBAAAAACCAUAAAACZHQAAAAEZGF0YQIAAAAIcHJpY2VXaW4EAAAAByRtYXRjaDEFAAAACXRyYWRpbmdUeAMJAAABAAAAAgUAAAAHJG1hdGNoMQIAAAATRXhjaGFuZ2VUcmFuc2FjdGlvbgQAAAAIZXhjaGFuZ2UFAAAAByRtYXRjaDEDAwkAAAAAAAACBQAAAAhwcmljZVdpbggFAAAACGV4Y2hhbmdlAAAABXByaWNlCQAAZwAAAAIIBQAAAAhleGNoYW5nZQAAAAl0aW1lc3RhbXAFAAAAEG1pblRpbWVUb1RyYWRpbmcHCQAAZwAAAAIFAAAAEG1heFRpbWVUb1RyYWRpbmcIBQAAAAhleGNoYW5nZQAAAAl0aW1lc3RhbXAHBwMJAQAAAAlpc0RlZmluZWQAAAABCQAEHQAAAAIIBQAAAAJ0eAAAAAZzZW5kZXICAAAAC3RyYWRpbmdUeElkBgcGNRz7Fg==", "chainId": 84, "height": 471214, "spentComplexity": 0 } View: original | compacted Prev: CPWMqQuB3gYEPiTdAW2tnMVEdfGgUtZuRRmeAg7ophjf Next: 4gZHg2e8srLsPN9whLsPuEbeniD4gVzrnSriQKMEXo3p Diff:
Old | New | Differences | |
---|---|---|---|
4 | 4 | let minTimeToTrading = 1549086617000 | |
5 | 5 | let maxTimeToTrading = 1549086677000 | |
6 | 6 | let fee = 10000000 | |
7 | - | let betAsset = base58'WAVES' | |
8 | 7 | let decimals = 2 | |
9 | 8 | let multiply = 100 | |
10 | 9 | let totalMoney = if (isDefined(getInteger(tx.sender, "totalMoney"))) | |
44 | 43 | else "")) + toString(dBet)) | |
45 | 44 | match paymentTx { | |
46 | 45 | case payment: TransferTransaction => | |
47 | - | if (if (if (if ( | |
46 | + | if (if (if (if (!(isDefined(getString(tx.sender, paymentTxId)))) | |
48 | 47 | then (payment.recipient == tx.sender) | |
49 | 48 | else false) | |
50 | 49 | then (payment.amount > fee) | |
51 | - | else false) | |
52 | - | then (payment.assetId == betAsset) | |
53 | 50 | else false) | |
54 | 51 | then (extract(getInteger(dt.data, "totalMoney")) == (totalMoney + (payment.amount - fee))) | |
55 | 52 | else false) |
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 | - | let betAsset = base58'WAVES' | |
8 | 7 | let decimals = 2 | |
9 | 8 | let multiply = 100 | |
10 | 9 | let totalMoney = if (isDefined(getInteger(tx.sender, "totalMoney"))) | |
11 | 10 | then extract(getInteger(tx.sender, "totalMoney")) | |
12 | 11 | else 0 | |
13 | 12 | match tx { | |
14 | 13 | case dt: DataTransaction => | |
15 | 14 | if (if ((maxTimeToBet >= tx.timestamp)) | |
16 | 15 | then isDefined(getString(dt.data, "bet_s")) | |
17 | 16 | else false) | |
18 | 17 | then { | |
19 | 18 | let paymentTxId = extract(getString(dt.data, "paymentTxId")) | |
20 | 19 | let paymentTx = transactionById(fromBase58String(paymentTxId)) | |
21 | 20 | let betGroup = extract(getString(dt.data, "bet_s")) | |
22 | 21 | let dtBetSummary = extract(getInteger(dt.data, betGroup)) | |
23 | 22 | let betSummary = if (isDefined(getInteger(tx.sender, betGroup))) | |
24 | 23 | then extract(getInteger(tx.sender, betGroup)) | |
25 | 24 | else 0 | |
26 | 25 | let vBet = extract(getInteger(dt.data, "bet_v")) | |
27 | 26 | let iBet = extract(getInteger(dt.data, "bet_i")) | |
28 | 27 | let dBet = extract(getInteger(dt.data, "bet_d")) | |
29 | 28 | let c = (decimals - size(toString(dBet))) | |
30 | 29 | let tBet = (((toString(iBet) + ".") + (if ((c == 1)) | |
31 | 30 | then "0" | |
32 | 31 | else if ((c == 2)) | |
33 | 32 | then "00" | |
34 | 33 | else if ((c == 3)) | |
35 | 34 | then "000" | |
36 | 35 | else if ((c == 4)) | |
37 | 36 | then "0000" | |
38 | 37 | else if ((c == 5)) | |
39 | 38 | then "00000" | |
40 | 39 | else if ((c == 6)) | |
41 | 40 | then "000000" | |
42 | 41 | else if ((c == 7)) | |
43 | 42 | then "0000000" | |
44 | 43 | else "")) + toString(dBet)) | |
45 | 44 | match paymentTx { | |
46 | 45 | case payment: TransferTransaction => | |
47 | - | if (if (if (if ( | |
46 | + | if (if (if (if (!(isDefined(getString(tx.sender, paymentTxId)))) | |
48 | 47 | then (payment.recipient == tx.sender) | |
49 | 48 | else false) | |
50 | 49 | then (payment.amount > fee) | |
51 | - | else false) | |
52 | - | then (payment.assetId == betAsset) | |
53 | 50 | else false) | |
54 | 51 | then (extract(getInteger(dt.data, "totalMoney")) == (totalMoney + (payment.amount - fee))) | |
55 | 52 | else false) | |
56 | 53 | then (vBet == ((iBet * multiply) + dBet)) | |
57 | 54 | else false | |
58 | 55 | case _ => | |
59 | 56 | false | |
60 | 57 | } | |
61 | 58 | } | |
62 | 59 | else if (if ((tx.timestamp > maxTimeToTrading)) | |
63 | 60 | then !(isDefined(getString(tx.sender, "tradingTxId"))) | |
64 | 61 | else false) | |
65 | 62 | then { | |
66 | 63 | let tradingTxId = extract(getString(dt.data, "tradingTxId")) | |
67 | 64 | let tradingTx = transactionById(fromBase58String(tradingTxId)) | |
68 | 65 | let priceWin = extract(getInteger(dt.data, "priceWin")) | |
69 | 66 | match tradingTx { | |
70 | 67 | case exchange: ExchangeTransaction => | |
71 | 68 | if (if ((priceWin == exchange.price)) | |
72 | 69 | then (exchange.timestamp >= minTimeToTrading) | |
73 | 70 | else false) | |
74 | 71 | then (maxTimeToTrading >= exchange.timestamp) | |
75 | 72 | else false | |
76 | 73 | case _ => | |
77 | 74 | false | |
78 | 75 | } | |
79 | 76 | } | |
80 | 77 | else if (isDefined(getString(tx.sender, "tradingTxId"))) | |
81 | 78 | then true | |
82 | 79 | else false | |
83 | 80 | case _ => | |
84 | 81 | true | |
85 | 82 | } |
github/deemru/w8io/169f3d6 40.91 ms ◑