Make Kredits DAO address configurable

This commit is contained in:
bumi 2019-07-02 17:27:51 +02:00
parent 430edad1b8
commit ba6ea93a9c
1 changed files with 5 additions and 1 deletions

View File

@ -9,6 +9,7 @@ const argv = require('yargs')
.describe({
network: 'Ethereum network to connect to',
rpcUrl: 'Ethereum node RPC URL; alternative to --network',
daoAddress: 'Optional Kredits DAO address',
host: 'IPFS API host',
port: 'IPFS API port',
protocol: 'IPFS API protocol',
@ -27,7 +28,10 @@ console.log(`Using IPFS:`, ipfsConfig);
(async () => {
try {
const kredits = await Kredits.for({ network: argv.network, rpcUrl: argv.rpcUrl }, { apm: argv.apm, ipfsConfig }).init();
const kredits = await Kredits.for(
{ network: argv.network, rpcUrl: argv.rpcUrl },
{ apm: argv.apm, ipfsConfig: ipfsConfig, addresses: { Kernel: argv.daoAddress } }
).init();
const ipfsPinner = new IpfsPinner(kredits);
ipfsPinner.pinAll().then(pins => {