2020-11-05 22:10:04 +01:00
|
|
|
const { resolve } = require('path')
|
|
|
|
|
|
|
|
module.exports = async function module(moduleOptions) {
|
|
|
|
const defaultOptions = {
|
|
|
|
id: 1,
|
|
|
|
rpcUrl: '',
|
|
|
|
rpcCallRetryAttempt: 15,
|
2020-11-06 12:38:38 +01:00
|
|
|
blockGasLimit: 7300000,
|
2020-11-05 22:10:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
const options = Object.assign({}, defaultOptions, this.options.provider, moduleOptions)
|
|
|
|
|
|
|
|
// Register plugin
|
|
|
|
this.addPlugin({
|
|
|
|
src: resolve(__dirname, 'plugin.js'),
|
|
|
|
fileName: 'provider.js',
|
2020-11-06 12:38:38 +01:00
|
|
|
options,
|
2020-11-05 22:10:04 +01:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2020-11-06 12:38:38 +01:00
|
|
|
module.exports.meta = require('../package.json')
|