src: sed s/CNS/Registry/g (error msgs)
This commit is contained in:
parent
9f9322d88e
commit
8d703e580b
@ -13,9 +13,9 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
||||||
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
if (!address && privateKey) {
|
if (!address && privateKey) {
|
||||||
address = new Account(Buffer.from(privateKey, 'hex')).getCosmosAddress();
|
address = new Account(Buffer.from(privateKey, 'hex')).getCosmosAddress();
|
||||||
|
@ -23,10 +23,10 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
||||||
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(privateKey, 'Invalid Transaction Key.');
|
assert(privateKey, 'Invalid Transaction Key.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const account = new Account(Buffer.from(privateKey, 'hex'));
|
const account = new Account(Buffer.from(privateKey, 'hex'));
|
||||||
const bidderAddress = account.formattedCosmosAddress;
|
const bidderAddress = account.formattedCosmosAddress;
|
||||||
|
@ -18,10 +18,10 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
||||||
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(privateKey, 'Invalid Transaction Key.');
|
assert(privateKey, 'Invalid Transaction Key.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
const fee = getGasAndFees(argv, cnsConfig);
|
const fee = getGasAndFees(argv, cnsConfig);
|
||||||
|
@ -14,9 +14,9 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(config as string)
|
const { services: { cns: cnsConfig } } = getConfig(config as string)
|
||||||
const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
const result = await registry.getAuctionsByIds([id as string]);
|
const result = await registry.getAuctionsByIds([id as string]);
|
||||||
|
@ -16,10 +16,10 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
||||||
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(privateKey, 'Invalid Transaction Key.');
|
assert(privateKey, 'Invalid Transaction Key.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
const fee = getGasAndFees(argv, cnsConfig);
|
const fee = getGasAndFees(argv, cnsConfig);
|
||||||
|
@ -22,10 +22,10 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
||||||
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(privateKey, 'Invalid Transaction Key.');
|
assert(privateKey, 'Invalid Transaction Key.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
const fee = getGasAndFees(argv, cnsConfig);
|
const fee = getGasAndFees(argv, cnsConfig);
|
||||||
|
@ -14,9 +14,9 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
||||||
const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
const result = await registry.lookupAuthorities([name], true);
|
const result = await registry.lookupAuthorities([name], true);
|
||||||
|
@ -22,10 +22,10 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
||||||
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(privateKey, 'Invalid Transaction Key.');
|
assert(privateKey, 'Invalid Transaction Key.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
const fee = getGasAndFees(argv, cnsConfig);
|
const fee = getGasAndFees(argv, cnsConfig);
|
||||||
|
@ -14,10 +14,10 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
||||||
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(privateKey, 'Invalid Transaction Key.');
|
assert(privateKey, 'Invalid Transaction Key.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
const fee = getGasAndFees(argv, cnsConfig);
|
const fee = getGasAndFees(argv, cnsConfig);
|
||||||
|
@ -27,10 +27,10 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(config as string)
|
const { services: { cns: cnsConfig } } = getConfig(config as string)
|
||||||
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(privateKey, 'Invalid Transaction Key.');
|
assert(privateKey, 'Invalid Transaction Key.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
const fee = getGasAndFees(argv, cnsConfig);
|
const fee = getGasAndFees(argv, cnsConfig);
|
||||||
|
@ -14,10 +14,10 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
||||||
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(privateKey, 'Invalid Transaction Key.');
|
assert(privateKey, 'Invalid Transaction Key.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
const fee = getGasAndFees(argv, cnsConfig);
|
const fee = getGasAndFees(argv, cnsConfig);
|
||||||
|
@ -14,9 +14,9 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(config as string)
|
const { services: { cns: cnsConfig } } = getConfig(config as string)
|
||||||
const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
|
|
||||||
|
@ -17,9 +17,9 @@ export const builder = {
|
|||||||
export const handler = async (argv: Arguments) => {
|
export const handler = async (argv: Arguments) => {
|
||||||
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
||||||
const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
|
|
||||||
|
@ -20,10 +20,10 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
||||||
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(privateKey, 'Invalid Transaction Key.');
|
assert(privateKey, 'Invalid Transaction Key.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
const fee = getGasAndFees(argv, cnsConfig);
|
const fee = getGasAndFees(argv, cnsConfig);
|
||||||
|
@ -25,10 +25,10 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
||||||
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(privateKey, 'Invalid Transaction Key.');
|
assert(privateKey, 'Invalid Transaction Key.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
const fee = getGasAndFees(argv, cnsConfig);
|
const fee = getGasAndFees(argv, cnsConfig);
|
||||||
|
@ -28,10 +28,10 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
||||||
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(privateKey, 'Invalid Transaction Key.');
|
assert(privateKey, 'Invalid Transaction Key.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
const fee = getGasAndFees(argv, cnsConfig);
|
const fee = getGasAndFees(argv, cnsConfig);
|
||||||
|
@ -28,10 +28,10 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
||||||
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(privateKey, 'Invalid Transaction Key.');
|
assert(privateKey, 'Invalid Transaction Key.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
const fee = getGasAndFees(argv, cnsConfig);
|
const fee = getGasAndFees(argv, cnsConfig);
|
||||||
|
@ -14,10 +14,10 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
||||||
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(privateKey, 'Invalid Transaction Key.');
|
assert(privateKey, 'Invalid Transaction Key.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
const fee = getGasAndFees(argv, cnsConfig);
|
const fee = getGasAndFees(argv, cnsConfig);
|
||||||
|
@ -20,9 +20,9 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
||||||
const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
const result = await registry.lookupNames([name], argv.history as boolean);
|
const result = await registry.lookupNames([name], argv.history as boolean);
|
||||||
|
@ -14,9 +14,9 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
||||||
const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
|
|
||||||
|
@ -16,10 +16,10 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
||||||
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(privateKey, 'Invalid Transaction Key.');
|
assert(privateKey, 'Invalid Transaction Key.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
const fee = getGasAndFees(argv, cnsConfig);
|
const fee = getGasAndFees(argv, cnsConfig);
|
||||||
|
@ -14,9 +14,9 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(config as string)
|
const { services: { cns: cnsConfig } } = getConfig(config as string)
|
||||||
const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
const result = await registry.getRecordsByIds([id as string]);
|
const result = await registry.getRecordsByIds([id as string]);
|
||||||
|
@ -29,9 +29,9 @@ export const handler = async (argv: Arguments) => {
|
|||||||
const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
const { type, name, bondId, all } = argv;
|
const { type, name, bondId, all } = argv;
|
||||||
|
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
|
|
||||||
|
@ -22,11 +22,11 @@ export const handler = async (argv: Arguments) => {
|
|||||||
const { services: { cns: cnsConfig } } = getConfig(config as string)
|
const { services: { cns: cnsConfig } } = getConfig(config as string)
|
||||||
const { restEndpoint, gqlEndpoint, userKey, bondId, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, userKey, bondId, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
|
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(userKey, 'Invalid User Key.');
|
assert(userKey, 'Invalid User Key.');
|
||||||
assert(bondId, 'Invalid Bond ID.');
|
assert(bondId, 'Invalid Bond ID.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
let file = null;
|
let file = null;
|
||||||
if (filename) {
|
if (filename) {
|
||||||
|
@ -6,14 +6,14 @@ import { getConfig, getConnectionInfo } from '../../util';
|
|||||||
|
|
||||||
export const command = 'status';
|
export const command = 'status';
|
||||||
|
|
||||||
export const desc = 'Get CNS status.';
|
export const desc = 'Get Registry status.';
|
||||||
|
|
||||||
export const handler = async (argv: Arguments) => {
|
export const handler = async (argv: Arguments) => {
|
||||||
const { services: { cns } } = getConfig(argv.config as string)
|
const { services: { cns } } = getConfig(argv.config as string)
|
||||||
const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cns);
|
const { restEndpoint, gqlEndpoint, chainId } = getConnectionInfo(argv, cns);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
|
|
||||||
|
@ -28,10 +28,10 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
const { services: { cns: cnsConfig } } = getConfig(argv.config as string)
|
||||||
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
const { restEndpoint, gqlEndpoint, privateKey, chainId } = getConnectionInfo(argv, cnsConfig);
|
||||||
assert(restEndpoint, 'Invalid CNS REST endpoint.');
|
assert(restEndpoint, 'Invalid Registry REST endpoint.');
|
||||||
assert(gqlEndpoint, 'Invalid CNS GQL endpoint.');
|
assert(gqlEndpoint, 'Invalid Registry GQL endpoint.');
|
||||||
assert(privateKey, 'Invalid Transaction Key.');
|
assert(privateKey, 'Invalid Transaction Key.');
|
||||||
assert(chainId, 'Invalid CNS Chain ID.');
|
assert(chainId, 'Invalid Registry Chain ID.');
|
||||||
|
|
||||||
const account = new Account(Buffer.from(privateKey, 'hex'));
|
const account = new Account(Buffer.from(privateKey, 'hex'));
|
||||||
const fromAddress = account.formattedCosmosAddress;
|
const fromAddress = account.formattedCosmosAddress;
|
||||||
|
@ -2,7 +2,7 @@ import yargs from 'yargs';
|
|||||||
|
|
||||||
export const command = 'cns';
|
export const command = 'cns';
|
||||||
|
|
||||||
export const desc = 'CNS tools';
|
export const desc = 'Laconic Registry Tools';
|
||||||
|
|
||||||
exports.builder = (yargs: yargs.Argv) => {
|
exports.builder = (yargs: yargs.Argv) => {
|
||||||
return yargs
|
return yargs
|
||||||
|
Loading…
Reference in New Issue
Block a user