Transaction

ff053cf119346caf2ea4bbdd9d659c3711e57793fe272e519b8feba285342ed7
( - )
197,508
2021-02-26 04:38:30
1
2,397 B

2 Outputs

Total Output:
  • Q!ÝSû´Ž_·²%ƒq• ½ŸŸ[ÕW4O-òÐvjQ®Mi{"__cls":"class GameContract{\n constructor(pKeyOwner,playerIdOwner,wagerAmount){\n this.gamePlayState = 0;\n this.pubKeyCreator = pKeyOwner;\n this.pubKeyOpponent = null;\n this.creatorId = playerIdOwner;\n this.opponentId = null;\n this.createdAt = new Date().getTime();\n this.updatedAt = new Date().getTime();\n this._amount = wagerAmount;\n this.moves = [];\n this._owners = [pKeyOwner];\n this.wagerState = 0;\n }\n addOpponent(pKey,playerId){\n if(!this.pubKeyOpponent){\n this.pubKeyOpponent = pKey;\n this.opponentId = playerId;\n this.gamePlayState = 1;\n this._owners.push(pKey);\n this.updatedAt = new Date().getTime();\n }\n \n }\n \n closeWager(amount,playerId){\n if(amount === this._amount && playerId === this.opponentId && this.gamePlayState == 1){\n this.wagerState = 1;\n this.updatedAt = new Date().getTime();\n }\n }\n \n isValidPayloadMove(move){\n return (move && (move['playerId'] == this.creatorId || move['playerId'] == this.opponentId) && move['fen']);\n }\n isValidMove(fen){\n return true;\n }\n addMove(move){\n if(this.isValidPayloadMove(move) && this.isValidMove(move) && this.wagerState == 1 && this.gamePlayState>=1 && this.gamePlayState<6 ){\n if(this.isWiningMove(move['fen'])){\n this.gamePlayState = 6;\n this.updatedAt = new Date().getTime();\n }else{\n let temp = {\n playerId : move['playerId'],\n fen : move['fen'],\n timestamp : new Date().getTime()\n }\n this.moves.push(temp);\n this.updatedAt = new Date().getTime();\n }\n }\n }\n isWiningMove(fen){\n return false;\n }\n \n \n }","__index":{"obj":0},"__func":"constructor","__args":["03dd015318fbb48e5fb7b2251e837195050abd9f079f5bd557344f2df21dd0766a","58022b9303a7f452b1f5bbec7c5f52d3631603c6641ea8c7925a3661b612451b",15]}u
    https://whatsonchain.com/tx/ff053cf119346caf2ea4bbdd9d659c3711e57793fe272e519b8feba285342ed7