upgrade to infura v3
This commit is contained in:
parent
2de5c6d78f
commit
d28c6ae691
2 changed files with 19 additions and 3 deletions
|
|
@ -2,10 +2,10 @@ const _ = require('lodash/fp')
|
|||
const base = require('../geth/base')
|
||||
|
||||
function run (account) {
|
||||
const apiKey = account.apiKey
|
||||
if (!apiKey) throw new Error('Need to configure API key for Infura')
|
||||
const endpoint = account.endpoint
|
||||
if (!endpoint) throw new Error('Need to configure API endpoint for Infura')
|
||||
|
||||
base.connect(`https://mainnet.infura.io/${apiKey}`)
|
||||
base.connect(endpoint)
|
||||
}
|
||||
|
||||
module.exports = _.merge(base, {run})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue