Estoy tratando de obtener algunos registros de ropsten y aquí está mi código:
web3.eth.getPastLogs(
{
address: '0x3b873a919aa0512d5a0f09e6dcceaa4a6727fafe',
fromBlock: 3292448,
toBlock: 3292448,
},
).then(console.log).catch(e => console.log(e));
lo que da como resultado un error:
Error: Returned error: invalid argument 0: hex string without 0x prefix
¿Qué estoy haciendo mal?
Conviértalo a hexadecimal:
fromBlock: web3.utils.toHex(3292448)
toBlock: web3.utils.toHex(3292448)