Make Kredits DAO address configurable
This commit is contained in:
parent
430edad1b8
commit
ba6ea93a9c
6
index.js
6
index.js
@ -9,6 +9,7 @@ const argv = require('yargs')
|
|||||||
.describe({
|
.describe({
|
||||||
network: 'Ethereum network to connect to',
|
network: 'Ethereum network to connect to',
|
||||||
rpcUrl: 'Ethereum node RPC URL; alternative to --network',
|
rpcUrl: 'Ethereum node RPC URL; alternative to --network',
|
||||||
|
daoAddress: 'Optional Kredits DAO address',
|
||||||
host: 'IPFS API host',
|
host: 'IPFS API host',
|
||||||
port: 'IPFS API port',
|
port: 'IPFS API port',
|
||||||
protocol: 'IPFS API protocol',
|
protocol: 'IPFS API protocol',
|
||||||
@ -27,7 +28,10 @@ console.log(`Using IPFS:`, ipfsConfig);
|
|||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
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);
|
const ipfsPinner = new IpfsPinner(kredits);
|
||||||
|
|
||||||
ipfsPinner.pinAll().then(pins => {
|
ipfsPinner.pinAll().then(pins => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user