File tree 1 file changed +3
-3
lines changed 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
import Web3 from 'web3'
2
2
import { EventData } from 'web3-eth-contract'
3
- import lotteryConfig from './contract.json'
3
+ import lotteryJson from './contract.json'
4
4
import emitter from '../emitter'
5
5
6
6
type NetworkSettings = Record < string , { address : string } >
7
7
8
8
const projectUrl = process . env [ 'NEXT_PUBLIC_PROJECT_URL' ]
9
9
const networkId = process . env [ 'NEXT_PUBLIC_NETWORK_ID' ]
10
10
11
- const networkSettings = lotteryConfig . networks as NetworkSettings
11
+ const networkSettings = lotteryJson . networks as NetworkSettings
12
12
13
- const CONTRACT_ABI = lotteryConfig . abi as unknown as AbiItem
13
+ const CONTRACT_ABI = lotteryJson . abi as unknown as AbiItem
14
14
const CONTRACT_ADDRESS = networkSettings [ networkId ?? 5777 ] . address
15
15
16
16
export const web3 = new Web3 ( Web3 . givenProvider ?? projectUrl )
You can’t perform that action at this time.
0 commit comments