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})
|
||||
|
|
|
|||
|
|
@ -9,6 +9,22 @@
|
|||
"secret": true,
|
||||
"required": true,
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"code": "apiSecret",
|
||||
"display": "API secret",
|
||||
"fieldType": "password",
|
||||
"secret": true,
|
||||
"required": true,
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"code": "endpoint",
|
||||
"display": "Endpoint",
|
||||
"fieldType": "password",
|
||||
"secret": true,
|
||||
"required": true,
|
||||
"value": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue