tx · fANYXGefpZZxfszJTVdXjxFiv7HkRrzvA6Aw3CTEL27
3Mpfd3hihdPKUHqWqC9KYjcM18BKw91VkKe: -0.01400000 Waves
2019.01.29 10:12 [471226] smart account 3Mpfd3hihdPKUHqWqC9KYjcM18BKw91VkKe > SELF 0.00000000 Waves
{
"type": 13,
"id": "fANYXGefpZZxfszJTVdXjxFiv7HkRrzvA6Aw3CTEL27",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1548746008500,
"version": 1,
"sender": "3Mpfd3hihdPKUHqWqC9KYjcM18BKw91VkKe",
"senderPublicKey": "4f1JNnYPBjnrCyRNwNpfg2zg6V34QG4EBF8a2o2yz9rg",
"proofs": [
"56EJJKT9gdz4ja2h3H9w1kt6uWJLwiijgWPGEESBVSqw2iu2Eg7cAPPCSTMN9HLZTCShtCQ79bNCqQ5sNsCL7edo"
],
"script": "base64:AQQAAAAMbWF4VGltZVRvQmV0AAAAAWinm5GoBAAAABBtaW5UaW1lVG9UcmFkaW5nAAAAAWiswe2oBAAAABBtYXhUaW1lVG9UcmFkaW5nAAAAAWiswtgIBAAAAANmZWUAAAAAAACYloAEAAAACGRlY2ltYWxzAAAAAAAAAAACBAAAAAhtdWx0aXBseQAAAAAAAAAAZAQAAAAKdG90YWxNb25leQAAAAAAAAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAACZHQFAAAAByRtYXRjaDADAwkAAGcAAAACBQAAAAxtYXhUaW1lVG9CZXQIBQAAAAJ0eAAAAAl0aW1lc3RhbXAJAQAAAAlpc0RlZmluZWQAAAABCQAEEwAAAAIIBQAAAAJkdAAAAARkYXRhAgAAAAViZXRfcwcEAAAAC3BheW1lbnRUeElkCQEAAAAHZXh0cmFjdAAAAAEJAAQTAAAAAggFAAAAAmR0AAAABGRhdGECAAAAC3BheW1lbnRUeElkBAAAAAlwYXltZW50VHgJAAPoAAAAAQkAAlkAAA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CQAAZwAAAAIFAAAAEG1heFRpbWVUb1RyYWRpbmcIBQAAAAhleGNoYW5nZQAAAAl0aW1lc3RhbXAHBwMJAQAAAAlpc0RlZmluZWQAAAABCQAEHQAAAAIIBQAAAAJ0eAAAAAZzZW5kZXICAAAAC3RyYWRpbmdUeElkBgcGapJCyA==",
"chainId": 84,
"height": 471226,
"spentComplexity": 0
}
View: original | compacted
Prev: GYTiJAxWcCdHUiz43vDvqQBW3AxHmbBWZEAyMZ6HRbsC
Next: AJYCTu1FSYnDCX2G4dTNugkeWgu4KAyY26oZdGp5vk78
Diff:
Old | New | | Differences |
---|
14 | 14 | | else false) |
---|
15 | 15 | | then { |
---|
16 | 16 | | let paymentTxId = extract(getString(dt.data, "paymentTxId")) |
---|
| 17 | + | let paymentTx = transactionById(fromBase58String(paymentTxId)) |
---|
| 18 | + | let betGroup = extract(getString(dt.data, "bet_s")) |
---|
| 19 | + | let dtBetSummary = extract(getInteger(dt.data, betGroup)) |
---|
| 20 | + | let betSummary = if (isDefined(getInteger(tx.sender, betGroup))) |
---|
| 21 | + | then extract(getInteger(tx.sender, betGroup)) |
---|
| 22 | + | else 0 |
---|
17 | 23 | | false |
---|
18 | 24 | | } |
---|
19 | 25 | | else if (if ((tx.timestamp > maxTimeToTrading)) |
---|
Full:
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 | + | let paymentTx = transactionById(fromBase58String(paymentTxId)) |
---|
| 18 | + | let betGroup = extract(getString(dt.data, "bet_s")) |
---|
| 19 | + | let dtBetSummary = extract(getInteger(dt.data, betGroup)) |
---|
| 20 | + | let betSummary = if (isDefined(getInteger(tx.sender, betGroup))) |
---|
| 21 | + | then extract(getInteger(tx.sender, betGroup)) |
---|
| 22 | + | else 0 |
---|
17 | 23 | | false |
---|
18 | 24 | | } |
---|
19 | 25 | | else if (if ((tx.timestamp > maxTimeToTrading)) |
---|
20 | 26 | | then !(isDefined(getString(tx.sender, "tradingTxId"))) |
---|
21 | 27 | | else false) |
---|
22 | 28 | | then { |
---|
23 | 29 | | let tradingTxId = extract(getString(dt.data, "tradingTxId")) |
---|
24 | 30 | | let tradingTx = transactionById(fromBase58String(tradingTxId)) |
---|
25 | 31 | | let priceWin = extract(getInteger(dt.data, "priceWin")) |
---|
26 | 32 | | match tradingTx { |
---|
27 | 33 | | case exchange: ExchangeTransaction => |
---|
28 | 34 | | if (if ((priceWin == exchange.price)) |
---|
29 | 35 | | then (exchange.timestamp >= minTimeToTrading) |
---|
30 | 36 | | else false) |
---|
31 | 37 | | then (maxTimeToTrading >= exchange.timestamp) |
---|
32 | 38 | | else false |
---|
33 | 39 | | case _ => |
---|
34 | 40 | | false |
---|
35 | 41 | | } |
---|
36 | 42 | | } |
---|
37 | 43 | | else if (isDefined(getString(tx.sender, "tradingTxId"))) |
---|
38 | 44 | | then true |
---|
39 | 45 | | else false |
---|
40 | 46 | | case _ => |
---|
41 | 47 | | true |
---|
42 | 48 | | } |
---|