diff --git a/src/index.ts b/src/index.ts index 0e5aedc..ca46d19 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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") @@ -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); diff --git a/src/trudy.ts b/src/trudy.ts index 1ae6c5c..5ff835e 100644 --- a/src/trudy.ts +++ b/src/trudy.ts @@ -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" };