Skip to content

Commit c1564eb

Browse files
Merge pull request #7 from StabilityNexus/development
Development
2 parents 1cdddc5 + daaa7d0 commit c1564eb

File tree

9 files changed

+932
-772
lines changed

9 files changed

+932
-772
lines changed

src/app/providers.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { WagmiProvider } from "wagmi";
44
import { config } from "@/lib/walletConfig";
55
import { RainbowKitProvider } from "@rainbow-me/rainbowkit";
66
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
7-
import { sepolia } from "viem/chains";
7+
import { polygonAmoy } from "viem/chains";
88
import { useSyncWallet } from "@/hooks/useSyncWallet";
99
import { Toaster } from "react-hot-toast";
1010

@@ -21,7 +21,7 @@ export function Providers({ children }: { children: React.ReactNode }) {
2121
return (
2222
<QueryClientProvider client={queryClient}>
2323
<WagmiProvider config={config}>
24-
<RainbowKitProvider initialChain={sepolia}>
24+
<RainbowKitProvider initialChain={polygonAmoy}>
2525
{children}
2626
<Toaster />
2727
</RainbowKitProvider>

src/app/try-contracts/factory/page.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
useCreatePredictionPool,
88
useAllPools,
99
} from "@/lib/web3/factory";
10-
import { useAccount, useWaitForTransactionReceipt } from "wagmi";
10+
import { useAccount, useChainId, useWaitForTransactionReceipt } from "wagmi";
1111
import toast from "react-hot-toast";
1212
import { Settings2Icon } from "lucide-react";
1313

@@ -27,6 +27,8 @@ export default function FactoryTryPage() {
2727
const { feedAddress: currentFeed } = useGetPriceFeed(tokenPair);
2828
const { allPools } = useAllPools();
2929

30+
const chainId = useChainId();
31+
3032
const { isLoading, isSuccess, isError, error } = useWaitForTransactionReceipt(
3133
{
3234
hash: txHash ?? undefined,
@@ -92,7 +94,7 @@ export default function FactoryTryPage() {
9294
<div className="max-w-4xl mx-auto">
9395
<div className="text-center space-y-4">
9496
<h1 className="text-5xl font-extrabold bg-gradient-to-r from-gray-900 to-gray-600 bg-clip-text text-transparent">
95-
Factory Playground
97+
Factory Playground
9698
</h1>
9799
<p className="text-lg text-gray-600 max-w-2xl mx-auto">
98100
Create and manage prediction pools with custom price feeds and

src/config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,8 @@ export const NATIVE_TOKENS: Record<SupportedChain, string> = {
2626
mainnet: 'ETH',
2727
polygon: 'MATIC',
2828
};
29+
30+
export const FACTORY_ADDRESSES = {
31+
sepolia: '0x27F0445e9A28eeF757d132f5257dd994Ff06fB54',
32+
amoy: '0xeFD22a59Cd56A220a275824D84a8520C5A44671A'
33+
}

0 commit comments

Comments
 (0)