Skip to content

Commit

Permalink
Add map-accounts back
Browse files Browse the repository at this point in the history
  • Loading branch information
gakonst committed Dec 6, 2018
1 parent 2b1a85b commit da4952f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
21 changes: 20 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,25 @@ program

// DPOS BINDINGS

program
.command("map-accounts")
.description("Connects the user's eth/dappchain addresses")
.action(async function() {
const user = await DPOSUser.createOfflineUserAsync(
config.ethEndpoint,
config.ethPrivateKey,
config.dappchainEndpoint,
config.dappchainPrivateKey,
config.chainId,
config.loomGatewayEthAddress,
config.loomTokenEthAddress
);
try {
await user.mapAccounts();
} catch (err) {
console.error(err);
}
});
program
.command("list-validators")
.description("Show the current DPoS validators")
Expand All @@ -154,7 +173,7 @@ program
" Address:",
LocalAddress.fromPublicKey(v.pubKey).toString()
);
console.log(" Power:", v.power);
console.log(" Power:", v.power.toString());
});
} catch (err) {
console.error(err);
Expand Down
4 changes: 2 additions & 2 deletions src/trudy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const config = {
dappchainPrivateKey:
"OED7hbGxMW3xzlRM7JLRyRRvlEJ6wUCG/A6VEpngIyeoXMHT2YqfxHZuKSd8WIx6Dre5PyYXss2qv8rp2PaXuA==",
dappchainEndpoint: "https://test-z-asia1.dappchains.com",
loomTokenEthAddress: "0x97D24aCf088BBA06dB8b3675eF17bC02077CbDFa",
loomGatewayEthAddress: "0xd242754d9D02f46D4e33B0eDaff04099A0A346aF",
loomTokenEthAddress: "0xF858C8B28654F018cA08f7C092910Da30A31Ccda",
loomGatewayEthAddress: "0x682721650515Bac4b46801E06C3B3848132c78F6",
chainId: "asia1"
};

0 comments on commit da4952f

Please sign in to comment.