tx · AUeDdNTZqdL75ToF4nMmz5beJxqhToBUJmUtvzMQZd9e

3N3mV2Baor8EY7CYQ7QgAm3tL8KruH1VpKA:  -0.01000000 Waves

2021.07.24 10:12 [1627402] smart account 3N3mV2Baor8EY7CYQ7QgAm3tL8KruH1VpKA > SELF 0.00000000 Waves

{ "type": 13, "id": "AUeDdNTZqdL75ToF4nMmz5beJxqhToBUJmUtvzMQZd9e", "fee": 1000000, "feeAssetId": null, "timestamp": 1627110844089, "version": 2, "chainId": 84, "sender": "3N3mV2Baor8EY7CYQ7QgAm3tL8KruH1VpKA", "senderPublicKey": "4P5V3b5K49wXNGa4M6SwDgHAMBa582FxTsF5qjWePQo3", "proofs": [ "s1dTH5sctKFEEXSCXD1kkMyWqsmdZ2fBCbfaGKwNLvG5zEifULA2Qn3PyZevxtDJp3ELWzrwSn4uirr7N7vAHAA" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIICAAAAAAAAAABAAAAA2ludgEAAAAEcGxheQAAAAIAAAAEY2FyZAAAAAVjbGFzcwQAAAANdHJhbnNhY3Rpb25JZAkAAlgAAAABCAUAAAADaW52AAAADXRyYW5zYWN0aW9uSWQEAAAACmN1cnJlbnRLZXkIBQAAAANpbnYAAAAGY2FsbGVyBAAAAAlidGNBbW91bnQJAQAAAAV2YWx1ZQAAAAEICQABkQAAAAIIBQAAAANpbnYAAAAIcGF5bWVudHMAAAAAAAAAAAAAAAAGYW1vdW50BAAAAA9jdXJyZW50S2V5Qnl0ZXMJAAJYAAAAAQgIBQAAAANpbnYAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAhjYXJkTmFtZQkAASwAAAACCQABLAAAAAIFAAAABWNsYXNzAgAAAAFfBQAAAARjYXJkBAAAABVjYXJkTmFtZUN1cnJlbnRQbGF5ZXIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAFY2xhc3MCAAAAAV8FAAAABGNhcmQCAAAAAV8FAAAAD2N1cnJlbnRLZXlCeXRlc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Z0NhcmQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACAgAAAAdzdGF0dXNfBQAAABVjYXJkTmFtZUN1cnJlbnRQbGF5ZXICAAAABFVzZWQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAIaGlzdG9yeV8FAAAADXRyYW5zYWN0aW9uSWQCAAAAAV8FAAAAD2N1cnJlbnRLZXlCeXRlcwkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAl1c2VkQ2FyZDoFAAAACGNhcmROYW1lAgAAAAkvIHdpbm5lcjoFAAAABndpbm5lcgIAAAAOLyB3aW5uaW5nQ2FyZDoFAAAAC3dpbm5pbmdDYXJkAgAAAB8vIHBvaW50c1JlbWFpbmluZ09uV2lubmluZ0NhcmQ6CQABpAAAAAEFAAAAHHBvaW50c1JlbWFpbmluZ09uV2lubmluZ0NhcmQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAWUmVzdWx0YWRvIGRhIFBhcnRpZGE6IAkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAl1c2VkQ2FyZDoFAAAACGNhcmROYW1lAgAAAAkvIHdpbm5lcjoFAAAABndpbm5lcgIAAAAOLyB3aW5uaW5nQ2FyZDoFAAAAC3dpbm5pbmdDYXJkAgAAAB8vIHBvaW50c1JlbWFpbmluZ09uV2lubmluZ0NhcmQ6CQABpAAAAAEFAAAAHHBvaW50c1JlbWFpbmluZ09uV2lubmluZ0NhcmQFAAAAA25pbAAAAABj8t7J", "height": 1627402, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DEntW1bhqT9N8C6iNn5ibWNcuekgoHJQxjMoqpcoJM4G Next: DtZRPoBriWFhvwoTuA4eKuCeozeAAcGvMe65sUfVTK8A Diff:
OldNewDifferences
55
66 @Callable(inv)
77 func play (card,class) = {
8+ let transactionId = toBase58String(inv.transactionId)
89 let currentKey = inv.caller
910 let btcAmount = value(inv.payments[0].amount)
1011 let currentKeyBytes = toBase58String(inv.caller.bytes)
6667 let pointsRemainingOnWinningCard = if ((currentCardScore > arenaCardScore))
6768 then (currentCardScore - arenaCardScore)
6869 else (arenaCardScore - currentCardScore)
69-[StringEntry("playerIntTheArena", winner), StringEntry("cardInTheArena", cardName), IntegerEntry("arenaCardScore", pointsRemainingOnWinningCard), StringEntry(("status_" + cardNameCurrentPlayer), "Used"), StringEntry("Resultado da Partida: ", ((((("winner: " + winner) + "/ winningCard:") + winningCard) + "/ pointsRemainingOnWinningCard:") + toString(pointsRemainingOnWinningCard)))]
70+[StringEntry("playerIntTheArena", winner), StringEntry("cardInTheArena", cardName), IntegerEntry("arenaCardScore", pointsRemainingOnWinningCard), StringEntry(("status_" + cardNameCurrentPlayer), "Used"), StringEntry(((("history_" + transactionId) + "_") + currentKeyBytes), ((((((("usedCard:" + cardName) + "/ winner:") + winner) + "/ winningCard:") + winningCard) + "/ pointsRemainingOnWinningCard:") + toString(pointsRemainingOnWinningCard))), StringEntry("Resultado da Partida: ", ((((((("usedCard:" + cardName) + "/ winner:") + winner) + "/ winningCard:") + winningCard) + "/ pointsRemainingOnWinningCard:") + toString(pointsRemainingOnWinningCard)))]
7071 }
7172 }
7273
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(inv)
77 func play (card,class) = {
8+ let transactionId = toBase58String(inv.transactionId)
89 let currentKey = inv.caller
910 let btcAmount = value(inv.payments[0].amount)
1011 let currentKeyBytes = toBase58String(inv.caller.bytes)
1112 let cardName = ((class + "_") + card)
1213 let cardNameCurrentPlayer = ((((class + "_") + card) + "_") + currentKeyBytes)
1314 let undead = base58'3btiz2mNkbcFhcAww6Zn6WaRtDY3mLHf2dbJHNNbdUFk'
1415 let cardsGame = ["Undead_01", "Undead_02", "Undead_03", "Undead_04", "Undead_05", "Undead_07", "Undead_08", "Undead_09", "Undead_10"]
1516 let classGame = ["Undead"]
1617 let assetsGame = ["3btiz2mNkbcFhcAww6Zn6WaRtDY3mLHf2dbJHNNbdUFk"]
1718 let currentCardStatus = match getString(this, ("status_" + cardNameCurrentPlayer)) {
1819 case t: String =>
1920 t
2021 case _ =>
2122 ""
2223 }
2324 let currentCardScore = match getInteger(this, cardName) {
2425 case t: Int =>
2526 t
2627 case _ =>
2728 0
2829 }
2930 let playerInTheArena = match getString(this, "playerInTheArena") {
3031 case t: String =>
3132 t
3233 case _ =>
3334 ""
3435 }
3536 let cardInTheArena = match getString(this, "cardInTheArena") {
3637 case t: String =>
3738 t
3839 case _ =>
3940 ""
4041 }
4142 let arenaCardScore = match getInteger(this, "arenaCardScore") {
4243 case t: Int =>
4344 t
4445 case _ =>
4546 0
4647 }
4748 if (if (!(containsElement(classGame, class)))
4849 then !(containsElement(cardsGame, card))
4950 else false)
5051 then throw("A classe enviada não existe no game! Por favor contate o suporte!")
5152 else if ((0 > assetBalance(currentKey, undead)))
5253 then throw("E necessário ter o token do deck em sua carteira! Para adquirir, realize a compra em Swap Decks.")
5354 else if (if ((cardInTheArena == ""))
5455 then true
5556 else (playerInTheArena == ""))
5657 then [StringEntry("playerInTheArena", currentKeyBytes), StringEntry("cardInTheArena", cardName), IntegerEntry("arenaCardScore", currentCardScore)]
5758 else if ((currentCardStatus == "Used"))
5859 then throw("Esta carta já foi utilizada! Utilize todas as cartas do deck para esta ser liberada novamente!")
5960 else {
6061 let winner = if ((currentCardScore > arenaCardScore))
6162 then currentKeyBytes
6263 else playerInTheArena
6364 let winningCard = if ((currentCardScore > arenaCardScore))
6465 then cardName
6566 else cardInTheArena
6667 let pointsRemainingOnWinningCard = if ((currentCardScore > arenaCardScore))
6768 then (currentCardScore - arenaCardScore)
6869 else (arenaCardScore - currentCardScore)
69-[StringEntry("playerIntTheArena", winner), StringEntry("cardInTheArena", cardName), IntegerEntry("arenaCardScore", pointsRemainingOnWinningCard), StringEntry(("status_" + cardNameCurrentPlayer), "Used"), StringEntry("Resultado da Partida: ", ((((("winner: " + winner) + "/ winningCard:") + winningCard) + "/ pointsRemainingOnWinningCard:") + toString(pointsRemainingOnWinningCard)))]
70+[StringEntry("playerIntTheArena", winner), StringEntry("cardInTheArena", cardName), IntegerEntry("arenaCardScore", pointsRemainingOnWinningCard), StringEntry(("status_" + cardNameCurrentPlayer), "Used"), StringEntry(((("history_" + transactionId) + "_") + currentKeyBytes), ((((((("usedCard:" + cardName) + "/ winner:") + winner) + "/ winningCard:") + winningCard) + "/ pointsRemainingOnWinningCard:") + toString(pointsRemainingOnWinningCard))), StringEntry("Resultado da Partida: ", ((((((("usedCard:" + cardName) + "/ winner:") + winner) + "/ winningCard:") + winningCard) + "/ pointsRemainingOnWinningCard:") + toString(pointsRemainingOnWinningCard)))]
7071 }
7172 }
7273
7374

github/deemru/w8io/026f985 
35.19 ms