I'm trying to write a script that mimics a contract value read flow that works on Etherscan
I have a bytes32 value 0x..........
of character length 48. On etherscan I can just paste this value into the box and read a return value from a function.
However, when passing it into an ethers contract instance like contract.function(bytes32Value)
, I'm getting this error in my script: incorrect data length
Not sure whether etherscan is doing something behind the scenes to clean up the data type, but not clear to me how to run this