Uploading hex string as bytes #2621
-
I'm currently trying to cast a hex string in forge to bytes and uploading it. But the string
In hardhat this works "magically". You can pass a hex string to a solidity function that accepts bytes, and it does the right thing. e.g. How do I successfully upload hex as bytes using forge? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
This is a Solidity question for future reference, so you should be able to find the answer to that in the Solidity docs. I think what you're looking for is |
Beta Was this translation helpful? Give feedback.
This is a Solidity question for future reference, so you should be able to find the answer to that in the Solidity docs.
I think what you're looking for is
hex""
, e.g.hex"aa"