From 1d473180735839f38bdc2b21c30cb2a25f0bf36b Mon Sep 17 00:00:00 2001 From: zramsay Date: Wed, 11 Jan 2023 13:00:00 -0500 Subject: [PATCH] cns -> lns to avoid variable collision --- src/cmds/registry-cmds/account-cmds/get.ts | 4 ++-- src/cmds/registry-cmds/auction-cmds/bid-cmds/commit.ts | 6 +++--- src/cmds/registry-cmds/auction-cmds/bid-cmds/reveal.ts | 6 +++--- src/cmds/registry-cmds/auction-cmds/get.ts | 4 ++-- src/cmds/registry-cmds/authority-cmds/bond-cmds/set.ts | 6 +++--- src/cmds/registry-cmds/authority-cmds/reserve.ts | 6 +++--- src/cmds/registry-cmds/authority-cmds/whois.ts | 4 ++-- src/cmds/registry-cmds/bond-cmds/associate.ts | 6 +++--- src/cmds/registry-cmds/bond-cmds/cancel.ts | 6 +++--- src/cmds/registry-cmds/bond-cmds/create.ts | 6 +++--- src/cmds/registry-cmds/bond-cmds/dissociate.ts | 6 +++--- src/cmds/registry-cmds/bond-cmds/get.ts | 4 ++-- src/cmds/registry-cmds/bond-cmds/list.ts | 4 ++-- src/cmds/registry-cmds/bond-cmds/records-cmds/dissociate.ts | 6 +++--- .../registry-cmds/bond-cmds/records-cmds/reassociate.ts | 6 +++--- src/cmds/registry-cmds/bond-cmds/refill.ts | 6 +++--- src/cmds/registry-cmds/bond-cmds/withdraw.ts | 6 +++--- src/cmds/registry-cmds/name-cmds/delete.ts | 6 +++--- src/cmds/registry-cmds/name-cmds/lookup.ts | 4 ++-- src/cmds/registry-cmds/name-cmds/resolve.ts | 4 ++-- src/cmds/registry-cmds/name-cmds/set.ts | 6 +++--- src/cmds/registry-cmds/record-cmds/get.ts | 4 ++-- src/cmds/registry-cmds/record-cmds/list.ts | 4 ++-- src/cmds/registry-cmds/record-cmds/publish.ts | 6 +++--- src/cmds/registry-cmds/status.ts | 4 ++-- src/cmds/registry-cmds/tokens-cmds/send.ts | 6 +++--- 26 files changed, 68 insertions(+), 68 deletions(-) diff --git a/src/cmds/registry-cmds/account-cmds/get.ts b/src/cmds/registry-cmds/account-cmds/get.ts index 10b0214..18403c0 100644 --- a/src/cmds/registry-cmds/account-cmds/get.ts +++ b/src/cmds/registry-cmds/account-cmds/get.ts @@ -11,8 +11,8 @@ export const desc = 'Get account.'; export const handler = async (argv: Arguments) => { let address = argv.address as string; - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(chainId, 'Invalid Registry Chain ID.'); diff --git a/src/cmds/registry-cmds/auction-cmds/bid-cmds/commit.ts b/src/cmds/registry-cmds/auction-cmds/bid-cmds/commit.ts index 94f8fb5..678b5c0 100644 --- a/src/cmds/registry-cmds/auction-cmds/bid-cmds/commit.ts +++ b/src/cmds/registry-cmds/auction-cmds/bid-cmds/commit.ts @@ -21,8 +21,8 @@ export const handler = async (argv: Arguments) => { assert(quantity, 'Invalid token quantity.'); assert(denom, 'Invalid token type.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); @@ -40,7 +40,7 @@ export const handler = async (argv: Arguments) => { fs.writeFileSync(revealFilePath, JSON.stringify(reveal, undefined, 2)); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.commitBid({ auctionId, commitHash }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); diff --git a/src/cmds/registry-cmds/auction-cmds/bid-cmds/reveal.ts b/src/cmds/registry-cmds/auction-cmds/bid-cmds/reveal.ts index 796ff49..2134b27 100644 --- a/src/cmds/registry-cmds/auction-cmds/bid-cmds/reveal.ts +++ b/src/cmds/registry-cmds/auction-cmds/bid-cmds/reveal.ts @@ -16,15 +16,15 @@ export const handler = async (argv: Arguments) => { assert(auctionId, 'Invalid auction ID.'); assert(filePath, 'Invalid reveal file path.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const reveal = fs.readFileSync(path.resolve(filePath)); const result = await registry.revealBid({ auctionId, reveal: reveal.toString('hex') }, privateKey, fee); diff --git a/src/cmds/registry-cmds/auction-cmds/get.ts b/src/cmds/registry-cmds/auction-cmds/get.ts index c859a49..88f0615 100644 --- a/src/cmds/registry-cmds/auction-cmds/get.ts +++ b/src/cmds/registry-cmds/auction-cmds/get.ts @@ -12,8 +12,8 @@ export const handler = async (argv: Arguments) => { const { id, config } = argv; assert(id, 'Invalid auction ID.'); - const { services: { cns: cnsConfig } } = getConfig(config as string) - const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(config as string) + const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(chainId, 'Invalid Registry Chain ID.'); diff --git a/src/cmds/registry-cmds/authority-cmds/bond-cmds/set.ts b/src/cmds/registry-cmds/authority-cmds/bond-cmds/set.ts index 6a97b51..cbc16d3 100644 --- a/src/cmds/registry-cmds/authority-cmds/bond-cmds/set.ts +++ b/src/cmds/registry-cmds/authority-cmds/bond-cmds/set.ts @@ -14,15 +14,15 @@ export const handler = async (argv: Arguments) => { assert(name, 'Invalid authority name.'); assert(bondId, 'Invalid Bond ID.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.setAuthorityBond({ name, bondId }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); } diff --git a/src/cmds/registry-cmds/authority-cmds/reserve.ts b/src/cmds/registry-cmds/authority-cmds/reserve.ts index 02988b6..9f1336e 100644 --- a/src/cmds/registry-cmds/authority-cmds/reserve.ts +++ b/src/cmds/registry-cmds/authority-cmds/reserve.ts @@ -20,15 +20,15 @@ export const handler = async (argv: Arguments) => { const owner = argv.owner as string; assert(name, 'Invalid authority name.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.reserveAuthority({ name, owner }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); diff --git a/src/cmds/registry-cmds/authority-cmds/whois.ts b/src/cmds/registry-cmds/authority-cmds/whois.ts index 90dfb1f..a07ef60 100644 --- a/src/cmds/registry-cmds/authority-cmds/whois.ts +++ b/src/cmds/registry-cmds/authority-cmds/whois.ts @@ -12,8 +12,8 @@ export const handler = async (argv: Arguments) => { const name = argv.name as string; assert(name, 'Invalid authority name.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(chainId, 'Invalid Registry Chain ID.'); diff --git a/src/cmds/registry-cmds/bond-cmds/associate.ts b/src/cmds/registry-cmds/bond-cmds/associate.ts index 75dd289..ea2e27d 100644 --- a/src/cmds/registry-cmds/bond-cmds/associate.ts +++ b/src/cmds/registry-cmds/bond-cmds/associate.ts @@ -20,15 +20,15 @@ export const handler = async (argv: Arguments) => { assert(id, 'Invalid Record ID.'); assert(bondId, 'Invalid Bond ID.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.associateBond({ recordId: id, bondId }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); } diff --git a/src/cmds/registry-cmds/bond-cmds/cancel.ts b/src/cmds/registry-cmds/bond-cmds/cancel.ts index 8b520df..c07b382 100644 --- a/src/cmds/registry-cmds/bond-cmds/cancel.ts +++ b/src/cmds/registry-cmds/bond-cmds/cancel.ts @@ -12,15 +12,15 @@ export const handler = async (argv: Arguments) => { const id = argv.id as string assert(id, 'Invalid Bond ID.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.cancelBond({ id }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); } diff --git a/src/cmds/registry-cmds/bond-cmds/create.ts b/src/cmds/registry-cmds/bond-cmds/create.ts index de99f60..26a1e12 100644 --- a/src/cmds/registry-cmds/bond-cmds/create.ts +++ b/src/cmds/registry-cmds/bond-cmds/create.ts @@ -25,15 +25,15 @@ export const handler = async (argv: Arguments) => { assert(denom, 'Invalid Type.'); assert(amount, 'Invalid Quantity.'); - const { services: { cns: cnsConfig } } = getConfig(config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.createBond({ denom, amount }, privateKey, fee); console.log(verbose ? JSON.stringify(result, undefined, 2) : result.data); } diff --git a/src/cmds/registry-cmds/bond-cmds/dissociate.ts b/src/cmds/registry-cmds/bond-cmds/dissociate.ts index 7e0b475..ef42c42 100644 --- a/src/cmds/registry-cmds/bond-cmds/dissociate.ts +++ b/src/cmds/registry-cmds/bond-cmds/dissociate.ts @@ -12,15 +12,15 @@ export const handler = async (argv: Arguments) => { const id = argv.id as string; assert(id, 'Invalid Record ID.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.dissociateBond({ recordId: id }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); } diff --git a/src/cmds/registry-cmds/bond-cmds/get.ts b/src/cmds/registry-cmds/bond-cmds/get.ts index 9cb83a5..36e45ba 100644 --- a/src/cmds/registry-cmds/bond-cmds/get.ts +++ b/src/cmds/registry-cmds/bond-cmds/get.ts @@ -12,8 +12,8 @@ export const handler = async (argv: Arguments) => { const { id, config } = argv; console.assert(id, 'Bond Id is required.'); - const { services: { cns: cnsConfig } } = getConfig(config as string) - const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(config as string) + const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(chainId, 'Invalid Registry Chain ID.'); diff --git a/src/cmds/registry-cmds/bond-cmds/list.ts b/src/cmds/registry-cmds/bond-cmds/list.ts index beff4cc..864e317 100644 --- a/src/cmds/registry-cmds/bond-cmds/list.ts +++ b/src/cmds/registry-cmds/bond-cmds/list.ts @@ -15,8 +15,8 @@ export const builder = { } export const handler = async (argv: Arguments) => { - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(chainId, 'Invalid Registry Chain ID.'); diff --git a/src/cmds/registry-cmds/bond-cmds/records-cmds/dissociate.ts b/src/cmds/registry-cmds/bond-cmds/records-cmds/dissociate.ts index 341f365..ede0e5e 100644 --- a/src/cmds/registry-cmds/bond-cmds/records-cmds/dissociate.ts +++ b/src/cmds/registry-cmds/bond-cmds/records-cmds/dissociate.ts @@ -18,15 +18,15 @@ export const handler = async (argv: Arguments) => { const bondId = argv.bondId as string; assert(bondId, 'Invalid Bond ID.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.dissociateRecords({ bondId }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); } diff --git a/src/cmds/registry-cmds/bond-cmds/records-cmds/reassociate.ts b/src/cmds/registry-cmds/bond-cmds/records-cmds/reassociate.ts index 1fe897c..fb1aa92 100644 --- a/src/cmds/registry-cmds/bond-cmds/records-cmds/reassociate.ts +++ b/src/cmds/registry-cmds/bond-cmds/records-cmds/reassociate.ts @@ -23,15 +23,15 @@ export const handler = async (argv: Arguments) => { assert(oldBondId, 'Invalid Old Bond ID.'); assert(newBondId, 'Invalid New Bond ID.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.reassociateRecords({ oldBondId, newBondId }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); } diff --git a/src/cmds/registry-cmds/bond-cmds/refill.ts b/src/cmds/registry-cmds/bond-cmds/refill.ts index e8f4827..72ed6fe 100644 --- a/src/cmds/registry-cmds/bond-cmds/refill.ts +++ b/src/cmds/registry-cmds/bond-cmds/refill.ts @@ -26,15 +26,15 @@ export const handler = async (argv: Arguments) => { assert(denom, 'Invalid Type.'); assert(amount, 'Invalid Quantity.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.refillBond({ id, denom, amount }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); } diff --git a/src/cmds/registry-cmds/bond-cmds/withdraw.ts b/src/cmds/registry-cmds/bond-cmds/withdraw.ts index cc46a5c..74ca63f 100644 --- a/src/cmds/registry-cmds/bond-cmds/withdraw.ts +++ b/src/cmds/registry-cmds/bond-cmds/withdraw.ts @@ -26,15 +26,15 @@ export const handler = async (argv: Arguments) => { assert(denom, 'Invalid Type.'); assert(amount, 'Invalid Quantity.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.withdrawBond({ id, denom, amount }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); } diff --git a/src/cmds/registry-cmds/name-cmds/delete.ts b/src/cmds/registry-cmds/name-cmds/delete.ts index e099def..c1259f2 100644 --- a/src/cmds/registry-cmds/name-cmds/delete.ts +++ b/src/cmds/registry-cmds/name-cmds/delete.ts @@ -12,15 +12,15 @@ export const handler = async (argv: Arguments) => { const name = argv.name as string; assert(name, 'Invalid Name.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.deleteName({ crn: name }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); diff --git a/src/cmds/registry-cmds/name-cmds/lookup.ts b/src/cmds/registry-cmds/name-cmds/lookup.ts index edbcbd1..6baaa7e 100644 --- a/src/cmds/registry-cmds/name-cmds/lookup.ts +++ b/src/cmds/registry-cmds/name-cmds/lookup.ts @@ -18,8 +18,8 @@ export const handler = async (argv: Arguments) => { const name = argv.name as string; assert(name, 'Invalid Name.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(chainId, 'Invalid Registry Chain ID.'); diff --git a/src/cmds/registry-cmds/name-cmds/resolve.ts b/src/cmds/registry-cmds/name-cmds/resolve.ts index 10b1d4d..64c17c1 100644 --- a/src/cmds/registry-cmds/name-cmds/resolve.ts +++ b/src/cmds/registry-cmds/name-cmds/resolve.ts @@ -12,8 +12,8 @@ export const handler = async (argv: Arguments) => { const name = argv.name as string; assert(name, 'Invalid Name.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(chainId, 'Invalid Registry Chain ID.'); diff --git a/src/cmds/registry-cmds/name-cmds/set.ts b/src/cmds/registry-cmds/name-cmds/set.ts index 8f76dc4..5bb49f4 100644 --- a/src/cmds/registry-cmds/name-cmds/set.ts +++ b/src/cmds/registry-cmds/name-cmds/set.ts @@ -14,15 +14,15 @@ export const handler = async (argv: Arguments) => { assert(name, 'Invalid Name.'); assert(id, 'Invalid Record ID.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); assert(chainId, 'Invalid Registry Chain ID.'); const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.setName({ crn: name, cid: id }, privateKey, fee); console.log(JSON.stringify(result, undefined, 2)); diff --git a/src/cmds/registry-cmds/record-cmds/get.ts b/src/cmds/registry-cmds/record-cmds/get.ts index 7a9cd0a..669ec70 100644 --- a/src/cmds/registry-cmds/record-cmds/get.ts +++ b/src/cmds/registry-cmds/record-cmds/get.ts @@ -12,8 +12,8 @@ export const handler = async (argv: Arguments) => { const { id, config } = argv; assert(id, 'Invalid Record ID.'); - const { services: { cns: cnsConfig } } = getConfig(config as string) - const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(config as string) + const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(chainId, 'Invalid Registry Chain ID.'); diff --git a/src/cmds/registry-cmds/record-cmds/list.ts b/src/cmds/registry-cmds/record-cmds/list.ts index a8731e7..014d0ae 100644 --- a/src/cmds/registry-cmds/record-cmds/list.ts +++ b/src/cmds/registry-cmds/record-cmds/list.ts @@ -25,8 +25,8 @@ export const builder = { } export const handler = async (argv: Arguments) => { - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, lnsConfig); const { type, name, bondId, all } = argv; assert(restEndpoint, 'Invalid Registry REST endpoint.'); diff --git a/src/cmds/registry-cmds/record-cmds/publish.ts b/src/cmds/registry-cmds/record-cmds/publish.ts index deb03a4..d0612a4 100644 --- a/src/cmds/registry-cmds/record-cmds/publish.ts +++ b/src/cmds/registry-cmds/record-cmds/publish.ts @@ -19,8 +19,8 @@ export const builder = { export const handler = async (argv: Arguments) => { const { txKey, filename, verbose, config } = argv; - const { services: { cns: cnsConfig } } = getConfig(config as string) - const { restEndpoint, gqlEndpoint, userKey, bondId, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(config as string) + const { restEndpoint, gqlEndpoint, userKey, bondId, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); @@ -37,7 +37,7 @@ export const handler = async (argv: Arguments) => { const { record } = await yaml.load(fs.readFileSync(file, 'utf-8')) as any; const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); const result = await registry.setRecord({ privateKey: userKey, record, bondId }, txKey as string, fee); console.log(verbose ? JSON.stringify(result, undefined, 2) : result.data); diff --git a/src/cmds/registry-cmds/status.ts b/src/cmds/registry-cmds/status.ts index c22a565..ac2e01a 100644 --- a/src/cmds/registry-cmds/status.ts +++ b/src/cmds/registry-cmds/status.ts @@ -9,8 +9,8 @@ export const command = 'status'; export const desc = 'Get Registry status.'; export const handler = async (argv: Arguments) => { - const { services: { cns } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cns); + const { services: { lns } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, lns); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(chainId, 'Invalid Registry Chain ID.'); diff --git a/src/cmds/registry-cmds/tokens-cmds/send.ts b/src/cmds/registry-cmds/tokens-cmds/send.ts index c19f293..5c49a32 100644 --- a/src/cmds/registry-cmds/tokens-cmds/send.ts +++ b/src/cmds/registry-cmds/tokens-cmds/send.ts @@ -26,8 +26,8 @@ export const handler = async (argv: Arguments) => { assert(denom, 'Invalid Type.'); assert(amount, 'Invalid Quantity.'); - const { services: { cns: cnsConfig } } = getConfig(argv.config as string) - const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig); + const { services: { lns: lnsConfig } } = getConfig(argv.config as string) + const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, lnsConfig); assert(restEndpoint, 'Invalid Registry REST endpoint.'); assert(gqlEndpoint, 'Invalid Registry GQL endpoint.'); assert(privateKey, 'Invalid Transaction Key.'); @@ -37,7 +37,7 @@ export const handler = async (argv: Arguments) => { const fromAddress = account.formattedCosmosAddress; const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const fee = getGasAndFees(argv, cnsConfig); + const fee = getGasAndFees(argv, lnsConfig); await registry.sendCoins({ denom, amount, destinationAddress }, privateKey, fee); const result = await registry.getAccounts([fromAddress, destinationAddress]); console.log(JSON.stringify(result, undefined, 2));