Skip to content

Error: unexpected character "_" at position xx in " address payable _add" #759

@thecircleoflifefree

Description

@thecircleoflifefree

My const abi includes among others, this signature which it complaints about. If I remove it no error received at the console.log.

function withdraw(uint256 _cD, address payable _add, uint8 _abc) public"

The abi is used in the new ethers.Contract()

From your abi_coder(I dont recall exactly if that was the name of the module) I tried fidgetting with variables below as it appears this is the culprit behind the complaint (educated assumption):

let paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);
let paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);
let paramTypeArray = new RegExp(/^(.*)\[([0-9]*)\]$/);

but did not reach a particular conclusion.

Am I doing something wrong? What approach should I take to troubleshoot this?

Best Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionQuestions, feedback and general information.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions