tx · 75Uxeg7w2JEiCfqKtCSKMj7Mm33CNhc83w6BBPtRHN7F

3Mt5BW4KVsvfxGUYuDqcfDMeoacc5GPn179:  -0.01400000 Waves

2019.03.10 20:52 [530305] smart account 3Mt5BW4KVsvfxGUYuDqcfDMeoacc5GPn179 > SELF 0.00000000 Waves

{ "type": 13, "id": "75Uxeg7w2JEiCfqKtCSKMj7Mm33CNhc83w6BBPtRHN7F", "fee": 1400000, "feeAssetId": null, "timestamp": 1552240412145, "version": 1, "sender": "3Mt5BW4KVsvfxGUYuDqcfDMeoacc5GPn179", "senderPublicKey": "F7KHa5J2ja7H22YreD3YJ8rBEFcvpa3DvQhFG4ZUXk8P", "proofs": [ "3hPh4DDg8XnTWWoPqjdbcCS8aDt1wcHz3RbRJSmAE8o9GEcCETipwUwbMBhcv9HfEsM7KMiKCFbgH97v82bQMNLu" ], "script": "base64:AQQAAAAGYXV0aG9yAgAAABVNYURhTWEgTGFicyBAZGFpZGFsb3MEAAAACG9uZVdhdmVzAAAAAAAF9eEABAAAAAtwYWllZEFtb3VudAkAAGgAAAACAAAAAAAAAAABBQAAAAhvbmVXYXZlcwQAAAAKcGFpZWRUeEZlZQkAAGkAAAACBQAAAAhvbmVXYXZlcwAAAAAAAAAAZAQAAAAJZGF0YVR4RmVlCQAAaQAAAAIFAAAACG9uZVdhdmVzAAAAAAAAAABkBAAAAAhzdGFydFBvcwAAAAAAAAAAAAQAAAAGZW5kUG9zAAAAAAAAAAAYBAAAABVhZGRyZXNzVG9QYXlQdWJsaWNLZXkBAAAAII59m1WbITiydrSsh5p7DTg06jWuC97IwDX0JxhY8UwtBAAAAAxhZGRyZXNzVG9QYXkJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEFAAAAFWFkZHJlc3NUb1BheVB1YmxpY0tleQQAAAALbWVQdWJsaWNLZXkBAAAAINGhxwvEds7cbetxn2NKu1NHYRJroK33xbBnxqlOHo5YBAAAAAJtZQkBAAAAFGFkZHJlc3NGcm9tUH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AAAAAAAAIIBQAAAAZkYXRhVHgAAAADZmVlBQAAAAlkYXRhVHhGZWUHBwa/Tpgl", "chainId": 84, "height": 530305, "spentComplexity": 0 } View: original | compacted Prev: AiZsM4bsmsM7VBYMGEJKutANHdCX17ZExoZZLdbbpgsc Next: 72yhPJhWLUmKLv4RsJpi57wC3yYu2JbVfmnQk5qsR4yH Diff:
OldNewDifferences
77 let dataTxFee = (oneWaves / 100)
88 let startPos = 0
99 let endPos = 24
10-let addressToPayPublicKey = base58'CDCQgNAFkShqxYv88NXZJBWjoNJ8Yd7x3rx7APvuWNsD'
10+let addressToPayPublicKey = base58'AbDyruBD8QqodWvMWRxAx8FhwRuf4cMFZu6SA1G4YwWU'
1111 let addressToPay = addressFromPublicKey(addressToPayPublicKey)
12-let mePublicKey = base58'7rmY9jh9rZCqHjaCPrvu8KFY27vM8775VqatNSgEgsqa'
12+let mePublicKey = base58'F7KHa5J2ja7H22YreD3YJ8rBEFcvpa3DvQhFG4ZUXk8P'
1313 let me = addressFromPublicKey(mePublicKey)
1414 match tx {
1515 case winTx: TransferTransaction =>
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 1 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
33 let author = "MaDaMa Labs @daidalos"
44 let oneWaves = 100000000
55 let paiedAmount = (1 * oneWaves)
66 let paiedTxFee = (oneWaves / 100)
77 let dataTxFee = (oneWaves / 100)
88 let startPos = 0
99 let endPos = 24
10-let addressToPayPublicKey = base58'CDCQgNAFkShqxYv88NXZJBWjoNJ8Yd7x3rx7APvuWNsD'
10+let addressToPayPublicKey = base58'AbDyruBD8QqodWvMWRxAx8FhwRuf4cMFZu6SA1G4YwWU'
1111 let addressToPay = addressFromPublicKey(addressToPayPublicKey)
12-let mePublicKey = base58'7rmY9jh9rZCqHjaCPrvu8KFY27vM8775VqatNSgEgsqa'
12+let mePublicKey = base58'F7KHa5J2ja7H22YreD3YJ8rBEFcvpa3DvQhFG4ZUXk8P'
1313 let me = addressFromPublicKey(mePublicKey)
1414 match tx {
1515 case winTx: TransferTransaction =>
1616 let hashAttachment = sha256(winTx.attachment)
1717 let untBytes = takeRightBytes(take(winTx.attachment, 2), 1)
1818 let decBytes = take(winTx.attachment, 1)
1919 let win = takeRightBytes(take(winTx.attachment, 4), 1)
2020 let untInt = if ((untBytes == toBytes("0")))
2121 then 0
2222 else if ((untBytes == toBytes("1")))
2323 then 1
2424 else if ((untBytes == toBytes("2")))
2525 then 2
2626 else if ((untBytes == toBytes("3")))
2727 then 3
2828 else if ((untBytes == toBytes("4")))
2929 then 4
3030 else if ((untBytes == toBytes("5")))
3131 then 5
3232 else if ((untBytes == toBytes("6")))
3333 then 6
3434 else if ((untBytes == toBytes("7")))
3535 then 7
3636 else if ((untBytes == toBytes("8")))
3737 then 8
3838 else if ((untBytes == toBytes("9")))
3939 then 9
4040 else 0
4141 let decInt = if ((decBytes == toBytes("0")))
4242 then 0
4343 else if ((decBytes == toBytes("1")))
4444 then 10
4545 else if ((decBytes == toBytes("2")))
4646 then 20
4747 else 0
4848 let pos = (decInt + untInt)
4949 let posString = if ((pos > 9))
5050 then toString(pos)
5151 else ("0" + toString(pos))
5252 let posHash = extract(getString(me, ("hash" + posString)))
5353 let paymentTxId = extract(getString(me, posString))
5454 let paymentTx = transactionById(fromBase58String(paymentTxId))
5555 match paymentTx {
5656 case paymentTx: TransferTransaction =>
5757 if (if ((hashAttachment == fromBase58String(posHash)))
5858 then (win == toBytes("1"))
5959 else false)
6060 then (winTx.sender == paymentTx.sender)
6161 else false
6262 case _ =>
6363 false
6464 }
6565 case dataTx: DataTransaction =>
6666 let insertPos = extract(getInteger(dataTx.data, "pos"))
6767 let validPos = if ((insertPos >= startPos))
6868 then (endPos >= insertPos)
6969 else false
7070 if (!(validPos))
7171 then throw("POS not valid")
7272 else {
7373 let insertPosString = if ((insertPos > 9))
7474 then toString(insertPos)
7575 else ("0" + toString(insertPos))
7676 let paymentTxId = extract(getString(dataTx.data, insertPosString))
7777 let satisfiesFormat = if (if (if (if ((size(dataTx.data) == 3))
7878 then isDefined(getInteger(dataTx.data, "pos"))
7979 else false)
8080 then isDefined(getString(dataTx.data, insertPosString))
8181 else false)
8282 then isDefined(getBoolean(dataTx.data, paymentTxId))
8383 else false)
8484 then (extract(getBoolean(dataTx.data, paymentTxId)) == true)
8585 else false
8686 if (!(satisfiesFormat))
8787 then throw("DATA FORMAT not valid")
8888 else {
8989 let posNotUsed = !(isDefined(getString(me, insertPosString)))
9090 if (!(posNotUsed))
9191 then throw("POS alredy used")
9292 else {
9393 let txIdNotUsed = !(isDefined(getBoolean(me, paymentTxId)))
9494 if (!(txIdNotUsed))
9595 then throw("TxId alredy used")
9696 else {
9797 let dataTransactionIsValid = if (if (if (satisfiesFormat)
9898 then validPos
9999 else false)
100100 then posNotUsed
101101 else false)
102102 then txIdNotUsed
103103 else false
104104 let paymentTx = transactionById(fromBase58String(paymentTxId))
105105 match paymentTx {
106106 case paymentTx: TransferTransaction =>
107107 if (if (if (if (if (dataTransactionIsValid)
108108 then (paymentTx.recipient == addressToPay)
109109 else false)
110110 then (paymentTx.amount >= (paiedAmount - paiedTxFee))
111111 else false)
112112 then !(isDefined(paymentTx.assetId))
113113 else false)
114114 then sigVerify(dataTx.bodyBytes, dataTx.proofs[0], paymentTx.senderPublicKey)
115115 else false)
116116 then (dataTx.fee == dataTxFee)
117117 else false
118118 case _ =>
119119 false
120120 }
121121 }
122122 }
123123 }
124124 }
125125 case _ =>
126126 true
127127 }

github/deemru/w8io/026f985 
32.39 ms