FormatContractArguments({abi, methodName, args}) {
    const method = abi.find(func => {
      // Constructor has type=constructor but no name
      return func.name === methodName || func.type === methodName;
    });

    if(method === undefined) { throw Error("Unknown method: " + methodName); }

    // Format each argument
    return args.map((arg, i) => this.FormatContractArgument({type: method.inputs[i].type, value: arg}));
  }
// Apply any necessary formatting to contract arguments based on the ABI spec
Apply any necessary formatting to contract arguments based on the ABI spec
Apply any necessary formatting to contract arguments based on the ABI spec
FormatContractArguments({abi, methodName, args}) {
    const method = abi.find(func => {
      return func.name === methodName || func.type === methodName;
    });
    if(method === undefined) { throw Error("Unknown method: " + methodName); }
    return args.map((arg, i) => this.FormatContractArgument({type: method.inputs[i].type, value: arg}));
  }
FormatContractArguments ( { abi , methodName , args } ) { const method = abi . find ( func => { return func . name === methodName || func . type === methodName ; } ) ; if ( method === undefined ) { throw Error ( "Unknown method: " + methodName ) ; } return args . map ( ( arg , i ) => this . FormatContractArgument ( { type : method . inputs [ i ] . type , value : arg } ) ) ; }
Apply any necessary formatting to contract arguments based on the ABI spec
Apply any necessary formatting to contract arguments based on the ABI spec
// Constructor has type=constructor but no name // Format each argument