tx · 3V3by1xoZsgKpwxFzKaNmu6w2759VdxqmYDmoMW5LN8c

3MxorpV6jKdNhrzHSujnjVXu7fr8PCHhMwi:  -0.01400000 Waves

2019.11.05 01:41 [750759] smart account 3MxorpV6jKdNhrzHSujnjVXu7fr8PCHhMwi > SELF 0.00000000 Waves

{ "type": 13, "id": "3V3by1xoZsgKpwxFzKaNmu6w2759VdxqmYDmoMW5LN8c", "fee": 1400000, "feeAssetId": null, "timestamp": 1572907432056, "version": 1, "sender": "3MxorpV6jKdNhrzHSujnjVXu7fr8PCHhMwi", "senderPublicKey": "BZT5fzv8ZeHVn8xAGZVXZHUvoAkdRNCbtEuBn3pCuXEH", "proofs": [ "3MVMp3KWvePLVV4bKZFthURHRiwyPgASuMDWeqKztpifDHxEvWM9oFSKjkco4YfY2kGjqKG4PdLfWAureckUKYsu" ], "script": "base64:AAIDAAAAAAAAAAQIARIAAAAACQAAAAAOb3duZXJQdWJsaWNLZXkBAAAAIJzk8c0RpUC/4FTtbn+K+nnFooxwPYgbvcStVfoh24hqAAAAAAxSYW5kb21pemVLZXkJAAJZAAAAAQIAAAAsQlpUNWZ6djhaZUhWbjh4QUdaVlhaSFV2b0FrZFJOQ2J0RXVCbjNwQ3VYRUgAAAAACmRlcGxveUluZm8CAAAAJGFkZGVkIGRhdGEgZnVuY3Rpb25hbGl0eSAodGVzdHBoYXNlKQEAAAALZW5jcnlwdERhdGEAAAACAAAAB21lc3NhZ2UAAAAEcEtleQQAAAAGb3V0cHV0AgAAACRyc2FWZXJpZnkoU2hhMjU2ICxtZXNzYWdlLHBLZXkscEtleSkFAAAABm91dHB1dAEAAAAJc2Vzc2lvbklkAAAAAAQAAAADZ2lkCQAEsQAAAAEJAAH3AAAAAQkAAZoAAAABCAUAAAAJbGFzdEJsb2NrAAAABmhlaWdodAUAAAADZ2lkAQAAAAlyYW5kb21pemUAAAACAAAAB3JzYVNpZ24AAAALdGhpc1Nlc3Npb24EAAAABmdhbWVJZAUAAAALdGhpc1Nlc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ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAElJlaXNzdWVUcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAEElzc3VlVHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAOb3duZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAABZAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADm93bmVyUHVibGljS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwBgdCUW+D", "chainId": 84, "height": 750759, "spentComplexity": 0 } View: original | compacted Prev: DLaSBB12NKsc9TiRgJVXdW4VUoDrsoqYEqzwyoKiFjK8 Next: HfsuBxwEwcqAbd26XgsgHLCqhuxCy1547RLSCuUTtG8n Diff:
OldNewDifferences
7272 then throw("Prices are 1, 2, and 4 waves. Other amounts will be rejected by the smart contract")
7373 else {
7474 let tokenAmount = (paid.amount * 3)
75- ScriptResult(WriteSet([DataEntry(gameId, messageData)]), TransferSet([ScriptTransfer(i.caller, tokenAmount, asset)]))
75+ WriteSet([DataEntry(gameId, messageData)])
7676 }
7777 }
7878
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 func encryptData (message,pKey) = {
1111 let output = "rsaVerify(Sha256 ,message,pKey,pKey)"
1212 output
1313 }
1414
1515
1616 func sessionId () = {
1717 let gid = toInt(sha256(toBytes(lastBlock.height)))
1818 gid
1919 }
2020
2121
2222 func randomize (rsaSign,thisSession) = {
2323 let gameId = thisSession
2424 let rsaSigValid = sigVerify(toBytes(gameId), toBytes(rsaSign), RandomizeKey)
2525 if (rsaSigValid)
2626 then {
2727 let rand = (toInt(sha256(toBytes(rsaSign))) % 6)
2828 if ((0 > rand))
2929 then ((-1 * rand) + 1)
3030 else (rand + 1)
3131 }
3232 else throw("Invalid RSA signature")
3333 }
3434
3535
3636 func listParser (dataString,separator) = {
3737 let choppedlist = "x"
3838 choppedlist
3939 }
4040
4141
4242 func listBuilder (receiver,amount,txid) = {
4343 let compiledList = "placeholder"
4444 compiledList
4545 }
4646
4747
4848 func getData (dataKey) = {
4949 let dataPackage = getStringValue(this, dataKey)
5050 dataPackage
5151 }
5252
5353
5454 @Callable(i)
5555 func initiate () = {
5656 let gameId = toBase58String(i.transactionId)
5757 let paid = extract(i.payment)
5858 let message = "default message for now"
5959 let callerAccount = toBase58String(extract(i.callerPublicKey))
6060 let callerAddress = toBase58String(extract(i.caller.bytes))
6161 let callerTxId = i.transactionId
6262 let asset = base58'6khhQRn6E7dsLqxnkGHnEKoZZJv9U7bhadzprWvjAi6m'
6363 let sizing = if ((paid.amount == 100000000))
6464 then "S"
6565 else if ((paid.amount == 200000000))
6666 then "M"
6767 else if ((paid.amount == 400000000))
6868 then "L"
6969 else "error"
7070 let messageData = (((((((("SUBMITTED" + ";") + toBase58String(extract(i.callerPublicKey))) + ";") + toString(paid.amount)) + ";") + toString(height)) + ";") + sizing)
7171 if ((sizing == "error"))
7272 then throw("Prices are 1, 2, and 4 waves. Other amounts will be rejected by the smart contract")
7373 else {
7474 let tokenAmount = (paid.amount * 3)
75- ScriptResult(WriteSet([DataEntry(gameId, messageData)]), TransferSet([ScriptTransfer(i.caller, tokenAmount, asset)]))
75+ WriteSet([DataEntry(gameId, messageData)])
7676 }
7777 }
7878
7979
8080 @Verifier(tx)
8181 func verify () = match tx {
8282 case d: ReissueTransaction|IssueTransaction|SetScriptTransaction =>
8383 sigVerify(tx.bodyBytes, tx.proofs[0], ownerPublicKey)
8484 case d: DataTransaction =>
8585 sigVerify(tx.bodyBytes, tx.proofs[0], ownerPublicKey)
8686 case d: TransferTransaction =>
8787 true
8888 case _ =>
8989 false
9090 }
9191

github/deemru/w8io/169f3d6 
33.58 ms