async function show(args, apis) {
  if (args.length !== 1) {
    console.log(
      'invalid number of args: should be 1, got {0}'.format(args.length)
    );
    return;
  }

  const contractKey = args[0];
  if (apis[contractKey] === undefined) {
    console.log("'{0}' contract does not exist".format(args[0]));
    return;
  }

  const contract = new apis[contractKey]['api'](
    apis[contractKey]['address'].toLowerCase()
  );
  let msg = '\n' + '[Method]'.padEnd(40) + '[Args]\n';

  apis[contractKey].api['abi']
    .filter(function(obj) {
      return obj.type === 'function';
    })
    .sort(function(a, b) {
      if (a.name < b.name) {
        return -1;
      }
      if (a.name > b.name) {
        return 1;
      }

      return 0;
    })
    .forEach(function(functionAbi) {
      msg =
        msg +
        '{0}[{1}]\n'.format(
          functionAbi.name.padEnd(40),
          getArgs(contract['methods'][functionAbi.name], functionAbi).join(', ')
        );
    });
  console.log(msg);
}
/**
 * Print all the api methods of the smart contract
 * @param {object} args is a list of command args
 * @param {object} apis has an api of smart contracts
 */
Print all the api methods of the smart contract
@param {object} args is a list of command args
@param {object} apis has an api of smart contracts
Print all the api methods of the smart contract @param { object } args is a list of command args @param { object } apis has an api of smart contracts
async function show(args, apis) {
  if (args.length !== 1) {
    console.log(
      'invalid number of args: should be 1, got {0}'.format(args.length)
    );
    return;
  }
  const contractKey = args[0];
  if (apis[contractKey] === undefined) {
    console.log("'{0}' contract does not exist".format(args[0]));
    return;
  }
  const contract = new apis[contractKey]['api'](
    apis[contractKey]['address'].toLowerCase()
  );
  let msg = '\n' + '[Method]'.padEnd(40) + '[Args]\n';
  apis[contractKey].api['abi']
    .filter(function(obj) {
      return obj.type === 'function';
    })
    .sort(function(a, b) {
      if (a.name < b.name) {
        return -1;
      }
      if (a.name > b.name) {
        return 1;
      }
      return 0;
    })
    .forEach(function(functionAbi) {
      msg =
        msg +
        '{0}[{1}]\n'.format(
          functionAbi.name.padEnd(40),
          getArgs(contract['methods'][functionAbi.name], functionAbi).join(', ')
        );
    });
  console.log(msg);
}
async function show ( args , apis ) { if ( args . length !== 1 ) { console . log ( 'invalid number of args: should be 1, got {0}' . format ( args . length ) ) ; return ; } const contractKey = args [ 0 ] ; if ( apis [ contractKey ] === undefined ) { console . log ( "'{0}' contract does not exist" . format ( args [ 0 ] ) ) ; return ; } const contract = new apis [ contractKey ] [ 'api' ] ( apis [ contractKey ] [ 'address' ] . toLowerCase ( ) ) ; let msg = '\n' + '[Method]' . padEnd ( 40 ) + '[Args]\n' ; apis [ contractKey ] . api [ 'abi' ] . filter ( function ( obj ) { return obj . type === 'function' ; } ) . sort ( function ( a , b ) { if ( a . name < b . name ) { return - 1 ; } if ( a . name > b . name ) { return 1 ; } return 0 ; } ) . forEach ( function ( functionAbi ) { msg = msg + '{0}[{1}]\n' . format ( functionAbi . name . padEnd ( 40 ) , getArgs ( contract [ 'methods' ] [ functionAbi . name ] , functionAbi ) . join ( ', ' ) ) ; } ) ; console . log ( msg ) ; }
Print all the api methods of the smart contract
 @param {object} args is a list of command args
 @param {object} apis has an api of smart contracts
Print all the api methods of the smart contract @param { object } args is a list of command args @param { object } apis has an api of smart contracts