tornado-initiation-ui/plugins/provider.js

22 lines
464 B
JavaScript
Raw Normal View History

2020-11-05 11:17:59 +01:00
import networkConfig from '@/networkConfig'
import { Provider } from '../services'
const MAIN_NET_ID = 1
const MAIN_NET_BLOCK_GAS_LIMIT = 7300000
const options = {
config: {
id: MAIN_NET_ID,
rpcCallRetryAttempt: 15,
2020-11-05 11:17:59 +01:00
rpcUrl: networkConfig.netId1.rpcUrl,
blockGasLimit: MAIN_NET_BLOCK_GAS_LIMIT,
},
}
const provider = new Provider(options)
export default (context, inject) => {
inject('provider', provider)
context.$provider = provider
}