tx · 952d1Dr5ABqLro5HxPFCAyCbEEkTRwa87Udky7un9dnh

3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu:  -0.01400000 Waves

2019.01.30 22:00 [473394] smart account 3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu > SELF 0.00000000 Waves

{ "type": 13, "id": "952d1Dr5ABqLro5HxPFCAyCbEEkTRwa87Udky7un9dnh", "fee": 1400000, "feeAssetId": null, "timestamp": 1548874889955, "version": 1, "sender": "3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu", "senderPublicKey": "F3DbYSfYZz6arcD6Mst8HdWScxTeWvTvatC7jp4DGryX", "proofs": [ "4GL7bw1SBJeVNxfFyFNRugVK2g1Acref1Lk6P85xXvcPB5F5Whe9i3ECcm8HTSJkzFxZJbxYDjfVZjkMVgqVGLxF" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABm9yYWNsZQkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTkN6YVlUTkRHdFI4emY5eWZjcWVQRmpDcUZ4OVM1emhzNAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAACndpdGhkcmF3VHgFAAAAByRtYXRjaDAEAAAABHR4SWQJAQAAAAdleHRyYWN0AAAAAQkABB0AAAACBQAAAAJtZQkAAlgAAAABCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEEAAAAByRtYXRjaDEJAAPoAAAAAQkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAABAwkAAAEAAAACBQAAAAckbWF0Y2gxAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAlwYXltZW50VHgFAAAAByRtYXRjaDEEAAAAEmlzUGF5bWVudFRvb2tQbGFjZQMJAAAAA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EAAAAEmlzRHR4U2lnbmVkQnlQYXllcgkAAfQAAAADCAUAAAADZHR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAADZHR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAACXBheW1lbnRUeAAAAA9zZW5kZXJQdWJsaWNLZXkDAwkBAAAAASEAAAABBQAAABlpc1BheW1lbnRBbHJlYWR5TWVudGlvbmVkBgkBAAAAASEAAAABBQAAAA9pc1dpdGhkcmF3RXhpc3QFAAAAEmlzRHR4U2lnbmVkQnlQYXllcgcHCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleVpuZyU=", "chainId": 84, "height": 473394, "spentComplexity": 0 } View: original | compacted Prev: 9F6wNow4L6tfFU3sK2Gsj4z7mBbHQjLKumYG19dvK27t Next: 7z8647rmbK6jDoGBiVKQjeLqRGzht6vAD1naij1M7fxy Full:
OldNewDifferences
11 {-# STDLIB_VERSION 1 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
33 let me = tx.sender
44 let oracle = extract(addressFromString("3NCzaYTNDGtR8zf9yfcqePFjCqFx9S5zhs4"))
55 match tx {
66 case withdrawTx: TransferTransaction =>
77 let txId = extract(getString(me, toBase58String(tx.proofs[1])))
88 match transactionById(tx.proofs[1]) {
99 case paymentTx: TransferTransaction =>
1010 let isPaymentTookPlace = if ((txId == toBase58String(tx.id)))
1111 then sigVerify(tx.bodyBytes, tx.proofs[0], paymentTx.senderPublicKey)
1212 else false
1313 let keyLen = 19
1414 let att = paymentTx.attachment
1515 let key = take(att, keyLen)
1616 let type = drop(take(att, (keyLen + 1)), keyLen)
1717 let val = drop(take(att, (keyLen + 2)), (keyLen + 1))
1818 let valComplex = extract(getBinary(oracle, toBase58String(key)))
1919 let koeff = if ((type == drop(toBytes(0), 7)))
2020 then 35
2121 else if ((type == drop(toBytes(1), 7)))
2222 then 1
2323 else if ((type == drop(toBytes(2), 7)))
2424 then 1
2525 else if ((type == drop(toBytes(3), 7)))
2626 then 1
2727 else if ((type == drop(toBytes(4), 7)))
2828 then 2
2929 else if ((type == drop(toBytes(5), 7)))
3030 then 2
3131 else if ((type == drop(toBytes(6), 7)))
3232 then 2
3333 else 0
3434 let ver = take(valComplex, 1)
3535 let valReal = if ((type == drop(toBytes(0), 7)))
3636 then drop(take(valComplex, 2), 1)
3737 else if ((type == drop(toBytes(1), 7)))
3838 then drop(take(valComplex, 3), 2)
3939 else if ((type == drop(toBytes(2), 7)))
4040 then drop(take(valComplex, 4), 3)
4141 else if ((type == drop(toBytes(3), 7)))
4242 then drop(take(valComplex, 5), 4)
4343 else if ((type == drop(toBytes(4), 7)))
4444 then drop(take(valComplex, 6), 5)
4545 else if ((type == drop(toBytes(5), 7)))
4646 then drop(take(valComplex, 7), 5)
4747 else if ((type == drop(toBytes(6), 7)))
4848 then drop(take(valComplex, 8), 6)
4949 else toBytes(38)
5050 let isWin = if ((val == valReal))
5151 then (val != toBytes(38))
5252 else false
5353 let isAmountOk = (withdrawTx.amount == (paymentTx.amount * koeff))
5454 if (if (isPaymentTookPlace)
5555 then isWin
5656 else false)
5757 then isAmountOk
5858 else false
5959 case _ =>
6060 false
6161 }
6262 case dtx: DataTransaction =>
6363 let paymentTxIdStr = extract(dtx.data[0].key)
6464 let paymentTx = transactionById(fromBase58String(paymentTxIdStr))
6565 let isPaymentAlreadyMentioned = isDefined(getString(me, paymentTxIdStr))
6666 let withdrawTransactionId = fromBase58String(extract(getString(me, paymentTxIdStr)))
6767 let isWithdrawExist = isDefined(transactionById(withdrawTransactionId))
6868 match paymentTx {
6969 case paymentTx: TransferTransaction =>
7070 let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey)
7171 if (if (!(isPaymentAlreadyMentioned))
7272 then true
7373 else !(isWithdrawExist))
7474 then isDtxSignedByPayer
7575 else false
7676 case _ =>
7777 false
7878 }
7979 case _ =>
8080 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
8181 }

github/deemru/w8io/026f985 
21.18 ms