forked from muon-protocol/bonpion-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wagmi.config.ts
220 lines (214 loc) · 6.81 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
import { defineConfig, loadEnv } from '@wagmi/cli';
import { react } from '@wagmi/cli/plugins';
// PION BSC Mainnet
import PION_MAINNET_TOKEN_ABI from './src/abis/PION/Mainnet/Token';
import PION_MAINNET_NFT_ABI from './src/abis/PION/Mainnet/NFT';
import PION_MAINNET_LP_TOKEN_ABI from './src/abis/PION/Mainnet/LPToken';
import PION_MAINNET_MUON_REWARD_MANAGER_ABI from './src/abis/PION/Mainnet/Reward';
import PION_MAINNET_MUON_NODE_STAKING_ABI from './src/abis/PION/Mainnet/MuonNodeStaking';
import PION_MAINNET_MUON_NODE_MANAGER_ABI from './src/abis/PION/Mainnet/MuonNodeManager';
import PION_MAINNET_BOOSTER_ABI from './src/abis/PION/Mainnet/Booster';
import PION_MAINNET_PANCAKE_PAIR_ABI from './src/abis/PION/Mainnet/PancakePair';
import { erc20ABI } from 'wagmi';
// ALICE BSC Testnet
import ALICE_TESTNET_TOKEN_ABI from './src/abis/ALICE/BSCTestnet/ALICE';
import ALICE_TESTNET_NFT_ABI from './src/abis/ALICE/BSCTestnet/BonALICE';
import ALICE_TESTNET_LP_TOKEN_ABI from './src/abis/ALICE/BSCTestnet/LPToken';
import ALICE_TESTNET_MUON_REWARD_MANAGER_ABI from './src/abis/ALICE/BSCTestnet/Reward';
import ALICE_TESTNET_MUON_NODE_STAKING_ABI from './src/abis/ALICE/BSCTestnet/MuonNodeStaking';
import ALICE_TESTNET_MUON_NODE_MANAGER_ABI from './src/abis/ALICE/BSCTestnet/MuonNodeManager';
import ALICE_TESTNET_BOOSTER_ABI from './src/abis/ALICE/BSCTestnet/Booster';
import ALICE_TESTNET_PANCAKE_PAIR_ABI from './src/abis/ALICE/BSCTestnet/PancakePair';
// PION BSC Testnet
import PION_TESTNET_TOKEN_ABI from './src/abis/PION/BSCTestnet/Token';
import PION_TESTNET_NFT_ABI from './src/abis/PION/BSCTestnet/NFT';
import PION_TESTNET_MUON_NODE_MANAGER_ABI from './src/abis/PION/BSCTestnet/MuonNodeManager';
import PION_TESTNET_MUON_NODE_STAKING_ABI from './src/abis/PION/BSCTestnet/MuonNodeStaking';
import PION_TESTNET_MUON_REWARD_MANAGER_ABI from './src/abis/PION/BSCTestnet/MuonRewardManager';
import PION_TESTNET_OLD_TOKEN_ABI from './src/abis/PION/BSCTestnet/OldToken';
import PION_TESTNET_MIGRRATE_HELPER_ABI from './src/abis/PION/BSCTestnet/MigrationHelper';
// PION BSC Mainnet
import PION_BSCMAINNET_TOKEN_ABI from './src/abis/PION/BSCMainnet/Token';
import PION_BSCMAINNET_NFT_ABI from './src/abis/PION/BSCMainnet/NFT';
import PION_BSCMAINNET_MUON_NODE_MANAGER_ABI from './src/abis/PION/BSCMainnet/MuonNodeManager';
import PION_BSCMAINNET_MUON_NODE_STAKING_ABI from './src/abis/PION/BSCMainnet/MuonNodeStaking';
import PION_BSCMAINNET_MUON_REWARD_MANAGER_ABI from './src/abis/PION/BSCMainnet/MuonRewardManager';
import PION_BSCMAINNET_BOOSTER_ABI from './src/abis/PION/BSCMainnet/Booster';
export default defineConfig(() => {
const env = loadEnv({
mode: process.env.NODE_ENV,
envDir: process.cwd(),
});
if (env.VITE_PROJECT_NAME === 'PION') {
if (env.VITE_APP_CHAIN_ID === '1') {
return {
out: 'src/abis/types/generated.ts',
contracts: [
{
name: 'erc20',
abi: erc20ABI,
},
{
name: 'Alice',
abi: PION_MAINNET_TOKEN_ABI,
},
{
name: 'BonALICE',
abi: PION_MAINNET_NFT_ABI,
},
{
name: 'LpToken',
abi: PION_MAINNET_LP_TOKEN_ABI,
},
{
name: 'Reward',
abi: PION_MAINNET_MUON_REWARD_MANAGER_ABI,
},
{
name: 'MuonNodeStaking',
abi: PION_MAINNET_MUON_NODE_STAKING_ABI,
},
{
name: 'MuonNodeManager',
abi: PION_MAINNET_MUON_NODE_MANAGER_ABI,
},
{
name: 'Booster',
abi: PION_MAINNET_BOOSTER_ABI,
},
{
name: 'PancakePair',
abi: PION_MAINNET_PANCAKE_PAIR_ABI,
},
],
plugins: [react()],
};
} else if (env.VITE_APP_CHAIN_ID === '56') {
return {
out: 'src/abis/types/generated.ts',
contracts: [
{
name: 'Alice',
abi: PION_BSCMAINNET_TOKEN_ABI,
},
{
name: 'BonALICE',
abi: PION_BSCMAINNET_NFT_ABI,
},
{
name: 'Reward',
abi: PION_BSCMAINNET_MUON_REWARD_MANAGER_ABI,
},
{
name: 'LpToken',
abi: PION_MAINNET_LP_TOKEN_ABI,
},
{
name: 'MuonNodeStaking',
abi: PION_BSCMAINNET_MUON_NODE_STAKING_ABI,
},
{
name: 'MuonNodeManager',
abi: PION_BSCMAINNET_MUON_NODE_MANAGER_ABI,
},
{
name: 'Booster',
abi: PION_BSCMAINNET_BOOSTER_ABI,
},
],
plugins: [react()],
};
} else {
// env.VITE_APP_CHAIN_ID === '97'
return {
out: 'src/abis/types/generated.ts',
contracts: [
{
name: 'OldToken',
abi: PION_TESTNET_OLD_TOKEN_ABI,
},
{
name: 'erc20',
abi: erc20ABI,
},
{
name: 'Alice',
abi: PION_TESTNET_TOKEN_ABI,
},
{
name: 'BonALICE',
abi: PION_TESTNET_NFT_ABI,
},
{
name: 'LpToken',
abi: PION_MAINNET_LP_TOKEN_ABI,
},
{
name: 'Reward',
abi: PION_TESTNET_MUON_REWARD_MANAGER_ABI,
},
{
name: 'MuonNodeStaking',
abi: PION_TESTNET_MUON_NODE_STAKING_ABI,
},
{
name: 'MuonNodeManager',
abi: PION_TESTNET_MUON_NODE_MANAGER_ABI,
},
{
name: 'Booster',
abi: PION_MAINNET_BOOSTER_ABI,
},
{
name: 'PancakePair',
abi: PION_MAINNET_PANCAKE_PAIR_ABI,
},
{
name: 'MigrationHelper',
abi: PION_TESTNET_MIGRRATE_HELPER_ABI,
},
],
plugins: [react()],
};
}
} else {
return {
out: 'src/abis/types/generated.ts',
contracts: [
{
name: 'Alice',
abi: ALICE_TESTNET_TOKEN_ABI,
},
{
name: 'BonALICE',
abi: ALICE_TESTNET_NFT_ABI,
},
{
name: 'LpToken',
abi: ALICE_TESTNET_LP_TOKEN_ABI,
},
{
name: 'Reward',
abi: ALICE_TESTNET_MUON_REWARD_MANAGER_ABI,
},
{
name: 'MuonNodeStaking',
abi: ALICE_TESTNET_MUON_NODE_STAKING_ABI,
},
{
name: 'MuonNodeManager',
abi: ALICE_TESTNET_MUON_NODE_MANAGER_ABI,
},
{
name: 'Booster',
abi: ALICE_TESTNET_BOOSTER_ABI,
},
{
name: 'PancakePair',
abi: ALICE_TESTNET_PANCAKE_PAIR_ABI,
},
],
plugins: [react()],
};
}
});