Hot answers tagged

2

Since solidity 0.5 keccak256 is expecting bytes as input and you are passing an uint. You can use abi.encodePacked to convert an arbitrary input to bytes. keccak256(abi.encodePacked( (rw() / (10**20) ) % (10**12) ) )


1

I'm not the strongest player in this dialect, but this looks familier: await instance.purchaseTokens.call('12'); Try adding transaction arguments (gas, gasPrice, value) like this: await instance.purchaseTokens.call({value: <amount>}); call is probably wrong, so: `await instance.purchaseTokens({value: }); Hope it helps. p.s. If there are ...


Only top voted, non community-wiki answers of a minimum length are eligible