diff --git a/frontend/src/components/tankGame/Tank.tsx b/frontend/src/components/tankGame/Tank.tsx
index 007ea24..cf85a64 100644
--- a/frontend/src/components/tankGame/Tank.tsx
+++ b/frontend/src/components/tankGame/Tank.tsx
@@ -2,7 +2,7 @@ import { Droplet, Heart, Target, User, Zap } from "lucide-react";
import { ITank } from "./ITank";
import { useTankGameGetEpoch, useTankGameLastDripEpoch } from "@/src/generated";
import { DropdownMenu, DropdownMenuContent } from "../ui/dropdown-menu";
-import { Address} from "viem";
+import { Address } from "viem";
import { useTankNameFromId } from "./EventsStream";
interface TankProps {
@@ -13,17 +13,29 @@ interface TankProps {
left: number;
} | null;
onChange: () => void;
- address: Address
+ address: Address;
}
-export function Tank({ tankObj, open, position, onChange, address }: TankProps) {
+export function Tank({
+ tankObj,
+ open,
+ position,
+ onChange,
+ address,
+}: TankProps) {
const { tank, tankId } = tankObj;
const tankName = useTankNameFromId(address, tankId);
let lastDripEpoch = useTankGameLastDripEpoch({
args: [tankId],
enabled: !!tankId,
watch: true,
+ // @ts-ignore
+ address: address,
+ });
+ let currentEpoch = useTankGameGetEpoch({
+ watch: true,
+ // @ts-ignore
+ address: address,
});
- let currentEpoch = useTankGameGetEpoch({ watch: true });
return (
@@ -48,9 +60,7 @@ export function Tank({ tankObj, open, position, onChange, address }: TankProps)
-
- Owner name: {tankName}
-
+ Owner name: {tankName}
{" "}
diff --git a/frontend/src/components/treaties/Bounty.tsx b/frontend/src/components/treaties/Bounty.tsx
index 5ecfd98..fea17dd 100644
--- a/frontend/src/components/treaties/Bounty.tsx
+++ b/frontend/src/components/treaties/Bounty.tsx
@@ -8,7 +8,11 @@ import {
} from "@/src/generated";
import { useState, useEffect } from "react";
import { Address, BaseError, formatEther } from "viem";
-import { useAccount, useBlockNumber, useWaitForTransaction } from "wagmi";
+import {
+ useAccount,
+ useBlockNumber,
+ useWaitForTransaction,
+} from "wagmi";
import { getPublicClient } from "wagmi/actions";
import {
getTankNameFromJoinIndex,
@@ -69,9 +73,9 @@ export default function Bounty({
} else {
return acc.map((item: any) =>
item.address === current.address &&
- item.args.tankId === current.args.tankId &&
- item.args.target === current.args.target &&
- item.args.amount > current.args.amount
+ item.args.tankId === current.args.tankId &&
+ item.args.target === current.args.target &&
+ item.args.amount > current.args.amount
? current
: item
);
@@ -92,8 +96,11 @@ export default function Bounty({
}, [hookAddress, blockNumber]);
const { config: addHooksConfig } = usePrepareTankGameAddHooks({
args: [ownerTank.data!, hookAddress],
- enabled: !!ownerTank,
+ // @ts-ignore
+ address: gameAddress,
+ enabled: !!ownerTank.data,
});
+ // console.log(addHooksConfig);
const { write: addHook, data: addHookData } =
useTankGameAddHooks(addHooksConfig);
useWaitForTransaction({
@@ -264,7 +271,9 @@ function BountyCard({
diff --git a/frontend/src/generated.ts b/frontend/src/generated.ts
index 35333d4..5d95bb0 100644
--- a/frontend/src/generated.ts
+++ b/frontend/src/generated.ts
@@ -1326,21 +1326,21 @@ export const gameViewABI = [
{
stateMutability: 'view',
type: 'function',
- inputs: [{ name: 'game', internalType: 'address', type: 'address' }],
+ inputs: [{ name: 'gameAddress', internalType: 'address', type: 'address' }],
name: 'getBoard',
outputs: [{ name: '', internalType: 'contract Board', type: 'address' }],
},
{
stateMutability: 'view',
type: 'function',
- inputs: [{ name: 'game', internalType: 'address', type: 'address' }],
+ inputs: [{ name: 'gameAddress', internalType: 'address', type: 'address' }],
name: 'getEpoch',
outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
},
{
stateMutability: 'view',
type: 'function',
- inputs: [{ name: 'game', internalType: 'address', type: 'address' }],
+ inputs: [{ name: 'gameAddress', internalType: 'address', type: 'address' }],
name: 'getGameEpoch',
outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
},
@@ -1348,7 +1348,7 @@ export const gameViewABI = [
stateMutability: 'view',
type: 'function',
inputs: [
- { name: 'game', internalType: 'address', type: 'address' },
+ { name: 'gameAddress', internalType: 'address', type: 'address' },
{ name: 'tankId', internalType: 'uint256', type: 'uint256' },
],
name: 'getLastDrip',
@@ -1357,14 +1357,14 @@ export const gameViewABI = [
{
stateMutability: 'view',
type: 'function',
- inputs: [{ name: 'game', internalType: 'address', type: 'address' }],
+ inputs: [{ name: 'gameAddress', internalType: 'address', type: 'address' }],
name: 'getPlayerCount',
outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
},
{
stateMutability: 'view',
type: 'function',
- inputs: [{ name: 'game', internalType: 'address', type: 'address' }],
+ inputs: [{ name: 'gameAddress', internalType: 'address', type: 'address' }],
name: 'getSettings',
outputs: [
{
@@ -1393,7 +1393,7 @@ export const gameViewABI = [
{
stateMutability: 'view',
type: 'function',
- inputs: [{ name: 'game', internalType: 'address', type: 'address' }],
+ inputs: [{ name: 'gameAddress', internalType: 'address', type: 'address' }],
name: 'getState',
outputs: [
{ name: '', internalType: 'enum ITankGame.GameState', type: 'uint8' },
@@ -1403,7 +1403,7 @@ export const gameViewABI = [
stateMutability: 'view',
type: 'function',
inputs: [
- { name: 'game', internalType: 'address', type: 'address' },
+ { name: 'gameAddress', internalType: 'address', type: 'address' },
{ name: 'tankId', internalType: 'uint256', type: 'uint256' },
],
name: 'getTank',
@@ -1425,7 +1425,7 @@ export const gameViewABI = [
stateMutability: 'view',
type: 'function',
inputs: [
- { name: 'game', internalType: 'address', type: 'address' },
+ { name: 'gameAddress', internalType: 'address', type: 'address' },
{ name: 'tankId', internalType: 'uint256', type: 'uint256' },
],
name: 'getUpgradeCost',
@@ -1435,7 +1435,7 @@ export const gameViewABI = [
stateMutability: 'view',
type: 'function',
inputs: [
- { name: 'game', internalType: 'address', type: 'address' },
+ { name: 'gameAddress', internalType: 'address', type: 'address' },
{ name: 'tankId', internalType: 'uint256', type: 'uint256' },
{ name: '_owner', internalType: 'address', type: 'address' },
],
@@ -1822,23 +1822,6 @@ export const hookFactoryConfig = {
abi: hookFactoryABI,
} as const
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// IAcceptable
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-export const iAcceptableABI = [
- {
- stateMutability: 'nonpayable',
- type: 'function',
- inputs: [
- { name: 'from', internalType: 'address', type: 'address' },
- { name: 'hook', internalType: 'address', type: 'address' },
- ],
- name: 'accept',
- outputs: [],
- },
-] as const
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// IGameView
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -4032,27 +4015,66 @@ export const nonAggressionABI = [
] as const
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// NonAggressionHook
+// Strings
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+export const stringsABI = [
+ {
+ type: 'error',
+ inputs: [
+ { name: 'value', internalType: 'uint256', type: 'uint256' },
+ { name: 'length', internalType: 'uint256', type: 'uint256' },
+ ],
+ name: 'StringsInsufficientHexLength',
+ },
+] as const
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// TankGame
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-export const nonAggressionHookABI = [
+/**
+ * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x2c927e3b60586eb229Dcc55978Bc96A7E00Fb414)
+ * -
+ */
+export const tankGameABI = [
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: '_getEpoch',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ },
{
stateMutability: 'nonpayable',
type: 'function',
inputs: [
- { name: 'from', internalType: 'address', type: 'address' },
- { name: 'hook', internalType: 'address', type: 'address' },
+ { name: 'tankId', internalType: 'uint256', type: 'uint256' },
+ { name: 'hooks', internalType: 'contract IHooks', type: 'address' },
],
- name: 'accept',
+ name: 'addHooks',
outputs: [],
},
{
- stateMutability: 'pure',
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: 'aliveTanksIdSum',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: 'board',
+ outputs: [{ name: '', internalType: 'contract Board', type: 'address' }],
+ },
+ {
+ stateMutability: 'nonpayable',
type: 'function',
inputs: [
- { name: '', internalType: 'address', type: 'address' },
{
- name: '',
+ name: 'params',
internalType: 'struct ITankGame.ClaimParams',
type: 'tuple',
components: [
@@ -4060,18 +4082,30 @@ export const nonAggressionHookABI = [
{ name: 'claimer', internalType: 'address', type: 'address' },
],
},
- { name: '', internalType: 'bytes', type: 'bytes' },
],
- name: 'afterClaim',
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
+ name: 'claim',
+ outputs: [],
},
{
- stateMutability: 'pure',
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
+ name: 'claimed',
+ outputs: [{ name: 'claimed', internalType: 'bool', type: 'bool' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ name: 'deadTanks',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'nonpayable',
type: 'function',
inputs: [
- { name: '', internalType: 'address', type: 'address' },
{
- name: '',
+ name: 'params',
internalType: 'struct ITankGame.DelegateParams',
type: 'tuple',
components: [
@@ -4079,36 +4113,87 @@ export const nonAggressionHookABI = [
{ name: 'delegatee', internalType: 'address', type: 'address' },
],
},
- { name: '', internalType: 'bytes', type: 'bytes' },
],
- name: 'afterDelegate',
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
+ name: 'delegate',
+ outputs: [],
},
{
- stateMutability: 'pure',
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [
+ { name: 'tankId', internalType: 'uint256', type: 'uint256' },
+ { name: 'delegate', internalType: 'address', type: 'address' },
+ ],
+ name: 'delegates',
+ outputs: [{ name: 'isDelegate', internalType: 'bool', type: 'bool' }],
+ },
+ {
+ stateMutability: 'payable',
+ type: 'function',
+ inputs: [],
+ name: 'donate',
+ outputs: [],
+ },
+ {
+ stateMutability: 'nonpayable',
type: 'function',
inputs: [
- { name: '', internalType: 'address', type: 'address' },
{
- name: '',
+ name: 'params',
internalType: 'struct ITankGame.DripParams',
type: 'tuple',
components: [
{ name: 'tankId', internalType: 'uint256', type: 'uint256' },
],
},
- { name: '', internalType: 'bytes', type: 'bytes' },
],
- name: 'afterDrip',
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
+ name: 'drip',
+ outputs: [],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: 'epochStart',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: 'factory',
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
+ },
+ {
+ stateMutability: 'nonpayable',
+ type: 'function',
+ inputs: [
+ { name: 'tankId', internalType: 'uint256', type: 'uint256' },
+ { name: 'hooks', internalType: 'contract IHooks', type: 'address' },
+ ],
+ name: 'forceAddDefaultHook',
+ outputs: [],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
+ name: 'getLastDrip',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
+ name: 'getUpgradeCost',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
},
{
stateMutability: 'nonpayable',
type: 'function',
inputs: [
- { name: '', internalType: 'address', type: 'address' },
{
- name: '',
+ name: 'params',
internalType: 'struct ITankGame.GiveParams',
type: 'tuple',
components: [
@@ -4118,18 +4203,56 @@ export const nonAggressionHookABI = [
{ name: 'aps', internalType: 'uint256', type: 'uint256' },
],
},
- { name: '', internalType: 'bytes', type: 'bytes' },
],
- name: 'afterGive',
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
+ name: 'give',
+ outputs: [],
},
{
- stateMutability: 'pure',
+ stateMutability: 'payable',
type: 'function',
inputs: [
- { name: '', internalType: 'address', type: 'address' },
{
- name: '',
+ name: 'gs',
+ internalType: 'struct ITankGame.GameSettings',
+ type: 'tuple',
+ components: [
+ { name: 'playerCount', internalType: 'uint256', type: 'uint256' },
+ { name: 'boardSize', internalType: 'uint256', type: 'uint256' },
+ { name: 'initAPs', internalType: 'uint256', type: 'uint256' },
+ { name: 'initHearts', internalType: 'uint256', type: 'uint256' },
+ { name: 'initShootRange', internalType: 'uint256', type: 'uint256' },
+ { name: 'epochSeconds', internalType: 'uint256', type: 'uint256' },
+ { name: 'buyInMinimum', internalType: 'uint256', type: 'uint256' },
+ {
+ name: 'revealWaitBlocks',
+ internalType: 'uint256',
+ type: 'uint256',
+ },
+ { name: 'autoStart', internalType: 'bool', type: 'bool' },
+ { name: 'root', internalType: 'bytes32', type: 'bytes32' },
+ ],
+ },
+ { name: '_owner', internalType: 'address', type: 'address' },
+ ],
+ name: 'initialize',
+ outputs: [],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [
+ { name: 'tankId', internalType: 'uint256', type: 'uint256' },
+ { name: '_owner', internalType: 'address', type: 'address' },
+ ],
+ name: 'isAuth',
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
+ },
+ {
+ stateMutability: 'payable',
+ type: 'function',
+ inputs: [
+ {
+ name: 'params',
internalType: 'struct ITankGame.JoinParams',
type: 'tuple',
components: [
@@ -4138,18 +4261,30 @@ export const nonAggressionHookABI = [
{ name: 'playerName', internalType: 'string', type: 'string' },
],
},
- { name: '', internalType: 'bytes', type: 'bytes' },
],
- name: 'afterJoin',
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
+ name: 'join',
+ outputs: [],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
+ name: 'lastDripEpoch',
+ outputs: [{ name: 'epoch', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: 'lastRevealBlock',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
},
{
stateMutability: 'nonpayable',
type: 'function',
inputs: [
- { name: '', internalType: 'address', type: 'address' },
{
- name: '',
+ name: 'params',
internalType: 'struct ITankGame.MoveParams',
type: 'tuple',
components: [
@@ -4166,28 +4301,97 @@ export const nonAggressionHookABI = [
},
],
},
- { name: '', internalType: 'bytes', type: 'bytes' },
],
- name: 'afterMove',
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
+ name: 'move',
+ outputs: [],
},
{
- stateMutability: 'nonpayable',
+ stateMutability: 'view',
type: 'function',
- inputs: [
- { name: '', internalType: 'address', type: 'address' },
- { name: '', internalType: 'bytes', type: 'bytes' },
- ],
- name: 'afterReveal',
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
+ inputs: [],
+ name: 'numTanksAlive',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: 'owner',
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [{ name: 'player', internalType: 'address', type: 'address' }],
+ name: 'players',
+ outputs: [{ name: 'tank', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: 'playersCount',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ name: 'podium',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: 'prizePool',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'nonpayable',
+ type: 'function',
+ inputs: [],
+ name: 'reveal',
+ outputs: [],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: 'revealBlock',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'nonpayable',
+ type: 'function',
+ inputs: [{ name: '_owner', internalType: 'address', type: 'address' }],
+ name: 'setOwner',
+ outputs: [],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: 'settings',
+ outputs: [
+ { name: 'playerCount', internalType: 'uint256', type: 'uint256' },
+ { name: 'boardSize', internalType: 'uint256', type: 'uint256' },
+ { name: 'initAPs', internalType: 'uint256', type: 'uint256' },
+ { name: 'initHearts', internalType: 'uint256', type: 'uint256' },
+ { name: 'initShootRange', internalType: 'uint256', type: 'uint256' },
+ { name: 'epochSeconds', internalType: 'uint256', type: 'uint256' },
+ { name: 'buyInMinimum', internalType: 'uint256', type: 'uint256' },
+ { name: 'revealWaitBlocks', internalType: 'uint256', type: 'uint256' },
+ { name: 'autoStart', internalType: 'bool', type: 'bool' },
+ { name: 'root', internalType: 'bytes32', type: 'bytes32' },
+ ],
},
{
stateMutability: 'nonpayable',
type: 'function',
inputs: [
- { name: 'gameId', internalType: 'address', type: 'address' },
{
- name: 'shootParams',
+ name: 'params',
internalType: 'struct ITankGame.ShootParams',
type: 'tuple',
components: [
@@ -4196,602 +4400,858 @@ export const nonAggressionHookABI = [
{ name: 'shots', internalType: 'uint256', type: 'uint256' },
],
},
- { name: 'hookData', internalType: 'bytes', type: 'bytes' },
],
- name: 'afterShoot',
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
+ name: 'shoot',
+ outputs: [],
},
{
stateMutability: 'nonpayable',
type: 'function',
- inputs: [
- { name: '', internalType: 'address', type: 'address' },
- {
- name: '',
- internalType: 'struct ITankGame.UpgradeParams',
- type: 'tuple',
- components: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- ],
- },
- { name: '', internalType: 'bytes', type: 'bytes' },
+ inputs: [],
+ name: 'start',
+ outputs: [],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: 'state',
+ outputs: [
+ { name: '', internalType: 'enum ITankGame.GameState', type: 'uint8' },
],
- name: 'afterUpgrade',
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
},
{
- stateMutability: 'nonpayable',
+ stateMutability: 'view',
type: 'function',
- inputs: [
- { name: '', internalType: 'address', type: 'address' },
- {
- name: '',
- internalType: 'struct ITankGame.VoteParams',
- type: 'tuple',
- components: [
- { name: 'voter', internalType: 'uint256', type: 'uint256' },
- { name: 'cursed', internalType: 'uint256', type: 'uint256' },
- ],
- },
- { name: '', internalType: 'bytes', type: 'bytes' },
+ inputs: [],
+ name: 'stateData',
+ outputs: [
+ { name: 'playersCount', internalType: 'uint256', type: 'uint256' },
+ { name: 'numTanksAlive', internalType: 'uint256', type: 'uint256' },
+ { name: 'prizePool', internalType: 'uint256', type: 'uint256' },
+ { name: 'epochStart', internalType: 'uint256', type: 'uint256' },
+ { name: 'aliveTanksIdSum', internalType: 'uint256', type: 'uint256' },
+ { name: 'revealBlock', internalType: 'uint256', type: 'uint256' },
+ { name: 'lastRevealBlock', internalType: 'uint256', type: 'uint256' },
+ { name: 'owner', internalType: 'address', type: 'address' },
],
- name: 'afterVote',
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
},
{
- stateMutability: 'pure',
+ stateMutability: 'view',
type: 'function',
inputs: [
- { name: '', internalType: 'address', type: 'address' },
- {
- name: '',
- internalType: 'struct ITankGame.ClaimParams',
- type: 'tuple',
- components: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- { name: 'claimer', internalType: 'address', type: 'address' },
- ],
- },
- { name: '', internalType: 'bytes', type: 'bytes' },
+ { name: 'tankId', internalType: 'uint256', type: 'uint256' },
+ { name: '', internalType: 'uint256', type: 'uint256' },
+ ],
+ name: 'tankHooks',
+ outputs: [
+ { name: 'hooks', internalType: 'contract IHooks', type: 'address' },
],
- name: 'beforeClaim',
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
},
{
- stateMutability: 'pure',
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
+ name: 'tanks',
+ outputs: [
+ { name: 'owner', internalType: 'address', type: 'address' },
+ { name: 'hearts', internalType: 'uint256', type: 'uint256' },
+ { name: 'aps', internalType: 'uint256', type: 'uint256' },
+ { name: 'range', internalType: 'uint256', type: 'uint256' },
+ ],
+ },
+ {
+ stateMutability: 'nonpayable',
type: 'function',
inputs: [
- { name: '', internalType: 'address', type: 'address' },
{
- name: '',
- internalType: 'struct ITankGame.DelegateParams',
+ name: 'params',
+ internalType: 'struct ITankGame.UpgradeParams',
type: 'tuple',
components: [
{ name: 'tankId', internalType: 'uint256', type: 'uint256' },
- { name: 'delegatee', internalType: 'address', type: 'address' },
],
},
- { name: '', internalType: 'bytes', type: 'bytes' },
],
- name: 'beforeDelegate',
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
+ name: 'upgrade',
+ outputs: [],
},
{
- stateMutability: 'pure',
+ stateMutability: 'nonpayable',
type: 'function',
inputs: [
- { name: '', internalType: 'address', type: 'address' },
{
- name: '',
- internalType: 'struct ITankGame.DripParams',
+ name: 'params',
+ internalType: 'struct ITankGame.VoteParams',
type: 'tuple',
components: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
+ { name: 'voter', internalType: 'uint256', type: 'uint256' },
+ { name: 'cursed', internalType: 'uint256', type: 'uint256' },
],
},
- { name: '', internalType: 'bytes', type: 'bytes' },
],
- name: 'beforeDrip',
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
+ name: 'vote',
+ outputs: [],
},
{
- stateMutability: 'pure',
+ stateMutability: 'view',
type: 'function',
inputs: [
- { name: '', internalType: 'address', type: 'address' },
- {
- name: '',
- internalType: 'struct ITankGame.GiveParams',
- type: 'tuple',
- components: [
- { name: 'fromId', internalType: 'uint256', type: 'uint256' },
- { name: 'toId', internalType: 'uint256', type: 'uint256' },
- { name: 'hearts', internalType: 'uint256', type: 'uint256' },
- { name: 'aps', internalType: 'uint256', type: 'uint256' },
- ],
- },
- { name: '', internalType: 'bytes', type: 'bytes' },
+ { name: 'epoch', internalType: 'uint256', type: 'uint256' },
+ { name: 'tankId', internalType: 'uint256', type: 'uint256' },
],
- name: 'beforeGive',
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
+ name: 'votedThisEpoch',
+ outputs: [{ name: 'voted', internalType: 'bool', type: 'bool' }],
},
{
- stateMutability: 'pure',
+ stateMutability: 'view',
type: 'function',
inputs: [
- { name: '', internalType: 'address', type: 'address' },
- {
- name: '',
- internalType: 'struct ITankGame.JoinParams',
- type: 'tuple',
- components: [
- { name: 'joiner', internalType: 'address', type: 'address' },
- { name: 'proof', internalType: 'bytes32[]', type: 'bytes32[]' },
- { name: 'playerName', internalType: 'string', type: 'string' },
- ],
- },
- { name: '', internalType: 'bytes', type: 'bytes' },
+ { name: 'epoch', internalType: 'uint256', type: 'uint256' },
+ { name: 'tankId', internalType: 'uint256', type: 'uint256' },
],
- name: 'beforeJoin',
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
+ name: 'votesPerEpoch',
+ outputs: [{ name: 'votes', internalType: 'uint256', type: 'uint256' }],
},
{
- stateMutability: 'nonpayable',
+ stateMutability: 'view',
type: 'function',
+ inputs: [{ name: 'epoch', internalType: 'uint256', type: 'uint256' }],
+ name: 'votingClosed',
+ outputs: [{ name: 'votingClosed', internalType: 'bool', type: 'bool' }],
+ },
+ {
+ type: 'event',
+ anonymous: false,
inputs: [
- { name: '', internalType: 'address', type: 'address' },
{
- name: '',
- internalType: 'struct ITankGame.MoveParams',
- type: 'tuple',
- components: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- {
- name: 'to',
- internalType: 'struct Board.Point',
- type: 'tuple',
- components: [
- { name: 'x', internalType: 'uint256', type: 'uint256' },
- { name: 'y', internalType: 'uint256', type: 'uint256' },
- { name: 'z', internalType: 'uint256', type: 'uint256' },
- ],
- },
- ],
+ name: 'hunter',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'victim',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'reward',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
},
- { name: '', internalType: 'bytes', type: 'bytes' },
],
- name: 'beforeMove',
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
+ name: 'BountyCompleted',
},
{
- stateMutability: 'pure',
- type: 'function',
+ type: 'event',
+ anonymous: false,
inputs: [
- { name: '', internalType: 'address', type: 'address' },
- { name: '', internalType: 'bytes', type: 'bytes' },
+ {
+ name: 'reciever',
+ internalType: 'address',
+ type: 'address',
+ indexed: false,
+ },
+ {
+ name: 'tankId',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'amount',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
],
- name: 'beforeReveal',
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
+ name: 'Claim',
},
{
- stateMutability: 'nonpayable',
- type: 'function',
+ type: 'event',
+ anonymous: false,
inputs: [
- { name: '', internalType: 'address', type: 'address' },
{
- name: '',
- internalType: 'struct ITankGame.ShootParams',
- type: 'tuple',
- components: [
- { name: 'fromId', internalType: 'uint256', type: 'uint256' },
- { name: 'toId', internalType: 'uint256', type: 'uint256' },
- { name: 'shots', internalType: 'uint256', type: 'uint256' },
- ],
+ name: 'poker',
+ internalType: 'address',
+ type: 'address',
+ indexed: false,
+ },
+ {
+ name: 'blocknumber',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
},
- { name: '', internalType: 'bytes', type: 'bytes' },
],
- name: 'beforeShoot',
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
+ name: 'Commit',
},
{
- stateMutability: 'nonpayable',
- type: 'function',
+ type: 'event',
+ anonymous: false,
inputs: [
- { name: '', internalType: 'address', type: 'address' },
{
- name: '',
- internalType: 'struct ITankGame.UpgradeParams',
- type: 'tuple',
- components: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- ],
+ name: 'cursedTank',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'voter',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'epoch',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
},
- { name: '', internalType: 'bytes', type: 'bytes' },
],
- name: 'beforeUpgrade',
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
+ name: 'Curse',
},
{
- stateMutability: 'nonpayable',
- type: 'function',
+ type: 'event',
+ anonymous: false,
inputs: [
- { name: '', internalType: 'address', type: 'address' },
{
- name: '',
- internalType: 'struct ITankGame.VoteParams',
- type: 'tuple',
- components: [
- { name: 'voter', internalType: 'uint256', type: 'uint256' },
- { name: 'cursed', internalType: 'uint256', type: 'uint256' },
- ],
+ name: 'killer',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'killed',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
},
- { name: '', internalType: 'bytes', type: 'bytes' },
],
- name: 'beforeVote',
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
+ name: 'Death',
},
-] as const
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// Strings
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-export const stringsABI = [
{
- type: 'error',
+ type: 'event',
+ anonymous: false,
inputs: [
- { name: 'value', internalType: 'uint256', type: 'uint256' },
- { name: 'length', internalType: 'uint256', type: 'uint256' },
+ {
+ name: 'tank',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'delegate',
+ internalType: 'address',
+ type: 'address',
+ indexed: false,
+ },
+ {
+ name: 'owner',
+ internalType: 'address',
+ type: 'address',
+ indexed: false,
+ },
],
- name: 'StringsInsufficientHexLength',
- },
-] as const
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// TankGame
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-/**
- * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x2c927e3b60586eb229Dcc55978Bc96A7E00Fb414)
- * -
- */
-export const tankGameABI = [
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: '_getEpoch',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ name: 'Delegate',
},
{
- stateMutability: 'nonpayable',
- type: 'function',
+ type: 'event',
+ anonymous: false,
inputs: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- { name: 'hooks', internalType: 'contract IHooks', type: 'address' },
+ {
+ name: 'tankId',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'amount',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'epoch',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
],
- name: 'addHooks',
- outputs: [],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'aliveTanksIdSum',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'board',
- outputs: [{ name: '', internalType: 'contract Board', type: 'address' }],
+ name: 'Drip',
},
{
- stateMutability: 'nonpayable',
- type: 'function',
+ type: 'event',
+ anonymous: false,
inputs: [
{
- name: 'params',
- internalType: 'struct ITankGame.ClaimParams',
+ name: 'settings',
+ internalType: 'struct ITankGame.GameSettings',
type: 'tuple',
components: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- { name: 'claimer', internalType: 'address', type: 'address' },
+ { name: 'playerCount', internalType: 'uint256', type: 'uint256' },
+ { name: 'boardSize', internalType: 'uint256', type: 'uint256' },
+ { name: 'initAPs', internalType: 'uint256', type: 'uint256' },
+ { name: 'initHearts', internalType: 'uint256', type: 'uint256' },
+ { name: 'initShootRange', internalType: 'uint256', type: 'uint256' },
+ { name: 'epochSeconds', internalType: 'uint256', type: 'uint256' },
+ { name: 'buyInMinimum', internalType: 'uint256', type: 'uint256' },
+ {
+ name: 'revealWaitBlocks',
+ internalType: 'uint256',
+ type: 'uint256',
+ },
+ { name: 'autoStart', internalType: 'bool', type: 'bool' },
+ { name: 'root', internalType: 'bytes32', type: 'bytes32' },
],
+ indexed: false,
},
],
- name: 'claim',
- outputs: [],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
- name: 'claimed',
- outputs: [{ name: 'claimed', internalType: 'bool', type: 'bool' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- name: 'deadTanks',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ name: 'GameInit',
},
{
- stateMutability: 'nonpayable',
- type: 'function',
+ type: 'event',
+ anonymous: false,
inputs: [
{
- name: 'params',
- internalType: 'struct ITankGame.DelegateParams',
- type: 'tuple',
- components: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- { name: 'delegatee', internalType: 'address', type: 'address' },
- ],
+ name: 'winner',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'second',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'third',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'prizePool',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
},
],
- name: 'delegate',
- outputs: [],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- { name: 'delegate', internalType: 'address', type: 'address' },
- ],
- name: 'delegates',
- outputs: [{ name: 'isDelegate', internalType: 'bool', type: 'bool' }],
- },
- {
- stateMutability: 'payable',
- type: 'function',
- inputs: [],
- name: 'donate',
- outputs: [],
+ name: 'GameOver',
},
+ { type: 'event', anonymous: false, inputs: [], name: 'GameStarted' },
{
- stateMutability: 'nonpayable',
- type: 'function',
+ type: 'event',
+ anonymous: false,
inputs: [
{
- name: 'params',
- internalType: 'struct ITankGame.DripParams',
- type: 'tuple',
- components: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- ],
+ name: 'fromId',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'toId',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'hearts',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
},
+ { name: 'aps', internalType: 'uint256', type: 'uint256', indexed: false },
],
- name: 'drip',
- outputs: [],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'epochStart',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'factory',
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
+ name: 'Give',
},
{
- stateMutability: 'nonpayable',
- type: 'function',
+ type: 'event',
+ anonymous: false,
inputs: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- { name: 'hooks', internalType: 'contract IHooks', type: 'address' },
+ {
+ name: 'tankId',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'hook',
+ internalType: 'address',
+ type: 'address',
+ indexed: false,
+ },
],
- name: 'forceAddDefaultHook',
- outputs: [],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
- name: 'getLastDrip',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
- name: 'getUpgradeCost',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ name: 'HooksAdded',
},
{
- stateMutability: 'nonpayable',
- type: 'function',
+ type: 'event',
+ anonymous: false,
inputs: [
{
- name: 'params',
- internalType: 'struct ITankGame.GiveParams',
+ name: 'tankId',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'position',
+ internalType: 'struct Board.Point',
type: 'tuple',
components: [
- { name: 'fromId', internalType: 'uint256', type: 'uint256' },
- { name: 'toId', internalType: 'uint256', type: 'uint256' },
- { name: 'hearts', internalType: 'uint256', type: 'uint256' },
- { name: 'aps', internalType: 'uint256', type: 'uint256' },
+ { name: 'x', internalType: 'uint256', type: 'uint256' },
+ { name: 'y', internalType: 'uint256', type: 'uint256' },
+ { name: 'z', internalType: 'uint256', type: 'uint256' },
],
+ indexed: false,
},
],
- name: 'give',
- outputs: [],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'position', internalType: 'uint256', type: 'uint256' }],
- name: 'heartsOnBoard',
- outputs: [{ name: 'heartCount', internalType: 'uint256', type: 'uint256' }],
+ name: 'Move',
},
{
- stateMutability: 'payable',
- type: 'function',
+ type: 'event',
+ anonymous: false,
inputs: [
{
- name: 'gs',
- internalType: 'struct ITankGame.GameSettings',
+ name: 'player',
+ internalType: 'address',
+ type: 'address',
+ indexed: false,
+ },
+ {
+ name: 'tankId',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'position',
+ internalType: 'struct Board.Point',
type: 'tuple',
components: [
- { name: 'playerCount', internalType: 'uint256', type: 'uint256' },
- { name: 'boardSize', internalType: 'uint256', type: 'uint256' },
- { name: 'initAPs', internalType: 'uint256', type: 'uint256' },
- { name: 'initHearts', internalType: 'uint256', type: 'uint256' },
- { name: 'initShootRange', internalType: 'uint256', type: 'uint256' },
- { name: 'epochSeconds', internalType: 'uint256', type: 'uint256' },
- { name: 'buyInMinimum', internalType: 'uint256', type: 'uint256' },
- {
- name: 'revealWaitBlocks',
- internalType: 'uint256',
- type: 'uint256',
- },
- { name: 'autoStart', internalType: 'bool', type: 'bool' },
- { name: 'root', internalType: 'bytes32', type: 'bytes32' },
+ { name: 'x', internalType: 'uint256', type: 'uint256' },
+ { name: 'y', internalType: 'uint256', type: 'uint256' },
+ { name: 'z', internalType: 'uint256', type: 'uint256' },
],
+ indexed: false,
},
- { name: '_owner', internalType: 'address', type: 'address' },
+ { name: 'name', internalType: 'string', type: 'string', indexed: false },
],
- name: 'initialize',
- outputs: [],
+ name: 'PlayerJoined',
},
{
- stateMutability: 'view',
- type: 'function',
+ type: 'event',
+ anonymous: false,
inputs: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- { name: '_owner', internalType: 'address', type: 'address' },
+ {
+ name: 'donator',
+ internalType: 'address',
+ type: 'address',
+ indexed: false,
+ },
+ {
+ name: 'amount',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'newTotal',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
],
- name: 'isAuth',
- outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
+ name: 'PrizeIncrease',
},
{
- stateMutability: 'payable',
- type: 'function',
- inputs: [
+ type: 'event',
+ anonymous: false,
+ inputs: [
{
- name: 'params',
- internalType: 'struct ITankGame.JoinParams',
- type: 'tuple',
- components: [
- { name: 'joiner', internalType: 'address', type: 'address' },
- { name: 'proof', internalType: 'bytes32[]', type: 'bytes32[]' },
- { name: 'playerName', internalType: 'string', type: 'string' },
- ],
+ name: 'poker',
+ internalType: 'address',
+ type: 'address',
+ indexed: false,
+ },
+ {
+ name: 'blocknumber',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
},
],
- name: 'join',
- outputs: [],
+ name: 'Reveal',
},
{
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
- name: 'lastDripEpoch',
- outputs: [{ name: 'epoch', internalType: 'uint256', type: 'uint256' }],
+ type: 'event',
+ anonymous: false,
+ inputs: [
+ {
+ name: 'savior',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'saved',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ ],
+ name: 'Revive',
},
{
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'lastRevealBlock',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ type: 'event',
+ anonymous: false,
+ inputs: [
+ {
+ name: 'tankId',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'targetId',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ ],
+ name: 'Shoot',
},
{
- stateMutability: 'nonpayable',
- type: 'function',
+ type: 'event',
+ anonymous: false,
inputs: [
{
- name: 'params',
- internalType: 'struct ITankGame.MoveParams',
+ name: 'poker',
+ internalType: 'address',
+ type: 'address',
+ indexed: false,
+ },
+ {
+ name: 'position',
+ internalType: 'struct Board.Point',
type: 'tuple',
components: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- {
- name: 'to',
- internalType: 'struct Board.Point',
- type: 'tuple',
- components: [
- { name: 'x', internalType: 'uint256', type: 'uint256' },
- { name: 'y', internalType: 'uint256', type: 'uint256' },
- { name: 'z', internalType: 'uint256', type: 'uint256' },
- ],
- },
+ { name: 'x', internalType: 'uint256', type: 'uint256' },
+ { name: 'y', internalType: 'uint256', type: 'uint256' },
+ { name: 'z', internalType: 'uint256', type: 'uint256' },
],
+ indexed: false,
},
],
- name: 'move',
- outputs: [],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'numTanksAlive',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ name: 'SpawnHeart',
},
{
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'owner',
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
+ type: 'event',
+ anonymous: false,
+ inputs: [
+ {
+ name: 'tankId',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'range',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ ],
+ name: 'Upgrade',
},
{
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'player', internalType: 'address', type: 'address' }],
- name: 'players',
- outputs: [{ name: 'tank', internalType: 'uint256', type: 'uint256' }],
+ type: 'event',
+ anonymous: false,
+ inputs: [
+ {
+ name: 'voter',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'cursed',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ {
+ name: 'epoch',
+ internalType: 'uint256',
+ type: 'uint256',
+ indexed: false,
+ },
+ ],
+ name: 'Vote',
},
+] as const
+
+/**
+ * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x2c927e3b60586eb229Dcc55978Bc96A7E00Fb414)
+ * -
+ */
+export const tankGameAddress = {
+ 5: '0x2c927e3b60586eb229Dcc55978Bc96A7E00Fb414',
+ 31337: '0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0',
+} as const
+
+/**
+ * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x2c927e3b60586eb229Dcc55978Bc96A7E00Fb414)
+ * -
+ */
+export const tankGameConfig = {
+ address: tankGameAddress,
+ abi: tankGameABI,
+} as const
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// TankGameFactory
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x9758ce8FE412C72893b42FFEdAEDff1840e1886f)
+ * -
+ */
+export const tankGameFactoryABI = [
{
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'playersCount',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ stateMutability: 'nonpayable',
+ type: 'constructor',
+ inputs: [
+ { name: '_gameView', internalType: 'contract GameView', type: 'address' },
+ {
+ name: '_hookFactory',
+ internalType: 'contract HookFactory',
+ type: 'address',
+ },
+ ],
},
{
- stateMutability: 'view',
+ stateMutability: 'nonpayable',
type: 'function',
- inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- name: 'podium',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ inputs: [
+ { name: '_implementation', internalType: 'address', type: 'address' },
+ {
+ name: 'settings',
+ internalType: 'struct ITankGame.GameSettings',
+ type: 'tuple',
+ components: [
+ { name: 'playerCount', internalType: 'uint256', type: 'uint256' },
+ { name: 'boardSize', internalType: 'uint256', type: 'uint256' },
+ { name: 'initAPs', internalType: 'uint256', type: 'uint256' },
+ { name: 'initHearts', internalType: 'uint256', type: 'uint256' },
+ { name: 'initShootRange', internalType: 'uint256', type: 'uint256' },
+ { name: 'epochSeconds', internalType: 'uint256', type: 'uint256' },
+ { name: 'buyInMinimum', internalType: 'uint256', type: 'uint256' },
+ {
+ name: 'revealWaitBlocks',
+ internalType: 'uint256',
+ type: 'uint256',
+ },
+ { name: 'autoStart', internalType: 'bool', type: 'bool' },
+ { name: 'root', internalType: 'bytes32', type: 'bytes32' },
+ ],
+ },
+ { name: '_owner', internalType: 'address', type: 'address' },
+ ],
+ name: 'createGame',
+ outputs: [
+ { name: 'game', internalType: 'contract ITankGame', type: 'address' },
+ ],
},
{
stateMutability: 'view',
type: 'function',
inputs: [],
- name: 'prizePool',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'nonpayable',
- type: 'function',
- inputs: [],
- name: 'reveal',
- outputs: [],
+ name: 'gameView',
+ outputs: [{ name: '', internalType: 'contract GameView', type: 'address' }],
},
{
stateMutability: 'view',
type: 'function',
inputs: [],
- name: 'revealBlock',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ name: 'hookFactory',
+ outputs: [
+ { name: '', internalType: 'contract HookFactory', type: 'address' },
+ ],
},
{
- stateMutability: 'nonpayable',
- type: 'function',
- inputs: [{ name: '_owner', internalType: 'address', type: 'address' }],
- name: 'setOwner',
- outputs: [],
+ type: 'event',
+ anonymous: false,
+ inputs: [
+ {
+ name: 'game',
+ internalType: 'address',
+ type: 'address',
+ indexed: false,
+ },
+ {
+ name: 'settings',
+ internalType: 'struct ITankGame.GameSettings',
+ type: 'tuple',
+ components: [
+ { name: 'playerCount', internalType: 'uint256', type: 'uint256' },
+ { name: 'boardSize', internalType: 'uint256', type: 'uint256' },
+ { name: 'initAPs', internalType: 'uint256', type: 'uint256' },
+ { name: 'initHearts', internalType: 'uint256', type: 'uint256' },
+ { name: 'initShootRange', internalType: 'uint256', type: 'uint256' },
+ { name: 'epochSeconds', internalType: 'uint256', type: 'uint256' },
+ { name: 'buyInMinimum', internalType: 'uint256', type: 'uint256' },
+ {
+ name: 'revealWaitBlocks',
+ internalType: 'uint256',
+ type: 'uint256',
+ },
+ { name: 'autoStart', internalType: 'bool', type: 'bool' },
+ { name: 'root', internalType: 'bytes32', type: 'bytes32' },
+ ],
+ indexed: false,
+ },
+ ],
+ name: 'GameCreated',
+ },
+ { type: 'error', inputs: [], name: 'ERC1167FailedCreateClone' },
+] as const
+
+/**
+ * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x9758ce8FE412C72893b42FFEdAEDff1840e1886f)
+ * -
+ */
+export const tankGameFactoryAddress = {
+ 5: '0x9758ce8FE412C72893b42FFEdAEDff1840e1886f',
+ 31337: '0x5FC8d32690cc91D4c39d9d3abcBD16989F875707',
+} as const
+
+/**
+ * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x9758ce8FE412C72893b42FFEdAEDff1840e1886f)
+ * -
+ */
+export const tankGameFactoryConfig = {
+ address: tankGameFactoryAddress,
+ abi: tankGameFactoryABI,
+} as const
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// TankGameV2Storage
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+export const tankGameV2StorageABI = [
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: 'aliveTanksIdSum',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: 'board',
+ outputs: [{ name: '', internalType: 'contract Board', type: 'address' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
+ name: 'claimed',
+ outputs: [{ name: 'claimed', internalType: 'bool', type: 'bool' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ name: 'deadTanks',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [
+ { name: 'tankId', internalType: 'uint256', type: 'uint256' },
+ { name: 'delegate', internalType: 'address', type: 'address' },
+ ],
+ name: 'delegates',
+ outputs: [{ name: 'isDelegate', internalType: 'bool', type: 'bool' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: 'epochStart',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
+ name: 'lastDripEpoch',
+ outputs: [{ name: 'epoch', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: 'lastRevealBlock',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: 'numTanksAlive',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: 'owner',
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [{ name: 'player', internalType: 'address', type: 'address' }],
+ name: 'players',
+ outputs: [{ name: 'tank', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: 'playersCount',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ name: 'podium',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: 'prizePool',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
+ },
+ {
+ stateMutability: 'view',
+ type: 'function',
+ inputs: [],
+ name: 'revealBlock',
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
},
{
stateMutability: 'view',
@@ -4811,31 +5271,6 @@ export const tankGameABI = [
{ name: 'root', internalType: 'bytes32', type: 'bytes32' },
],
},
- {
- stateMutability: 'nonpayable',
- type: 'function',
- inputs: [
- {
- name: 'params',
- internalType: 'struct ITankGame.ShootParams',
- type: 'tuple',
- components: [
- { name: 'fromId', internalType: 'uint256', type: 'uint256' },
- { name: 'toId', internalType: 'uint256', type: 'uint256' },
- { name: 'shots', internalType: 'uint256', type: 'uint256' },
- ],
- },
- ],
- name: 'shoot',
- outputs: [],
- },
- {
- stateMutability: 'nonpayable',
- type: 'function',
- inputs: [],
- name: 'start',
- outputs: [],
- },
{
stateMutability: 'view',
type: 'function',
@@ -4873,17 +5308,6 @@ export const tankGameABI = [
{ name: 'hooks', internalType: 'contract IHooks', type: 'address' },
],
},
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
- name: 'tankToPosition',
- outputs: [
- { name: 'x', internalType: 'uint256', type: 'uint256' },
- { name: 'y', internalType: 'uint256', type: 'uint256' },
- { name: 'z', internalType: 'uint256', type: 'uint256' },
- ],
- },
{
stateMutability: 'view',
type: 'function',
@@ -4896,46 +5320,6 @@ export const tankGameABI = [
{ name: 'range', internalType: 'uint256', type: 'uint256' },
],
},
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'position', internalType: 'uint256', type: 'uint256' }],
- name: 'tanksOnBoard',
- outputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'nonpayable',
- type: 'function',
- inputs: [
- {
- name: 'params',
- internalType: 'struct ITankGame.UpgradeParams',
- type: 'tuple',
- components: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- ],
- },
- ],
- name: 'upgrade',
- outputs: [],
- },
- {
- stateMutability: 'nonpayable',
- type: 'function',
- inputs: [
- {
- name: 'params',
- internalType: 'struct ITankGame.VoteParams',
- type: 'tuple',
- components: [
- { name: 'voter', internalType: 'uint256', type: 'uint256' },
- { name: 'cursed', internalType: 'uint256', type: 'uint256' },
- ],
- },
- ],
- name: 'vote',
- outputs: [],
- },
{
stateMutability: 'view',
type: 'function',
@@ -4963,14494 +5347,9789 @@ export const tankGameABI = [
name: 'votingClosed',
outputs: [{ name: 'votingClosed', internalType: 'bool', type: 'bool' }],
},
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'hunter',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'victim',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'reward',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'BountyCompleted',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'reciever',
- internalType: 'address',
- type: 'address',
- indexed: false,
- },
- {
- name: 'tankId',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'amount',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'Claim',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'poker',
- internalType: 'address',
- type: 'address',
- indexed: false,
- },
- {
- name: 'blocknumber',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'Commit',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'cursedTank',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'voter',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'epoch',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'Curse',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'killer',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'killed',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'Death',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'tank',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'delegate',
- internalType: 'address',
- type: 'address',
- indexed: false,
- },
- {
- name: 'owner',
- internalType: 'address',
- type: 'address',
- indexed: false,
- },
- ],
- name: 'Delegate',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'tankId',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'amount',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'epoch',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'Drip',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'settings',
- internalType: 'struct ITankGame.GameSettings',
- type: 'tuple',
- components: [
- { name: 'playerCount', internalType: 'uint256', type: 'uint256' },
- { name: 'boardSize', internalType: 'uint256', type: 'uint256' },
- { name: 'initAPs', internalType: 'uint256', type: 'uint256' },
- { name: 'initHearts', internalType: 'uint256', type: 'uint256' },
- { name: 'initShootRange', internalType: 'uint256', type: 'uint256' },
- { name: 'epochSeconds', internalType: 'uint256', type: 'uint256' },
- { name: 'buyInMinimum', internalType: 'uint256', type: 'uint256' },
- {
- name: 'revealWaitBlocks',
- internalType: 'uint256',
- type: 'uint256',
- },
- { name: 'autoStart', internalType: 'bool', type: 'bool' },
- { name: 'root', internalType: 'bytes32', type: 'bytes32' },
- ],
- indexed: false,
- },
- ],
- name: 'GameInit',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'winner',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'second',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'third',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'prizePool',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'GameOver',
- },
- { type: 'event', anonymous: false, inputs: [], name: 'GameStarted' },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'fromId',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'toId',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'hearts',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- { name: 'aps', internalType: 'uint256', type: 'uint256', indexed: false },
- ],
- name: 'Give',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'tankId',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'hook',
- internalType: 'address',
- type: 'address',
- indexed: false,
- },
- ],
- name: 'HooksAdded',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'tankId',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'position',
- internalType: 'struct Board.Point',
- type: 'tuple',
- components: [
- { name: 'x', internalType: 'uint256', type: 'uint256' },
- { name: 'y', internalType: 'uint256', type: 'uint256' },
- { name: 'z', internalType: 'uint256', type: 'uint256' },
- ],
- indexed: false,
- },
- ],
- name: 'Move',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'player',
- internalType: 'address',
- type: 'address',
- indexed: false,
- },
- {
- name: 'tankId',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'position',
- internalType: 'struct Board.Point',
- type: 'tuple',
- components: [
- { name: 'x', internalType: 'uint256', type: 'uint256' },
- { name: 'y', internalType: 'uint256', type: 'uint256' },
- { name: 'z', internalType: 'uint256', type: 'uint256' },
- ],
- indexed: false,
- },
- { name: 'name', internalType: 'string', type: 'string', indexed: false },
- ],
- name: 'PlayerJoined',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'donator',
- internalType: 'address',
- type: 'address',
- indexed: false,
- },
- {
- name: 'amount',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'newTotal',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'PrizeIncrease',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'poker',
- internalType: 'address',
- type: 'address',
- indexed: false,
- },
- {
- name: 'blocknumber',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'Reveal',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'savior',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'saved',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'Revive',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'tankId',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'targetId',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'Shoot',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'poker',
- internalType: 'address',
- type: 'address',
- indexed: false,
- },
- {
- name: 'position',
- internalType: 'struct Board.Point',
- type: 'tuple',
- components: [
- { name: 'x', internalType: 'uint256', type: 'uint256' },
- { name: 'y', internalType: 'uint256', type: 'uint256' },
- { name: 'z', internalType: 'uint256', type: 'uint256' },
- ],
- indexed: false,
- },
- ],
- name: 'SpawnHeart',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'tankId',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'range',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'Upgrade',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'voter',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'cursed',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'epoch',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'Vote',
- },
-] as const
-
-/**
- * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x2c927e3b60586eb229Dcc55978Bc96A7E00Fb414)
- * -
- */
-export const tankGameAddress = {
- 5: '0x2c927e3b60586eb229Dcc55978Bc96A7E00Fb414',
- 31337: '0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0',
-} as const
-
-/**
- * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x2c927e3b60586eb229Dcc55978Bc96A7E00Fb414)
- * -
- */
-export const tankGameConfig = {
- address: tankGameAddress,
- abi: tankGameABI,
-} as const
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// TankGameFactory
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-/**
- * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x9758ce8FE412C72893b42FFEdAEDff1840e1886f)
- * -
- */
-export const tankGameFactoryABI = [
- {
- stateMutability: 'nonpayable',
- type: 'constructor',
- inputs: [
- { name: '_gameView', internalType: 'contract GameView', type: 'address' },
- {
- name: '_hookFactory',
- internalType: 'contract HookFactory',
- type: 'address',
- },
- ],
- },
- {
- stateMutability: 'nonpayable',
- type: 'function',
- inputs: [
- { name: '_implementation', internalType: 'address', type: 'address' },
- {
- name: 'settings',
- internalType: 'struct ITankGame.GameSettings',
- type: 'tuple',
- components: [
- { name: 'playerCount', internalType: 'uint256', type: 'uint256' },
- { name: 'boardSize', internalType: 'uint256', type: 'uint256' },
- { name: 'initAPs', internalType: 'uint256', type: 'uint256' },
- { name: 'initHearts', internalType: 'uint256', type: 'uint256' },
- { name: 'initShootRange', internalType: 'uint256', type: 'uint256' },
- { name: 'epochSeconds', internalType: 'uint256', type: 'uint256' },
- { name: 'buyInMinimum', internalType: 'uint256', type: 'uint256' },
- {
- name: 'revealWaitBlocks',
- internalType: 'uint256',
- type: 'uint256',
- },
- { name: 'autoStart', internalType: 'bool', type: 'bool' },
- { name: 'root', internalType: 'bytes32', type: 'bytes32' },
- ],
- },
- { name: '_owner', internalType: 'address', type: 'address' },
- ],
- name: 'createGame',
- outputs: [
- { name: 'game', internalType: 'contract ITankGame', type: 'address' },
- ],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'gameView',
- outputs: [{ name: '', internalType: 'contract GameView', type: 'address' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'hookFactory',
- outputs: [
- { name: '', internalType: 'contract HookFactory', type: 'address' },
- ],
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'game',
- internalType: 'address',
- type: 'address',
- indexed: false,
- },
- {
- name: 'settings',
- internalType: 'struct ITankGame.GameSettings',
- type: 'tuple',
- components: [
- { name: 'playerCount', internalType: 'uint256', type: 'uint256' },
- { name: 'boardSize', internalType: 'uint256', type: 'uint256' },
- { name: 'initAPs', internalType: 'uint256', type: 'uint256' },
- { name: 'initHearts', internalType: 'uint256', type: 'uint256' },
- { name: 'initShootRange', internalType: 'uint256', type: 'uint256' },
- { name: 'epochSeconds', internalType: 'uint256', type: 'uint256' },
- { name: 'buyInMinimum', internalType: 'uint256', type: 'uint256' },
- {
- name: 'revealWaitBlocks',
- internalType: 'uint256',
- type: 'uint256',
- },
- { name: 'autoStart', internalType: 'bool', type: 'bool' },
- { name: 'root', internalType: 'bytes32', type: 'bytes32' },
- ],
- indexed: false,
- },
- ],
- name: 'GameCreated',
- },
- { type: 'error', inputs: [], name: 'ERC1167FailedCreateClone' },
-] as const
-
-/**
- * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x9758ce8FE412C72893b42FFEdAEDff1840e1886f)
- * -
- */
-export const tankGameFactoryAddress = {
- 5: '0x9758ce8FE412C72893b42FFEdAEDff1840e1886f',
- 31337: '0x5FC8d32690cc91D4c39d9d3abcBD16989F875707',
-} as const
-
-/**
- * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x9758ce8FE412C72893b42FFEdAEDff1840e1886f)
- * -
- */
-export const tankGameFactoryConfig = {
- address: tankGameFactoryAddress,
- abi: tankGameFactoryABI,
-} as const
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// TankGameLogic
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-export const tankGameLogicABI = [
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'hunter',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'victim',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'reward',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'BountyCompleted',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'reciever',
- internalType: 'address',
- type: 'address',
- indexed: false,
- },
- {
- name: 'tankId',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'amount',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'Claim',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'poker',
- internalType: 'address',
- type: 'address',
- indexed: false,
- },
- {
- name: 'blocknumber',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'Commit',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'cursedTank',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'voter',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'epoch',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'Curse',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'killer',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'killed',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'Death',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'tank',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'delegate',
- internalType: 'address',
- type: 'address',
- indexed: false,
- },
- {
- name: 'owner',
- internalType: 'address',
- type: 'address',
- indexed: false,
- },
- ],
- name: 'Delegate',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'tankId',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'amount',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'epoch',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'Drip',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'settings',
- internalType: 'struct ITankGame.GameSettings',
- type: 'tuple',
- components: [
- { name: 'playerCount', internalType: 'uint256', type: 'uint256' },
- { name: 'boardSize', internalType: 'uint256', type: 'uint256' },
- { name: 'initAPs', internalType: 'uint256', type: 'uint256' },
- { name: 'initHearts', internalType: 'uint256', type: 'uint256' },
- { name: 'initShootRange', internalType: 'uint256', type: 'uint256' },
- { name: 'epochSeconds', internalType: 'uint256', type: 'uint256' },
- { name: 'buyInMinimum', internalType: 'uint256', type: 'uint256' },
- {
- name: 'revealWaitBlocks',
- internalType: 'uint256',
- type: 'uint256',
- },
- { name: 'root', internalType: 'bytes32', type: 'bytes32' },
- ],
- indexed: false,
- },
- ],
- name: 'GameInit',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'winner',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'second',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'third',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'prizePool',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'GameOver',
- },
- { type: 'event', anonymous: false, inputs: [], name: 'GameStarted' },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'fromId',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'toId',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'hearts',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- { name: 'aps', internalType: 'uint256', type: 'uint256', indexed: false },
- ],
- name: 'Give',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'tankId',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'hook',
- internalType: 'address',
- type: 'address',
- indexed: false,
- },
- ],
- name: 'HooksAdded',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'tankId',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'position',
- internalType: 'struct Board.Point',
- type: 'tuple',
- components: [
- { name: 'x', internalType: 'uint256', type: 'uint256' },
- { name: 'y', internalType: 'uint256', type: 'uint256' },
- { name: 'z', internalType: 'uint256', type: 'uint256' },
- ],
- indexed: false,
- },
- ],
- name: 'Move',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'player',
- internalType: 'address',
- type: 'address',
- indexed: false,
- },
- {
- name: 'tankId',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'position',
- internalType: 'struct Board.Point',
- type: 'tuple',
- components: [
- { name: 'x', internalType: 'uint256', type: 'uint256' },
- { name: 'y', internalType: 'uint256', type: 'uint256' },
- { name: 'z', internalType: 'uint256', type: 'uint256' },
- ],
- indexed: false,
- },
- { name: 'name', internalType: 'string', type: 'string', indexed: false },
- ],
- name: 'PlayerJoined',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'donator',
- internalType: 'address',
- type: 'address',
- indexed: false,
- },
- {
- name: 'amount',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'newTotal',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'PrizeIncrease',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'poker',
- internalType: 'address',
- type: 'address',
- indexed: false,
- },
- {
- name: 'blocknumber',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'Reveal',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'savior',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'saved',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'Revive',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'tankId',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'targetId',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'Shoot',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'poker',
- internalType: 'address',
- type: 'address',
- indexed: false,
- },
- {
- name: 'position',
- internalType: 'struct Board.Point',
- type: 'tuple',
- components: [
- { name: 'x', internalType: 'uint256', type: 'uint256' },
- { name: 'y', internalType: 'uint256', type: 'uint256' },
- { name: 'z', internalType: 'uint256', type: 'uint256' },
- ],
- indexed: false,
- },
- ],
- name: 'SpawnHeart',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'tankId',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'range',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'Upgrade',
- },
- {
- type: 'event',
- anonymous: false,
- inputs: [
- {
- name: 'voter',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'cursed',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- {
- name: 'epoch',
- internalType: 'uint256',
- type: 'uint256',
- indexed: false,
- },
- ],
- name: 'Vote',
- },
- {
- stateMutability: 'nonpayable',
- type: 'function',
- inputs: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- { name: 'hooks', internalType: 'contract IHooks', type: 'address' },
- ],
- name: 'addHooks',
- outputs: [],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'aliveTanksIdSum',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'board',
- outputs: [{ name: '', internalType: 'contract Board', type: 'address' }],
- },
- {
- stateMutability: 'nonpayable',
- type: 'function',
- inputs: [
- {
- name: 'params',
- internalType: 'struct ITankGame.ClaimParams',
- type: 'tuple',
- components: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- { name: 'claimer', internalType: 'address', type: 'address' },
- ],
- },
- ],
- name: 'claim',
- outputs: [],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
- name: 'claimed',
- outputs: [{ name: 'claimed', internalType: 'bool', type: 'bool' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- name: 'deadTanks',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'nonpayable',
- type: 'function',
- inputs: [
- {
- name: 'params',
- internalType: 'struct ITankGame.DelegateParams',
- type: 'tuple',
- components: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- { name: 'delegatee', internalType: 'address', type: 'address' },
- ],
- },
- ],
- name: 'delegate',
- outputs: [],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- { name: 'delegate', internalType: 'address', type: 'address' },
- ],
- name: 'delegates',
- outputs: [{ name: 'isDelegate', internalType: 'bool', type: 'bool' }],
- },
- {
- stateMutability: 'payable',
- type: 'function',
- inputs: [],
- name: 'donate',
- outputs: [],
- },
- {
- stateMutability: 'nonpayable',
- type: 'function',
- inputs: [
- {
- name: 'params',
- internalType: 'struct ITankGame.DripParams',
- type: 'tuple',
- components: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- ],
- },
- ],
- name: 'drip',
- outputs: [],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'epochStart',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'nonpayable',
- type: 'function',
- inputs: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- { name: 'hooks', internalType: 'contract IHooks', type: 'address' },
- ],
- name: 'forceAddDefaultHook',
- outputs: [],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'getBoard',
- outputs: [{ name: '', internalType: 'contract Board', type: 'address' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'getEpoch',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
- name: 'getLastDrip',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'getPlayerCount',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'getSettings',
- outputs: [
- {
- name: '',
- internalType: 'struct ITankGame.GameSettings',
- type: 'tuple',
- components: [
- { name: 'playerCount', internalType: 'uint256', type: 'uint256' },
- { name: 'boardSize', internalType: 'uint256', type: 'uint256' },
- { name: 'initAPs', internalType: 'uint256', type: 'uint256' },
- { name: 'initHearts', internalType: 'uint256', type: 'uint256' },
- { name: 'initShootRange', internalType: 'uint256', type: 'uint256' },
- { name: 'epochSeconds', internalType: 'uint256', type: 'uint256' },
- { name: 'buyInMinimum', internalType: 'uint256', type: 'uint256' },
- {
- name: 'revealWaitBlocks',
- internalType: 'uint256',
- type: 'uint256',
- },
- { name: 'root', internalType: 'bytes32', type: 'bytes32' },
- ],
- },
- ],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'getState',
- outputs: [
- { name: '', internalType: 'enum ITankGame.GameState', type: 'uint8' },
- ],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
- name: 'getTank',
- outputs: [
- {
- name: '',
- internalType: 'struct ITankGame.Tank',
- type: 'tuple',
- components: [
- { name: 'owner', internalType: 'address', type: 'address' },
- { name: 'hearts', internalType: 'uint256', type: 'uint256' },
- { name: 'aps', internalType: 'uint256', type: 'uint256' },
- { name: 'range', internalType: 'uint256', type: 'uint256' },
- ],
- },
- ],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
- name: 'getUpgradeCost',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'nonpayable',
- type: 'function',
- inputs: [
- {
- name: 'params',
- internalType: 'struct ITankGame.GiveParams',
- type: 'tuple',
- components: [
- { name: 'fromId', internalType: 'uint256', type: 'uint256' },
- { name: 'toId', internalType: 'uint256', type: 'uint256' },
- { name: 'hearts', internalType: 'uint256', type: 'uint256' },
- { name: 'aps', internalType: 'uint256', type: 'uint256' },
- ],
- },
- ],
- name: 'give',
- outputs: [],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'position', internalType: 'uint256', type: 'uint256' }],
- name: 'heartsOnBoard',
- outputs: [{ name: 'heartCount', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- { name: '_owner', internalType: 'address', type: 'address' },
- ],
- name: 'isAuth',
- outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
- },
- {
- stateMutability: 'payable',
- type: 'function',
- inputs: [
- {
- name: 'params',
- internalType: 'struct ITankGame.JoinParams',
- type: 'tuple',
- components: [
- { name: 'joiner', internalType: 'address', type: 'address' },
- { name: 'proof', internalType: 'bytes32[]', type: 'bytes32[]' },
- { name: 'playerName', internalType: 'string', type: 'string' },
- ],
- },
- ],
- name: 'join',
- outputs: [],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
- name: 'lastDripEpoch',
- outputs: [{ name: 'epoch', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'lastRevealBlock',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'nonpayable',
- type: 'function',
- inputs: [
- {
- name: 'params',
- internalType: 'struct ITankGame.MoveParams',
- type: 'tuple',
- components: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- {
- name: 'to',
- internalType: 'struct Board.Point',
- type: 'tuple',
- components: [
- { name: 'x', internalType: 'uint256', type: 'uint256' },
- { name: 'y', internalType: 'uint256', type: 'uint256' },
- { name: 'z', internalType: 'uint256', type: 'uint256' },
- ],
- },
- ],
- },
- ],
- name: 'move',
- outputs: [],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'numTanksAlive',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'owner',
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'player', internalType: 'address', type: 'address' }],
- name: 'players',
- outputs: [{ name: 'tank', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'playersCount',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- name: 'podium',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'prizePool',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'nonpayable',
- type: 'function',
- inputs: [],
- name: 'reveal',
- outputs: [],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'revealBlock',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'nonpayable',
- type: 'function',
- inputs: [{ name: '_owner', internalType: 'address', type: 'address' }],
- name: 'setOwner',
- outputs: [],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'settings',
- outputs: [
- { name: 'playerCount', internalType: 'uint256', type: 'uint256' },
- { name: 'boardSize', internalType: 'uint256', type: 'uint256' },
- { name: 'initAPs', internalType: 'uint256', type: 'uint256' },
- { name: 'initHearts', internalType: 'uint256', type: 'uint256' },
- { name: 'initShootRange', internalType: 'uint256', type: 'uint256' },
- { name: 'epochSeconds', internalType: 'uint256', type: 'uint256' },
- { name: 'buyInMinimum', internalType: 'uint256', type: 'uint256' },
- { name: 'revealWaitBlocks', internalType: 'uint256', type: 'uint256' },
- { name: 'root', internalType: 'bytes32', type: 'bytes32' },
- ],
- },
- {
- stateMutability: 'nonpayable',
- type: 'function',
- inputs: [
- {
- name: 'params',
- internalType: 'struct ITankGame.ShootParams',
- type: 'tuple',
- components: [
- { name: 'fromId', internalType: 'uint256', type: 'uint256' },
- { name: 'toId', internalType: 'uint256', type: 'uint256' },
- { name: 'shots', internalType: 'uint256', type: 'uint256' },
- ],
- },
- ],
- name: 'shoot',
- outputs: [],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'state',
- outputs: [
- { name: '', internalType: 'enum ITankGame.GameState', type: 'uint8' },
- ],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'stateData',
- outputs: [
- { name: 'playersCount', internalType: 'uint256', type: 'uint256' },
- { name: 'numTanksAlive', internalType: 'uint256', type: 'uint256' },
- { name: 'prizePool', internalType: 'uint256', type: 'uint256' },
- { name: 'epochStart', internalType: 'uint256', type: 'uint256' },
- { name: 'aliveTanksIdSum', internalType: 'uint256', type: 'uint256' },
- { name: 'revealBlock', internalType: 'uint256', type: 'uint256' },
- { name: 'lastRevealBlock', internalType: 'uint256', type: 'uint256' },
- { name: 'owner', internalType: 'address', type: 'address' },
- ],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- { name: '', internalType: 'uint256', type: 'uint256' },
- ],
- name: 'tankHooks',
- outputs: [
- { name: 'hooks', internalType: 'contract IHooks', type: 'address' },
- ],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
- name: 'tankToPosition',
- outputs: [
- { name: 'x', internalType: 'uint256', type: 'uint256' },
- { name: 'y', internalType: 'uint256', type: 'uint256' },
- { name: 'z', internalType: 'uint256', type: 'uint256' },
- ],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
- name: 'tanks',
- outputs: [
- { name: 'owner', internalType: 'address', type: 'address' },
- { name: 'hearts', internalType: 'uint256', type: 'uint256' },
- { name: 'aps', internalType: 'uint256', type: 'uint256' },
- { name: 'range', internalType: 'uint256', type: 'uint256' },
- ],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'position', internalType: 'uint256', type: 'uint256' }],
- name: 'tanksOnBoard',
- outputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'nonpayable',
- type: 'function',
- inputs: [
- {
- name: 'params',
- internalType: 'struct ITankGame.UpgradeParams',
- type: 'tuple',
- components: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- ],
- },
- ],
- name: 'upgrade',
- outputs: [],
- },
- {
- stateMutability: 'nonpayable',
- type: 'function',
- inputs: [
- {
- name: 'params',
- internalType: 'struct ITankGame.VoteParams',
- type: 'tuple',
- components: [
- { name: 'voter', internalType: 'uint256', type: 'uint256' },
- { name: 'cursed', internalType: 'uint256', type: 'uint256' },
- ],
- },
- ],
- name: 'vote',
- outputs: [],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [
- { name: 'epoch', internalType: 'uint256', type: 'uint256' },
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- ],
- name: 'votedThisEpoch',
- outputs: [{ name: 'voted', internalType: 'bool', type: 'bool' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [
- { name: 'epoch', internalType: 'uint256', type: 'uint256' },
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- ],
- name: 'votesPerEpoch',
- outputs: [{ name: 'votes', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'epoch', internalType: 'uint256', type: 'uint256' }],
- name: 'votingClosed',
- outputs: [{ name: 'votingClosed', internalType: 'bool', type: 'bool' }],
- },
-] as const
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// TankGameV2Storage
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-export const tankGameV2StorageABI = [
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'aliveTanksIdSum',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'board',
- outputs: [{ name: '', internalType: 'contract Board', type: 'address' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
- name: 'claimed',
- outputs: [{ name: 'claimed', internalType: 'bool', type: 'bool' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- name: 'deadTanks',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- { name: 'delegate', internalType: 'address', type: 'address' },
- ],
- name: 'delegates',
- outputs: [{ name: 'isDelegate', internalType: 'bool', type: 'bool' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'epochStart',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
- name: 'lastDripEpoch',
- outputs: [{ name: 'epoch', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'lastRevealBlock',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'numTanksAlive',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'owner',
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'player', internalType: 'address', type: 'address' }],
- name: 'players',
- outputs: [{ name: 'tank', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'playersCount',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- name: 'podium',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'prizePool',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'revealBlock',
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'settings',
- outputs: [
- { name: 'playerCount', internalType: 'uint256', type: 'uint256' },
- { name: 'boardSize', internalType: 'uint256', type: 'uint256' },
- { name: 'initAPs', internalType: 'uint256', type: 'uint256' },
- { name: 'initHearts', internalType: 'uint256', type: 'uint256' },
- { name: 'initShootRange', internalType: 'uint256', type: 'uint256' },
- { name: 'epochSeconds', internalType: 'uint256', type: 'uint256' },
- { name: 'buyInMinimum', internalType: 'uint256', type: 'uint256' },
- { name: 'revealWaitBlocks', internalType: 'uint256', type: 'uint256' },
- { name: 'autoStart', internalType: 'bool', type: 'bool' },
- { name: 'root', internalType: 'bytes32', type: 'bytes32' },
- ],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'state',
- outputs: [
- { name: '', internalType: 'enum ITankGame.GameState', type: 'uint8' },
- ],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [],
- name: 'stateData',
- outputs: [
- { name: 'playersCount', internalType: 'uint256', type: 'uint256' },
- { name: 'numTanksAlive', internalType: 'uint256', type: 'uint256' },
- { name: 'prizePool', internalType: 'uint256', type: 'uint256' },
- { name: 'epochStart', internalType: 'uint256', type: 'uint256' },
- { name: 'aliveTanksIdSum', internalType: 'uint256', type: 'uint256' },
- { name: 'revealBlock', internalType: 'uint256', type: 'uint256' },
- { name: 'lastRevealBlock', internalType: 'uint256', type: 'uint256' },
- { name: 'owner', internalType: 'address', type: 'address' },
- ],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- { name: '', internalType: 'uint256', type: 'uint256' },
- ],
- name: 'tankHooks',
- outputs: [
- { name: 'hooks', internalType: 'contract IHooks', type: 'address' },
- ],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'tankId', internalType: 'uint256', type: 'uint256' }],
- name: 'tanks',
- outputs: [
- { name: 'owner', internalType: 'address', type: 'address' },
- { name: 'hearts', internalType: 'uint256', type: 'uint256' },
- { name: 'aps', internalType: 'uint256', type: 'uint256' },
- { name: 'range', internalType: 'uint256', type: 'uint256' },
- ],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [
- { name: 'epoch', internalType: 'uint256', type: 'uint256' },
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- ],
- name: 'votedThisEpoch',
- outputs: [{ name: 'voted', internalType: 'bool', type: 'bool' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [
- { name: 'epoch', internalType: 'uint256', type: 'uint256' },
- { name: 'tankId', internalType: 'uint256', type: 'uint256' },
- ],
- name: 'votesPerEpoch',
- outputs: [{ name: 'votes', internalType: 'uint256', type: 'uint256' }],
- },
- {
- stateMutability: 'view',
- type: 'function',
- inputs: [{ name: 'epoch', internalType: 'uint256', type: 'uint256' }],
- name: 'votingClosed',
- outputs: [{ name: 'votingClosed', internalType: 'bool', type: 'bool' }],
- },
-] as const
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// React
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link boardABI}__.
- */
-export function useBoardRead<
- TFunctionName extends string,
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi'
- > = {} as any,
-) {
- return useContractRead({ abi: boardABI, ...config } as UseContractReadConfig<
- typeof boardABI,
- TFunctionName,
- TSelectData
- >)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link boardABI}__ and `functionName` set to `"boardSize"`.
- */
-export function useBoardBoardSize<
- TFunctionName extends 'boardSize',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: boardABI,
- functionName: 'boardSize',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link boardABI}__ and `functionName` set to `"getDistance"`.
- */
-export function useBoardGetDistance<
- TFunctionName extends 'getDistance',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: boardABI,
- functionName: 'getDistance',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link boardABI}__ and `functionName` set to `"getDistanceTankToPoint"`.
- */
-export function useBoardGetDistanceTankToPoint<
- TFunctionName extends 'getDistanceTankToPoint',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: boardABI,
- functionName: 'getDistanceTankToPoint',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link boardABI}__ and `functionName` set to `"getDistanceTanks"`.
- */
-export function useBoardGetDistanceTanks<
- TFunctionName extends 'getDistanceTanks',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: boardABI,
- functionName: 'getDistanceTanks',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link boardABI}__ and `functionName` set to `"getEmptyTile"`.
- */
-export function useBoardGetEmptyTile<
- TFunctionName extends 'getEmptyTile',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: boardABI,
- functionName: 'getEmptyTile',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link boardABI}__ and `functionName` set to `"getHeartAtPosition"`.
- */
-export function useBoardGetHeartAtPosition<
- TFunctionName extends 'getHeartAtPosition',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: boardABI,
- functionName: 'getHeartAtPosition',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link boardABI}__ and `functionName` set to `"getPerimeterForRadius"`.
- */
-export function useBoardGetPerimeterForRadius<
- TFunctionName extends 'getPerimeterForRadius',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: boardABI,
- functionName: 'getPerimeterForRadius',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link boardABI}__ and `functionName` set to `"getTankPosition"`.
- */
-export function useBoardGetTankPosition<
- TFunctionName extends 'getTankPosition',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: boardABI,
- functionName: 'getTankPosition',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link boardABI}__ and `functionName` set to `"getTile"`.
- */
-export function useBoardGetTile<
- TFunctionName extends 'getTile',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: boardABI,
- functionName: 'getTile',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link boardABI}__ and `functionName` set to `"getTotalTiles"`.
- */
-export function useBoardGetTotalTiles<
- TFunctionName extends 'getTotalTiles',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: boardABI,
- functionName: 'getTotalTiles',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link boardABI}__ and `functionName` set to `"isValidPoint"`.
- */
-export function useBoardIsValidPoint<
- TFunctionName extends 'isValidPoint',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: boardABI,
- functionName: 'isValidPoint',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link boardABI}__ and `functionName` set to `"pointToIndex"`.
- */
-export function useBoardPointToIndex<
- TFunctionName extends 'pointToIndex',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: boardABI,
- functionName: 'pointToIndex',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link boardABI}__ and `functionName` set to `"randomPoint"`.
- */
-export function useBoardRandomPoint<
- TFunctionName extends 'randomPoint',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: boardABI,
- functionName: 'randomPoint',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link boardABI}__.
- */
-export function useBoardWrite<
- TFunctionName extends string,
- TMode extends WriteContractMode = undefined,
->(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult['request']['abi'],
- TFunctionName,
- TMode
- >
- : UseContractWriteConfig & {
- abi?: never
- } = {} as any,
-) {
- return useContractWrite({
- abi: boardABI,
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link boardABI}__ and `functionName` set to `"setTile"`.
- */
-export function useBoardSetTile(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof boardABI,
- 'setTile'
- >['request']['abi'],
- 'setTile',
- TMode
- > & { functionName?: 'setTile' }
- : UseContractWriteConfig & {
- abi?: never
- functionName?: 'setTile'
- } = {} as any,
-) {
- return useContractWrite({
- abi: boardABI,
- functionName: 'setTile',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link boardABI}__.
- */
-export function usePrepareBoardWrite(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: boardABI,
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link boardABI}__ and `functionName` set to `"setTile"`.
- */
-export function usePrepareBoardSetTile(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: boardABI,
- functionName: 'setTile',
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link bountyABI}__.
- */
-export function useBountyRead<
- TFunctionName extends string,
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi'
- > = {} as any,
-) {
- return useContractRead({ abi: bountyABI, ...config } as UseContractReadConfig<
- typeof bountyABI,
- TFunctionName,
- TSelectData
- >)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"afterClaim"`.
- */
-export function useBountyAfterClaim<
- TFunctionName extends 'afterClaim',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: bountyABI,
- functionName: 'afterClaim',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"afterDelegate"`.
- */
-export function useBountyAfterDelegate<
- TFunctionName extends 'afterDelegate',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: bountyABI,
- functionName: 'afterDelegate',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"afterDrip"`.
- */
-export function useBountyAfterDrip<
- TFunctionName extends 'afterDrip',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: bountyABI,
- functionName: 'afterDrip',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"afterJoin"`.
- */
-export function useBountyAfterJoin<
- TFunctionName extends 'afterJoin',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: bountyABI,
- functionName: 'afterJoin',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"beforeClaim"`.
- */
-export function useBountyBeforeClaim<
- TFunctionName extends 'beforeClaim',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: bountyABI,
- functionName: 'beforeClaim',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"beforeDelegate"`.
- */
-export function useBountyBeforeDelegate<
- TFunctionName extends 'beforeDelegate',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: bountyABI,
- functionName: 'beforeDelegate',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"beforeDrip"`.
- */
-export function useBountyBeforeDrip<
- TFunctionName extends 'beforeDrip',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: bountyABI,
- functionName: 'beforeDrip',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"beforeGive"`.
- */
-export function useBountyBeforeGive<
- TFunctionName extends 'beforeGive',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: bountyABI,
- functionName: 'beforeGive',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"beforeJoin"`.
- */
-export function useBountyBeforeJoin<
- TFunctionName extends 'beforeJoin',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: bountyABI,
- functionName: 'beforeJoin',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"beforeReveal"`.
- */
-export function useBountyBeforeReveal<
- TFunctionName extends 'beforeReveal',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: bountyABI,
- functionName: 'beforeReveal',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"bounties"`.
- */
-export function useBountyBounties<
- TFunctionName extends 'bounties',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: bountyABI,
- functionName: 'bounties',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"bountiesData"`.
- */
-export function useBountyBountiesData<
- TFunctionName extends 'bountiesData',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: bountyABI,
- functionName: 'bountiesData',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"bountyCount"`.
- */
-export function useBountyBountyCount<
- TFunctionName extends 'bountyCount',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: bountyABI,
- functionName: 'bountyCount',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"ownerTank"`.
- */
-export function useBountyOwnerTank<
- TFunctionName extends 'ownerTank',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: bountyABI,
- functionName: 'ownerTank',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"tankGame"`.
- */
-export function useBountyTankGame<
- TFunctionName extends 'tankGame',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: bountyABI,
- functionName: 'tankGame',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"tankGameView"`.
- */
-export function useBountyTankGameView<
- TFunctionName extends 'tankGameView',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: bountyABI,
- functionName: 'tankGameView',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"withdrawals"`.
- */
-export function useBountyWithdrawals<
- TFunctionName extends 'withdrawals',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: bountyABI,
- functionName: 'withdrawals',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link bountyABI}__.
- */
-export function useBountyWrite<
- TFunctionName extends string,
- TMode extends WriteContractMode = undefined,
->(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult['request']['abi'],
- TFunctionName,
- TMode
- >
- : UseContractWriteConfig & {
- abi?: never
- } = {} as any,
-) {
- return useContractWrite({
- abi: bountyABI,
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"afterGive"`.
- */
-export function useBountyAfterGive(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof bountyABI,
- 'afterGive'
- >['request']['abi'],
- 'afterGive',
- TMode
- > & { functionName?: 'afterGive' }
- : UseContractWriteConfig & {
- abi?: never
- functionName?: 'afterGive'
- } = {} as any,
-) {
- return useContractWrite({
- abi: bountyABI,
- functionName: 'afterGive',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"afterMove"`.
- */
-export function useBountyAfterMove(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof bountyABI,
- 'afterMove'
- >['request']['abi'],
- 'afterMove',
- TMode
- > & { functionName?: 'afterMove' }
- : UseContractWriteConfig & {
- abi?: never
- functionName?: 'afterMove'
- } = {} as any,
-) {
- return useContractWrite({
- abi: bountyABI,
- functionName: 'afterMove',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"afterReveal"`.
- */
-export function useBountyAfterReveal<
- TMode extends WriteContractMode = undefined,
->(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof bountyABI,
- 'afterReveal'
- >['request']['abi'],
- 'afterReveal',
- TMode
- > & { functionName?: 'afterReveal' }
- : UseContractWriteConfig & {
- abi?: never
- functionName?: 'afterReveal'
- } = {} as any,
-) {
- return useContractWrite({
- abi: bountyABI,
- functionName: 'afterReveal',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"afterShoot"`.
- */
-export function useBountyAfterShoot<
- TMode extends WriteContractMode = undefined,
->(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof bountyABI,
- 'afterShoot'
- >['request']['abi'],
- 'afterShoot',
- TMode
- > & { functionName?: 'afterShoot' }
- : UseContractWriteConfig & {
- abi?: never
- functionName?: 'afterShoot'
- } = {} as any,
-) {
- return useContractWrite({
- abi: bountyABI,
- functionName: 'afterShoot',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"afterUpgrade"`.
- */
-export function useBountyAfterUpgrade<
- TMode extends WriteContractMode = undefined,
->(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof bountyABI,
- 'afterUpgrade'
- >['request']['abi'],
- 'afterUpgrade',
- TMode
- > & { functionName?: 'afterUpgrade' }
- : UseContractWriteConfig & {
- abi?: never
- functionName?: 'afterUpgrade'
- } = {} as any,
-) {
- return useContractWrite({
- abi: bountyABI,
- functionName: 'afterUpgrade',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"afterVote"`.
- */
-export function useBountyAfterVote(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof bountyABI,
- 'afterVote'
- >['request']['abi'],
- 'afterVote',
- TMode
- > & { functionName?: 'afterVote' }
- : UseContractWriteConfig & {
- abi?: never
- functionName?: 'afterVote'
- } = {} as any,
-) {
- return useContractWrite({
- abi: bountyABI,
- functionName: 'afterVote',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"beforeMove"`.
- */
-export function useBountyBeforeMove<
- TMode extends WriteContractMode = undefined,
->(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof bountyABI,
- 'beforeMove'
- >['request']['abi'],
- 'beforeMove',
- TMode
- > & { functionName?: 'beforeMove' }
- : UseContractWriteConfig & {
- abi?: never
- functionName?: 'beforeMove'
- } = {} as any,
-) {
- return useContractWrite({
- abi: bountyABI,
- functionName: 'beforeMove',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"beforeShoot"`.
- */
-export function useBountyBeforeShoot<
- TMode extends WriteContractMode = undefined,
->(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof bountyABI,
- 'beforeShoot'
- >['request']['abi'],
- 'beforeShoot',
- TMode
- > & { functionName?: 'beforeShoot' }
- : UseContractWriteConfig & {
- abi?: never
- functionName?: 'beforeShoot'
- } = {} as any,
-) {
- return useContractWrite({
- abi: bountyABI,
- functionName: 'beforeShoot',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"beforeUpgrade"`.
- */
-export function useBountyBeforeUpgrade<
- TMode extends WriteContractMode = undefined,
->(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof bountyABI,
- 'beforeUpgrade'
- >['request']['abi'],
- 'beforeUpgrade',
- TMode
- > & { functionName?: 'beforeUpgrade' }
- : UseContractWriteConfig & {
- abi?: never
- functionName?: 'beforeUpgrade'
- } = {} as any,
-) {
- return useContractWrite({
- abi: bountyABI,
- functionName: 'beforeUpgrade',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"beforeVote"`.
- */
-export function useBountyBeforeVote<
- TMode extends WriteContractMode = undefined,
->(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof bountyABI,
- 'beforeVote'
- >['request']['abi'],
- 'beforeVote',
- TMode
- > & { functionName?: 'beforeVote' }
- : UseContractWriteConfig & {
- abi?: never
- functionName?: 'beforeVote'
- } = {} as any,
-) {
- return useContractWrite({
- abi: bountyABI,
- functionName: 'beforeVote',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"cancel"`.
- */
-export function useBountyCancel(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof bountyABI,
- 'cancel'
- >['request']['abi'],
- 'cancel',
- TMode
- > & { functionName?: 'cancel' }
- : UseContractWriteConfig & {
- abi?: never
- functionName?: 'cancel'
- } = {} as any,
-) {
- return useContractWrite({
- abi: bountyABI,
- functionName: 'cancel',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"create"`.
- */
-export function useBountyCreate(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof bountyABI,
- 'create'
- >['request']['abi'],
- 'create',
- TMode
- > & { functionName?: 'create' }
- : UseContractWriteConfig & {
- abi?: never
- functionName?: 'create'
- } = {} as any,
-) {
- return useContractWrite({
- abi: bountyABI,
- functionName: 'create',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"withdraw"`.
- */
-export function useBountyWithdraw(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof bountyABI,
- 'withdraw'
- >['request']['abi'],
- 'withdraw',
- TMode
- > & { functionName?: 'withdraw' }
- : UseContractWriteConfig & {
- abi?: never
- functionName?: 'withdraw'
- } = {} as any,
-) {
- return useContractWrite({
- abi: bountyABI,
- functionName: 'withdraw',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link bountyABI}__.
- */
-export function usePrepareBountyWrite(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: bountyABI,
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"afterGive"`.
- */
-export function usePrepareBountyAfterGive(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: bountyABI,
- functionName: 'afterGive',
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"afterMove"`.
- */
-export function usePrepareBountyAfterMove(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: bountyABI,
- functionName: 'afterMove',
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"afterReveal"`.
- */
-export function usePrepareBountyAfterReveal(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: bountyABI,
- functionName: 'afterReveal',
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"afterShoot"`.
- */
-export function usePrepareBountyAfterShoot(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: bountyABI,
- functionName: 'afterShoot',
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"afterUpgrade"`.
- */
-export function usePrepareBountyAfterUpgrade(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: bountyABI,
- functionName: 'afterUpgrade',
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"afterVote"`.
- */
-export function usePrepareBountyAfterVote(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: bountyABI,
- functionName: 'afterVote',
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"beforeMove"`.
- */
-export function usePrepareBountyBeforeMove(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: bountyABI,
- functionName: 'beforeMove',
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"beforeShoot"`.
- */
-export function usePrepareBountyBeforeShoot(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: bountyABI,
- functionName: 'beforeShoot',
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"beforeUpgrade"`.
- */
-export function usePrepareBountyBeforeUpgrade(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: bountyABI,
- functionName: 'beforeUpgrade',
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"beforeVote"`.
- */
-export function usePrepareBountyBeforeVote(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: bountyABI,
- functionName: 'beforeVote',
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"cancel"`.
- */
-export function usePrepareBountyCancel(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: bountyABI,
- functionName: 'cancel',
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"create"`.
- */
-export function usePrepareBountyCreate(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: bountyABI,
- functionName: 'create',
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link bountyABI}__ and `functionName` set to `"withdraw"`.
- */
-export function usePrepareBountyWithdraw(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: bountyABI,
- functionName: 'withdraw',
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link useContractEvent}__ with `abi` set to __{@link bountyABI}__.
- */
-export function useBountyEvent(
- config: Omit<
- UseContractEventConfig,
- 'abi'
- > = {} as any,
-) {
- return useContractEvent({
- abi: bountyABI,
- ...config,
- } as UseContractEventConfig)
-}
-
-/**
- * Wraps __{@link useContractEvent}__ with `abi` set to __{@link bountyABI}__ and `eventName` set to `"BountyHookCreated"`.
- */
-export function useBountyBountyHookCreatedEvent(
- config: Omit<
- UseContractEventConfig,
- 'abi' | 'eventName'
- > = {} as any,
-) {
- return useContractEvent({
- abi: bountyABI,
- eventName: 'BountyHookCreated',
- ...config,
- } as UseContractEventConfig)
-}
-
-/**
- * Wraps __{@link useContractEvent}__ with `abi` set to __{@link bountyABI}__ and `eventName` set to `"BountyPosted"`.
- */
-export function useBountyBountyPostedEvent(
- config: Omit<
- UseContractEventConfig,
- 'abi' | 'eventName'
- > = {} as any,
-) {
- return useContractEvent({
- abi: bountyABI,
- eventName: 'BountyPosted',
- ...config,
- } as UseContractEventConfig)
-}
-
-/**
- * Wraps __{@link useContractEvent}__ with `abi` set to __{@link bountyABI}__ and `eventName` set to `"BountyWon"`.
- */
-export function useBountyBountyWonEvent(
- config: Omit<
- UseContractEventConfig,
- 'abi' | 'eventName'
- > = {} as any,
-) {
- return useContractEvent({
- abi: bountyABI,
- eventName: 'BountyWon',
- ...config,
- } as UseContractEventConfig)
-}
-
-/**
- * Wraps __{@link useContractEvent}__ with `abi` set to __{@link bountyABI}__ and `eventName` set to `"Withdraw"`.
- */
-export function useBountyWithdrawEvent(
- config: Omit<
- UseContractEventConfig,
- 'abi' | 'eventName'
- > = {} as any,
-) {
- return useContractEvent({
- abi: bountyABI,
- eventName: 'Withdraw',
- ...config,
- } as UseContractEventConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link defaultEmptyHooksABI}__.
- */
-export function useDefaultEmptyHooksRead<
- TFunctionName extends string,
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >,
- 'abi'
- > = {} as any,
-) {
- return useContractRead({
- abi: defaultEmptyHooksABI,
- ...config,
- } as UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"afterClaim"`.
- */
-export function useDefaultEmptyHooksAfterClaim<
- TFunctionName extends 'afterClaim',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: defaultEmptyHooksABI,
- functionName: 'afterClaim',
- ...config,
- } as UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"afterDelegate"`.
- */
-export function useDefaultEmptyHooksAfterDelegate<
- TFunctionName extends 'afterDelegate',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: defaultEmptyHooksABI,
- functionName: 'afterDelegate',
- ...config,
- } as UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"afterDrip"`.
- */
-export function useDefaultEmptyHooksAfterDrip<
- TFunctionName extends 'afterDrip',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: defaultEmptyHooksABI,
- functionName: 'afterDrip',
- ...config,
- } as UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"afterJoin"`.
- */
-export function useDefaultEmptyHooksAfterJoin<
- TFunctionName extends 'afterJoin',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: defaultEmptyHooksABI,
- functionName: 'afterJoin',
- ...config,
- } as UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"beforeClaim"`.
- */
-export function useDefaultEmptyHooksBeforeClaim<
- TFunctionName extends 'beforeClaim',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: defaultEmptyHooksABI,
- functionName: 'beforeClaim',
- ...config,
- } as UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"beforeDelegate"`.
- */
-export function useDefaultEmptyHooksBeforeDelegate<
- TFunctionName extends 'beforeDelegate',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: defaultEmptyHooksABI,
- functionName: 'beforeDelegate',
- ...config,
- } as UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"beforeDrip"`.
- */
-export function useDefaultEmptyHooksBeforeDrip<
- TFunctionName extends 'beforeDrip',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: defaultEmptyHooksABI,
- functionName: 'beforeDrip',
- ...config,
- } as UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"beforeGive"`.
- */
-export function useDefaultEmptyHooksBeforeGive<
- TFunctionName extends 'beforeGive',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: defaultEmptyHooksABI,
- functionName: 'beforeGive',
- ...config,
- } as UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"beforeJoin"`.
- */
-export function useDefaultEmptyHooksBeforeJoin<
- TFunctionName extends 'beforeJoin',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: defaultEmptyHooksABI,
- functionName: 'beforeJoin',
- ...config,
- } as UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"beforeReveal"`.
- */
-export function useDefaultEmptyHooksBeforeReveal<
- TFunctionName extends 'beforeReveal',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return useContractRead({
- abi: defaultEmptyHooksABI,
- functionName: 'beforeReveal',
- ...config,
- } as UseContractReadConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TSelectData
- >)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__.
- */
-export function useDefaultEmptyHooksWrite<
- TFunctionName extends string,
- TMode extends WriteContractMode = undefined,
->(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof defaultEmptyHooksABI,
- string
- >['request']['abi'],
- TFunctionName,
- TMode
- >
- : UseContractWriteConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName,
- TMode
- > & {
- abi?: never
- } = {} as any,
-) {
- return useContractWrite({
- abi: defaultEmptyHooksABI,
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"afterGive"`.
- */
-export function useDefaultEmptyHooksAfterGive<
- TMode extends WriteContractMode = undefined,
->(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof defaultEmptyHooksABI,
- 'afterGive'
- >['request']['abi'],
- 'afterGive',
- TMode
- > & { functionName?: 'afterGive' }
- : UseContractWriteConfig<
- typeof defaultEmptyHooksABI,
- 'afterGive',
- TMode
- > & {
- abi?: never
- functionName?: 'afterGive'
- } = {} as any,
-) {
- return useContractWrite({
- abi: defaultEmptyHooksABI,
- functionName: 'afterGive',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"afterMove"`.
- */
-export function useDefaultEmptyHooksAfterMove<
- TMode extends WriteContractMode = undefined,
->(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof defaultEmptyHooksABI,
- 'afterMove'
- >['request']['abi'],
- 'afterMove',
- TMode
- > & { functionName?: 'afterMove' }
- : UseContractWriteConfig<
- typeof defaultEmptyHooksABI,
- 'afterMove',
- TMode
- > & {
- abi?: never
- functionName?: 'afterMove'
- } = {} as any,
-) {
- return useContractWrite({
- abi: defaultEmptyHooksABI,
- functionName: 'afterMove',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"afterReveal"`.
- */
-export function useDefaultEmptyHooksAfterReveal<
- TMode extends WriteContractMode = undefined,
->(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof defaultEmptyHooksABI,
- 'afterReveal'
- >['request']['abi'],
- 'afterReveal',
- TMode
- > & { functionName?: 'afterReveal' }
- : UseContractWriteConfig<
- typeof defaultEmptyHooksABI,
- 'afterReveal',
- TMode
- > & {
- abi?: never
- functionName?: 'afterReveal'
- } = {} as any,
-) {
- return useContractWrite({
- abi: defaultEmptyHooksABI,
- functionName: 'afterReveal',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"afterShoot"`.
- */
-export function useDefaultEmptyHooksAfterShoot<
- TMode extends WriteContractMode = undefined,
->(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof defaultEmptyHooksABI,
- 'afterShoot'
- >['request']['abi'],
- 'afterShoot',
- TMode
- > & { functionName?: 'afterShoot' }
- : UseContractWriteConfig<
- typeof defaultEmptyHooksABI,
- 'afterShoot',
- TMode
- > & {
- abi?: never
- functionName?: 'afterShoot'
- } = {} as any,
-) {
- return useContractWrite({
- abi: defaultEmptyHooksABI,
- functionName: 'afterShoot',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"afterUpgrade"`.
- */
-export function useDefaultEmptyHooksAfterUpgrade<
- TMode extends WriteContractMode = undefined,
->(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof defaultEmptyHooksABI,
- 'afterUpgrade'
- >['request']['abi'],
- 'afterUpgrade',
- TMode
- > & { functionName?: 'afterUpgrade' }
- : UseContractWriteConfig<
- typeof defaultEmptyHooksABI,
- 'afterUpgrade',
- TMode
- > & {
- abi?: never
- functionName?: 'afterUpgrade'
- } = {} as any,
-) {
- return useContractWrite({
- abi: defaultEmptyHooksABI,
- functionName: 'afterUpgrade',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"afterVote"`.
- */
-export function useDefaultEmptyHooksAfterVote<
- TMode extends WriteContractMode = undefined,
->(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof defaultEmptyHooksABI,
- 'afterVote'
- >['request']['abi'],
- 'afterVote',
- TMode
- > & { functionName?: 'afterVote' }
- : UseContractWriteConfig<
- typeof defaultEmptyHooksABI,
- 'afterVote',
- TMode
- > & {
- abi?: never
- functionName?: 'afterVote'
- } = {} as any,
-) {
- return useContractWrite({
- abi: defaultEmptyHooksABI,
- functionName: 'afterVote',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"beforeMove"`.
- */
-export function useDefaultEmptyHooksBeforeMove<
- TMode extends WriteContractMode = undefined,
->(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof defaultEmptyHooksABI,
- 'beforeMove'
- >['request']['abi'],
- 'beforeMove',
- TMode
- > & { functionName?: 'beforeMove' }
- : UseContractWriteConfig<
- typeof defaultEmptyHooksABI,
- 'beforeMove',
- TMode
- > & {
- abi?: never
- functionName?: 'beforeMove'
- } = {} as any,
-) {
- return useContractWrite({
- abi: defaultEmptyHooksABI,
- functionName: 'beforeMove',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"beforeShoot"`.
- */
-export function useDefaultEmptyHooksBeforeShoot<
- TMode extends WriteContractMode = undefined,
->(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof defaultEmptyHooksABI,
- 'beforeShoot'
- >['request']['abi'],
- 'beforeShoot',
- TMode
- > & { functionName?: 'beforeShoot' }
- : UseContractWriteConfig<
- typeof defaultEmptyHooksABI,
- 'beforeShoot',
- TMode
- > & {
- abi?: never
- functionName?: 'beforeShoot'
- } = {} as any,
-) {
- return useContractWrite({
- abi: defaultEmptyHooksABI,
- functionName: 'beforeShoot',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"beforeUpgrade"`.
- */
-export function useDefaultEmptyHooksBeforeUpgrade<
- TMode extends WriteContractMode = undefined,
->(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof defaultEmptyHooksABI,
- 'beforeUpgrade'
- >['request']['abi'],
- 'beforeUpgrade',
- TMode
- > & { functionName?: 'beforeUpgrade' }
- : UseContractWriteConfig<
- typeof defaultEmptyHooksABI,
- 'beforeUpgrade',
- TMode
- > & {
- abi?: never
- functionName?: 'beforeUpgrade'
- } = {} as any,
-) {
- return useContractWrite({
- abi: defaultEmptyHooksABI,
- functionName: 'beforeUpgrade',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link useContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"beforeVote"`.
- */
-export function useDefaultEmptyHooksBeforeVote<
- TMode extends WriteContractMode = undefined,
->(
- config: TMode extends 'prepared'
- ? UseContractWriteConfig<
- PrepareWriteContractResult<
- typeof defaultEmptyHooksABI,
- 'beforeVote'
- >['request']['abi'],
- 'beforeVote',
- TMode
- > & { functionName?: 'beforeVote' }
- : UseContractWriteConfig<
- typeof defaultEmptyHooksABI,
- 'beforeVote',
- TMode
- > & {
- abi?: never
- functionName?: 'beforeVote'
- } = {} as any,
-) {
- return useContractWrite({
- abi: defaultEmptyHooksABI,
- functionName: 'beforeVote',
- ...config,
- } as any)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__.
- */
-export function usePrepareDefaultEmptyHooksWrite(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: defaultEmptyHooksABI,
- ...config,
- } as UsePrepareContractWriteConfig<
- typeof defaultEmptyHooksABI,
- TFunctionName
- >)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"afterGive"`.
- */
-export function usePrepareDefaultEmptyHooksAfterGive(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: defaultEmptyHooksABI,
- functionName: 'afterGive',
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"afterMove"`.
- */
-export function usePrepareDefaultEmptyHooksAfterMove(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: defaultEmptyHooksABI,
- functionName: 'afterMove',
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"afterReveal"`.
- */
-export function usePrepareDefaultEmptyHooksAfterReveal(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: defaultEmptyHooksABI,
- functionName: 'afterReveal',
- ...config,
- } as UsePrepareContractWriteConfig<
- typeof defaultEmptyHooksABI,
- 'afterReveal'
- >)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"afterShoot"`.
- */
-export function usePrepareDefaultEmptyHooksAfterShoot(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: defaultEmptyHooksABI,
- functionName: 'afterShoot',
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"afterUpgrade"`.
- */
-export function usePrepareDefaultEmptyHooksAfterUpgrade(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: defaultEmptyHooksABI,
- functionName: 'afterUpgrade',
- ...config,
- } as UsePrepareContractWriteConfig<
- typeof defaultEmptyHooksABI,
- 'afterUpgrade'
- >)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"afterVote"`.
- */
-export function usePrepareDefaultEmptyHooksAfterVote(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: defaultEmptyHooksABI,
- functionName: 'afterVote',
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"beforeMove"`.
- */
-export function usePrepareDefaultEmptyHooksBeforeMove(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: defaultEmptyHooksABI,
- functionName: 'beforeMove',
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"beforeShoot"`.
- */
-export function usePrepareDefaultEmptyHooksBeforeShoot(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: defaultEmptyHooksABI,
- functionName: 'beforeShoot',
- ...config,
- } as UsePrepareContractWriteConfig<
- typeof defaultEmptyHooksABI,
- 'beforeShoot'
- >)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"beforeUpgrade"`.
- */
-export function usePrepareDefaultEmptyHooksBeforeUpgrade(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: defaultEmptyHooksABI,
- functionName: 'beforeUpgrade',
- ...config,
- } as UsePrepareContractWriteConfig<
- typeof defaultEmptyHooksABI,
- 'beforeUpgrade'
- >)
-}
-
-/**
- * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link defaultEmptyHooksABI}__ and `functionName` set to `"beforeVote"`.
- */
-export function usePrepareDefaultEmptyHooksBeforeVote(
- config: Omit<
- UsePrepareContractWriteConfig,
- 'abi' | 'functionName'
- > = {} as any,
-) {
- return usePrepareContractWrite({
- abi: defaultEmptyHooksABI,
- functionName: 'beforeVote',
- ...config,
- } as UsePrepareContractWriteConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link gameViewABI}__.
- *
- * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE19866944E2CD0FfaE4e35d168149b9B934eA471)
- * -
- */
-export function useGameViewRead<
- TFunctionName extends string,
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'address'
- > & { chainId?: keyof typeof gameViewAddress } = {} as any,
-) {
- const { chain } = useNetwork()
- const defaultChainId = useChainId()
- const chainId = config.chainId ?? chain?.id ?? defaultChainId
- return useContractRead({
- abi: gameViewABI,
- address: gameViewAddress[chainId as keyof typeof gameViewAddress],
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link gameViewABI}__ and `functionName` set to `"getAllHearts"`.
- *
- * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE19866944E2CD0FfaE4e35d168149b9B934eA471)
- * -
- */
-export function useGameViewGetAllHearts<
- TFunctionName extends 'getAllHearts',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'address' | 'functionName'
- > & { chainId?: keyof typeof gameViewAddress } = {} as any,
-) {
- const { chain } = useNetwork()
- const defaultChainId = useChainId()
- const chainId = config.chainId ?? chain?.id ?? defaultChainId
- return useContractRead({
- abi: gameViewABI,
- address: gameViewAddress[chainId as keyof typeof gameViewAddress],
- functionName: 'getAllHearts',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link gameViewABI}__ and `functionName` set to `"getAllTanks"`.
- *
- * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE19866944E2CD0FfaE4e35d168149b9B934eA471)
- * -
- */
-export function useGameViewGetAllTanks<
- TFunctionName extends 'getAllTanks',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'address' | 'functionName'
- > & { chainId?: keyof typeof gameViewAddress } = {} as any,
-) {
- const { chain } = useNetwork()
- const defaultChainId = useChainId()
- const chainId = config.chainId ?? chain?.id ?? defaultChainId
- return useContractRead({
- abi: gameViewABI,
- address: gameViewAddress[chainId as keyof typeof gameViewAddress],
- functionName: 'getAllTanks',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link gameViewABI}__ and `functionName` set to `"getBoard"`.
- *
- * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE19866944E2CD0FfaE4e35d168149b9B934eA471)
- * -
- */
-export function useGameViewGetBoard<
- TFunctionName extends 'getBoard',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'address' | 'functionName'
- > & { chainId?: keyof typeof gameViewAddress } = {} as any,
-) {
- const { chain } = useNetwork()
- const defaultChainId = useChainId()
- const chainId = config.chainId ?? chain?.id ?? defaultChainId
- return useContractRead({
- abi: gameViewABI,
- address: gameViewAddress[chainId as keyof typeof gameViewAddress],
- functionName: 'getBoard',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link gameViewABI}__ and `functionName` set to `"getEpoch"`.
- *
- * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE19866944E2CD0FfaE4e35d168149b9B934eA471)
- * -
- */
-export function useGameViewGetEpoch<
- TFunctionName extends 'getEpoch',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'address' | 'functionName'
- > & { chainId?: keyof typeof gameViewAddress } = {} as any,
-) {
- const { chain } = useNetwork()
- const defaultChainId = useChainId()
- const chainId = config.chainId ?? chain?.id ?? defaultChainId
- return useContractRead({
- abi: gameViewABI,
- address: gameViewAddress[chainId as keyof typeof gameViewAddress],
- functionName: 'getEpoch',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link gameViewABI}__ and `functionName` set to `"getGameEpoch"`.
- *
- * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE19866944E2CD0FfaE4e35d168149b9B934eA471)
- * -
- */
-export function useGameViewGetGameEpoch<
- TFunctionName extends 'getGameEpoch',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'address' | 'functionName'
- > & { chainId?: keyof typeof gameViewAddress } = {} as any,
-) {
- const { chain } = useNetwork()
- const defaultChainId = useChainId()
- const chainId = config.chainId ?? chain?.id ?? defaultChainId
- return useContractRead({
- abi: gameViewABI,
- address: gameViewAddress[chainId as keyof typeof gameViewAddress],
- functionName: 'getGameEpoch',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link gameViewABI}__ and `functionName` set to `"getLastDrip"`.
- *
- * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE19866944E2CD0FfaE4e35d168149b9B934eA471)
- * -
- */
-export function useGameViewGetLastDrip<
- TFunctionName extends 'getLastDrip',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'address' | 'functionName'
- > & { chainId?: keyof typeof gameViewAddress } = {} as any,
-) {
- const { chain } = useNetwork()
- const defaultChainId = useChainId()
- const chainId = config.chainId ?? chain?.id ?? defaultChainId
- return useContractRead({
- abi: gameViewABI,
- address: gameViewAddress[chainId as keyof typeof gameViewAddress],
- functionName: 'getLastDrip',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link gameViewABI}__ and `functionName` set to `"getPlayerCount"`.
- *
- * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE19866944E2CD0FfaE4e35d168149b9B934eA471)
- * -
- */
-export function useGameViewGetPlayerCount<
- TFunctionName extends 'getPlayerCount',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'address' | 'functionName'
- > & { chainId?: keyof typeof gameViewAddress } = {} as any,
-) {
- const { chain } = useNetwork()
- const defaultChainId = useChainId()
- const chainId = config.chainId ?? chain?.id ?? defaultChainId
- return useContractRead({
- abi: gameViewABI,
- address: gameViewAddress[chainId as keyof typeof gameViewAddress],
- functionName: 'getPlayerCount',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link gameViewABI}__ and `functionName` set to `"getSettings"`.
- *
- * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE19866944E2CD0FfaE4e35d168149b9B934eA471)
- * -
- */
-export function useGameViewGetSettings<
- TFunctionName extends 'getSettings',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'address' | 'functionName'
- > & { chainId?: keyof typeof gameViewAddress } = {} as any,
-) {
- const { chain } = useNetwork()
- const defaultChainId = useChainId()
- const chainId = config.chainId ?? chain?.id ?? defaultChainId
- return useContractRead({
- abi: gameViewABI,
- address: gameViewAddress[chainId as keyof typeof gameViewAddress],
- functionName: 'getSettings',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link gameViewABI}__ and `functionName` set to `"getState"`.
- *
- * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE19866944E2CD0FfaE4e35d168149b9B934eA471)
- * -
- */
-export function useGameViewGetState<
- TFunctionName extends 'getState',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'address' | 'functionName'
- > & { chainId?: keyof typeof gameViewAddress } = {} as any,
-) {
- const { chain } = useNetwork()
- const defaultChainId = useChainId()
- const chainId = config.chainId ?? chain?.id ?? defaultChainId
- return useContractRead({
- abi: gameViewABI,
- address: gameViewAddress[chainId as keyof typeof gameViewAddress],
- functionName: 'getState',
- ...config,
- } as UseContractReadConfig)
-}
-
-/**
- * Wraps __{@link useContractRead}__ with `abi` set to __{@link gameViewABI}__ and `functionName` set to `"getTank"`.
- *
- * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE19866944E2CD0FfaE4e35d168149b9B934eA471)
- * -
- */
-export function useGameViewGetTank<
- TFunctionName extends 'getTank',
- TSelectData = ReadContractResult,
->(
- config: Omit<
- UseContractReadConfig,
- 'abi' | 'address' | 'functionName'
- > & { chainId?: keyof typeof gameViewAddress } = {} as any,
-) {
- const { chain } = useNetwork()
- const defaultChainId = useChainId()
- const chainId = config.chainId ?? chain?.id ?? defaultChainId
- return useContractRead({
- abi: gameViewABI,
- address: gameViewAddress[chainId as keyof typeof gameViewAddress],
- functionName: 'getTank',
- ...config,
- } as UseContractReadConfig