tx · 9tvqPyhuvUsrztQEqQKzAXJLPv99BjTg64XzoS1yipVb

3NC3ZeZYDpDR72ngL6CoC19ygSD9uGBW3fX:  -0.01000000 Waves

2023.05.17 22:38 [2582381] smart account 3NC3ZeZYDpDR72ngL6CoC19ygSD9uGBW3fX > SELF 0.00000000 Waves

{ "type": 13, "id": "9tvqPyhuvUsrztQEqQKzAXJLPv99BjTg64XzoS1yipVb", "fee": 1000000, "feeAssetId": null, "timestamp": 1684352323933, "version": 2, "chainId": 84, "sender": "3NC3ZeZYDpDR72ngL6CoC19ygSD9uGBW3fX", "senderPublicKey": "8jH62ceUHZbFsEBSPohAjv3Rzc8mw3QhZaUKhGHngY2J", "proofs": [ "35pBnXsfRUJH7Uv3h8zLPcorAhDCuRMAZhPr67scyScHb1UNPRsi1vm1oWMTM29VGFZayehPSx7H61fd15B4f95g" ], "script": "base64:BgIQCAISABIAEgASBgoEEQEICAMADnRvdGFsTWF0Y2hzS2V5Ag50b3RhbE1hdGNoc0tleQEQdHJ5R2V0SW50ZWdlckV4dAIHYWRkcmVzcwNrZXkEByRtYXRjaDAJAJoIAgUHYWRkcmVzcwUDa2V5AwkAAQIFByRtYXRjaDACA0ludAQBYQUHJG1hdGNoMAUBYQAAAQl0cnlHZXRJbnQBA2tleQkBEHRyeUdldEludGVnZXJFeHQCBQR0aGlzBQNrZXkEAWkBB215VG9rZW4ACQCUCgIJAMwIAgkAwggFCQCsAgICBlRfdGNjXwkArwICCQDYBAEICAUBaQZjYWxsZXIFYnl0ZXMABgIAAKCNBgACBgUDbmlsBQR1bml0AWkBCmNsYWltVG9rZW4ABAlyZWNpcGllbnQIBQFpBmNhbGxlcgQFdG9rZW4JANkEAQIsQlRQaUNlQUVkNEVLa0N5eVJUakROdzNmeW1EN1B2b3I2UFFBeVZQTjMyWlMJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwUJcmVjaXBpZW50AMgBBQV0b2tlbgUDbmlsAWkBDGRlcG9zaXRUb2tlbgAECXJlY2lw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gszQ==", "height": 2582381, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5AyrVjmRLNTsLZSfNq5H95J2EtyctqAEzz8boKqNbNme Next: HJJiaqQdhQy9DsyRkF4uBp8gVthdgMtNH9SFRbY32pjA Diff:
OldNewDifferences
3838
3939
4040 @Callable(i)
41-func verificarVencedor (solucoes,numPlayer) = {
41+func verificarVencedor (solucoes,numPlayer,opponent,board) = {
4242 let recipient = i.caller
4343 let token = fromBase58String("BTPiCeAEd4EKkCyyRTjDNw3fymD7Pvor6PQAyVPN32ZS")
4444 if (containsElement(solucoes, (3 * (numPlayer + 1))))
4545 then {
4646 let qtd = (tryGetInt(totalMatchsKey) + 1)
4747 let amountMatches = ("Partida-" + toString(qtd))
48-[IntegerEntry(totalMatchsKey, qtd), StringEntry(amountMatches, "Jogador carteira"), ScriptTransfer(recipient, 400, token)]
48+ let infos = (((((("Vencedor: " + toBase58String(i.caller.bytes)) + " ; ") + "Oponente: ") + opponent) + "Tabuleiro: ") + board)
49+[IntegerEntry(totalMatchsKey, qtd), StringEntry(amountMatches, infos), ScriptTransfer(recipient, 400, token)]
4950 }
5051 else if (if (containsElement(solucoes, 3))
5152 then true
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let totalMatchsKey = "totalMatchsKey"
55
66 func tryGetIntegerExt (address,key) = match getInteger(address, key) {
77 case a: Int =>
88 a
99 case _ =>
1010 0
1111 }
1212
1313
1414 func tryGetInt (key) = tryGetIntegerExt(this, key)
1515
1616
1717 @Callable(i)
1818 func myToken () = $Tuple2([Issue(("T_tcc_" + take(toBase58String(i.caller.bytes), 6)), "", 100000, 2, true)], unit)
1919
2020
2121
2222 @Callable(i)
2323 func claimToken () = {
2424 let recipient = i.caller
2525 let token = fromBase58String("BTPiCeAEd4EKkCyyRTjDNw3fymD7Pvor6PQAyVPN32ZS")
2626 [ScriptTransfer(recipient, 200, token)]
2727 }
2828
2929
3030
3131 @Callable(i)
3232 func depositToken () = {
3333 let recipient = toBase58String(i.caller.bytes)
3434 let token = fromBase58String("BTPiCeAEd4EKkCyyRTjDNw3fymD7Pvor6PQAyVPN32ZS")
3535 [StringEntry(recipient, "100")]
3636 }
3737
3838
3939
4040 @Callable(i)
41-func verificarVencedor (solucoes,numPlayer) = {
41+func verificarVencedor (solucoes,numPlayer,opponent,board) = {
4242 let recipient = i.caller
4343 let token = fromBase58String("BTPiCeAEd4EKkCyyRTjDNw3fymD7Pvor6PQAyVPN32ZS")
4444 if (containsElement(solucoes, (3 * (numPlayer + 1))))
4545 then {
4646 let qtd = (tryGetInt(totalMatchsKey) + 1)
4747 let amountMatches = ("Partida-" + toString(qtd))
48-[IntegerEntry(totalMatchsKey, qtd), StringEntry(amountMatches, "Jogador carteira"), ScriptTransfer(recipient, 400, token)]
48+ let infos = (((((("Vencedor: " + toBase58String(i.caller.bytes)) + " ; ") + "Oponente: ") + opponent) + "Tabuleiro: ") + board)
49+[IntegerEntry(totalMatchsKey, qtd), StringEntry(amountMatches, infos), ScriptTransfer(recipient, 400, token)]
4950 }
5051 else if (if (containsElement(solucoes, 3))
5152 then true
5253 else containsElement(solucoes, 6))
5354 then [StringEntry("Jogador", "Perdeu")]
5455 else [StringEntry("Ambos", "Empate")]
5556 }
5657
5758

github/deemru/w8io/026f985 
199.84 ms