tx · F4xVwvGv17BEYfqsRggS9xSWBFLvH5SV3myQUBunSvW9

3MxorpV6jKdNhrzHSujnjVXu7fr8PCHhMwi:  -0.01400000 Waves

2020.04.15 05:26 [954916] smart account 3MxorpV6jKdNhrzHSujnjVXu7fr8PCHhMwi > SELF 0.00000000 Waves

{ "type": 13, "id": "F4xVwvGv17BEYfqsRggS9xSWBFLvH5SV3myQUBunSvW9", "fee": 1400000, "feeAssetId": null, "timestamp": 1586917776944, "version": 1, "sender": "3MxorpV6jKdNhrzHSujnjVXu7fr8PCHhMwi", "senderPublicKey": "BZT5fzv8ZeHVn8xAGZVXZHUvoAkdRNCbtEuBn3pCuXEH", "proofs": [ "31L7fE2z7DraSMRFn56yL5pB9N69oRQ7sURQdkcxs1S1jLV3L614A4gqn2dkGW9xB5TNWymtLY1RM44d5U4cssT2" ], "script": "base64:AAIDAAAAAAAAAAkIARIAEgMKAQgAAAAJAAAAAA5vd25lclB1YmxpY0tleQEAAAAgnOTxzRGlQL/gVO1uf4r6ecWijHA9iBu9xK1V+iHbiGoAAAAADFJhbmRvbWl6ZUtleQkAAlkAAAABAgAAACxCWlQ1Znp2OFplSFZuOHhBR1pWWFpIVXZvQWtkUk5DYnRFdUJuM3BDdVhFSAAAAAAKZGVwbG95SW5mbwIAAAAkYWRkZWQgZGF0YSBmdW5jdGlvbmFsaXR5ICh0ZXN0cGhhc2UpAAAAAAVhc3NldAEAAAAgVXxs3EW2jBqsaGzTqhCj5Mw9QqAAJNYM2NtCErS5DvoBAAAAC2VuY3J5cHREYXRhAAAAAgAAAAdtZXNzYWdlAAAABHBLZXkEAAAABm91dHB1dAIAAAAkcnNhVmVyaWZ5KFNoYTI1NiAsbWVzc2FnZSxwS2V5LHBLZXkpBQAAAAZvdXRwdXQBAAAACXNlc3Npb25JZAAAAAAEAAAAA2dpZAkABLEAAAABCQAB9wAAAAEJAAGaAAAAAQgFAAAACWxhc3RCbG9jawAAAAZoZWlnaHQFAAAAA2dpZAEAAAAHZ2V0R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XRhRW50cnkAAAACBQAAAAR0eElkBQAAAAttZXNzYWdlRGF0YQUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAKY29pbkFtb3VudAUAAAAFYXNzZXQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAElJlaXNzdWVUcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAEElzc3VlVHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAOb3duZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAABZAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADm93bmVyUHVibGljS2V5B5sj26A=", "chainId": 84, "height": 954916, "spentComplexity": 0 } View: original | compacted Prev: 6uwjNSfvf8vv3GSAuZxhDsaSfbaoNmV4NoKXBYt2ZYBx Next: 9z689B4zqpZAcG8etkZSKGmrwumgfkkTxNRmgL2yiqcE Diff:
OldNewDifferences
7676 then throw("Prices are 1, 2, and 4 waves. Other amounts will be rejected by the smart contract")
7777 else {
7878 let returnTransactionList = match getString(this, (callerAccount + ":transactions")) {
79- case c: String =>
80- ((transactionId + ";") + c)
8179 case _ =>
8280 transactionId
8381 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let ownerPublicKey = base58'BZT5fzv8ZeHVn8xAGZVXZHUvoAkdRNCbtEuBn3pCuXEH'
55
66 let RandomizeKey = fromBase58String("BZT5fzv8ZeHVn8xAGZVXZHUvoAkdRNCbtEuBn3pCuXEH")
77
88 let deployInfo = "added data functionality (testphase)"
99
1010 let asset = base58'6khhQRn6E7dsLqxnkGHnEKoZZJv9U7bhadzprWvjAi6m'
1111
1212 func encryptData (message,pKey) = {
1313 let output = "rsaVerify(Sha256 ,message,pKey,pKey)"
1414 output
1515 }
1616
1717
1818 func sessionId () = {
1919 let gid = toInt(sha256(toBytes(lastBlock.height)))
2020 gid
2121 }
2222
2323
2424 func getData (dataKey) = {
2525 let dataPackage = getStringValue(this, dataKey)
2626 dataPackage
2727 }
2828
2929
3030 func updateUserTXrecord (callerAddress,newTXid) = {
3131 let currentRecord = getData(callerAddress)
3232 let newRecord = ((newTXid + ";") + currentRecord)
3333 let response = WriteSet([DataEntry(callerAddress, newRecord)])
3434 response
3535 }
3636
3737
3838 func updateField (dataList,listSeparator,fieldIndex,newFieldData) = {
3939 let numFields = size(dataList)
4040 if ((numFields >= fieldIndex))
4141 then if ((fieldIndex == 0))
4242 then {
4343 let field0 = newFieldData
4444 let field1 = extract(split(dataList, ";")[1])
4545 let field2 = extract(split(dataList, ";")[2])
4646 let field3 = extract(split(dataList, ";")[3])
4747 let field4 = extract(split(dataList, ";")[4])
4848 let field5 = extract(split(dataList, ";")[5])
4949 let field6 = extract(split(dataList, ";")[6])
5050 let field7 = extract(split(dataList, ";")[7])
5151 let returnString = ((((((((((((((field0 + listSeparator) + field1) + listSeparator) + field2) + listSeparator) + field3) + listSeparator) + field4) + listSeparator) + field5) + listSeparator) + field6) + listSeparator) + field7)
5252 returnString
5353 }
5454 else throw("error creating datastring")
5555 else throw(("field index out of range. Number of fields for string is: " + toString(numFields)))
5656 }
5757
5858
5959 @Callable(i)
6060 func initiate () = {
6161 let transactionId = toBase58String(i.transactionId)
6262 let paid = extract(i.payment)
6363 let message = "default message for now"
6464 let callerAccount = toBase58String(extract(i.callerPublicKey))
6565 let callerAddress = toBase58String(extract(i.caller.bytes))
6666 let callerTxId = i.transactionId
6767 let sizing = if ((paid.amount == 100000000))
6868 then "S"
6969 else if ((paid.amount == 200000000))
7070 then "M"
7171 else if ((paid.amount == 400000000))
7272 then "L"
7373 else "error"
7474 let messageData = (((((((("SUBMITTED" + ";") + toBase58String(extract(i.caller.bytes))) + ";") + toString(paid.amount)) + ";") + toString(height)) + ";") + sizing)
7575 if ((sizing == "error"))
7676 then throw("Prices are 1, 2, and 4 waves. Other amounts will be rejected by the smart contract")
7777 else {
7878 let returnTransactionList = match getString(this, (callerAccount + ":transactions")) {
79- case c: String =>
80- ((transactionId + ";") + c)
8179 case _ =>
8280 transactionId
8381 }
8482 WriteSet([DataEntry(transactionId, messageData), DataEntry((callerAccount + ":transactions"), returnTransactionList)])
8583 }
8684 }
8785
8886
8987
9088 @Callable(i)
9189 func finalize (txId) = if ((i.callerPublicKey != ownerPublicKey))
9290 then throw("Only owner can call finalize function")
9391 else {
9492 let coinData = getData(txId)
9593 let coinAmount = parseIntValue(extract(split(coinData, ";")[8]))
9694 let statusField = parseIntValue(extract(split(coinData, ";")[0]))
9795 let messageData = updateField(coinData, ";", 0, "COMPLETED")
9896 ScriptResult(WriteSet([DataEntry(txId, messageData)]), TransferSet([ScriptTransfer(i.caller, coinAmount, asset)]))
9997 }
10098
10199
102100 @Verifier(tx)
103101 func verify () = match tx {
104102 case d: TransferTransaction|ReissueTransaction|IssueTransaction|SetScriptTransaction =>
105103 sigVerify(tx.bodyBytes, tx.proofs[0], ownerPublicKey)
106104 case d: DataTransaction =>
107105 sigVerify(tx.bodyBytes, tx.proofs[0], ownerPublicKey)
108106 case _ =>
109107 false
110108 }
111109

github/deemru/w8io/169f3d6 
28.07 ms