-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Contract deployment doesn't support libraries #3805
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment. |
I've came accross a similar issue. My steps:
As @boukestam mentioned, this is because of 'foreign' characters in the bytecode. Currently, I am unable to deploy my contract containing a link to my library... Is there any update to this issue? UPDATE: Reading this issue it seems like this is still part of the hashed Library-Name, indicating that the linking did not work as expected. |
Hi there, wanting to know if this is still an issue for you? If so, could provide a test repository for this? |
I also have this issue when using with a library. If I move a function from library to inner contract, then it compiles successfully. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment. |
While trying to deploy a smart contract we got the following error
The data field must be HEX encoded data.
After a lot of debugging I found out that this is caused because the isHex function in utils.js only supports characters 0-9 and a-f.
But when using a linked library solidity includes this in the outputted JSON
And adds dollar signs and underscores in the bytecode to indicate the location of the library

This is according to the solidity github found here ethereum/solidity#635
How can we deploy this contract? We couldn't find any way to change the compiler settings to not include these characters
The text was updated successfully, but these errors were encountered: