question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
thecircleoflifefreecommented, Mar 17, 2020

Glad to see you are ok, thanks for replying back. Removed payable as per your suggestion and no further issues =)

0reactions
ricmoocommented, Mar 17, 2020

Awesome! I should add a note for this is the v4 docs too. 😃

Thanks! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

JSON Parsing error in Java: Unexpected character at position
I get an error on the JSONObject x line saying Unexpected character ( ) at position 0. BUT the thing is when I...
Read more >
json - Curl - JSON_PARSER_ERROR Unexpected character
getting the following error using curl with salesforce, I'm trying to update a record. Have I formatted this wrong or am I missing...
Read more >
Python SyntaxError: unexpected character after line
The “SyntaxError: unexpected character after line continuation character” error is raised when you add code after a line continuation character.
Read more >
Common CSV Template Error Messages and How to Fix Them
To fix this error, make sure your opening and closing tags match exactly. Failed to Parse file. Example Error Message. Failed to parse...
Read more >
SyntaxError: JSON.parse: unexpected character at line 1 colu
parse: unexpected character at line 1 column 1 of the JSON data OK <b>Notice</b>: Undefined index: email in <b>/home/getitsig/public_html/ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found