generated from mvllow/next-pwa-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwagmi-cli.config.ts
54 lines (50 loc) · 1.64 KB
/
wagmi-cli.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
43
44
45
46
47
48
49
50
51
52
53
54
import { defineConfig } from '@wagmi/cli'
import { foundry, react } from '@wagmi/cli/plugins'
import type { Address } from 'viem'
import { erc20Abi } from 'viem'
import { base, baseSepolia } from 'viem/chains'
const poolDeployments = {
[base.id]: '0x5CA11740144513897Be27e3E82D75Aa75067F712' as Address, // github commit: eda48eb,
[baseSepolia.id]: '0x5C22662210E48D0f5614cACA6f7a6a938716Ea26' as Address, // github commit: eda48eb,
}
const tokenDeployments = {
[base.id]: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913' as Address, // base mainnet USDC
[baseSepolia.id]: '0xfD2Ec58cE4c87b253567Ff98ce2778de6AF0101b' as Address, // base sepolia droplet
}
const tokenAbi =
process.env.NODE_ENV === 'production'
? erc20Abi
: ([
...erc20Abi,
{
type: 'function',
inputs: [
{ name: 'to', internalType: 'address', type: 'address' },
{ name: 'amount', internalType: 'uint256', type: 'uint256' },
],
name: 'mint',
outputs: [],
stateMutability: 'nonpayable',
},
] as const)
export default defineConfig({
out: 'src/types/contracts.ts',
contracts: [
{
name: 'Token',
abi: tokenAbi,
address: tokenDeployments,
},
],
plugins: [
foundry({
project: 'contracts',
include: ['Pool.json'],
deployments: {
Pool: poolDeployments,
Token: tokenDeployments,
},
}),
// react(),
],
})