-
Notifications
You must be signed in to change notification settings - Fork 3
/
wagmi.config.ts
42 lines (40 loc) · 1.09 KB
/
wagmi.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { defineConfig, loadEnv } from '@wagmi/cli';
import { etherscan, react } from '@wagmi/cli/plugins';
import { Address } from 'viem';
import AUCTION_ABI from '@/utils/abis/auction';
import TOKEN_ABI from '@/utils/abis/token';
import GOVERNOR_ABI from '@/utils/abis/governor';
export default defineConfig(() => {
const env = loadEnv({
mode: process.env.NODE_ENV,
envDir: process.cwd(),
});
const DAO_ADDRESSES = {
token: env.NEXT_PUBLIC_TOKEN as Address,
metadata: env.NEXT_PUBLIC_METADATA as Address,
auction: env.NEXT_PUBLIC_AUCTION as Address,
treasury: env.NEXT_PUBLIC_TREASURY as Address,
governor: env.NEXT_PUBLIC_GOVERNOR as Address,
};
return {
out: 'src/hooks/wagmiGenerated.ts',
contracts: [
{
name: 'Auction',
abi: AUCTION_ABI,
address: DAO_ADDRESSES.auction,
},
{
name: 'Token',
abi: TOKEN_ABI,
address: DAO_ADDRESSES.token,
},
{
name: 'Governor',
abi: GOVERNOR_ABI,
address: DAO_ADDRESSES.governor,
},
],
plugins: [react()],
};
});