tx · Dzei18m7jUM9ziF6rZoZs1rTbjXWPx3W79C5qHSse9sR

3MtkCfhJSAZ6P2bsBM2DdpurZ7S1vepUvrc:  -0.01400000 Waves

2019.09.27 19:12 [695048] smart account 3MtkCfhJSAZ6P2bsBM2DdpurZ7S1vepUvrc > SELF 0.00000000 Waves

{ "type": 13, "id": "Dzei18m7jUM9ziF6rZoZs1rTbjXWPx3W79C5qHSse9sR", "fee": 1400000, "feeAssetId": null, "timestamp": 1569600773863, "version": 1, "sender": "3MtkCfhJSAZ6P2bsBM2DdpurZ7S1vepUvrc", "senderPublicKey": "5M8TjFdQ2hPL23uw5RrCvaES2qU4NpCtn68zqTyiYm2E", "proofs": [ "65b6HisqRF7kAVDufjEGJt25X5zetYHSeEFS4rrPc5sawgGDgPuNPNnkzY5vh1khwcEuCeVShKL8gwiFwe6rMqYn" ], "script": "base64:AAIDAAAAAAAAAAAAAAAGAAAAAAdXQVZFTEVUCQAAaAAAAAIJAABoAAAAAgAAAAAAAAAAZAAAAAAAAAAD6AAAAAAAAAAD6AAAAAAKQ09NTUlTU0lPTgkAAGkAAAACCQAAaAAAAAIAAAAAAAAAAAUFAAAAB1dBVkVMRVQAAAAAAAAAA+gAAAAAB3Rva2VuSUQCAAAALDR5c1plVXZ0QnJTVmdKOXYzTWZoM2JXRDJXTlBkNWtRODI3cGlvZ3dwTXg0AAAAAAlwcml6ZVBvb2wJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQIAAAAjM01ycXpYZlFXVHJocko2R0JhbVN3S0tEejMxZ2RYTGdDYXIAAAAAB3Byb2plY3QJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQIAAAAjM041THk0Ymt2ZzV1RmpmOUJwZUFzaWs4THEyc2ZIWWMySFUAAAAADXBsYXllclN0b3JhZ2UJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQIAAAAjM014WmFXSm1keXBqdj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AAAAEdW5pdAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAdwcm9qZWN0BQAAAAxoYWxmT2ZEb25hdGUFAAAABHVuaXQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAARZ2FtZVdhbGxldEFkZHJlc3MAAAAAAAABhqAFAAAABHVuaXQFAAAAA25pbAAAAAAsZiiu", "chainId": 84, "height": 695048, "spentComplexity": 0 } View: original | compacted Prev: 3i6NAMFjn1pdukWv4zXM2zyecVDQLSUgfgrQ7BGxV9tU Next: 9Z7dGxMS2FJsgaLtjLv1uAno9ZVFMU4LBpAjiTViNrXR Diff:
OldNewDifferences
1818 let txId = toBase58String(i.transactionId)
1919 let pmt = extract(i.payment)
2020 let paymentAmt = pmt.amount
21+ let halfOfDonate = ((paymentAmt / 2) * WAVELET)
2122 let paymentSum = ((paymentAmt - COMMISSION) / WAVELET)
22- let halfOfDonate = ((paymentSum / 2) * WAVELET)
2323 let isExistPackage = isDefined(getStringValue(this, packageName))
2424 if (!(isExistPackage))
2525 then throw("This package doesn't exist anymore")
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 prizePool = addressFromStringValue("3MrqzXfQWTrhrJ6GBamSwKKDz31gdXLgCar")
1111
1212 let project = addressFromStringValue("3N5Ly4bkvg5uFjf9BpeAsik8Lq2sfHYc2HU")
1313
1414 let playerStorage = addressFromStringValue("3MxZaWJmdypjv8MMv8RPTtDq4GNMPdCisJP")
1515
1616 @Callable(i)
1717 func buy (playerID,packageName) = {
1818 let txId = toBase58String(i.transactionId)
1919 let pmt = extract(i.payment)
2020 let paymentAmt = pmt.amount
21+ let halfOfDonate = ((paymentAmt / 2) * WAVELET)
2122 let paymentSum = ((paymentAmt - COMMISSION) / WAVELET)
22- let halfOfDonate = ((paymentSum / 2) * WAVELET)
2323 let isExistPackage = isDefined(getStringValue(this, packageName))
2424 if (!(isExistPackage))
2525 then throw("This package doesn't exist anymore")
2626 else {
2727 let packageNameData = split(packageName, "_")
2828 let tokensAmount = parseIntValue(packageNameData[0])
2929 let actualPrice = parseIntValue(getStringValue(this, packageName))
3030 if ((paymentSum != actualPrice))
3131 then throw(((("Donation amount should be " + toString(actualPrice)) + " Waves, but we got ") + toString(paymentSum)))
3232 else {
3333 let betNotInWaves = isDefined(pmt.assetId)
3434 let feeNotInWaves = isDefined(pmt.assetId)
3535 let playerPubKey58 = toBase58String(i.callerPublicKey)
3636 let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58))
3737 if (betNotInWaves)
3838 then throw("Bet amount must be in Waves")
3939 else if (feeNotInWaves)
4040 then throw("Transaction's fee must be in Waves")
4141 else {
4242 let playerAddressStr = toString(playerAddress)
4343 let paymentSumStr = toString(paymentSum)
4444 let gameWalletStr = getStringValue(playerStorage, (playerID + "_address"))
4545 let gameWalletAddress = addressFromStringValue(gameWalletStr)
4646 TransferSet([ScriptTransfer(prizePool, halfOfDonate, unit), ScriptTransfer(project, halfOfDonate, unit), ScriptTransfer(gameWalletAddress, 100000, unit)])
4747 }
4848 }
4949 }
5050 }
5151
5252

github/deemru/w8io/026f985 
19.93 ms