tx · 8shKPk51a3hSL8gFEWf2hYdUxZmxYr3L5ma7joBq4Ea3

3MtkCfhJSAZ6P2bsBM2DdpurZ7S1vepUvrc:  -0.01400000 Waves

2019.09.27 17:49 [694957] smart account 3MtkCfhJSAZ6P2bsBM2DdpurZ7S1vepUvrc > SELF 0.00000000 Waves

{ "type": 13, "id": "8shKPk51a3hSL8gFEWf2hYdUxZmxYr3L5ma7joBq4Ea3", "fee": 1400000, "feeAssetId": null, "timestamp": 1569595748432, "version": 1, "sender": "3MtkCfhJSAZ6P2bsBM2DdpurZ7S1vepUvrc", "senderPublicKey": "5M8TjFdQ2hPL23uw5RrCvaES2qU4NpCtn68zqTyiYm2E", "proofs": [ "ARJmafXxUToaeVqejAdBz7P7DRm7bSp2tPwMvsdFfJxHMEyUi3AM96QuqWLeQK7gXUQ3JPEoVXV43J5AeVT5x2S" ], "script": "base64:AAIDAAAAAAAAAAAAAAAEAAAAAAdXQVZFTEVUCQAAaAAAAAIJAABoAAAAAgAAAAAAAAAAZAAAAAAAAAAD6AAAAAAAAAAD6AAAAAAKQ09NTUlTU0lPTgkAAGkAAAACCQAAaAAAAAIAAAAAAAAAAAUFAAAAB1dBVkVMRVQAAAAAAAAAA+gAAAAAB3Rva2VuSUQCAAAALDR5c1plVXZ0QnJTVmdKOXYzTWZoM2JXRDJXTlBkNWtRODI3cGlvZ3dwTXg0AAAAAA1wbGF5ZXJTdG9yYWdlAgAAACMzTXhaYVdKbWR5cGp2OE1NdjhSUFR0RHE0R05NUGRDaXNKUAAAAAEAAAABaQEAAAADYnV5AAAAAgAAAAhwbGF5ZXJJRAAAAAtwYWNrYWdlTmFtZQQAAAAEdHhJZAkAAlgAAAABCAUAAAABaQAAAA10cmFuc2FjdGlvbklkBAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAQAAAAKcGF5bWVudEFtdAgFAAAAA3BtdAAAAAZhbW91bnQEAAAACnBheW1lbnRTdW0JAABpAAAAAgkAA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AAAEJAAJZAAAAAQUAAAAOcGxheWVyUHViS2V5NTgDBQAAAA1iZXROb3RJbldhdmVzCQAAAgAAAAECAAAAG0JldCBhbW91bnQgbXVzdCBiZSBpbiBXYXZlcwMFAAAADWZlZU5vdEluV2F2ZXMJAAACAAAAAQIAAAAiVHJhbnNhY3Rpb24ncyBmZWUgbXVzdCBiZSBpbiBXYXZlcwQAAAAQcGxheWVyQWRkcmVzc1N0cgkABCUAAAABBQAAAA1wbGF5ZXJBZGRyZXNzBAAAAA1wYXltZW50U3VtU3RyCQABpAAAAAEFAAAACnBheW1lbnRTdW0EAAAADWdhbWVXYWxsZXRTdHICAAAAIzNNdlB3dk1RUGNTRXVHTW9DSm82WDl6aThycjRhRWlXV3BGBAAAABFnYW1lV2FsbGV0QWRkcmVzcwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAA1nYW1lV2FsbGV0U3RyBAAAAA50b2tlbnNUcmFuc2ZlcgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAABFnYW1lV2FsbGV0QWRkcmVzcwUAAAAMdG9rZW5zQW1vdW50CQABmwAAAAEFAAAAB3Rva2VuSUQFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQUAAAAOdG9rZW5zVHJhbnNmZXIAAAAAqiflqQ==", "chainId": 84, "height": 694957, "spentComplexity": 0 } View: original | compacted Prev: GXzEJzvSn5CAgf1kQJWLYVrj1dwSmTinSgKUmKjeDJoH Next: 6zpEzMcg5bfMqJscYWANaV1rTDPEa2qTBuFyEmnBzwoV Diff:
OldNewDifferences
2323 let tokensAmount = parseIntValue(packageNameData[0])
2424 let actualPrice = parseIntValue(getStringValue(this, packageName))
2525 if ((paymentSum != actualPrice))
26- then throw((("Donation amount should be " + toString(actualPrice)) + " Waves"))
26+ then throw(((("Donation amount should be " + toString(actualPrice)) + " Waves, but we got ") + toString(paymentSum)))
2727 else {
2828 let betNotInWaves = isDefined(pmt.assetId)
2929 let feeNotInWaves = isDefined(pmt.assetId)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let WAVELET = ((100 * 1000) * 1000)
55
66 let COMMISSION = ((5 * WAVELET) / 1000)
77
88 let tokenID = "4ysZeUvtBrSVgJ9v3Mfh3bWD2WNPd5kQ827piogwpMx4"
99
1010 let playerStorage = "3MxZaWJmdypjv8MMv8RPTtDq4GNMPdCisJP"
1111
1212 @Callable(i)
1313 func buy (playerID,packageName) = {
1414 let txId = toBase58String(i.transactionId)
1515 let pmt = extract(i.payment)
1616 let paymentAmt = pmt.amount
1717 let paymentSum = ((paymentAmt - COMMISSION) / 1000000)
1818 let isExistPackage = isDefined(getStringValue(this, packageName))
1919 if (!(isExistPackage))
2020 then throw("This package doesn't exist anymore")
2121 else {
2222 let packageNameData = split(packageName, "_")
2323 let tokensAmount = parseIntValue(packageNameData[0])
2424 let actualPrice = parseIntValue(getStringValue(this, packageName))
2525 if ((paymentSum != actualPrice))
26- then throw((("Donation amount should be " + toString(actualPrice)) + " Waves"))
26+ then throw(((("Donation amount should be " + toString(actualPrice)) + " Waves, but we got ") + toString(paymentSum)))
2727 else {
2828 let betNotInWaves = isDefined(pmt.assetId)
2929 let feeNotInWaves = isDefined(pmt.assetId)
3030 let playerPubKey58 = toBase58String(i.callerPublicKey)
3131 let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58))
3232 if (betNotInWaves)
3333 then throw("Bet amount must be in Waves")
3434 else if (feeNotInWaves)
3535 then throw("Transaction's fee must be in Waves")
3636 else {
3737 let playerAddressStr = toString(playerAddress)
3838 let paymentSumStr = toString(paymentSum)
3939 let gameWalletStr = "3MvPwvMQPcSEuGMoCJo6X9zi8rr4aEiWWpF"
4040 let gameWalletAddress = addressFromStringValue(gameWalletStr)
4141 let tokensTransfer = [ScriptTransfer(gameWalletAddress, tokensAmount, toBytes(tokenID))]
4242 TransferSet(tokensTransfer)
4343 }
4444 }
4545 }
4646 }
4747
4848

github/deemru/w8io/026f985 
24.98 ms