mirror of
https://github.com/luxfhe/example-poker.git
synced 2026-10-30 18:13:22 +00:00
1355 lines
36 KiB
TypeScript
1355 lines
36 KiB
TypeScript
/**
|
|
* This file is autogenerated by Create LuxFHE DApp.
|
|
* You should not edit it manually or your changes might be overwritten.
|
|
*/
|
|
import { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract";
|
|
|
|
const deployedContracts = {
|
|
420105: {
|
|
FHEKuhnPoker: {
|
|
address: "0xB8F92B06Ba405C6947c206E05e0c00D3E353D984",
|
|
abi: [
|
|
{
|
|
inputs: [],
|
|
stateMutability: "nonpayable",
|
|
type: "constructor",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "AlreadyAcceptedRematch",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "AlreadyRequestedRematch",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "ECDSAInvalidSignature",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "length",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "ECDSAInvalidSignatureLength",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [
|
|
{
|
|
internalType: "bytes32",
|
|
name: "s",
|
|
type: "bytes32",
|
|
},
|
|
],
|
|
name: "ECDSAInvalidSignatureS",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "GameEnded",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "GameNotEnded",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "GameNotStarted",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "GameStarted",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "InvalidAction",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "InvalidGame",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "InvalidPlayerB",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "InvalidShortString",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "ItsYourTurn",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "NotEnoughChips",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "NotInGame",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "NotPlayerInGame",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "NotYourTurn",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "OpponentHasLeft",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "OpponentStillHasTime",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "RematchCancelled",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "SignerNotMessageSender",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "SignerNotOwner",
|
|
type: "error",
|
|
},
|
|
{
|
|
inputs: [
|
|
{
|
|
internalType: "string",
|
|
name: "str",
|
|
type: "string",
|
|
},
|
|
],
|
|
name: "StringTooLong",
|
|
type: "error",
|
|
},
|
|
{
|
|
anonymous: false,
|
|
inputs: [
|
|
{
|
|
indexed: true,
|
|
internalType: "address",
|
|
name: "player",
|
|
type: "address",
|
|
},
|
|
{
|
|
indexed: true,
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "ChipTaken",
|
|
type: "event",
|
|
},
|
|
{
|
|
anonymous: false,
|
|
inputs: [],
|
|
name: "EIP712DomainChanged",
|
|
type: "event",
|
|
},
|
|
{
|
|
anonymous: false,
|
|
inputs: [
|
|
{
|
|
indexed: true,
|
|
internalType: "address",
|
|
name: "player",
|
|
type: "address",
|
|
},
|
|
{
|
|
indexed: true,
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "GameCancelled",
|
|
type: "event",
|
|
},
|
|
{
|
|
anonymous: false,
|
|
inputs: [
|
|
{
|
|
indexed: true,
|
|
internalType: "address",
|
|
name: "playerA",
|
|
type: "address",
|
|
},
|
|
{
|
|
indexed: true,
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "GameCreated",
|
|
type: "event",
|
|
},
|
|
{
|
|
anonymous: false,
|
|
inputs: [
|
|
{
|
|
indexed: true,
|
|
internalType: "address",
|
|
name: "playerB",
|
|
type: "address",
|
|
},
|
|
{
|
|
indexed: true,
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "GameJoined",
|
|
type: "event",
|
|
},
|
|
{
|
|
anonymous: false,
|
|
inputs: [
|
|
{
|
|
indexed: true,
|
|
internalType: "address",
|
|
name: "player",
|
|
type: "address",
|
|
},
|
|
{
|
|
indexed: true,
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
indexed: false,
|
|
internalType: "enum Action",
|
|
name: "action",
|
|
type: "uint8",
|
|
},
|
|
],
|
|
name: "PerformedGameAction",
|
|
type: "event",
|
|
},
|
|
{
|
|
anonymous: false,
|
|
inputs: [
|
|
{
|
|
indexed: true,
|
|
internalType: "address",
|
|
name: "user",
|
|
type: "address",
|
|
},
|
|
{
|
|
indexed: false,
|
|
internalType: "uint256",
|
|
name: "chips",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "PlayerDealtIn",
|
|
type: "event",
|
|
},
|
|
{
|
|
anonymous: false,
|
|
inputs: [
|
|
{
|
|
indexed: true,
|
|
internalType: "address",
|
|
name: "playerB",
|
|
type: "address",
|
|
},
|
|
{
|
|
indexed: true,
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "RematchAccepted",
|
|
type: "event",
|
|
},
|
|
{
|
|
anonymous: false,
|
|
inputs: [
|
|
{
|
|
indexed: true,
|
|
internalType: "address",
|
|
name: "playerA",
|
|
type: "address",
|
|
},
|
|
{
|
|
indexed: true,
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "RematchCreated",
|
|
type: "event",
|
|
},
|
|
{
|
|
anonymous: false,
|
|
inputs: [
|
|
{
|
|
indexed: true,
|
|
internalType: "address",
|
|
name: "winner",
|
|
type: "address",
|
|
},
|
|
{
|
|
indexed: true,
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
indexed: false,
|
|
internalType: "uint256",
|
|
name: "pot",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "WonByFold",
|
|
type: "event",
|
|
},
|
|
{
|
|
anonymous: false,
|
|
inputs: [
|
|
{
|
|
indexed: true,
|
|
internalType: "address",
|
|
name: "winner",
|
|
type: "address",
|
|
},
|
|
{
|
|
indexed: true,
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
indexed: false,
|
|
internalType: "uint256",
|
|
name: "pot",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "WonByResignation",
|
|
type: "event",
|
|
},
|
|
{
|
|
anonymous: false,
|
|
inputs: [
|
|
{
|
|
indexed: true,
|
|
internalType: "address",
|
|
name: "winner",
|
|
type: "address",
|
|
},
|
|
{
|
|
indexed: true,
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
indexed: false,
|
|
internalType: "uint256",
|
|
name: "pot",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "WonByShowdown",
|
|
type: "event",
|
|
},
|
|
{
|
|
anonymous: false,
|
|
inputs: [
|
|
{
|
|
indexed: true,
|
|
internalType: "address",
|
|
name: "winner",
|
|
type: "address",
|
|
},
|
|
{
|
|
indexed: true,
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
indexed: false,
|
|
internalType: "uint256",
|
|
name: "pot",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "WonByTimeout",
|
|
type: "event",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "cancelSearch",
|
|
outputs: [],
|
|
stateMutability: "nonpayable",
|
|
type: "function",
|
|
},
|
|
{
|
|
inputs: [
|
|
{
|
|
internalType: "address",
|
|
name: "",
|
|
type: "address",
|
|
},
|
|
],
|
|
name: "chips",
|
|
outputs: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
{
|
|
inputs: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "chipCount",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "dealMeIn",
|
|
outputs: [],
|
|
stateMutability: "nonpayable",
|
|
type: "function",
|
|
},
|
|
{
|
|
inputs: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "eGameCardA",
|
|
outputs: [
|
|
{
|
|
internalType: "euint8",
|
|
name: "",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
{
|
|
inputs: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "eGameCardB",
|
|
outputs: [
|
|
{
|
|
internalType: "euint8",
|
|
name: "",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "eip712Domain",
|
|
outputs: [
|
|
{
|
|
internalType: "bytes1",
|
|
name: "fields",
|
|
type: "bytes1",
|
|
},
|
|
{
|
|
internalType: "string",
|
|
name: "name",
|
|
type: "string",
|
|
},
|
|
{
|
|
internalType: "string",
|
|
name: "version",
|
|
type: "string",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "chainId",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "verifyingContract",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "bytes32",
|
|
name: "salt",
|
|
type: "bytes32",
|
|
},
|
|
{
|
|
internalType: "uint256[]",
|
|
name: "extensions",
|
|
type: "uint256[]",
|
|
},
|
|
],
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "findGame",
|
|
outputs: [],
|
|
stateMutability: "nonpayable",
|
|
type: "function",
|
|
},
|
|
{
|
|
inputs: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "games",
|
|
outputs: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "rematchingGid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "playerA",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "playerB",
|
|
type: "address",
|
|
},
|
|
{
|
|
components: [
|
|
{
|
|
internalType: "bool",
|
|
name: "accepted",
|
|
type: "bool",
|
|
},
|
|
{
|
|
internalType: "uint8",
|
|
name: "pot",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "startingPlayer",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "activePlayer",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "uint64",
|
|
name: "timeout",
|
|
type: "uint64",
|
|
},
|
|
{
|
|
internalType: "enum Action",
|
|
name: "action1",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "enum Action",
|
|
name: "action2",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "enum Action",
|
|
name: "action3",
|
|
type: "uint8",
|
|
},
|
|
],
|
|
internalType: "struct GameState",
|
|
name: "state",
|
|
type: "tuple",
|
|
},
|
|
{
|
|
components: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "uint8",
|
|
name: "cardA",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "uint8",
|
|
name: "cardB",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "winner",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "enum Outcome",
|
|
name: "outcome",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "rematchGid",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
internalType: "struct GameOutcome",
|
|
name: "outcome",
|
|
type: "tuple",
|
|
},
|
|
],
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
{
|
|
inputs: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "_gid",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "getGame",
|
|
outputs: [
|
|
{
|
|
components: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "rematchingGid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "playerA",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "playerB",
|
|
type: "address",
|
|
},
|
|
{
|
|
components: [
|
|
{
|
|
internalType: "bool",
|
|
name: "accepted",
|
|
type: "bool",
|
|
},
|
|
{
|
|
internalType: "uint8",
|
|
name: "pot",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "startingPlayer",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "activePlayer",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "uint64",
|
|
name: "timeout",
|
|
type: "uint64",
|
|
},
|
|
{
|
|
internalType: "enum Action",
|
|
name: "action1",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "enum Action",
|
|
name: "action2",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "enum Action",
|
|
name: "action3",
|
|
type: "uint8",
|
|
},
|
|
],
|
|
internalType: "struct GameState",
|
|
name: "state",
|
|
type: "tuple",
|
|
},
|
|
{
|
|
components: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "uint8",
|
|
name: "cardA",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "uint8",
|
|
name: "cardB",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "winner",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "enum Outcome",
|
|
name: "outcome",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "rematchGid",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
internalType: "struct GameOutcome",
|
|
name: "outcome",
|
|
type: "tuple",
|
|
},
|
|
],
|
|
internalType: "struct Game",
|
|
name: "game",
|
|
type: "tuple",
|
|
},
|
|
],
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
{
|
|
inputs: [
|
|
{
|
|
components: [
|
|
{
|
|
internalType: "bytes32",
|
|
name: "publicKey",
|
|
type: "bytes32",
|
|
},
|
|
{
|
|
internalType: "bytes",
|
|
name: "signature",
|
|
type: "bytes",
|
|
},
|
|
],
|
|
internalType: "struct Permission",
|
|
name: "permission",
|
|
type: "tuple",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "_gid",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
name: "getGameCard",
|
|
outputs: [
|
|
{
|
|
components: [
|
|
{
|
|
internalType: "string",
|
|
name: "data",
|
|
type: "string",
|
|
},
|
|
{
|
|
internalType: "uint8",
|
|
name: "utype",
|
|
type: "uint8",
|
|
},
|
|
],
|
|
internalType: "struct SealedUint",
|
|
name: "",
|
|
type: "tuple",
|
|
},
|
|
],
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
{
|
|
inputs: [
|
|
{
|
|
internalType: "address",
|
|
name: "_playerA",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "_playerB",
|
|
type: "address",
|
|
},
|
|
],
|
|
name: "getPairGames",
|
|
outputs: [
|
|
{
|
|
components: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "rematchingGid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "playerA",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "playerB",
|
|
type: "address",
|
|
},
|
|
{
|
|
components: [
|
|
{
|
|
internalType: "bool",
|
|
name: "accepted",
|
|
type: "bool",
|
|
},
|
|
{
|
|
internalType: "uint8",
|
|
name: "pot",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "startingPlayer",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "activePlayer",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "uint64",
|
|
name: "timeout",
|
|
type: "uint64",
|
|
},
|
|
{
|
|
internalType: "enum Action",
|
|
name: "action1",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "enum Action",
|
|
name: "action2",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "enum Action",
|
|
name: "action3",
|
|
type: "uint8",
|
|
},
|
|
],
|
|
internalType: "struct GameState",
|
|
name: "state",
|
|
type: "tuple",
|
|
},
|
|
{
|
|
components: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "uint8",
|
|
name: "cardA",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "uint8",
|
|
name: "cardB",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "winner",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "enum Outcome",
|
|
name: "outcome",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "rematchGid",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
internalType: "struct GameOutcome",
|
|
name: "outcome",
|
|
type: "tuple",
|
|
},
|
|
],
|
|
internalType: "struct Game[]",
|
|
name: "ret",
|
|
type: "tuple[]",
|
|
},
|
|
],
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
{
|
|
inputs: [
|
|
{
|
|
internalType: "address",
|
|
name: "_user",
|
|
type: "address",
|
|
},
|
|
],
|
|
name: "getUserGameState",
|
|
outputs: [
|
|
{
|
|
components: [
|
|
{
|
|
components: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "rematchingGid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "playerA",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "playerB",
|
|
type: "address",
|
|
},
|
|
{
|
|
components: [
|
|
{
|
|
internalType: "bool",
|
|
name: "accepted",
|
|
type: "bool",
|
|
},
|
|
{
|
|
internalType: "uint8",
|
|
name: "pot",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "startingPlayer",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "activePlayer",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "uint64",
|
|
name: "timeout",
|
|
type: "uint64",
|
|
},
|
|
{
|
|
internalType: "enum Action",
|
|
name: "action1",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "enum Action",
|
|
name: "action2",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "enum Action",
|
|
name: "action3",
|
|
type: "uint8",
|
|
},
|
|
],
|
|
internalType: "struct GameState",
|
|
name: "state",
|
|
type: "tuple",
|
|
},
|
|
{
|
|
components: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "uint8",
|
|
name: "cardA",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "uint8",
|
|
name: "cardB",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "winner",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "enum Outcome",
|
|
name: "outcome",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "rematchGid",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
internalType: "struct GameOutcome",
|
|
name: "outcome",
|
|
type: "tuple",
|
|
},
|
|
],
|
|
internalType: "struct Game",
|
|
name: "game",
|
|
type: "tuple",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "selfChips",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "opponentChips",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "activeGid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "rematchGid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "selfGid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "opponentGid",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
internalType: "struct FHEKuhnPoker.UserGameState",
|
|
name: "gameState",
|
|
type: "tuple",
|
|
},
|
|
],
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
{
|
|
inputs: [
|
|
{
|
|
internalType: "address",
|
|
name: "user",
|
|
type: "address",
|
|
},
|
|
],
|
|
name: "getUserGames",
|
|
outputs: [
|
|
{
|
|
components: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "rematchingGid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "playerA",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "playerB",
|
|
type: "address",
|
|
},
|
|
{
|
|
components: [
|
|
{
|
|
internalType: "bool",
|
|
name: "accepted",
|
|
type: "bool",
|
|
},
|
|
{
|
|
internalType: "uint8",
|
|
name: "pot",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "startingPlayer",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "activePlayer",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "uint64",
|
|
name: "timeout",
|
|
type: "uint64",
|
|
},
|
|
{
|
|
internalType: "enum Action",
|
|
name: "action1",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "enum Action",
|
|
name: "action2",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "enum Action",
|
|
name: "action3",
|
|
type: "uint8",
|
|
},
|
|
],
|
|
internalType: "struct GameState",
|
|
name: "state",
|
|
type: "tuple",
|
|
},
|
|
{
|
|
components: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "gid",
|
|
type: "uint256",
|
|
},
|
|
{
|
|
internalType: "uint8",
|
|
name: "cardA",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "uint8",
|
|
name: "cardB",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "address",
|
|
name: "winner",
|
|
type: "address",
|
|
},
|
|
{
|
|
internalType: "enum Outcome",
|
|
name: "outcome",
|
|
type: "uint8",
|
|
},
|
|
{
|
|
internalType: "uint256",
|
|
name: "rematchGid",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
internalType: "struct GameOutcome",
|
|
name: "outcome",
|
|
type: "tuple",
|
|
},
|
|
],
|
|
internalType: "struct Game[]",
|
|
name: "ret",
|
|
type: "tuple[]",
|
|
},
|
|
],
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "gid",
|
|
outputs: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "openGameId",
|
|
outputs: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
{
|
|
inputs: [
|
|
{
|
|
internalType: "enum Action",
|
|
name: "action",
|
|
type: "uint8",
|
|
},
|
|
],
|
|
name: "performAction",
|
|
outputs: [],
|
|
stateMutability: "nonpayable",
|
|
type: "function",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "rematch",
|
|
outputs: [],
|
|
stateMutability: "nonpayable",
|
|
type: "function",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "resign",
|
|
outputs: [],
|
|
stateMutability: "nonpayable",
|
|
type: "function",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "timeoutDuration",
|
|
outputs: [
|
|
{
|
|
internalType: "uint64",
|
|
name: "",
|
|
type: "uint64",
|
|
},
|
|
],
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
{
|
|
inputs: [],
|
|
name: "timeoutOpponent",
|
|
outputs: [],
|
|
stateMutability: "nonpayable",
|
|
type: "function",
|
|
},
|
|
{
|
|
inputs: [
|
|
{
|
|
internalType: "address",
|
|
name: "",
|
|
type: "address",
|
|
},
|
|
],
|
|
name: "userActiveGame",
|
|
outputs: [
|
|
{
|
|
internalType: "uint256",
|
|
name: "",
|
|
type: "uint256",
|
|
},
|
|
],
|
|
stateMutability: "view",
|
|
type: "function",
|
|
},
|
|
],
|
|
inheritedFunctions: {
|
|
eip712Domain: "@luxfhe/contracts/access/Permissioned.sol",
|
|
},
|
|
},
|
|
},
|
|
} as const;
|
|
|
|
export default deployedContracts satisfies GenericContractsDeclaration;
|