I’m not super familiar with Ruby or Rails, but I basically need to replicate this Javascript that uses ethersjs and call it from a Rails 6 controller. Anyone have any ideas how to achieve this? I’ve tried several different solutions but none would produce the same result.
function hashToken(tokenId, account) { return Buffer.from(ethers.utils.solidityKeccak256(['uint256', 'address'], [tokenId, account]).slice(2), 'hex') }