ethereum-studio
ethereum-studio copied to clipboard
eth.getBlock fails with "Number can only safely store up to 53 bits"
Re-opening the issue here (from: https://github.com/ethereum/web3.js/issues/3512) as it was suggested that this might be a problem with the custom EVM.
Expected behavior
Get the block.
Actual behavior
Error "Number can only safely store up to 53 bits"
Example code
this.web3.eth.getBlock(number, function(error, result) {
if (error) {
console.log(error);
return;
}
console.log(result.timestamp);
});
Ethereum Studio example: https://studio.ethereum.org/5eb924ed26b4730012351a47?openFile=app/app.js Lines (133-145)
Steps to reproduce the behavior
- Load the Ethereum Studio example
- Deploy the contract
- See the error in console log
Environment
Javascript with web3.js version 1.2.7
Hi @MaxXor !
Lets use take a look as they have pointed out correctly, might be an issue with the custom EVM Ethereum Studio implements.
The patch from @dvcrn seems to fix it: https://github.com/dvcrn/web3.js/commit/b868c5fece70fba6d34b577ef59f3fa3159390ad