Remove `stringToBytes32`
PatrickAlphaC opened this issue · 4 comments
We don't need to do this. We should just encode the jobid using ethers.
This is best practice anyways.
thanks for raising, makes sense
Hey @pappas999 @PatrickAlphaC ,
According to my understanding, in APIConsumer.sol stringToBytes32
function call in constructor needs to be removed and formatBytes32 should be used in deploy javascript file.
If my understanding is correct can I work on this issue?
Hi @shivam-agarwal-0 , thanks for much for volunteering to take on this PR. To action it successfully, you should change the variable in the solidity contract to be a bytes32 instead of a string, and then in any of the hardhat tasks or scripts that interact with the contract, you should use ethers.js library function like the one you specified to convert the string into a bytes32 to pass into the contract
Hey @pappas999 , I have opened a PR for this issue: #62
Please review and let me know if anything needs to be changed