tx · GdQs2F78qa8nx3YsWgPKziXs88jF6Y2F5xX7mFp8sagS 3N5ezXT9QVpBcxseKRkqbLdTRSUkbMJLzbD: -0.01400000 Waves 2019.01.29 17:20 [471643] smart account 3N5ezXT9QVpBcxseKRkqbLdTRSUkbMJLzbD > SELF 0.00000000 Waves
{ "type": 13, "id": "GdQs2F78qa8nx3YsWgPKziXs88jF6Y2F5xX7mFp8sagS", "fee": 1400000, "feeAssetId": null, "timestamp": 1548771595697, "version": 1, "sender": "3N5ezXT9QVpBcxseKRkqbLdTRSUkbMJLzbD", "senderPublicKey": "HMMwXJWPUWM7VKP5hJaoazWJiLMZZSta2F9AaWkUk1FX", "proofs": [], "script": "base64:AQQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAAnR0BQAAAAckbWF0Y2gwBAAAAA9yZWNpcGllbnRTdHJpbmcJAAJYAAAAAQgJAAQkAAAAAQgFAAAAAnR0AAAACXJlY2lwaWVudAAAAAVieXRlcwQAAAAEZ2FtZQkBAAAAB2V4dHJhY3QAAAABCQAEHQAAAAIIBQAAAAJ0dAAAAAZzZW5kZXIFAAAAD3JlY2lwaWVudFN0cmluZwQAAAAGd2lubmVyCQEAAAAHZXh0cmFjdAAAAAEJAAQdAAAAAggFAAAAAnR0AAAABnNlbmRlcgkAASwAAAACBQAAAARnYW1lAgAAAAdfd2lubmVyBAAAAAl3aW5BbW91bnQJAQAAAAdleHRyYWN0AAAAAQkABBoAAAACCAUAAAACdHQAAAAGc2VuZGVyCQABLAAAAAIFAAAABGdhbWUCAAAACl93aW5BbW91bnQDCQAAAAAAAAIIBQAAAAJ0dAAAAAZhbW91bnQFAAAACXdpbkFtb3VudAkAAAAAAAACBQAAAA9yZWNpcGllbnRTdHJpbmcFAAAABndpbm5lcgcDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAACZHQF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", "chainId": 84, "height": 471643, "spentComplexity": 0 } View: original | compacted Prev: FcbqZpeNLWmKxPiRtiHeRYRtfHGR76TMcFfz4zPY6HH8 Next: 3feUYkcu8ZtpRiK4BdvoKEcxyQGDHiq6cwCGTFCJAgew Diff:
Old | New | Differences | |
---|---|---|---|
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | match tx { | |
4 | 4 | case tt: TransferTransaction => | |
5 | - | let aa = "qwe" | |
6 | - | let rr = toBase58String(addressFromRecipient(tt.recipient).bytes) | |
7 | - | throw(rr) | |
5 | + | let recipientString = toBase58String(addressFromRecipient(tt.recipient).bytes) | |
6 | + | let game = extract(getString(tt.sender, recipientString)) | |
7 | + | let winner = extract(getString(tt.sender, (game + "_winner"))) | |
8 | + | let winAmount = extract(getInteger(tt.sender, (game + "_winAmount"))) | |
9 | + | if ((tt.amount == winAmount)) | |
10 | + | then (recipientString == winner) | |
11 | + | else false | |
8 | 12 | case dt: DataTransaction => | |
9 | 13 | let game = extract(getString(dt.data, "hash")) | |
10 | 14 | let betAmount = extract(getInteger(dt.data, (game + "_amount"))) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 1 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | match tx { | |
4 | 4 | case tt: TransferTransaction => | |
5 | - | let aa = "qwe" | |
6 | - | let rr = toBase58String(addressFromRecipient(tt.recipient).bytes) | |
7 | - | throw(rr) | |
5 | + | let recipientString = toBase58String(addressFromRecipient(tt.recipient).bytes) | |
6 | + | let game = extract(getString(tt.sender, recipientString)) | |
7 | + | let winner = extract(getString(tt.sender, (game + "_winner"))) | |
8 | + | let winAmount = extract(getInteger(tt.sender, (game + "_winAmount"))) | |
9 | + | if ((tt.amount == winAmount)) | |
10 | + | then (recipientString == winner) | |
11 | + | else false | |
8 | 12 | case dt: DataTransaction => | |
9 | 13 | let game = extract(getString(dt.data, "hash")) | |
10 | 14 | let betAmount = extract(getInteger(dt.data, (game + "_amount"))) | |
11 | 15 | let player1TxId = extract(getString(dt.data, (game + "_tx1"))) | |
12 | 16 | let player1Tx = transactionById(fromBase58String(player1TxId)) | |
13 | 17 | match player1Tx { | |
14 | 18 | case p1t: TransferTransaction => | |
15 | 19 | let player1Ok = (p1t.amount == betAmount) | |
16 | 20 | let player2TxId = extract(getString(dt.data, (game + "_tx2"))) | |
17 | 21 | let player2Tx = transactionById(fromBase58String(player2TxId)) | |
18 | 22 | match player2Tx { | |
19 | 23 | case p2t: TransferTransaction => | |
20 | 24 | let player2Ok = (p2t.amount == betAmount) | |
21 | 25 | if (player1Ok) | |
22 | 26 | then player2Ok | |
23 | 27 | else false | |
24 | 28 | case _ => | |
25 | 29 | false | |
26 | 30 | } | |
27 | 31 | case _ => | |
28 | 32 | false | |
29 | 33 | } | |
30 | 34 | case st: SetScriptTransaction => | |
31 | 35 | true | |
32 | 36 | case _ => | |
33 | 37 | false | |
34 | 38 | } |
github/deemru/w8io/026f985 20.80 ms ◑