fix cmd outputs #33
@ -43,7 +43,6 @@ export const handler = async (argv: Arguments) => {
|
|||||||
const fee = getGasAndFees(argv, cnsConfig);
|
const fee = getGasAndFees(argv, cnsConfig);
|
||||||
|
|
||||||
const result = await registry.commitBid({ auctionId, commitHash }, privateKey, fee);
|
const result = await registry.commitBid({ auctionId, commitHash }, privateKey, fee);
|
||||||
console.log(JSON.stringify(result, undefined, 2));
|
const revealFile = `{"reveal_file":"${revealFilePath}"}`
|
||||||
|
console.log(argv.verbose ? JSON.stringify(result, undefined, 2)+ JSON.stringify(JSON.parse(revealFile)) : JSON.stringify(JSON.parse(revealFile)));
|
||||||
console.log(`\nReveal file: ${revealFilePath}`);
|
|
||||||
}
|
}
|
||||||
|
@ -28,5 +28,6 @@ export const handler = async (argv: Arguments) => {
|
|||||||
|
|
||||||
const reveal = fs.readFileSync(path.resolve(filePath));
|
const reveal = fs.readFileSync(path.resolve(filePath));
|
||||||
const result = await registry.revealBid({ auctionId, reveal: reveal.toString('hex') }, privateKey, fee);
|
const result = await registry.revealBid({ auctionId, reveal: reveal.toString('hex') }, privateKey, fee);
|
||||||
console.log(JSON.stringify(result, undefined, 2));
|
const success = `{"success":${result.code==0}}`
|
||||||
|
console.log(argv.verbose ? JSON.stringify(result, undefined, 2): JSON.stringify(JSON.parse(success)));
|
||||||
}
|
}
|
||||||
|
@ -24,5 +24,6 @@ export const handler = async (argv: Arguments) => {
|
|||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
const fee = getGasAndFees(argv, cnsConfig);
|
const fee = getGasAndFees(argv, cnsConfig);
|
||||||
const result = await registry.setAuthorityBond({ name, bondId }, privateKey, fee);
|
const result = await registry.setAuthorityBond({ name, bondId }, privateKey, fee);
|
||||||
console.log(JSON.stringify(result, undefined, 2));
|
const success = `{"success":${result.code==0}}`
|
||||||
|
console.log(argv.verbose ? JSON.stringify(result, undefined, 2): JSON.stringify(JSON.parse(success)));
|
||||||
}
|
}
|
||||||
|
@ -31,5 +31,6 @@ export const handler = async (argv: Arguments) => {
|
|||||||
const fee = getGasAndFees(argv, cnsConfig);
|
const fee = getGasAndFees(argv, cnsConfig);
|
||||||
const result = await registry.reserveAuthority({ name, owner }, privateKey, fee);
|
const result = await registry.reserveAuthority({ name, owner }, privateKey, fee);
|
||||||
|
|
||||||
console.log(JSON.stringify(result, undefined, 2));
|
const success = `{"success":${result.code==0}}`
|
||||||
|
console.log(argv.verbose ? JSON.stringify(result, undefined, 2): JSON.stringify(JSON.parse(success)));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user